浏览代码

Corrected issue with VS

pull/180/head
raysan5 8 年前
父节点
当前提交
ed387d00aa
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      src/text.c

+ 3
- 1
src/text.c 查看文件

@ -859,7 +859,7 @@ static SpriteFont LoadTTF(const char *fileName, int fontSize, int firstChar, int
unsigned char *ttfBuffer = (unsigned char *)malloc(1 << 25); unsigned char *ttfBuffer = (unsigned char *)malloc(1 << 25);
unsigned char *dataBitmap = (unsigned char *)malloc(FONT_TEXTURE_WIDTH*FONT_TEXTURE_HEIGHT*sizeof(unsigned char)); // One channel bitmap returned! unsigned char *dataBitmap = (unsigned char *)malloc(FONT_TEXTURE_WIDTH*FONT_TEXTURE_HEIGHT*sizeof(unsigned char)); // One channel bitmap returned!
stbtt_bakedchar n">charData[numChars];
stbtt_bakedchar o">*charData = (stbtt_bakedchar *)malloc(sizeof(stbtt_bakedchar)*numChars);
SpriteFont font = { 0 }; SpriteFont font = { 0 };
@ -922,6 +922,8 @@ static SpriteFont LoadTTF(const char *fileName, int fontSize, int firstChar, int
font.charOffsets[i] = (Vector2){ charData[i].xoff, charData[i].yoff }; font.charOffsets[i] = (Vector2){ charData[i].xoff, charData[i].yoff };
font.charAdvanceX[i] = (int)charData[i].xadvance; font.charAdvanceX[i] = (int)charData[i].xadvance;
} }
free(charData);
return font; return font;
} }

正在加载...
取消
保存