Fixed most functions that take/return graphicsIds to accept u16s.
This commit is contained in:
parent
72e723df65
commit
5d5d97b46a
@ -54,7 +54,7 @@ void CallBattleTowerFunc(void);
|
||||
u16 GetRandomScaledFrontierTrainerId(u8 challengeNum, u8 battleNum);
|
||||
void SetBattleFacilityTrainerGfxId(u16 trainerId, u8 tempVarId);
|
||||
void SetEReaderTrainerGfxId(void);
|
||||
u8 GetBattleFacilityTrainerGfxId(u16 trainerId);
|
||||
u16 GetBattleFacilityTrainerGfxId(u16 trainerId);
|
||||
void PutNewBattleTowerRecord(struct EmeraldBattleTowerRecord *newRecordEm);
|
||||
u8 GetFrontierTrainerFrontSpriteId(u16 trainerId);
|
||||
u8 GetFrontierOpponentClass(u16 trainerId);
|
||||
@ -81,7 +81,7 @@ void GetBattleTowerTrainerLanguage(u8 *dst, u16 trainerId);
|
||||
u8 SetFacilityPtrsGetLevel(void);
|
||||
u8 GetFrontierEnemyMonLevel(u8 lvlMode);
|
||||
s32 GetHighestLevelInPlayerParty(void);
|
||||
u8 FacilityClassToGraphicsId(u8 facilityClass);
|
||||
u16 FacilityClassToGraphicsId(u8 facilityClass);
|
||||
bool32 ValidateBattleTowerRecord(u8 recordId); // unused
|
||||
void TrySetLinkBattleTowerEnemyPartyLevel(void);
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ bool32 CanResetRTC(void);
|
||||
u16 *GetVarPointer(u16 id);
|
||||
u16 VarGet(u16 id);
|
||||
bool8 VarSet(u16 id, u16 value);
|
||||
u8 VarGetObjectEventGraphicsId(u8 id);
|
||||
u16 VarGetObjectEventGraphicsId(u8 id);
|
||||
u8 *GetFlagPointer(u16 id);
|
||||
u8 FlagSet(u16 id);
|
||||
u8 FlagClear(u16 id);
|
||||
|
||||
@ -132,15 +132,15 @@ u8 GetDirectionToFace(s16, s16, s16, s16);
|
||||
void TrySpawnObjectEvents(s16 cameraX, s16 cameraY);
|
||||
u8 CreateObjectGraphicsSprite(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority);
|
||||
u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 elevation);
|
||||
u8 SpawnSpecialObjectEventParameterized(u16 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 elevation);
|
||||
u8 SpawnSpecialObjectEvent(struct ObjectEventTemplate *);
|
||||
void SetSpritePosToMapCoords(s16 mapX, s16 mapY, s16 *destX, s16 *destY);
|
||||
void CameraObjectReset1(void);
|
||||
u8 UpdateSpritePaletteByTemplate(const struct SpriteTemplate *, struct Sprite *);
|
||||
void ObjectEventSetGraphicsId(struct ObjectEvent *, u8 graphicsId);
|
||||
void ObjectEventSetGraphicsId(struct ObjectEvent *, u16 graphicsId);
|
||||
void ObjectEventTurn(struct ObjectEvent *, u8 direction);
|
||||
void ObjectEventTurnByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 direction);
|
||||
const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId);
|
||||
const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u16 graphicsId);
|
||||
void SetObjectInvisibility(u8 localId, u8 mapNum, u8 mapGroup, bool8 invisible);
|
||||
void FreeAndReserveObjectSpritePalettes(void);
|
||||
u8 LoadObjectEventPalette(u16 paletteTag);
|
||||
@ -462,9 +462,9 @@ u8 MovementType_Invisible_Step0(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_Invisible_Step1(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_Invisible_Step2(struct ObjectEvent *, struct Sprite *);
|
||||
|
||||
u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 elevation, u8 direction);
|
||||
u8 CreateVirtualObject(u16 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 elevation, u8 direction);
|
||||
void TurnVirtualObject(u8 virtualObjId, u8 direction);
|
||||
void SetVirtualObjectGraphics(u8 virtualObjId, u8 graphicsId);
|
||||
void SetVirtualObjectGraphics(u8 virtualObjId, u16 graphicsId);
|
||||
void SetVirtualObjectInvisibility(u8 virtualObjId, bool32 invisible);
|
||||
bool32 IsVirtualObjectInvisible(u8 virtualObjId);
|
||||
void SetVirtualObjectSpriteAnim(u8 virtualObjId, u8 animNum);
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
void PlayerStep(u8 direction, u16 newKeys, u16 heldKeys);
|
||||
void ClearPlayerAvatarInfo(void);
|
||||
void SetPlayerAvatarExtraStateTransition(u8, u8);
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u8);
|
||||
void SetPlayerAvatarExtraStateTransition(u16, u8);
|
||||
u16 GetPlayerAvatarGenderByGraphicsId(u16);
|
||||
bool8 TestPlayerAvatarFlags(u8);
|
||||
u8 GetPlayerAvatarSpriteId(void);
|
||||
void PlayerGetDestCoords(s16 *, s16 *);
|
||||
@ -38,11 +38,11 @@ void PlayerFreeze(void);
|
||||
void StopPlayerAvatar(void);
|
||||
void SetSpinStartFacingDir(u8);
|
||||
void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr);
|
||||
u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender);
|
||||
u16 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender);
|
||||
void SetPlayerAvatarFieldMove(void);
|
||||
u8 GetPlayerAvatarGraphicsIdByCurrentState(void);
|
||||
u16 GetPlayerAvatarGraphicsIdByCurrentState(void);
|
||||
void SetPlayerAvatarStateMask(u8 flags);
|
||||
u8 GetPlayerAvatarGraphicsIdByStateId(u8 state);
|
||||
u16 GetPlayerAvatarGraphicsIdByStateId(u8 state);
|
||||
u8 GetJumpSpecialMovementAction(u32);
|
||||
bool8 PartyHasMonWithSurf(void);
|
||||
bool8 IsPlayerFacingSurfableFishableWater(void);
|
||||
@ -50,8 +50,8 @@ bool8 IsPlayerSurfingNorth(void);
|
||||
void SetPlayerAvatarWatering(u8 direction);
|
||||
u8 GetPlayerAvatarFlags(void);
|
||||
void UpdatePlayerAvatarTransitionState(void);
|
||||
u8 GetFRLGAvatarGraphicsIdByGender(u8);
|
||||
u8 GetRSAvatarGraphicsIdByGender(u8);
|
||||
u16 GetFRLGAvatarGraphicsIdByGender(u8);
|
||||
u16 GetRSAvatarGraphicsIdByGender(u8);
|
||||
void PlayerWheelieInPlace(u8 direction);
|
||||
void PlayerWheelieMove(u8 direction);
|
||||
void PlayerPopWheelieWhileMoving(u8 direction);
|
||||
|
||||
@ -45,7 +45,7 @@ bool8 SetUpFieldMove_Dig(void);
|
||||
bool8 FldEff_UseDig(void);
|
||||
|
||||
// rock smash
|
||||
bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId);
|
||||
bool8 CheckObjectGraphicsInFrontOfPlayer(u16 graphicsId);
|
||||
u8 CreateFieldMoveTask(void);
|
||||
bool8 SetUpFieldMove_RockSmash(void);
|
||||
bool8 FldEff_UseRockSmash(void);
|
||||
|
||||
@ -1256,11 +1256,11 @@ void SetEReaderTrainerGfxId(void)
|
||||
SetBattleFacilityTrainerGfxId(TRAINER_EREADER, 0);
|
||||
}
|
||||
|
||||
u8 GetBattleFacilityTrainerGfxId(u16 trainerId)
|
||||
u16 GetBattleFacilityTrainerGfxId(u16 trainerId)
|
||||
{
|
||||
u32 i;
|
||||
u8 facilityClass;
|
||||
u8 trainerObjectGfxId;
|
||||
u16 trainerObjectGfxId;
|
||||
|
||||
SetFacilityPtrsGetLevel();
|
||||
if (trainerId == TRAINER_EREADER)
|
||||
@ -3466,7 +3466,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount)
|
||||
}
|
||||
}
|
||||
|
||||
u8 FacilityClassToGraphicsId(u8 facilityClass)
|
||||
u16 FacilityClassToGraphicsId(u8 facilityClass)
|
||||
{
|
||||
u8 trainerObjectGfxId;
|
||||
u8 i;
|
||||
|
||||
@ -801,12 +801,12 @@ static void CreateCableCarSprites(void)
|
||||
u8 spriteId;
|
||||
u8 i;
|
||||
|
||||
u8 playerGraphicsIds[2] = {
|
||||
u16 playerGraphicsIds[2] = {
|
||||
[MALE] = OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL,
|
||||
[FEMALE] = OBJ_EVENT_GFX_RIVAL_MAY_NORMAL
|
||||
};
|
||||
u16 rval = Random();
|
||||
u8 hikerGraphicsIds[4] = {
|
||||
u16 hikerGraphicsIds[4] = {
|
||||
OBJ_EVENT_GFX_HIKER,
|
||||
OBJ_EVENT_GFX_CAMPER,
|
||||
OBJ_EVENT_GFX_PICNICKER,
|
||||
@ -1069,4 +1069,3 @@ static void InitGroundTilemapData(bool8 goingDown)
|
||||
|
||||
sCableCar->groundTimer = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +193,7 @@ bool8 VarSet(u16 id, u16 value)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u8 VarGetObjectEventGraphicsId(u8 id)
|
||||
u16 VarGetObjectEventGraphicsId(u8 id)
|
||||
{
|
||||
return VarGet(VAR_OBJ_GFX_ID_0 + id);
|
||||
}
|
||||
|
||||
@ -1547,7 +1547,7 @@ u8 SpawnSpecialObjectEvent(struct ObjectEventTemplate *objectEventTemplate)
|
||||
return TrySpawnObjectEventTemplate(objectEventTemplate, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY);
|
||||
}
|
||||
|
||||
u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 elevation)
|
||||
u8 SpawnSpecialObjectEventParameterized(u16 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 elevation)
|
||||
{
|
||||
struct ObjectEventTemplate objectEventTemplate;
|
||||
|
||||
@ -1657,7 +1657,7 @@ u8 CreateObjectGraphicsSprite(u16 graphicsId, void (*callback)(struct Sprite *),
|
||||
// A unique id is given as an argument and stored in the sprite data to allow referring back to the same virtual object.
|
||||
// They can be turned (and, in the case of the Union Room, animated teleporting in and out) but do not have movement types
|
||||
// or any of the other data normally associated with object events.
|
||||
u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 elevation, u8 direction)
|
||||
u8 CreateVirtualObject(u16 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 elevation, u8 direction)
|
||||
{
|
||||
u8 spriteId;
|
||||
struct Sprite *sprite;
|
||||
@ -1846,7 +1846,7 @@ void UpdateFollowingPokemon(void) { // Update following pokemon if any
|
||||
bool8 shiny;
|
||||
u8 form;
|
||||
// Avoid spawning large (64x64) follower pokemon inside buildings
|
||||
if (GetFollowerInfo(&species, &form, &shiny) && !(gMapHeader.mapType == MAP_TYPE_INDOOR && SpeciesToGraphicsInfo(species, 0)->height == 64) && !FlagGet(FLAG_TEMP_HIDE_FOLLOWER) && FALSE) { // TODO
|
||||
if (GetFollowerInfo(&species, &form, &shiny) && !(gMapHeader.mapType == MAP_TYPE_INDOOR && SpeciesToGraphicsInfo(species, 0)->height == 64) && !FlagGet(FLAG_TEMP_HIDE_FOLLOWER)) {
|
||||
if (objEvent == NULL) { // Spawn follower
|
||||
struct ObjectEventTemplate template = {
|
||||
.localId = OBJ_EVENT_ID_FOLLOWER,
|
||||
@ -2357,14 +2357,14 @@ static void ObjectEventSetGraphics(struct ObjectEvent *objectEvent, const struct
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectEventSetGraphicsId(struct ObjectEvent *objectEvent, u8 graphicsId)
|
||||
void ObjectEventSetGraphicsId(struct ObjectEvent *objectEvent, u16 graphicsId)
|
||||
{
|
||||
objectEvent->graphicsId = graphicsId;
|
||||
ObjectEventSetGraphics(objectEvent, GetObjectEventGraphicsInfo(graphicsId));
|
||||
objectEvent->graphicsId = graphicsId;
|
||||
}
|
||||
|
||||
void ObjectEventSetGraphicsIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 graphicsId)
|
||||
void ObjectEventSetGraphicsIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u16 graphicsId)
|
||||
{
|
||||
u8 objectEventId;
|
||||
|
||||
@ -2396,7 +2396,7 @@ void PlayerObjectTurn(struct PlayerAvatar *playerAvatar, u8 direction)
|
||||
}
|
||||
|
||||
static void SetBerryTreeGraphics(struct ObjectEvent *objectEvent, u8 berryId, u8 berryStage) {
|
||||
const u8 graphicsId = gBerryTreeObjectEventGraphicsIdTablePointers[berryId][berryStage];
|
||||
const u16 graphicsId = gBerryTreeObjectEventGraphicsIdTablePointers[berryId][berryStage];
|
||||
const struct ObjectEventGraphicsInfo *graphicsInfo = GetObjectEventGraphicsInfo(graphicsId);
|
||||
struct Sprite *sprite = &gSprites[objectEvent->spriteId];
|
||||
UpdateSpritePalette(&sObjectEventSpritePalettes[gBerryTreePaletteSlotTablePointers[berryId][berryStage]-2], sprite);
|
||||
@ -2440,7 +2440,7 @@ static void get_berry_tree_graphics(struct ObjectEvent *objectEvent, struct Spri
|
||||
}
|
||||
}
|
||||
|
||||
const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId)
|
||||
const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u16 graphicsId)
|
||||
{
|
||||
u8 bard;
|
||||
|
||||
@ -9751,7 +9751,7 @@ void TurnVirtualObject(u8 virtualObjId, u8 direction)
|
||||
StartSpriteAnim(&gSprites[spriteId], GetFaceDirectionAnimNum(direction));
|
||||
}
|
||||
|
||||
void SetVirtualObjectGraphics(u8 virtualObjId, u8 graphicsId)
|
||||
void SetVirtualObjectGraphics(u8 virtualObjId, u16 graphicsId)
|
||||
{
|
||||
int spriteId = GetVirtualObjectSpriteId(virtualObjId);
|
||||
|
||||
|
||||
@ -1212,50 +1212,32 @@ void StopPlayerAvatar(void)
|
||||
}
|
||||
}
|
||||
|
||||
u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender)
|
||||
u16 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender)
|
||||
{
|
||||
return sRivalAvatarGfxIds[state][gender];
|
||||
}
|
||||
|
||||
u8 GetPlayerAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender)
|
||||
u16 GetPlayerAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender)
|
||||
{
|
||||
return sPlayerAvatarGfxIds[state][gender];
|
||||
}
|
||||
|
||||
u8 GetFRLGAvatarGraphicsIdByGender(u8 gender)
|
||||
u16 GetFRLGAvatarGraphicsIdByGender(u8 gender)
|
||||
{
|
||||
return sFRLGAvatarGfxIds[gender];
|
||||
}
|
||||
|
||||
u8 GetRSAvatarGraphicsIdByGender(u8 gender)
|
||||
u16 GetRSAvatarGraphicsIdByGender(u8 gender)
|
||||
{
|
||||
return sRSAvatarGfxIds[gender];
|
||||
}
|
||||
|
||||
u8 GetPlayerAvatarGraphicsIdByStateId(u8 state)
|
||||
u16 GetPlayerAvatarGraphicsIdByStateId(u8 state)
|
||||
{
|
||||
return GetPlayerAvatarGraphicsIdByStateIdAndGender(state, gPlayerAvatar.gender);
|
||||
}
|
||||
|
||||
u8 unref_GetRivalAvatarGenderByGraphicsId(u8 gfxId)
|
||||
{
|
||||
switch (gfxId)
|
||||
{
|
||||
case OBJ_EVENT_GFX_RIVAL_MAY_NORMAL:
|
||||
case OBJ_EVENT_GFX_RIVAL_MAY_MACH_BIKE:
|
||||
case OBJ_EVENT_GFX_RIVAL_MAY_ACRO_BIKE:
|
||||
case OBJ_EVENT_GFX_RIVAL_MAY_SURFING:
|
||||
case OBJ_EVENT_GFX_RIVAL_MAY_FIELD_MOVE:
|
||||
case OBJ_EVENT_GFX_MAY_UNDERWATER:
|
||||
case OBJ_EVENT_GFX_MAY_FISHING:
|
||||
case OBJ_EVENT_GFX_MAY_WATERING:
|
||||
return FEMALE;
|
||||
default:
|
||||
return MALE;
|
||||
}
|
||||
}
|
||||
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u8 gfxId)
|
||||
u16 GetPlayerAvatarGenderByGraphicsId(u16 gfxId)
|
||||
{
|
||||
switch (gfxId)
|
||||
{
|
||||
@ -1324,7 +1306,7 @@ void SetPlayerAvatarStateMask(u8 flags)
|
||||
gPlayerAvatar.flags |= flags;
|
||||
}
|
||||
|
||||
static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 graphicsId, u8 gender)
|
||||
static u8 GetPlayerAvatarStateTransitionByGraphicsId(u16 graphicsId, u8 gender)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
@ -1336,7 +1318,7 @@ static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 graphicsId, u8 gender)
|
||||
return PLAYER_AVATAR_FLAG_ON_FOOT;
|
||||
}
|
||||
|
||||
u8 GetPlayerAvatarGraphicsIdByCurrentState(void)
|
||||
u16 GetPlayerAvatarGraphicsIdByCurrentState(void)
|
||||
{
|
||||
u8 i;
|
||||
u8 flags = gPlayerAvatar.flags;
|
||||
@ -1349,7 +1331,7 @@ u8 GetPlayerAvatarGraphicsIdByCurrentState(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetPlayerAvatarExtraStateTransition(u8 graphicsId, u8 transitionFlag)
|
||||
void SetPlayerAvatarExtraStateTransition(u16 graphicsId, u8 transitionFlag)
|
||||
{
|
||||
u8 stateFlag = GetPlayerAvatarStateTransitionByGraphicsId(graphicsId, gPlayerAvatar.gender);
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ void SetPlayerGotFirstFans(void);
|
||||
u16 GetNumFansOfPlayerInTrainerFanClub(void);
|
||||
|
||||
static void RecordCyclingRoadResults(u32, u8);
|
||||
static void LoadLinkPartnerObjectEventSpritePalette(u8, u8, u8);
|
||||
static void LoadLinkPartnerObjectEventSpritePalette(u16, u8, u8);
|
||||
static void Task_PetalburgGymSlideOpenRoomDoors(u8);
|
||||
static void PetalburgGymSetDoorMetatiles(u8, u16);
|
||||
static void Task_PCTurnOnEffect(u8);
|
||||
@ -563,7 +563,7 @@ void SpawnLinkPartnerObjectEvent(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void LoadLinkPartnerObjectEventSpritePalette(u8 graphicsId, u8 localEventId, u8 paletteNum)
|
||||
static void LoadLinkPartnerObjectEventSpritePalette(u16 graphicsId, u8 localEventId, u8 paletteNum)
|
||||
{
|
||||
u8 adjustedPaletteNum;
|
||||
// Note: This temp var is necessary; paletteNum += 6 doesn't match.
|
||||
|
||||
@ -27,7 +27,7 @@ static void Task_DoFieldMove_RunFunc(u8 taskId);
|
||||
static void FieldCallback_RockSmash(void);
|
||||
static void FieldMove_RockSmash(void);
|
||||
|
||||
bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId)
|
||||
bool8 CheckObjectGraphicsInFrontOfPlayer(u16 graphicsId)
|
||||
{
|
||||
u8 objEventId;
|
||||
|
||||
|
||||
@ -1395,7 +1395,7 @@ static void NamingScreen_NoIcon(void)
|
||||
|
||||
static void NamingScreen_CreatePlayerIcon(void)
|
||||
{
|
||||
u8 rivalGfxId;
|
||||
u16 rivalGfxId;
|
||||
u8 spriteId;
|
||||
|
||||
rivalGfxId = GetRivalAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, sNamingScreen->monSpecies);
|
||||
@ -2584,5 +2584,3 @@ static const struct SpritePalette sSpritePalettes[] =
|
||||
{gNamingScreenMenu_Pal[4], PALTAG_OK_BUTTON},
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1206,7 +1206,7 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_createvobject(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 graphicsId = ScriptReadByte(ctx);
|
||||
u16 graphicsId = ScriptReadByte(ctx); // Support u16 in createvobject
|
||||
u8 virtualObjId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u32 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
@ -157,7 +157,7 @@ static const struct YesNoFuncTable sDeleteRegistryYesNoFuncs =
|
||||
.noFunc = DeleteRegistry_No,
|
||||
};
|
||||
|
||||
static const u8 sSecretBaseOwnerGfxIds[10] =
|
||||
static const u16 sSecretBaseOwnerGfxIds[10] =
|
||||
{
|
||||
// Male
|
||||
OBJ_EVENT_GFX_YOUNGSTER,
|
||||
|
||||
@ -23,9 +23,8 @@ static u8 CreateTask_AnimateUnionRoomPlayers(void);
|
||||
static u32 IsUnionRoomPlayerInvisible(u32, u32);
|
||||
static void SetUnionRoomObjectFacingDirection(s32, s32, u8);
|
||||
|
||||
// + 2 is just to match, those elements are empty and never read
|
||||
// Graphics ids should correspond with the classes in gUnionRoomFacilityClasses
|
||||
static const u8 sUnionRoomObjGfxIds[GENDER_COUNT][NUM_UNION_ROOM_CLASSES + 2] = {
|
||||
static const u16 sUnionRoomObjGfxIds[GENDER_COUNT][NUM_UNION_ROOM_CLASSES] = {
|
||||
[MALE] = {
|
||||
OBJ_EVENT_GFX_MAN_3,
|
||||
OBJ_EVENT_GFX_BLACK_BELT,
|
||||
@ -131,7 +130,7 @@ static bool32 IsPlayerStandingStill(void)
|
||||
}
|
||||
|
||||
// Gender and trainer id are used to determine which sprite a player appears as
|
||||
static u8 GetUnionRoomPlayerGraphicsId(u32 gender, u32 id)
|
||||
static u16 GetUnionRoomPlayerGraphicsId(u32 gender, u32 id)
|
||||
{
|
||||
return sUnionRoomObjGfxIds[gender][id % NUM_UNION_ROOM_CLASSES];
|
||||
}
|
||||
@ -442,7 +441,7 @@ static bool32 IsUnionRoomPlayerInvisible(u32 leaderId, u32 memberId)
|
||||
return IsVirtualObjectInvisible(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID);
|
||||
}
|
||||
|
||||
static void SpawnGroupMember(u32 leaderId, u32 memberId, u8 graphicsId, struct RfuGameData * gameData)
|
||||
static void SpawnGroupMember(u32 leaderId, u32 memberId, u16 graphicsId, struct RfuGameData * gameData)
|
||||
{
|
||||
s32 x, y;
|
||||
s32 id = UR_PLAYER_SPRITE_ID(leaderId, memberId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user