Fixed compile error without opengl
This commit is contained in:
parent
c2644e512c
commit
8c6dfae3f7
1 changed files with 4 additions and 0 deletions
|
@ -110,7 +110,9 @@ static void AddIcon(const char* ident, const char* tileset,
|
||||||
iconfile = malloc(sizeof(IconFile));
|
iconfile = malloc(sizeof(IconFile));
|
||||||
iconfile->FileName = strdup(file);
|
iconfile->FileName = strdup(file);
|
||||||
iconfile->Sprite = NULL;
|
iconfile->Sprite = NULL;
|
||||||
|
#ifdef USE_OPENGL
|
||||||
memset(iconfile->PlayerColorSprite, 0, sizeof(iconfile->PlayerColorSprite));
|
memset(iconfile->PlayerColorSprite, 0, sizeof(iconfile->PlayerColorSprite));
|
||||||
|
#endif
|
||||||
*(IconFile**)hash_add(IconFileHash, iconfile->FileName) = iconfile;
|
*(IconFile**)hash_add(IconFileHash, iconfile->FileName) = iconfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +212,9 @@ void LoadIcons(void)
|
||||||
icon->File->Sprite = LoadSprite(file, icon->Width, icon->Height);
|
icon->File->Sprite = LoadSprite(file, icon->Width, icon->Height);
|
||||||
}
|
}
|
||||||
icon->Sprite = icon->File->Sprite;
|
icon->Sprite = icon->File->Sprite;
|
||||||
|
#ifdef USE_OPENGL
|
||||||
icon->PlayerColorSprite = icon->File->PlayerColorSprite;
|
icon->PlayerColorSprite = icon->File->PlayerColorSprite;
|
||||||
|
#endif
|
||||||
if (icon->Index >= (unsigned)icon->Sprite->NumFrames) {
|
if (icon->Index >= (unsigned)icon->Sprite->NumFrames) {
|
||||||
DebugPrint("Invalid icon index: %s - %d\n" _C_
|
DebugPrint("Invalid icon index: %s - %d\n" _C_
|
||||||
icon->Ident _C_ icon->Index);
|
icon->Ident _C_ icon->Index);
|
||||||
|
|
Loading…
Add table
Reference in a new issue