Lines 63-68
Link Here
|
63 |
fread(&VGLTextFont->Height, 1 , 1, fd); |
63 |
fread(&VGLTextFont->Height, 1 , 1, fd); |
64 |
VGLTextFont->BitmapArray = |
64 |
VGLTextFont->BitmapArray = |
65 |
(byte*)malloc(256*((VGLTextFont->Width + 7)/8)*VGLTextFont->Height); |
65 |
(byte*)malloc(256*((VGLTextFont->Width + 7)/8)*VGLTextFont->Height); |
|
|
66 |
if (VGLTextFont->BitmapArray == NULL) { |
67 |
free(VGLTextFont); |
68 |
VGLTextFont = NULL; |
69 |
fclose(fd); |
70 |
return(1); |
71 |
} |
66 |
fread(VGLTextFont->BitmapArray, 1, |
72 |
fread(VGLTextFont->BitmapArray, 1, |
67 |
(256*VGLTextFont->Width* VGLTextFont->Height), fd); |
73 |
(256*VGLTextFont->Width* VGLTextFont->Height), fd); |
68 |
fclose(fd); |
74 |
fclose(fd); |
Lines 122-128
Link Here
|
122 |
VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, |
128 |
VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, |
123 |
byte fgcol, byte bgcol, int fill, int dir) |
129 |
byte fgcol, byte bgcol, int fill, int dir) |
124 |
{ |
130 |
{ |
125 |
int pos; |
131 |
size_t pos; |
126 |
|
132 |
|
127 |
for (pos=0; pos<strlen(str); pos++) { |
133 |
for (pos=0; pos<strlen(str); pos++) { |
128 |
switch (dir) { |
134 |
switch (dir) { |