Use event object constants
This commit is contained in:
@@ -1337,13 +1337,13 @@ void SetPlayerAvatarStateMask(u8 flags)
|
||||
gPlayerAvatar.flags |= flags;
|
||||
}
|
||||
|
||||
static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 a, u8 gender)
|
||||
static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 graphicsId, u8 gender)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (gUnknown_0849750C[gender][i][0] == a)
|
||||
if (gUnknown_0849750C[gender][i][0] == graphicsId)
|
||||
return gUnknown_0849750C[gender][i][1];
|
||||
}
|
||||
return 1;
|
||||
@@ -1362,9 +1362,9 @@ u8 GetPlayerAvatarGraphicsIdByCurrentState(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetPlayerAvatarExtraStateTransition(u8 a, u8 b)
|
||||
void SetPlayerAvatarExtraStateTransition(u8 graphicsId, u8 b)
|
||||
{
|
||||
u8 unk = GetPlayerAvatarStateTransitionByGraphicsId(a, gPlayerAvatar.gender);
|
||||
u8 unk = GetPlayerAvatarStateTransitionByGraphicsId(graphicsId, gPlayerAvatar.gender);
|
||||
|
||||
gPlayerAvatar.unk1 |= unk | b;
|
||||
DoPlayerAvatarTransition();
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
#include "task.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/vars.h"
|
||||
|
||||
@@ -311,7 +312,7 @@ void Task_HandlePorthole(u8 taskId)
|
||||
|
||||
void sub_80FB6EC(void)
|
||||
{
|
||||
u8 spriteId = AddPseudoEventObject(0x8C, SpriteCallbackDummy, 112, 80, 0);
|
||||
u8 spriteId = AddPseudoEventObject(EVENT_OBJ_GFX_SS_TIDAL, SpriteCallbackDummy, 112, 80, 0);
|
||||
|
||||
gSprites[spriteId].coordOffsetEnabled = FALSE;
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#include "global.h"
|
||||
#include "constants/flags.h"
|
||||
#include "constants/event_object_movement_constants.h"
|
||||
#include "event_data.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "script.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fieldmap.h"
|
||||
#include "union_room.h"
|
||||
#include "script.h"
|
||||
#include "task.h"
|
||||
#include "union_room.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/event_object_movement_constants.h"
|
||||
#include "constants/flags.h"
|
||||
|
||||
EWRAM_DATA struct UnkStruct_8019BA8 * gUnknown_02022C64 = NULL;
|
||||
EWRAM_DATA u32 gUnknown_02022C68 = 0;
|
||||
@@ -390,7 +391,7 @@ void sub_8019E70(u8 * sp8, s32 r9)
|
||||
for (r7 = 0; r7 < 5; r7++)
|
||||
{
|
||||
s32 r5 = 5 * r9 + r7;
|
||||
sp8[r5] = sprite_new(0x41, r5 - 0x38, gUnknown_082F0740[r9][0] + gUnknown_082F0760[r7][0], gUnknown_082F0740[r9][1] + gUnknown_082F0760[r7][1], 3, 1);
|
||||
sp8[r5] = sprite_new(EVENT_OBJ_GFX_MAN_4, r5 - 0x38, gUnknown_082F0740[r9][0] + gUnknown_082F0760[r7][0], gUnknown_082F0740[r9][1] + gUnknown_082F0760[r7][1], 3, 1);
|
||||
sub_8097C44(r5 - 0x38, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user