Move/rename gfx start/end vars

This commit is contained in:
GriffinR
2020-01-17 18:34:37 -05:00
committed by huderlem
parent aa631825fc
commit a40f054900
3 changed files with 27 additions and 25 deletions

View File

@@ -1861,27 +1861,30 @@ const struct EventObjectGraphicsInfo *GetEventObjectGraphicsInfo(u8 graphicsId)
{
u8 bard;
if (graphicsId >= SPRITE_VAR)
if (graphicsId >= OBJ_EVENT_GFX_VARS)
{
graphicsId = VarGetEventObjectGraphicsId(graphicsId - SPRITE_VAR);
graphicsId = VarGetEventObjectGraphicsId(graphicsId - OBJ_EVENT_GFX_VARS);
}
if (graphicsId == EVENT_OBJ_GFX_BARD)
{
bard = GetCurrentMauvilleOldMan();
return gMauvilleOldManGraphicsInfoPointers[bard];
}
if (graphicsId >= NUM_OBJECT_GRAPHICS_INFO)
if (graphicsId >= NUM_OBJ_EVENT_GFX)
{
graphicsId = EVENT_OBJ_GFX_NINJA_BOY;
}
return gEventObjectGraphicsInfoPointers[graphicsId];
}
static void SetEventObjectDynamicGraphicsId(struct EventObject *eventObject)
{
if (eventObject->graphicsId >= SPRITE_VAR)
if (eventObject->graphicsId >= OBJ_EVENT_GFX_VARS)
{
eventObject->graphicsId = VarGetEventObjectGraphicsId(eventObject->graphicsId - SPRITE_VAR);
eventObject->graphicsId = VarGetEventObjectGraphicsId(eventObject->graphicsId - OBJ_EVENT_GFX_VARS);
}
}