Fix Surface_Ids crash

This commit is contained in:
Clownacy 2019-02-18 20:40:51 +00:00
parent e5caff593c
commit 809fb95b26
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ void InitNpChar()
void SetUniqueParameter(NPCHAR *npc)
{
int code = npc->code_char;
npc->surf = gNpcTable[code].surf;
npc->surf = (Surface_Ids)gNpcTable[code].surf;
npc->hit_voice = gNpcTable[code].hit_voice;
npc->destroy_voice = gNpcTable[code].destroy_voice;
npc->damage = gNpcTable[code].damage;
@ -348,7 +348,7 @@ void PutNpChar(int fx, int fy)
(gNPC[n].x - side) / 0x200 - fx / 0x200 + a,
(gNPC[n].y - gNPC[n].view.top) / 0x200 - fy / 0x200,
&gNPC[n].rect,
gNPC[n].surf);
(Surface_Ids)gNPC[n].surf);
}
}
}

View file

@ -15,7 +15,7 @@ struct NPC_TABLE
{
uint16_t bits;
uint16_t life;
Surface_Ids surf;
uint8_t surf;
uint8_t hit_voice;
uint8_t destroy_voice;
uint8_t size;