Best wishes, All !
I have wrote function to write strings directly to vudeo memory. There it
is...
typedef unsigned char disp [25][80][2]; // Трехмерный массив для видеопмт.
video = (disp far*) 0xB000000;
disp far* video; // Указатель на начало области видеопамяти
void write (int x, int y, int color, int bkcolor, char * str)
{
int i=0;
while (str[i] != 0)
{
(*video)[y][x+i][0] = str[i];
(*video)[y][x+i][1] = color+16*bkcolor;
i++;
}
};
/* ----- */
This function works correctly.... But... I have wanted to make same function
to write float numbers too... I have created anoter function....
void write_d(short x, short y, short color, short bk_color, double what)
{
char z[10];
gcvt(what,10,z);
write(x,y,color,bk_color,z);
};
All looks to be nice, but this function makes my program unstable, so, it
will write string, but at the and of program OS/2 shows that "This program
cannot continue..."
What happenings ?
PS. Sorry for my dirty english :(
Hiding in the grave
Anton S. Maximenko
--- GoldED/2 2.50+
---------------
* Origin: Night is so beautiful (we need her as we need Day) (2:5020/535.29)
|