diff --git a/src/NpChar.cpp b/src/NpChar.cpp index a34c7835..85a08003 100644 --- a/src/NpChar.cpp +++ b/src/NpChar.cpp @@ -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); } } } diff --git a/src/NpcTbl.h b/src/NpcTbl.h index 8a41c7d5..19e43a8f 100644 --- a/src/NpcTbl.h +++ b/src/NpcTbl.h @@ -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;