Document pokecenter common scripts and animation (#690)

This commit is contained in:
metallicity 2025-09-12 13:26:06 -07:00 committed by GitHub
parent 188bddcbd4
commit 748c228868
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
85 changed files with 702 additions and 683 deletions

View File

@ -500,8 +500,8 @@
.short \length
.endm
.macro NurseJoyBow length=1
.short MOVEMENT_ACTION_NURSE_JOY_BOW
.macro PokecenterNurseBow length=1
.short MOVEMENT_ACTION_POKECENTER_NURSE_BOW
.short \length
.endm

View File

@ -1900,7 +1900,7 @@
.short \martID
.endm
.macro ScrCmd_14B
.macro BlackOutFromBattle2
.short 331
.endm
@ -3233,9 +3233,14 @@
.short \partySlot
.endm
.macro ScrCmd_23B arg0
.macro PlayPokecenterHealingAnimation pokeballCount
.short 571
.short \arg0
.short \pokeballCount
.endm
.macro CallPokecenterNurse nurseLocalID
SetVar VAR_0x8007, \nurseLocalID
CallCommonScript 0x7D2
.endm
.macro PlayElevatorAnimation elevatorDir, loopCount
@ -3481,9 +3486,9 @@
.short 601
.endm
.macro ScrCmd_25A arg0
.macro PlayHallOfFameHealingAnimation pokeballCount
.short 602
.short \arg0
.short \pokeballCount
.endm
.macro InitPersistedMapFeaturesForPlatformLift

View File

@ -74,6 +74,7 @@ metang_generators = {
'object_events': { 'type': 'enum', 'tag': 'ObjectEventGfx' },
'pal_park_land_area': { 'type': 'enum', 'tag': 'PalParkLandArea' },
'pal_park_water_area': { 'type': 'enum', 'tag': 'PalParkWaterArea' },
'player_transitions': { 'type': 'mask', 'tag': 'PlayerTransition' },
'pokemon_body_shapes': { 'type': 'enum', 'tag': 'PokemonBodyShape' },
'pokemon_colors': { 'type': 'enum', 'tag': 'PokemonColor' },
'pokemon_contest_types': { 'type': 'enum', 'tag': 'PokemonContestType' },
@ -93,6 +94,7 @@ metang_generators = {
'species_data_params': { 'type': 'enum', 'tag': 'SpeciesDataParam' },
'string_padding_mode': { 'type': 'enum', 'tag': 'PaddingMode' },
'text_banks': { 'type': 'enum', 'tag': 'TextBank' },
'time_of_day': { 'type': 'enum', 'tag': 'TimeOfDay' },
'trainers': { 'type': 'enum', 'tag': 'TrainerID' },
'trainer_classes': { 'type': 'enum', 'tag': 'TrainerClass' },
'trainer_message_types': { 'type': 'enum', 'tag': 'TrainerMessageType' },

View File

@ -98,7 +98,7 @@ MOVEMENT_ACTION_WALK_EVER_SO_SLIGHTLY_FAST_NORTH
MOVEMENT_ACTION_WALK_EVER_SO_SLIGHTLY_FAST_SOUTH
MOVEMENT_ACTION_WALK_EVER_SO_SLIGHTLY_FAST_WEST
MOVEMENT_ACTION_WALK_EVER_SO_SLIGHTLY_FAST_EAST
MOVEMENT_ACTION_NURSE_JOY_BOW
MOVEMENT_ACTION_POKECENTER_NURSE_BOW
MOVEMENT_ACTION_REVEAL_TRAINER
MOVEMENT_ACTION_PLAYER_GIVE
MOVEMENT_ACTION_EMOTE_DOUBLE_EXCLAMATION_MARK

View File

@ -24,7 +24,7 @@ OBJ_EVENT_GFX_REPORTER
OBJ_EVENT_GFX_CAMERAMAN
OBJ_EVENT_GFX_CASHIER_M
OBJ_EVENT_GFX_CASHIER_F
OBJ_EVENT_GFX_NURSE_JOY
OBJ_EVENT_GFX_POKECENTER_NURSE
OBJ_EVENT_GFX_TEALA
OBJ_EVENT_GFX_UNK_028
OBJ_EVENT_GFX_SCIENTIST_M

View File

@ -0,0 +1,10 @@
PLAYER_TRANSITION_WALKING
PLAYER_TRANSITION_CYCLING
PLAYER_TRANSITION_SURFING
PLAYER_TRANSITION_x0008
PLAYER_TRANSITION_WATER_BERRIES
PLAYER_TRANSITION_FISHING
PLAYER_TRANSITION_POKETCH
PLAYER_TRANSITION_SAVE
PLAYER_TRANSITION_HEALING
PLAYER_TRANSITION_x0200

View File

@ -0,0 +1,5 @@
TIMEOFDAY_MORNING
TIMEOFDAY_DAY
TIMEOFDAY_TWILIGHT
TIMEOFDAY_NIGHT
TIMEOFDAY_LATE_NIGHT

View File

@ -103,7 +103,7 @@ FLAG_UNK_0x0065
FLAG_UNK_0x0066
FLAG_UNK_0x0067
FLAG_UNK_0x0068
FLAG_POKECENTER_4_STAR_TRAINER_CARD
FLAG_POKECENTER_GOLD_TRAINER_CARD_SEEN
FLAG_POKECENTER_IDENTIFIED_POKERUS
FLAG_SUPER_ROD_OBTAINED
FLAG_UNK_0x006C
@ -142,7 +142,7 @@ FLAG_UNK_0x008C
FLAG_UNK_0x008D
FLAG_UNK_0x008E
FLAG_UNK_0x008F
FLAG_UNK_0x0090
FLAG_HAS_POKEDEX
FLAG_UNK_0x0091
FLAG_UNK_0x0092
FLAG_UNK_0x0093

View File

@ -1,6 +1,8 @@
#ifndef POKEPLATINUM_CONSTANTS_PLAYER_AVATAR_H
#define POKEPLATINUM_CONSTANTS_PLAYER_AVATAR_H
#include "generated/player_transitions.h";
// Player State
#define PLAYER_STATE_WALKING 0
#define PLAYER_STATE_CYCLING 1
@ -11,19 +13,6 @@
#define PLAYER_EVENT_USED_WATERFALL (1 << 1)
#define PLAYER_EVENT_DISTORTION_WORLD (1 << 2)
enum PlayerTransitionState {
PLAYER_TRANSITION_WALKING = 1 << 0,
PLAYER_TRANSITION_CYCLING = 1 << 1,
PLAYER_TRANSITION_SURFING = 1 << 2,
PLAYER_TRANSITION_x0008 = 1 << 3,
PLAYER_TRANSITION_WATER_BERRIES = 1 << 4,
PLAYER_TRANSITION_FISHING = 1 << 5,
PLAYER_TRANSITION_POKETCH = 1 << 6,
PLAYER_TRANSITION_SAVE = 1 << 7,
PLAYER_TRANSITION_HEAL = 1 << 8,
PLAYER_TRANSITION_x0200 = 1 << 9
};
enum PlayerMoveState {
PLAYER_MOVE_STATE_NONE = 0,
PLAYER_MOVE_STATE_START,

View File

@ -1,13 +1,7 @@
#ifndef POKEPLATINUM_CONSTANTS_RTC_H
#define POKEPLATINUM_CONSTANTS_RTC_H
enum TimeOfDay {
TIMEOFDAY_MORNING = 0,
TIMEOFDAY_DAY = 1,
TIMEOFDAY_TWILIGHT = 2,
TIMEOFDAY_NIGHT = 3,
TIMEOFDAY_LATE_NIGHT = 4,
};
#include "generated/time_of_day.h"
enum MonthOfYear {
MONTH_JAN = 1,

View File

@ -0,0 +1,11 @@
#ifndef POKEPLATINUM_CONSTANTS_TRAINER_CARD_LEVELS_H
#define POKEPLATINUM_CONSTANTS_TRAINER_CARD_LEVELS_H
#define TRAINER_CARD_LEVEL_NORMAL 0
#define TRAINER_CARD_LEVEL_COBALT 1
#define TRAINER_CARD_LEVEL_BRONZE 2
#define TRAINER_CARD_LEVEL_SILVER 3
#define TRAINER_CARD_LEVEL_GOLD 4
#define TRAINER_CARD_LEVEL_BLACK 5
#endif // POKEPLATINUM_CONSTANTS_TRAINER_CARD_LEVELS_H

View File

@ -0,0 +1,37 @@
#ifndef POKEPLATINUM_HEALING_MACHINE_ANIMATION_H
#define POKEPLATINUM_HEALING_MACHINE_ANIMATION_H
#include "field/field_system_decl.h"
#define HEALING_MACHINE_ANIMATION_STATE_START 0
#define HEALING_MACHINE_ANIMATION_STATE_ADD_POKEBALL 1
#define HEALING_MACHINE_ANIMATION_STATE_WAIT_FOR_POKEBALL 2
#define HEALING_MACHINE_ANIMATION_STATE_PLAY_FINAL_ANIMATION 3
#define HEALING_MACHINE_ANIMATION_STATE_WAIT_FOR_FINAL_ANIMATION 4
#define HEALING_MACHINE_ANIMATION_STATE_CLEAN_UP 5
#define HEALING_MACHINE_ANIMATION_POKEBALL_TAG 0x10
#define HEALING_MACHINE_ANIMATION_SCREEN_TAG 0x20
#define HEALING_MACHINE_ANIMATION_POKEBALL_MAX_TICKS 15
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_POSITIVE ((FX32_ONE * 4) + (FX32_ONE / 2))
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_NEGATIVE -HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_POSITIVE
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Y_ALL (FX32_ONE * 12)
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_X_LEFT HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_NEGATIVE
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_X_RIGHT HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_POSITIVE
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Z_TOP HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_NEGATIVE
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Z_MIDDLE 0x0
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Z_BOTTOM HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_POSITIVE
#define HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(zPos, xPos) { \
HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_X_##xPos, \
HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Y_ALL, \
HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Z_##zPos, \
}
void FieldSystem_PlayHealingAnimation_Pokecenter(FieldSystem *fieldSystem, const u8 pokeballCount);
void FieldSystem_PlayHealingAnimation_HallOfFame(FieldSystem *fieldSystem, const u8 pokeballCount);
#endif // POKEPLATINUM_HEALING_MACHINE_ANIMATION_H

View File

@ -1,8 +0,0 @@
#ifndef POKEPLATINUM_OV6_02246C24_H
#define POKEPLATINUM_OV6_02246C24_H
#include "field/field_system_decl.h"
void ov6_02246C24(FieldSystem *fieldSystem, const u8 param1);
#endif // POKEPLATINUM_OV6_02246C24_H

View File

@ -1,8 +0,0 @@
#ifndef POKEPLATINUM_OV6_02247D30_H
#define POKEPLATINUM_OV6_02247D30_H
#include "field/field_system_decl.h"
void ov6_02247D30(FieldSystem *fieldSystem, const u8 param1);
#endif // POKEPLATINUM_OV6_02247D30_H

View File

@ -2,6 +2,7 @@
#define POKEPLATINUM_PARTY_H
#include "constants/heap.h"
#include "constants/pokemon.h"
#include "struct_defs/pokemon.h"
@ -10,7 +11,7 @@
typedef struct Party {
int capacity;
int currentCount;
Pokemon pokemon[6];
Pokemon pokemon[MAX_PARTY_SIZE];
} Party;
int Party_SaveSize(void);

View File

@ -26,7 +26,7 @@ typedef struct TrainerCard {
u8 gameVersion;
u8 regionCode;
u8 gymLeadersToHide_Unused;
u8 stars;
u8 level;
u8 badgesInteractable : 1;
u8 liveTimeDisplay : 1;
u8 gender : 1;
@ -62,7 +62,7 @@ typedef struct TrainerCard {
void TrainerCard_Init(u8 param0, u8 param1, u8 gymLeadersToHide, u8 trainerAppearance, FieldSystem *fieldSystem, TrainerCard *trainerCard);
TrainerCard *TrainerCard_New(u16 heapID);
void TrainerCard_Free(TrainerCard *trainerCard);
u8 TrainerCard_CalculateStars(FieldSystem *fieldSystem);
u8 TrainerCard_CalculateLevel(FieldSystem *fieldSystem);
void TrainerCard_SaveBadgePolish(FieldSystem *fieldSystem, const TrainerCard *trainerCard);
void sub_02072204(FieldSystem *fieldSystem);

View File

@ -5,7 +5,7 @@
#include "location.h"
int sub_0203A7EC(void);
int FieldOverworldState_GetDefaultWarpID(void);
void Location_InitFly(int flyDestination, Location *location);
void Location_InitWhiteOut(int whiteOutDestination, Location *location);
int sub_0203A858(int param0);

View File

@ -3,7 +3,7 @@
#include "field_task.h"
BOOL sub_02052B2C(FieldTask *task);
void sub_02052C5C(FieldTask *task);
BOOL FieldTask_BlackOutFromBattle(FieldTask *task);
void FieldTask_StartBlackOutFromBattle(FieldTask *task);
#endif // POKEPLATINUM_UNK_020528D0_H

View File

@ -128,7 +128,7 @@ extern BOOL (*const gMovementActionFuncs_WalkEverSoSlightlyFastNorth[])(MapObjec
extern BOOL (*const gMovementActionFuncs_WalkEverSoSlightlyFastSouth[])(MapObject *);
extern BOOL (*const gMovementActionFuncs_WalkEverSoSlightlyFastWest[])(MapObject *);
extern BOOL (*const gMovementActionFuncs_WalkEverSoSlightlyFastEast[])(MapObject *);
extern BOOL (*const gMovementActionFuncs_NurseJoyBow[])(MapObject *);
extern BOOL (*const gMovementActionFuncs_PokecenterNurseBow[])(MapObject *);
extern BOOL (*const gMovementActionFuncs_RevealTrainer[])(MapObject *);
extern BOOL (*const gMovementActionFuncs_PlayerGive[])(MapObject *);
extern BOOL (*const gMovementActionFuncs_PlayerReceive[])(MapObject *);

View File

@ -580,7 +580,7 @@ Overlay overlay6
Object main.nef.p/src_overlay006_ov6_02246A30.c.o
Object main.nef.p/src_overlay006_special_dates.c.o
Object main.nef.p/src_overlay006_repel_step_update.c.o
Object main.nef.p/src_overlay006_ov6_02246C24.c.o
Object main.nef.p/src_overlay006_healing_machine_animation_pokecenter.c.o
Object main.nef.p/src_overlay006_elevator_animation.c.o
Object main.nef.p/src_overlay006_pc_animation.c.o
Object main.nef.p/src_overlay006_ov6_02247100.c.o
@ -589,7 +589,7 @@ Overlay overlay6
Object main.nef.p/src_overlay006_dual_slot_encounters.c.o
Object main.nef.p/src_overlay006_ov6_02247830.c.o
Object main.nef.p/src_overlay006_ov6_02247A0C.c.o
Object main.nef.p/src_overlay006_ov6_02247D30.c.o
Object main.nef.p/src_overlay006_healing_machine_animation_hall_of_fame.c.o
Object main.nef.p/src_overlay006_ov6_02247F5C.c.o
Object main.nef.p/src_overlay006_ov6_02248050.c.o
Object main.nef.p/src_overlay006_ov6_02248948.c.o

View File

@ -16,7 +16,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -51,7 +51,7 @@
],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_LOOK_SOUTH",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",
@ -65,7 +65,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_LOOK_SOUTH",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",
@ -79,7 +79,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_LOOK_SOUTH",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -44,7 +44,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -30,7 +30,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -44,7 +44,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -44,7 +44,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -44,7 +44,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -44,7 +44,7 @@
"y": 0
},
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_NURSE_JOY",
"graphics_id": "OBJ_EVENT_GFX_POKECENTER_NURSE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"flag": "0",

View File

@ -10,8 +10,7 @@
ScriptEntryEnd
_0016:
SetVar VAR_0x8007, 1
CallCommonScript 0x7D2
CallPokecenterNurse 1
End
_0022:

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001E:

View File

@ -1,5 +1,8 @@
#include "macros/scrcmd.inc"
#include "generated/distribution_events.h"
#include "generated/player_transitions.h"
#include "generated/time_of_day.h"
#include "constants/trainer_card_levels.h"
#include "generated/tutor_locations.h"
#include "res/text/bank/common_strings.h"
#include "res/text/bank/menu_entries.h"
@ -24,8 +27,8 @@
ScriptEntry CommonScript_BagIsFull @ 0x7E1
ScriptEntry _0BEE @ 0x7E2
ScriptEntry CommonScript_VendorGreetingGeneric @ 0x7E3
ScriptEntry _0FCA @ 0x7E4
ScriptEntry _103A @ 0x7E5
ScriptEntry CommonScript_PlayerHouseBlackOutRecover @ 0x7E4
ScriptEntry CommonScript_PokecenterBlackOutRecover @ 0x7E5
ScriptEntry CommonScript_EmptyScript4 @ 0x7E6
ScriptEntry _0FA7 @ 0x7E7
ScriptEntry CommonScript_EmptyScript5 @ 0x7E8
@ -75,15 +78,15 @@ CommonScript_PokecenterNurse:
LockAll
FacePlayer
GetTrainerCardLevel VAR_RESULT
GoToIfGe VAR_RESULT, 4, CommonScript_PokecenterNurse_GoldCard
SetVar VAR_0x8004, 0
GoToIfGe VAR_RESULT, TRAINER_CARD_LEVEL_GOLD, CommonScript_PokecenterNurse_GoldCard
SetVar VAR_0x8004, CommonStrings_Text_PokecenterGreeting_Day
GetTimeOfDay VAR_RESULT
Dummy1F9 VAR_RESULT
SetVar VAR_0x8004, 120
GoToIfEq VAR_RESULT, 0, CommonScript_PokecenterNurse_Greeting
SetVar VAR_0x8004, 121
GoToIfEq VAR_RESULT, 1, CommonScript_PokecenterNurse_Greeting
SetVar VAR_0x8004, 0
SetVar VAR_0x8004, CommonStrings_Text_PokecenterGreeting_Morning
GoToIfEq VAR_RESULT, TIMEOFDAY_MORNING, CommonScript_PokecenterNurse_Greeting
SetVar VAR_0x8004, CommonStrings_Text_PokecenterGreeting_Night
GoToIfEq VAR_RESULT, TIMEOFDAY_DAY, CommonScript_PokecenterNurse_Greeting
SetVar VAR_0x8004, CommonStrings_Text_PokecenterGreeting_Day
CommonScript_PokecenterNurse_Greeting:
MessageVar VAR_0x8004
ShowYesNoMenu VAR_RESULT
@ -92,7 +95,7 @@ CommonScript_PokecenterNurse_Greeting:
End
CommonScript_PokecenterNurse_DeclineHealPokemon:
Message pl_msg_00000213_00003
Message CommonStrings_Text_PokecenterHopeToSeeYouAgain1
WaitABXPadPress
CloseMessage
ReleaseAll
@ -100,45 +103,45 @@ CommonScript_PokecenterNurse_DeclineHealPokemon:
End
CommonScript_PokecenterNurse_AcceptHealPokemon:
SetPlayerState 0x100
SetPlayerState PLAYER_TRANSITION_HEALING
ChangePlayerState
ApplyMovement LOCALID_PLAYER, _02EC
ApplyMovement LOCALID_PLAYER, CommonScript_PokecenterNurse_PlayerGivePokemonMovement
WaitMovement
GetTrainerCardLevel VAR_RESULT
CallIfGe VAR_RESULT, 4, CommonScript_PokecenterNurse_TakePokemonMessage_GoldCard
CallIfLt VAR_RESULT, 4, CommonScript_PokecenterNurse_TakePokemonMessage
CallIfGe VAR_RESULT, TRAINER_CARD_LEVEL_GOLD, CommonScript_PokecenterNurse_TakePokemonMessage_GoldCard
CallIfLt VAR_RESULT, TRAINER_CARD_LEVEL_GOLD, CommonScript_PokecenterNurse_TakePokemonMessage
Call CommonScript_PokecenterNurse_HealPokemon
GoToIfUnset FLAG_POKECENTER_IDENTIFIED_POKERUS, CommonScript_PokecenterNurse_CheckPokerus
GoTo CommonScript_PokecenterNurse_FarewellAfterHeal
CommonScript_PokecenterNurse_TakePokemonMessage:
Message pl_msg_00000213_00001
Message CommonStrings_Text_PokecenterTakeYourPokemon
Return
CommonScript_PokecenterNurse_TakePokemonMessage_GoldCard:
Message pl_msg_00000213_00007
Message CommonStrings_Text_PokecenterTakeYourPokemon_GoldCard
Return
CommonScript_PokecenterNurse_HealPokemon:
ApplyMovement VAR_0x8007, _1260
ApplyMovement VAR_0x8007, CommonScript_PokecenterNurse_TurnToMachineMovement
WaitMovement
CountPartyNonEggs VAR_0x8006
ScrCmd_23B VAR_0x8006
ApplyMovement VAR_0x8007, _1278
PlayPokecenterHealingAnimation VAR_0x8006
ApplyMovement VAR_0x8007, CommonScript_PokecenterNurse_TurnToPlayerMovement
WaitMovement
HealParty
Return
CommonScript_PokecenterNurse_FarewellAfterHeal:
GoToIfEq VAR_0x8004, 1, CommonScript_PokecenterNurse_FarewellAfterHeal_GoldCard
Message pl_msg_00000213_00002
ApplyMovement LOCALID_PLAYER, _02F4
GoToIfEq VAR_0x8004, TRUE, CommonScript_PokecenterNurse_FarewellAfterHeal_GoldCard
Message CommonStrings_Text_PokecenterRestoredYourPokemon
ApplyMovement LOCALID_PLAYER, CommonScript_PokecenterNurse_PlayerRetrievePokemonMovement
WaitMovement
SetPlayerState 1
SetPlayerState PLAYER_TRANSITION_WALKING
ChangePlayerState
ApplyMovement VAR_0x8007, CommonScript_PokecenterNurse_NurseBowMovement
WaitMovement
Message pl_msg_00000213_00003
Message CommonStrings_Text_PokecenterHopeToSeeYouAgain1
WaitABXPadPress
CloseMessage
ReleaseAll
@ -146,14 +149,14 @@ CommonScript_PokecenterNurse_FarewellAfterHeal:
End
CommonScript_PokecenterNurse_FarewellAfterHeal_GoldCard:
Message pl_msg_00000213_00008
ApplyMovement LOCALID_PLAYER, _02F4
Message CommonStrings_Text_PokecenterThankYouForWaiting
ApplyMovement LOCALID_PLAYER, CommonScript_PokecenterNurse_PlayerRetrievePokemonMovement
WaitMovement
SetPlayerState 1
SetPlayerState PLAYER_TRANSITION_WALKING
ChangePlayerState
ApplyMovement VAR_0x8007, CommonScript_PokecenterNurse_NurseBowMovement
WaitMovement
Message pl_msg_00000213_00009
Message CommonStrings_Text_PokecenterHopeToSeeYouAgain2
WaitABXPadPress
CloseMessage
ReleaseAll
@ -162,16 +165,16 @@ CommonScript_PokecenterNurse_FarewellAfterHeal_GoldCard:
CommonScript_PokecenterNurse_CheckPokerus:
CheckPartyPokerus VAR_0x8006
GoToIfEq VAR_0x8006, 1, CommonScript_PokecenterNurse_FoundPokerus
GoToIfEq VAR_0x8006, TRUE, CommonScript_PokecenterNurse_IdentifiedPokerus
GoTo CommonScript_PokecenterNurse_FarewellAfterHeal
CommonScript_PokecenterNurse_FoundPokerus:
CommonScript_PokecenterNurse_IdentifiedPokerus:
SetFlag FLAG_POKECENTER_IDENTIFIED_POKERUS
ApplyMovement LOCALID_PLAYER, _02F4
ApplyMovement LOCALID_PLAYER, CommonScript_PokecenterNurse_PlayerRetrievePokemonMovement
WaitMovement
SetPlayerState 1
SetPlayerState PLAYER_TRANSITION_WALKING
ChangePlayerState
Message pl_msg_00000213_00010
Message CommonStrings_Text_PokecenterYourPokemonMayBeInfected
WaitABXPadPress
CloseMessage
ReleaseAll
@ -179,14 +182,14 @@ CommonScript_PokecenterNurse_FoundPokerus:
End
CommonScript_PokecenterNurse_GoldCard:
GoToIfSet FLAG_POKECENTER_4_STAR_TRAINER_CARD, CommonScript_PokecenterNurse_GoldCard_PreviouslySeen
SetFlag FLAG_POKECENTER_4_STAR_TRAINER_CARD
Message pl_msg_00000213_00004
GoToIfSet FLAG_POKECENTER_GOLD_TRAINER_CARD_SEEN, CommonScript_PokecenterNurse_GoldCard_PreviouslySeen
SetFlag FLAG_POKECENTER_GOLD_TRAINER_CARD_SEEN
Message CommonStrings_Text_PokecenterGreeting_Interrupted
BufferPlayerName 0
Message pl_msg_00000213_00005
Message CommonStrings_Text_PokecenterThatTrainerCard
ShowYesNoMenu VAR_RESULT
GoToIfEq VAR_RESULT, MENU_YES, CommonScript_PokecenterNurse_AcceptHealPokemon_GoldCard
Message pl_msg_00000213_00009
Message CommonStrings_Text_PokecenterHopeToSeeYouAgain2
WaitABXPadPress
CloseMessage
ReleaseAll
@ -195,10 +198,10 @@ CommonScript_PokecenterNurse_GoldCard:
CommonScript_PokecenterNurse_GoldCard_PreviouslySeen:
BufferPlayerName 0
Message pl_msg_00000213_00006
Message CommonStrings_Text_PokecenterGreatToSeeYou
ShowYesNoMenu VAR_RESULT
GoToIfEq VAR_RESULT, MENU_YES, CommonScript_PokecenterNurse_AcceptHealPokemon_GoldCard
Message pl_msg_00000213_00009
Message CommonStrings_Text_PokecenterHopeToSeeYouAgain2
WaitABXPadPress
CloseMessage
ReleaseAll
@ -206,22 +209,22 @@ CommonScript_PokecenterNurse_GoldCard_PreviouslySeen:
End
CommonScript_PokecenterNurse_AcceptHealPokemon_GoldCard:
SetVar VAR_0x8004, 1
SetVar VAR_0x8004, TRUE
GoTo CommonScript_PokecenterNurse_AcceptHealPokemon
.balign 4, 0
CommonScript_PokecenterNurse_NurseBowMovement:
NurseJoyBow
PokecenterNurseBow
Delay4
EndMovement
.balign 4, 0
_02EC:
CommonScript_PokecenterNurse_PlayerGivePokemonMovement:
PlayerGive
EndMovement
.balign 4, 0
_02F4:
CommonScript_PokecenterNurse_PlayerRetrievePokemonMovement:
PlayerReceive
EndMovement
@ -321,7 +324,7 @@ _0457:
FadeScreenOut
WaitFadeScreen
ScrCmd_1F8
ScrCmd_14B
BlackOutFromBattle2
End
_0479:
@ -1142,15 +1145,15 @@ CommonScript_VendorGreetingGeneric:
ReturnCommonScript
End
_0FCA:
CommonScript_PlayerHouseBlackOutRecover:
LockAll
ApplyMovement LOCALID_PLAYER, _1250
ApplyMovement 0, _1258
ApplyMovement LOCALID_PLAYER, CommonScript_PlayerHouseBlackOutRecover_PlayerTurnToMomMovement
ApplyMovement 0, CommonScript_PlayerHouseBlackOutRecover_MomTurnToPlayerMovement
WaitMovement
FadeScreenIn
WaitFadeScreen
BufferPlayerName 0
Message pl_msg_00000213_00040
Message CommonStrings_Text_YouHadQuiteTheExperienceOutThere
FadeScreenOut
WaitFadeScreen
CloseMessage
@ -1159,167 +1162,167 @@ _0FCA:
HealParty
FadeScreenIn
WaitFadeScreen
CallIfSet FLAG_UNK_0x0090, _1030
CallIfUnset FLAG_UNK_0x0090, _1035
CallIfSet FLAG_HAS_POKEDEX, CommonScript_PlayerHouseBlackOutRecover_BeforePokedexMessage
CallIfUnset FLAG_HAS_POKEDEX, CommonScript_PlayerHouseBlackOutRecover_AfterPokedexMessage
WaitABXPadPress
CloseMessage
ReleaseAll
End
_1030:
Message pl_msg_00000213_00041
CommonScript_PlayerHouseBlackOutRecover_BeforePokedexMessage:
Message CommonStrings_Text_YourPokemonAreLookingGreat_BeforePokedex
Return
_1035:
Message pl_msg_00000213_00042
CommonScript_PlayerHouseBlackOutRecover_AfterPokedexMessage:
Message CommonStrings_Text_YourPokemonAreLookingGreat_AfterPokedex
Return
_103A:
CommonScript_PokecenterBlackOutRecover:
LockAll
FadeScreenIn
WaitFadeScreen
SetPlayerState 0x100
SetPlayerState PLAYER_TRANSITION_HEALING
ChangePlayerState
ApplyMovement LOCALID_PLAYER, _02EC
ApplyMovement LOCALID_PLAYER, CommonScript_PokecenterNurse_PlayerGivePokemonMovement
WaitMovement
Message pl_msg_00000213_00043
Call _10C7
Message CommonStrings_Text_PokecenterFirstLetsRestoreYourPokemon
Call CommonScript_PokecenterNurse_FindNurseObject
Call CommonScript_PokecenterNurse_HealPokemon
CheckBadgeAcquired BADGE_ID_COAL, VAR_RESULT
GoToIfEq VAR_RESULT, 1, _10A2
Message pl_msg_00000213_00044
ApplyMovement LOCALID_PLAYER, _02F4
GoToIfEq VAR_RESULT, TRUE, CommonScript_PokecenterBlackOutRecover_HasCoalBadge
Message CommonStrings_Text_PokecenterHealedToPerfectHealth
ApplyMovement LOCALID_PLAYER, CommonScript_PokecenterNurse_PlayerRetrievePokemonMovement
WaitMovement
SetPlayerState 1
SetPlayerState PLAYER_TRANSITION_WALKING
ChangePlayerState
ApplyMovement VAR_0x8007, CommonScript_PokecenterNurse_NurseBowMovement
WaitMovement
Message pl_msg_00000213_00045
Message CommonStrings_Text_PokecenterGoodLuckTrainer
WaitABXPadPress
CloseMessage
ReleaseAll
End
_10A2:
ApplyMovement LOCALID_PLAYER, _02F4
CommonScript_PokecenterBlackOutRecover_HasCoalBadge:
ApplyMovement LOCALID_PLAYER, CommonScript_PokecenterNurse_PlayerRetrievePokemonMovement
WaitMovement
SetPlayerState 1
SetPlayerState PLAYER_TRANSITION_WALKING
ChangePlayerState
ApplyMovement VAR_0x8007, CommonScript_PokecenterNurse_NurseBowMovement
WaitMovement
Message pl_msg_00000213_00039
Message CommonStrings_Text_PokecenterAllHappyAndHealthy
WaitABXPadPress
CloseMessage
ReleaseAll
End
_10C7:
CommonScript_PokecenterNurse_FindNurseObject:
GetCurrentMapID VAR_0x8004
GoToIfEq VAR_0x8004, 6, _11BD
GoToIfEq VAR_0x8004, 36, _11C5
GoToIfEq VAR_0x8004, 48, _11CD
GoToIfEq VAR_0x8004, 69, _11D5
GoToIfEq VAR_0x8004, 101, _11DD
GoToIfEq VAR_0x8004, 123, _11E5
GoToIfEq VAR_0x8004, 134, _11ED
GoToIfEq VAR_0x8004, 151, _11F5
GoToIfEq VAR_0x8004, 168, _11FD
GoToIfEq VAR_0x8004, 173, _1205
GoToIfEq VAR_0x8004, 189, _120D
GoToIfEq VAR_0x8004, 0x1A4, _1215
GoToIfEq VAR_0x8004, 0x1AC, _121D
GoToIfEq VAR_0x8004, 0x1B3, _1225
GoToIfEq VAR_0x8004, 0x1BB, _122D
GoToIfEq VAR_0x8004, 0x1C4, _1235
GoToIfEq VAR_0x8004, 0x1CB, _123D
GoToIfEq VAR_0x8004, 175, _1245
GoToIfEq VAR_0x8004, MAP_HEADER_JUBILIFE_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Jubilife
GoToIfEq VAR_0x8004, MAP_HEADER_CANALAVE_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Canalave
GoToIfEq VAR_0x8004, MAP_HEADER_OREBURGH_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Oreburgh
GoToIfEq VAR_0x8004, MAP_HEADER_ETERNA_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Eterna
GoToIfEq VAR_0x8004, MAP_HEADER_HEARTHOME_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Hearthome
GoToIfEq VAR_0x8004, MAP_HEADER_PASTORIA_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Pastoria
GoToIfEq VAR_0x8004, MAP_HEADER_VEILSTONE_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Veilstone
GoToIfEq VAR_0x8004, MAP_HEADER_SUNYSHORE_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Sunnyshore
GoToIfEq VAR_0x8004, MAP_HEADER_SNOWPOINT_CITY_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Snowpoint
GoToIfEq VAR_0x8004, MAP_HEADER_POKEMON_LEAGUE_SOUTH_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_PokemonLeagueSouth
GoToIfEq VAR_0x8004, MAP_HEADER_FIGHT_AREA_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_FightArea
GoToIfEq VAR_0x8004, MAP_HEADER_SANDGEM_TOWN_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Sandgem
GoToIfEq VAR_0x8004, MAP_HEADER_FLOAROMA_TOWN_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Floaroma
GoToIfEq VAR_0x8004, MAP_HEADER_SOLACEON_TOWN_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Solaceon
GoToIfEq VAR_0x8004, MAP_HEADER_CELESTIC_TOWN_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_Celestic
GoToIfEq VAR_0x8004, MAP_HEADER_SURVIVAL_AREA_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_SurvivalArea
GoToIfEq VAR_0x8004, MAP_HEADER_RESORT_AREA_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_ResortArea
GoToIfEq VAR_0x8004, MAP_HEADER_POKEMON_LEAGUE_NORTH_POKECENTER_1F, CommonScript_PokecenterNurse_FindNurseObject_PokemonLeagueNorth
SetVar VAR_0x8007, 0
Return
_11BD:
CommonScript_PokecenterNurse_FindNurseObject_Jubilife:
SetVar VAR_0x8007, 3
Return
_11C5:
CommonScript_PokecenterNurse_FindNurseObject_Canalave:
SetVar VAR_0x8007, 1
Return
_11CD:
CommonScript_PokecenterNurse_FindNurseObject_Oreburgh:
SetVar VAR_0x8007, 3
Return
_11D5:
CommonScript_PokecenterNurse_FindNurseObject_Eterna:
SetVar VAR_0x8007, 3
Return
_11DD:
CommonScript_PokecenterNurse_FindNurseObject_Hearthome:
SetVar VAR_0x8007, 0
Return
_11E5:
CommonScript_PokecenterNurse_FindNurseObject_Pastoria:
SetVar VAR_0x8007, 0
Return
_11ED:
CommonScript_PokecenterNurse_FindNurseObject_Veilstone:
SetVar VAR_0x8007, 0
Return
_11F5:
CommonScript_PokecenterNurse_FindNurseObject_Sunnyshore:
SetVar VAR_0x8007, 0
Return
_11FD:
CommonScript_PokecenterNurse_FindNurseObject_Snowpoint:
SetVar VAR_0x8007, 0
Return
_1205:
CommonScript_PokecenterNurse_FindNurseObject_PokemonLeagueSouth:
SetVar VAR_0x8007, 0
Return
_120D:
CommonScript_PokecenterNurse_FindNurseObject_FightArea:
SetVar VAR_0x8007, 0
Return
_1215:
CommonScript_PokecenterNurse_FindNurseObject_Sandgem:
SetVar VAR_0x8007, 3
Return
_121D:
CommonScript_PokecenterNurse_FindNurseObject_Floaroma:
SetVar VAR_0x8007, 2
Return
_1225:
CommonScript_PokecenterNurse_FindNurseObject_Solaceon:
SetVar VAR_0x8007, 0
Return
_122D:
CommonScript_PokecenterNurse_FindNurseObject_Celestic:
SetVar VAR_0x8007, 0
Return
_1235:
CommonScript_PokecenterNurse_FindNurseObject_SurvivalArea:
SetVar VAR_0x8007, 0
Return
_123D:
CommonScript_PokecenterNurse_FindNurseObject_ResortArea:
SetVar VAR_0x8007, 0
Return
_1245:
CommonScript_PokecenterNurse_FindNurseObject_PokemonLeagueNorth:
SetVar VAR_0x8007, 3
Return
.balign 4, 0
_1250:
CommonScript_PlayerHouseBlackOutRecover_PlayerTurnToMomMovement:
FaceWest
EndMovement
.balign 4, 0
_1258:
CommonScript_PlayerHouseBlackOutRecover_MomTurnToPlayerMovement:
FaceEast
EndMovement
.balign 4, 0
_1260:
CommonScript_PokecenterNurse_TurnToMachineMovement:
FaceWest
EndMovement
@ -1332,7 +1335,7 @@ CommonScript_UnusedMovement2:
EndMovement
.balign 4, 0
_1278:
CommonScript_PokecenterNurse_TurnToPlayerMovement:
FaceSouth
EndMovement

View File

@ -10,8 +10,7 @@
ScriptEntryEnd
_0016:
SetVar VAR_0x8007, 3
CallCommonScript 0x7D2
CallPokecenterNurse 3
End
_0022:

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001E:

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 2
CallCommonScript 0x7D2
CallPokecenterNurse 2
End
_001E:

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001E:

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 3
CallCommonScript 0x7D2
CallPokecenterNurse 3
End
_001E:

View File

@ -12,8 +12,7 @@
ScriptEntryEnd
_001E:
SetVar VAR_0x8007, 3
CallCommonScript 0x7D2
CallPokecenterNurse 3
End
_002A:

View File

@ -8,8 +8,7 @@
ScriptEntryEnd
_000E:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001A:

View File

@ -48,7 +48,7 @@ _008C:
CallIfEq VAR_RESULT, 1, _010A
CallIfEq VAR_UNK_0x40F4, 0, _0102
GetPartyCount VAR_RESULT
ScrCmd_25A VAR_RESULT
PlayHallOfFameHealingAnimation VAR_RESULT
FadeScreenOut FADE_SCREEN_SPEED_MEDIUM
WaitFadeScreen
IncrementTrainerScore2 TRAINER_SCORE_EVENT_HALL_OF_FAME_ENTRY

View File

@ -271,8 +271,7 @@ _0323:
End
_0336:
SetVar VAR_0x8007, 3
CallCommonScript 0x7D2
CallPokecenterNurse 3
End
.balign 4, 0

View File

@ -15,8 +15,7 @@ _001A:
End
_0020:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_002C:

View File

@ -8,8 +8,7 @@
ScriptEntryEnd
_000E:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001A:

View File

@ -1159,7 +1159,7 @@ _0E1A:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
GoToIfSet FLAG_UNK_0x0090, _0E3E
GoToIfSet FLAG_HAS_POKEDEX, _0E3E
Message 58
GoTo _0E36

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 3
CallCommonScript 0x7D2
CallPokecenterNurse 3
End
_001E:

View File

@ -246,7 +246,7 @@ _0375:
_0394:
Message 12
GivePokedex
SetFlag FLAG_UNK_0x0090
SetFlag FLAG_HAS_POKEDEX
BufferPlayerName 0
Message 13
PlaySound SEQ_FANFA4

View File

@ -10,8 +10,7 @@
ScriptEntryEnd
_0016:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_0022:

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001E:

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001E:

View File

@ -9,8 +9,7 @@
ScriptEntryEnd
_0012:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001E:

View File

@ -35,7 +35,7 @@ _0067:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
GoToIfSet FLAG_UNK_0x0090, _00A3
GoToIfSet FLAG_HAS_POKEDEX, _00A3
GoToIfGe VAR_UNK_0x4095, 1, _00AE
GoToIfSet FLAG_UNK_0x00EA, _00BC
BufferPlayerName 0
@ -481,7 +481,7 @@ _05E7:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
GoToIfSet FLAG_UNK_0x0090, _0612
GoToIfSet FLAG_HAS_POKEDEX, _0612
GoToIfGe VAR_UNK_0x4095, 1, _061D
Message 8
WaitABXPadPress

View File

@ -170,7 +170,7 @@ _0214:
GoToIfSet FLAG_UNK_0x0002, _02AF
GoToIfGe VAR_UNK_0x40A4, 7, _0792
GoToIfEq VAR_UNK_0x40A4, 6, _035E
GoToIfSet FLAG_UNK_0x0090, _036C
GoToIfSet FLAG_HAS_POKEDEX, _036C
GoToIfGe VAR_UNK_0x40A4, 5, _0788
GoToIfGe VAR_UNK_0x40A4, 4, _0711
GoToIfSet FLAG_UNK_0x00F8, _075A

View File

@ -9,7 +9,7 @@ _0006:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
GoToIfSet FLAG_UNK_0x0090, _00B0
GoToIfSet FLAG_HAS_POKEDEX, _00B0
GoToIfGe VAR_UNK_0x4095, 1, _0082
GoToIfSet FLAG_UNK_0x006E, _0090
GoToIfSet FLAG_UNK_0x00EA, _009E

View File

@ -10,7 +10,7 @@ _000A:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
GoToIfSet FLAG_UNK_0x0090, _0028
GoToIfSet FLAG_HAS_POKEDEX, _0028
Message 0
WaitABXPadPress
CloseMessage
@ -29,7 +29,7 @@ _0033:
LockAll
FacePlayer
BufferPlayerName 0
GoToIfSet FLAG_UNK_0x0090, _0054
GoToIfSet FLAG_HAS_POKEDEX, _0054
Message 2
WaitABXPadPress
CloseMessage

View File

@ -8,8 +8,7 @@
ScriptEntryEnd
_000E:
SetVar VAR_0x8007, 0
CallCommonScript 0x7D2
CallPokecenterNurse 0
End
_001A:

View File

@ -2,7 +2,7 @@
"key": 55507,
"messages": [
{
"id": "pl_msg_00000213_00000",
"id": "CommonStrings_Text_PokecenterGreeting_Day",
"en_US": [
"Hello, and welcome to\n",
"the Pokémon Center.\r",
@ -12,14 +12,14 @@
]
},
{
"id": "pl_msg_00000213_00001",
"id": "CommonStrings_Text_PokecenterTakeYourPokemon",
"en_US": [
"OK, Ill take your Pokémon for a few\n",
"seconds."
]
},
{
"id": "pl_msg_00000213_00002",
"id": "CommonStrings_Text_PokecenterRestoredYourPokemon",
"en_US": [
"Thank you for waiting.\r",
"Weve restored your Pokémon to full\n",
@ -27,11 +27,11 @@
]
},
{
"id": "pl_msg_00000213_00003",
"id": "CommonStrings_Text_PokecenterHopeToSeeYouAgain1",
"en_US": "We hope to see you again!"
},
{
"id": "pl_msg_00000213_00004",
"id": "CommonStrings_Text_PokecenterGreeting_Interrupted",
"en_US": [
"Hello, and welcome to\n",
"the Pokémon Center.\r",
@ -41,7 +41,7 @@
]
},
{
"id": "pl_msg_00000213_00005",
"id": "CommonStrings_Text_PokecenterThatTrainerCard",
"en_US": [
"Th-that Trainer Card!\r",
"That sparkling color!\n",
@ -55,29 +55,29 @@
]
},
{
"id": "pl_msg_00000213_00006",
"id": "CommonStrings_Text_PokecenterGreatToSeeYou",
"en_US": [
"Its great to see you, {STRVAR_1 3, 0, 0}!\n",
"You want the usual, am I right?"
]
},
{
"id": "pl_msg_00000213_00007",
"id": "CommonStrings_Text_PokecenterTakeYourPokemon_GoldCard",
"en_US": [
"I will be pleased to take your\n",
"Pokémon for a few seconds."
]
},
{
"id": "pl_msg_00000213_00008",
"id": "CommonStrings_Text_PokecenterThankYouForWaiting",
"en_US": "Thank you for waiting."
},
{
"id": "pl_msg_00000213_00009",
"id": "CommonStrings_Text_PokecenterHopeToSeeYouAgain2",
"en_US": "We hope to see you again!"
},
{
"id": "pl_msg_00000213_00010",
"id": "CommonStrings_Text_PokecenterYourPokemonMayBeInfected",
"en_US": [
"Your Pokémon may be infected with\n",
"the Pokérus.\r",
@ -267,14 +267,14 @@
"garbage": 21
},
{
"id": "pl_msg_00000213_00039",
"id": "CommonStrings_Text_PokecenterAllHappyAndHealthy",
"en_US": [
"There! All happy and healthy!\n",
"Good luck and take care!"
]
},
{
"id": "pl_msg_00000213_00040",
"id": "CommonStrings_Text_YouHadQuiteTheExperienceOutThere",
"en_US": [
"Mom: {STRVAR_1 3, 0, 0}!\n",
"Welcome home.\r",
@ -287,7 +287,7 @@
]
},
{
"id": "pl_msg_00000213_00041",
"id": "CommonStrings_Text_YourPokemonAreLookingGreat_BeforePokedex",
"en_US": [
"Mom: Oh, good! You and your\n",
"Pokémon are looking great.\r",
@ -306,7 +306,7 @@
]
},
{
"id": "pl_msg_00000213_00042",
"id": "CommonStrings_Text_YourPokemonAreLookingGreat_AfterPokedex",
"en_US": [
"Mom: Oh, good! You and your\n",
"Pokémon are looking great.\r",
@ -321,21 +321,21 @@
]
},
{
"id": "pl_msg_00000213_00043",
"id": "CommonStrings_Text_PokecenterFirstLetsRestoreYourPokemon",
"en_US": [
"First, lets restore your Pokémon\n",
"to full health."
]
},
{
"id": "pl_msg_00000213_00044",
"id": "CommonStrings_Text_PokecenterHealedToPerfectHealth",
"en_US": [
"Your Pokémon have been healed\n",
"to perfect health."
]
},
{
"id": "pl_msg_00000213_00045",
"id": "CommonStrings_Text_PokecenterGoodLuckTrainer",
"en_US": [
"Please visit a Pokémon Center when\n",
"your Pokémons HP goes down.\r",
@ -786,7 +786,7 @@
]
},
{
"id": "pl_msg_00000213_00120",
"id": "CommonStrings_Text_PokecenterGreeting_Morning",
"en_US": [
"Good morning!\n",
"Welcome to the Pokémon Center.\r",
@ -796,7 +796,7 @@
]
},
{
"id": "pl_msg_00000213_00121",
"id": "CommonStrings_Text_PokecenterGreeting_Night",
"en_US": [
"Hello, and welcome to\n",
"the Pokémon Center.\r",

View File

@ -394,7 +394,7 @@ static BOOL FieldTask_WildEncounter(FieldTask *task)
if (CheckPlayerWonBattle(encounter->dto->resultMask) == 0) {
FreeWildEncounter(encounter);
RadarChain_Clear(fieldSystem->chain);
FieldTask_InitJump(task, sub_02052B2C, NULL);
FieldTask_InitJump(task, FieldTask_BlackOutFromBattle, NULL);
return FALSE;
}

View File

@ -58,7 +58,7 @@ void FieldOverworldState_Init(FieldOverworldState *fieldState)
OverworldMapHistory_Clear(&fieldState->mapHistory);
PlayerData_Init(&fieldState->playerData);
fieldState->warpId = sub_0203A7EC();
fieldState->warpId = FieldOverworldState_GetDefaultWarpID();
}
Location *FieldOverworldState_GetPlayerLocation(FieldOverworldState *fieldState)

View File

@ -468,7 +468,7 @@ pokeplatinum_c = files(
'overlay006/ov6_02246A30.c',
'overlay006/special_dates.c',
'overlay006/repel_step_update.c',
'overlay006/ov6_02246C24.c',
'overlay006/healing_machine_animation/pokecenter.c',
'overlay006/elevator_animation.c',
'overlay006/pc_animation.c',
'overlay006/ov6_02247100.c',
@ -477,7 +477,7 @@ pokeplatinum_c = files(
'overlay006/dual_slot_encounters.c',
'overlay006/ov6_02247830.c',
'overlay006/ov6_02247A0C.c',
'overlay006/ov6_02247D30.c',
'overlay006/healing_machine_animation/hall_of_fame.c',
'overlay006/ov6_02247F5C.c',
'overlay006/ov6_02248050.c',
'overlay006/ov6_02248948.c',

View File

@ -391,7 +391,7 @@ static void PlayerAvatar_RequestStateSave(PlayerAvatar *playerAvatar)
PlayerAvatar_Redraw(playerAvatar, v0);
}
static void ov5_021DFDA8(PlayerAvatar *playerAvatar)
static void PlayerAvatar_RequestStateHeal(PlayerAvatar *playerAvatar)
{
int v0 = Player_MoveStateFromGender(0x16, PlayerAvatar_Gender(playerAvatar));
PlayerAvatar_Redraw(playerAvatar, v0);
@ -412,7 +412,7 @@ static void (*const sPlayerAvatarRequestStateTbl[10])(PlayerAvatar *) = {
ov5_021DFD0C,
PlayerAvatar_RequestStatePoketch,
PlayerAvatar_RequestStateSave,
ov5_021DFDA8,
PlayerAvatar_RequestStateHeal,
ov5_021DFDC4
};

View File

@ -0,0 +1,144 @@
#include <nitro.h>
#include <string.h>
#include "constants/field/map_prop.h"
#include "constants/pokemon.h"
#include "field/field_system.h"
#include "overlay005/area_data.h"
#include "overlay005/map_prop.h"
#include "overlay005/map_prop_animation.h"
#include "overlay006/healing_machine_animation.h"
#include "field_task.h"
#include "heap.h"
#include "map_matrix.h"
#include "party.h"
#include "terrain_collision_manager.h"
typedef struct HallOfFameHealingAnimation {
VecFx32 position;
u8 pokeballCount;
u8 currentPokeballIndex;
u8 pokeballTicks;
u8 state;
u8 pokeballLoadedPropIDs[MAX_PARTY_SIZE];
} HallOfFameHealingAnimation;
static BOOL FieldTask_PlayHealingAnimation_HallOfFame(FieldTask *param0);
static VecFx32 HallOfFameHealingAnimation_PokeballOffsets[MAX_PARTY_SIZE] = {
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(TOP, LEFT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(TOP, RIGHT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(MIDDLE, LEFT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(MIDDLE, RIGHT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(BOTTOM, LEFT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(BOTTOM, RIGHT),
};
void FieldSystem_PlayHealingAnimation_HallOfFame(FieldSystem *fieldSystem, const u8 pokeballCount)
{
BOOL mapPropFound;
MapProp *healingMachine;
int mapMatrixIndex;
int healingMachineID = MAP_PROP_MODEL_POKEMON_LEAGUE_HALL_OF_FAME_MACHINE;
mapPropFound = FieldSystem_FindLoadedMapPropByModelID(fieldSystem, healingMachineID, &healingMachine, &mapMatrixIndex);
if (mapPropFound) {
HallOfFameHealingAnimation *animation = Heap_AllocAtEnd(HEAP_ID_FIELD1, sizeof(HallOfFameHealingAnimation));
animation->pokeballCount = pokeballCount;
animation->currentPokeballIndex = 0;
animation->pokeballTicks = 0;
animation->state = 0;
VecFx32 mapOrigin;
TerrainCollisionManager_GetMapAbsoluteOrigin(mapMatrixIndex, MapMatrix_GetWidth(fieldSystem->mapMatrix), &mapOrigin);
animation->position = MapProp_GetPosition(healingMachine);
animation->position.x += mapOrigin.x;
animation->position.z += mapOrigin.z;
FieldTask_InitCall(fieldSystem->task, FieldTask_PlayHealingAnimation_HallOfFame, animation);
} else {
GF_ASSERT(FALSE);
}
}
static BOOL FieldTask_PlayHealingAnimation_HallOfFame(FieldTask *param0)
{
FieldSystem *fieldSystem = FieldTask_GetFieldSystem(param0);
HallOfFameHealingAnimation *animation = (HallOfFameHealingAnimation *)FieldTask_GetEnv(param0);
switch (animation->state) {
case HEALING_MACHINE_ANIMATION_STATE_START: {
NNSG3dResMdl *pokeballModel;
NNSG3dResFileHeader **pokeballModelFile;
NNSG3dRenderObj *unused;
pokeballModelFile = AreaDataManager_GetMapPropModelFile(MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, fieldSystem->areaDataManager);
pokeballModel = NNS_G3dGetMdlByIdx(NNS_G3dGetMdlSet(*pokeballModelFile), 0);
MapPropOneShotAnimationManager_LoadPropAnimations(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, NULL, pokeballModel, AreaDataManager_GetMapPropTexture(fieldSystem->areaDataManager), 1, 1, 0);
(animation->state)++;
break;
}
case HEALING_MACHINE_ANIMATION_STATE_ADD_POKEBALL: {
MapProp *pokeballMapProp;
NNSG3dRenderObj *pokeballRenderObj;
VecFx32 pokeballPosition;
VecFx32 pokeballRotation = { 0, 0, 0 };
pokeballPosition.x = animation->position.x + HallOfFameHealingAnimation_PokeballOffsets[animation->currentPokeballIndex].x;
pokeballPosition.y = animation->position.y + HallOfFameHealingAnimation_PokeballOffsets[animation->currentPokeballIndex].y;
pokeballPosition.z = animation->position.z + HallOfFameHealingAnimation_PokeballOffsets[animation->currentPokeballIndex].z;
animation->pokeballLoadedPropIDs[animation->currentPokeballIndex] = MapPropManager_LoadOne(fieldSystem->mapPropManager, fieldSystem->areaDataManager, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, &pokeballPosition, &pokeballRotation, fieldSystem->mapPropAnimMan);
pokeballMapProp = MapPropManager_GetLoadedPropSafely(fieldSystem->mapPropManager, animation->pokeballLoadedPropIDs[animation->currentPokeballIndex]);
pokeballRenderObj = MapProp_GetRenderObj(pokeballMapProp);
MapPropOneShotAnimationManager_SetAnimationRenderObj(fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG, animation->currentPokeballIndex, pokeballRenderObj);
(animation->state)++;
break;
}
case HEALING_MACHINE_ANIMATION_STATE_WAIT_FOR_POKEBALL:
if (animation->pokeballTicks < HEALING_MACHINE_ANIMATION_POKEBALL_MAX_TICKS) {
animation->pokeballTicks++;
break;
} else {
animation->pokeballTicks = 0;
}
animation->currentPokeballIndex++;
if (animation->currentPokeballIndex < animation->pokeballCount) {
(animation->state) = HEALING_MACHINE_ANIMATION_STATE_ADD_POKEBALL;
} else {
(animation->state)++;
}
break;
case HEALING_MACHINE_ANIMATION_STATE_PLAY_FINAL_ANIMATION:
MapPropOneShotAnimationManager_PlayAnimation(fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG, 0);
(animation->state)++;
break;
case HEALING_MACHINE_ANIMATION_STATE_WAIT_FOR_FINAL_ANIMATION:
if (MapPropOneShotAnimationManager_IsAnimationLoopFinished(fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG)) {
u8 pokeballIndex;
MapPropOneShotAnimationManager_UnloadAnimation(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG);
for (pokeballIndex = 0; pokeballIndex < animation->pokeballCount; pokeballIndex++) {
MapPropManager_InitOne(animation->pokeballLoadedPropIDs[pokeballIndex], fieldSystem->mapPropManager);
}
(animation->state)++;
}
break;
case HEALING_MACHINE_ANIMATION_STATE_CLEAN_UP:
Heap_Free(animation);
return TRUE;
}
return FALSE;
}

View File

@ -0,0 +1,162 @@
#include <nitro.h>
#include <string.h>
#include "constants/field/map_prop.h"
#include "constants/pokemon.h"
#include "field/field_system.h"
#include "overlay005/area_data.h"
#include "overlay005/map_prop.h"
#include "overlay005/map_prop_animation.h"
#include "overlay006/healing_machine_animation.h"
#include "field_task.h"
#include "heap.h"
#include "map_matrix.h"
#include "party.h"
#include "sound_playback.h"
#include "terrain_collision_manager.h"
typedef struct PokecenterHealingAnimation {
VecFx32 position;
u8 pokeballCount;
u8 currentPokeballIndex;
u8 pokeballTicks;
u8 state;
u8 pokeballLoadedPropIDs[MAX_PARTY_SIZE];
} PokecenterHealingAnimation;
static BOOL FieldTask_PlayHealingAnimation_Pokecenter(FieldTask *param0);
static VecFx32 PokecenterHealingAnimation_PokeballOffsets[MAX_PARTY_SIZE] = {
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(TOP, LEFT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(TOP, RIGHT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(MIDDLE, LEFT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(MIDDLE, RIGHT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(BOTTOM, LEFT),
HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(BOTTOM, RIGHT),
};
void FieldSystem_PlayHealingAnimation_Pokecenter(FieldSystem *fieldSystem, const u8 pokeballCount)
{
BOOL mapPropFound;
MapProp *healingMachine;
int mapMatrixIndex;
int healingMachineID = MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE;
mapPropFound = FieldSystem_FindLoadedMapPropByModelID(fieldSystem, healingMachineID, &healingMachine, &mapMatrixIndex);
if (mapPropFound) {
PokecenterHealingAnimation *animation = Heap_AllocAtEnd(HEAP_ID_FIELD1, sizeof(PokecenterHealingAnimation));
animation->pokeballCount = pokeballCount;
animation->currentPokeballIndex = 0;
animation->pokeballTicks = 0;
animation->state = 0;
VecFx32 mapOrigin;
TerrainCollisionManager_GetMapAbsoluteOrigin(mapMatrixIndex, MapMatrix_GetWidth(fieldSystem->mapMatrix), &mapOrigin);
animation->position = MapProp_GetPosition(healingMachine);
animation->position.x += mapOrigin.x;
animation->position.z += mapOrigin.z;
FieldTask_InitCall(fieldSystem->task, FieldTask_PlayHealingAnimation_Pokecenter, animation);
} else {
GF_ASSERT(FALSE);
}
}
static BOOL FieldTask_PlayHealingAnimation_Pokecenter(FieldTask *param0)
{
FieldSystem *fieldSystem = FieldTask_GetFieldSystem(param0);
PokecenterHealingAnimation *animation = (PokecenterHealingAnimation *)FieldTask_GetEnv(param0);
switch (animation->state) {
case HEALING_MACHINE_ANIMATION_STATE_START: {
NNSG3dResMdl *pokeballModel;
NNSG3dResFileHeader **pokeballModelFile;
NNSG3dResMdl *screenModel;
NNSG3dResFileHeader **screenModelFile;
MapProp *screenMapProp;
NNSG3dRenderObj *screenRenderObj;
BOOL screenFound;
pokeballModelFile = AreaDataManager_GetMapPropModelFile(MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, fieldSystem->areaDataManager);
screenModelFile = AreaDataManager_GetMapPropModelFile(MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_TV, fieldSystem->areaDataManager);
pokeballModel = NNS_G3dGetMdlByIdx(NNS_G3dGetMdlSet(*pokeballModelFile), 0);
screenModel = NNS_G3dGetMdlByIdx(NNS_G3dGetMdlSet(*screenModelFile), 0);
MapPropOneShotAnimationManager_LoadPropAnimations(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, NULL, pokeballModel, AreaDataManager_GetMapPropTexture(fieldSystem->areaDataManager), 1, 1, 0);
screenFound = FieldSystem_FindLoadedMapPropByModelID(fieldSystem, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_TV, &screenMapProp, NULL);
GF_ASSERT(screenFound);
screenRenderObj = MapProp_GetRenderObj(screenMapProp);
MapPropOneShotAnimationManager_LoadPropAnimations(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_SCREEN_TAG, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_TV, screenRenderObj, screenModel, AreaDataManager_GetMapPropTexture(fieldSystem->areaDataManager), 1, 1, 0);
(animation->state)++;
break;
}
case HEALING_MACHINE_ANIMATION_STATE_ADD_POKEBALL: {
MapProp *pokeballMapProp;
NNSG3dRenderObj *pokeballRenderObj;
VecFx32 pokeballPosition;
VecFx32 pokeballRotation = { 0, 0, 0 };
pokeballPosition.x = animation->position.x + PokecenterHealingAnimation_PokeballOffsets[animation->currentPokeballIndex].x;
pokeballPosition.y = animation->position.y + PokecenterHealingAnimation_PokeballOffsets[animation->currentPokeballIndex].y;
pokeballPosition.z = animation->position.z + PokecenterHealingAnimation_PokeballOffsets[animation->currentPokeballIndex].z;
Sound_PlayEffect(SEQ_SE_DP_BOWA);
animation->pokeballLoadedPropIDs[animation->currentPokeballIndex] = MapPropManager_LoadOne(fieldSystem->mapPropManager, fieldSystem->areaDataManager, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, &pokeballPosition, &pokeballRotation, fieldSystem->mapPropAnimMan);
pokeballMapProp = MapPropManager_GetLoadedPropSafely(fieldSystem->mapPropManager, animation->pokeballLoadedPropIDs[animation->currentPokeballIndex]);
pokeballRenderObj = MapProp_GetRenderObj(pokeballMapProp);
MapPropOneShotAnimationManager_SetAnimationRenderObj(fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG, animation->currentPokeballIndex, pokeballRenderObj);
(animation->state)++;
break;
}
case HEALING_MACHINE_ANIMATION_STATE_WAIT_FOR_POKEBALL:
if (animation->pokeballTicks < HEALING_MACHINE_ANIMATION_POKEBALL_MAX_TICKS) {
animation->pokeballTicks++;
break;
} else {
animation->pokeballTicks = 0;
}
animation->currentPokeballIndex++;
if (animation->currentPokeballIndex < animation->pokeballCount) {
(animation->state) = HEALING_MACHINE_ANIMATION_STATE_ADD_POKEBALL;
} else {
(animation->state)++;
}
break;
case HEALING_MACHINE_ANIMATION_STATE_PLAY_FINAL_ANIMATION:
MapPropOneShotAnimationManager_PlayAnimation(fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG, 0);
MapPropOneShotAnimationManager_PlayAnimation(fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_SCREEN_TAG, 0);
Sound_PlayFanfare(SEQ_ASA);
(animation->state)++;
break;
case HEALING_MACHINE_ANIMATION_STATE_WAIT_FOR_FINAL_ANIMATION:
if ((MapPropOneShotAnimationManager_IsAnimationLoopFinished(fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG)) && (MapPropOneShotAnimationManager_IsAnimationLoopFinished(fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_SCREEN_TAG)) && (Sound_IsBGMPausedByFanfare() == FALSE)) {
u8 pokeballIndex;
MapPropOneShotAnimationManager_UnloadAnimation(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_SCREEN_TAG);
MapPropOneShotAnimationManager_UnloadAnimation(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, HEALING_MACHINE_ANIMATION_POKEBALL_TAG);
for (pokeballIndex = 0; pokeballIndex < animation->pokeballCount; pokeballIndex++) {
MapPropManager_InitOne(animation->pokeballLoadedPropIDs[pokeballIndex], fieldSystem->mapPropManager);
}
(animation->state)++;
}
break;
case HEALING_MACHINE_ANIMATION_STATE_CLEAN_UP:
Heap_Free(animation);
return TRUE;
}
return FALSE;
}

View File

@ -1,164 +0,0 @@
#include "overlay006/ov6_02246C24.h"
#include <nitro.h>
#include <string.h>
#include "constants/field/map_prop.h"
#include "field/field_system.h"
#include "overlay005/area_data.h"
#include "overlay005/map_prop.h"
#include "overlay005/map_prop_animation.h"
#include "field_task.h"
#include "heap.h"
#include "map_matrix.h"
#include "sound_playback.h"
#include "terrain_collision_manager.h"
typedef struct {
VecFx32 unk_00;
u8 unk_0C;
u8 unk_0D;
u8 unk_0E;
u8 unk_0F;
u8 unk_10[6];
} UnkStruct_ov6_02246C24;
static BOOL ov6_02246C9C(FieldTask *param0);
static VecFx32 Unk_ov6_0224989C[6] = {
{ -((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, -((FX32_ONE * 4) + (FX32_ONE / 2)) },
{ ((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, -((FX32_ONE * 4) + (FX32_ONE / 2)) },
{ -((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, 0x0 },
{ ((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, 0x0 },
{ -((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, ((FX32_ONE * 4) + (FX32_ONE / 2)) },
{ ((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, ((FX32_ONE * 4) + (FX32_ONE / 2)) }
};
void ov6_02246C24(FieldSystem *fieldSystem, const u8 param1)
{
BOOL v0;
MapProp *v1;
int v2;
int v3 = MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE;
v0 = FieldSystem_FindLoadedMapPropByModelID(fieldSystem, v3, &v1, &v2);
if (v0) {
UnkStruct_ov6_02246C24 *v4 = Heap_AllocAtEnd(HEAP_ID_FIELD1, sizeof(UnkStruct_ov6_02246C24));
v4->unk_0C = param1;
v4->unk_0D = 0;
v4->unk_0E = 0;
v4->unk_0F = 0;
{
VecFx32 v5;
TerrainCollisionManager_GetMapAbsoluteOrigin(v2, MapMatrix_GetWidth(fieldSystem->mapMatrix), &v5);
v4->unk_00 = MapProp_GetPosition(v1);
v4->unk_00.x += v5.x;
v4->unk_00.z += v5.z;
}
FieldTask_InitCall(fieldSystem->task, ov6_02246C9C, v4);
} else {
GF_ASSERT(FALSE);
}
}
static BOOL ov6_02246C9C(FieldTask *param0)
{
FieldSystem *fieldSystem = FieldTask_GetFieldSystem(param0);
UnkStruct_ov6_02246C24 *v1 = (UnkStruct_ov6_02246C24 *)FieldTask_GetEnv(param0);
switch (v1->unk_0F) {
case 0: {
NNSG3dResMdl *v2;
NNSG3dResFileHeader **v3;
NNSG3dResMdl *v4;
NNSG3dResFileHeader **v5;
MapProp *v6;
NNSG3dRenderObj *v7;
BOOL v8;
v3 = AreaDataManager_GetMapPropModelFile(MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, fieldSystem->areaDataManager);
v5 = AreaDataManager_GetMapPropModelFile(MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_TV, fieldSystem->areaDataManager);
v2 = NNS_G3dGetMdlByIdx(NNS_G3dGetMdlSet(*v3), 0);
v4 = NNS_G3dGetMdlByIdx(NNS_G3dGetMdlSet(*v5), 0);
MapPropOneShotAnimationManager_LoadPropAnimations(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, 0x10, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, NULL, v2, AreaDataManager_GetMapPropTexture(fieldSystem->areaDataManager), 1, 1, 0);
v8 = FieldSystem_FindLoadedMapPropByModelID(fieldSystem, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_TV, &v6, NULL);
GF_ASSERT(v8);
v7 = MapProp_GetRenderObj(v6);
MapPropOneShotAnimationManager_LoadPropAnimations(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, 0x20, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_TV, v7, v4, AreaDataManager_GetMapPropTexture(fieldSystem->areaDataManager), 1, 1, 0);
}
(v1->unk_0F)++;
break;
case 1: {
MapProp *v9;
NNSG3dRenderObj *v10;
VecFx32 v11;
VecFx32 v12 = { 0, 0, 0 };
v11.x = v1->unk_00.x + Unk_ov6_0224989C[v1->unk_0D].x;
v11.y = v1->unk_00.y + Unk_ov6_0224989C[v1->unk_0D].y;
v11.z = v1->unk_00.z + Unk_ov6_0224989C[v1->unk_0D].z;
Sound_PlayEffect(SEQ_SE_DP_BOWA);
v1->unk_10[v1->unk_0D] = MapPropManager_LoadOne(fieldSystem->mapPropManager, fieldSystem->areaDataManager, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, &v11, &v12, fieldSystem->mapPropAnimMan);
v9 = MapPropManager_GetLoadedPropSafely(fieldSystem->mapPropManager, v1->unk_10[v1->unk_0D]);
v10 = MapProp_GetRenderObj(v9);
MapPropOneShotAnimationManager_SetAnimationRenderObj(fieldSystem->mapPropOneShotAnimMan, 0x10, v1->unk_0D, v10);
(v1->unk_0F)++;
} break;
case 2:
if (v1->unk_0E < 15) {
v1->unk_0E++;
break;
} else {
v1->unk_0E = 0;
}
v1->unk_0D++;
if (v1->unk_0D < v1->unk_0C) {
(v1->unk_0F) = 1;
} else {
(v1->unk_0F)++;
}
break;
case 3:
MapPropOneShotAnimationManager_PlayAnimation(fieldSystem->mapPropOneShotAnimMan, 0x10, 0);
MapPropOneShotAnimationManager_PlayAnimation(fieldSystem->mapPropOneShotAnimMan, 0x20, 0);
Sound_PlayFanfare(SEQ_ASA);
(v1->unk_0F)++;
break;
case 4:
if ((MapPropOneShotAnimationManager_IsAnimationLoopFinished(fieldSystem->mapPropOneShotAnimMan, 0x10)) && (MapPropOneShotAnimationManager_IsAnimationLoopFinished(fieldSystem->mapPropOneShotAnimMan, 0x20)) && (Sound_IsBGMPausedByFanfare() == 0)) {
u8 v13;
MapPropOneShotAnimationManager_UnloadAnimation(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, 0x20);
MapPropOneShotAnimationManager_UnloadAnimation(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, 0x10);
for (v13 = 0; v13 < v1->unk_0C; v13++) {
MapPropManager_InitOne(v1->unk_10[v13], fieldSystem->mapPropManager);
}
(v1->unk_0F)++;
}
break;
case 5:
Heap_Free(v1);
return 1;
}
return 0;
}

View File

@ -1,143 +0,0 @@
#include "overlay006/ov6_02247D30.h"
#include <nitro.h>
#include <string.h>
#include "constants/field/map_prop.h"
#include "field/field_system.h"
#include "overlay005/area_data.h"
#include "overlay005/map_prop.h"
#include "overlay005/map_prop_animation.h"
#include "field_task.h"
#include "heap.h"
#include "map_matrix.h"
#include "terrain_collision_manager.h"
typedef struct {
VecFx32 unk_00;
u8 unk_0C;
u8 unk_0D;
u8 unk_0E;
u8 unk_0F;
u8 unk_10[6];
} UnkStruct_ov6_02247D30;
static BOOL ov6_02247DAC(FieldTask *param0);
static VecFx32 Unk_ov6_022498E4[6] = {
{ -((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, -((FX32_ONE * 4) + (FX32_ONE / 2)) },
{ ((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, -((FX32_ONE * 4) + (FX32_ONE / 2)) },
{ -((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, 0x0 },
{ ((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, 0x0 },
{ -((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, ((FX32_ONE * 4) + (FX32_ONE / 2)) },
{ ((FX32_ONE * 4) + (FX32_ONE / 2)), FX32_ONE * 12, ((FX32_ONE * 4) + (FX32_ONE / 2)) }
};
void ov6_02247D30(FieldSystem *fieldSystem, const u8 param1)
{
BOOL v0;
MapProp *v1;
int v2;
int v3 = MAP_PROP_MODEL_POKEMON_LEAGUE_HALL_OF_FAME_MACHINE;
v0 = FieldSystem_FindLoadedMapPropByModelID(fieldSystem, v3, &v1, &v2);
if (v0) {
UnkStruct_ov6_02247D30 *v4 = Heap_AllocAtEnd(HEAP_ID_FIELD1, sizeof(UnkStruct_ov6_02247D30));
v4->unk_0C = param1;
v4->unk_0D = 0;
v4->unk_0E = 0;
v4->unk_0F = 0;
{
VecFx32 v5;
TerrainCollisionManager_GetMapAbsoluteOrigin(v2, MapMatrix_GetWidth(fieldSystem->mapMatrix), &v5);
v4->unk_00 = MapProp_GetPosition(v1);
v4->unk_00.x += v5.x;
v4->unk_00.z += v5.z;
}
FieldTask_InitCall(fieldSystem->task, ov6_02247DAC, v4);
} else {
GF_ASSERT(FALSE);
}
}
static BOOL ov6_02247DAC(FieldTask *param0)
{
FieldSystem *fieldSystem = FieldTask_GetFieldSystem(param0);
UnkStruct_ov6_02247D30 *v1 = (UnkStruct_ov6_02247D30 *)FieldTask_GetEnv(param0);
switch (v1->unk_0F) {
case 0: {
NNSG3dResMdl *v2;
NNSG3dResFileHeader **v3;
NNSG3dRenderObj *v4;
v3 = AreaDataManager_GetMapPropModelFile(MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, fieldSystem->areaDataManager);
v2 = NNS_G3dGetMdlByIdx(NNS_G3dGetMdlSet(*v3), 0);
MapPropOneShotAnimationManager_LoadPropAnimations(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, 0x10, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, NULL, v2, AreaDataManager_GetMapPropTexture(fieldSystem->areaDataManager), 1, 1, 0);
}
(v1->unk_0F)++;
break;
case 1: {
MapProp *v5;
NNSG3dRenderObj *v6;
VecFx32 v7;
VecFx32 v8 = { 0, 0, 0 };
v7.x = v1->unk_00.x + Unk_ov6_022498E4[v1->unk_0D].x;
v7.y = v1->unk_00.y + Unk_ov6_022498E4[v1->unk_0D].y;
v7.z = v1->unk_00.z + Unk_ov6_022498E4[v1->unk_0D].z;
v1->unk_10[v1->unk_0D] = MapPropManager_LoadOne(fieldSystem->mapPropManager, fieldSystem->areaDataManager, MAP_PROP_MODEL_POKECENTER_HEALING_MACHINE_MINI_POKEBALL, &v7, &v8, fieldSystem->mapPropAnimMan);
v5 = MapPropManager_GetLoadedPropSafely(fieldSystem->mapPropManager, v1->unk_10[v1->unk_0D]);
v6 = MapProp_GetRenderObj(v5);
MapPropOneShotAnimationManager_SetAnimationRenderObj(fieldSystem->mapPropOneShotAnimMan, 0x10, v1->unk_0D, v6);
(v1->unk_0F)++;
} break;
case 2:
if (v1->unk_0E < 15) {
v1->unk_0E++;
break;
} else {
v1->unk_0E = 0;
}
v1->unk_0D++;
if (v1->unk_0D < v1->unk_0C) {
(v1->unk_0F) = 1;
} else {
(v1->unk_0F)++;
}
break;
case 3:
MapPropOneShotAnimationManager_PlayAnimation(fieldSystem->mapPropOneShotAnimMan, 0x10, 0);
(v1->unk_0F)++;
break;
case 4:
if (MapPropOneShotAnimationManager_IsAnimationLoopFinished(fieldSystem->mapPropOneShotAnimMan, 0x10)) {
u8 v9;
MapPropOneShotAnimationManager_UnloadAnimation(fieldSystem->mapPropAnimMan, fieldSystem->mapPropOneShotAnimMan, 0x10);
for (v9 = 0; v9 < v1->unk_0C; v9++) {
MapPropManager_InitOne(v1->unk_10[v9], fieldSystem->mapPropManager);
}
(v1->unk_0F)++;
}
break;
case 5:
Heap_Free(v1);
return 1;
}
return 0;
}

View File

@ -128,9 +128,9 @@ void Player_DeleteAll(PlayerAvatar *playerAvatar)
static PlayerAvatar *PlayerAvatar_Alloc(void)
{
PlayerAvatar *playerAvatar = Heap_Alloc(HEAP_ID_FIELD2, (sizeof(PlayerAvatar)));
PlayerAvatar *playerAvatar = Heap_Alloc(HEAP_ID_FIELD2, sizeof(PlayerAvatar));
GF_ASSERT(playerAvatar != NULL);
memset(playerAvatar, 0, (sizeof(PlayerAvatar)));
memset(playerAvatar, 0, sizeof(PlayerAvatar));
return playerAvatar;
}
@ -179,7 +179,7 @@ MapObject *sub_0205EA24(const MapObjectManager *mapObjMan)
int v0 = 0;
MapObject *mapObj = NULL;
while (sub_020625B0(mapObjMan, &mapObj, &v0, (1 << 0))) {
while (sub_020625B0(mapObjMan, &mapObj, &v0, 1 << 0)) {
if (MapObject_GetMovementType(mapObj) == 0x1) {
break;
}
@ -685,7 +685,7 @@ u32 Player_ConvertStateToTransition(int param0)
case 0x15:
return PLAYER_TRANSITION_SAVE;
case 0x16:
return PLAYER_TRANSITION_HEAL;
return PLAYER_TRANSITION_HEALING;
}
GF_ASSERT(0);
@ -700,15 +700,15 @@ PlayerAvatar *sub_0205EF3C(FieldSystem *fieldSystem)
void sub_0205EF40(PlayerAvatar *playerAvatar, int param1)
{
if (param1 == 1) {
sub_0205EB9C(playerAvatar, (1 << 0));
sub_0205EB9C(playerAvatar, 1 << 0);
} else {
sub_0205EBA4(playerAvatar, (1 << 0));
sub_0205EBA4(playerAvatar, 1 << 0);
}
}
int sub_0205EF58(PlayerAvatar *playerAvatar)
{
if (sub_0205EBB0(playerAvatar, (1 << 0))) {
if (sub_0205EBB0(playerAvatar, 1 << 0)) {
return 1;
}
@ -718,15 +718,15 @@ int sub_0205EF58(PlayerAvatar *playerAvatar)
void sub_0205EF6C(PlayerAvatar *playerAvatar, int param1)
{
if (param1 == 1) {
sub_0205EB9C(playerAvatar, (1 << 1));
sub_0205EB9C(playerAvatar, 1 << 1);
} else {
sub_0205EBA4(playerAvatar, (1 << 1));
sub_0205EBA4(playerAvatar, 1 << 1);
}
}
int sub_0205EF84(PlayerAvatar *playerAvatar)
{
if (sub_0205EBB0(playerAvatar, (1 << 1))) {
if (sub_0205EBB0(playerAvatar, 1 << 1)) {
return 1;
}
@ -736,15 +736,15 @@ int sub_0205EF84(PlayerAvatar *playerAvatar)
void sub_0205EF98(PlayerAvatar *playerAvatar, int param1)
{
if (param1 == 1) {
sub_0205EB9C(playerAvatar, (1 << 2));
sub_0205EB9C(playerAvatar, 1 << 2);
} else {
sub_0205EBA4(playerAvatar, (1 << 2));
sub_0205EBA4(playerAvatar, 1 << 2);
}
}
BOOL sub_0205EFB0(PlayerAvatar *playerAvatar)
{
if (sub_0205EBB0(playerAvatar, (1 << 2))) {
if (sub_0205EBB0(playerAvatar, 1 << 2)) {
return TRUE;
}
@ -754,15 +754,15 @@ BOOL sub_0205EFB0(PlayerAvatar *playerAvatar)
void sub_0205EFC4(PlayerAvatar *playerAvatar, int flag)
{
if (flag == TRUE) {
sub_0205EB9C(playerAvatar, (1 << 3));
sub_0205EB9C(playerAvatar, 1 << 3);
} else {
sub_0205EBA4(playerAvatar, (1 << 3));
sub_0205EBA4(playerAvatar, 1 << 3);
}
}
BOOL sub_0205EFDC(PlayerAvatar *playerAvatar)
{
if (sub_0205EBB0(playerAvatar, (1 << 3))) {
if (sub_0205EBB0(playerAvatar, 1 << 3)) {
return TRUE;
}
@ -772,15 +772,15 @@ BOOL sub_0205EFDC(PlayerAvatar *playerAvatar)
void PlayerAvatar_SetInDeepSwamp(PlayerAvatar *playerAvatar, BOOL flag)
{
if (flag == TRUE) {
sub_0205EB9C(playerAvatar, (1 << 4));
sub_0205EB9C(playerAvatar, 1 << 4);
} else {
sub_0205EBA4(playerAvatar, (1 << 4));
sub_0205EBA4(playerAvatar, 1 << 4);
}
}
BOOL PlayerAvatar_IsNotInDeepSwamp(PlayerAvatar *playerAvatar)
{
if (sub_0205EBB0(playerAvatar, (1 << 4))) {
if (sub_0205EBB0(playerAvatar, 1 << 4)) {
return TRUE;
}
@ -790,15 +790,15 @@ BOOL PlayerAvatar_IsNotInDeepSwamp(PlayerAvatar *playerAvatar)
void sub_0205F01C(PlayerAvatar *playerAvatar, BOOL flag)
{
if (flag == TRUE) {
sub_0205EB9C(playerAvatar, (1 << 5));
sub_0205EB9C(playerAvatar, 1 << 5);
} else {
sub_0205EBA4(playerAvatar, (1 << 5));
sub_0205EBA4(playerAvatar, 1 << 5);
}
}
BOOL sub_0205F034(PlayerAvatar *playerAvatar)
{
if (sub_0205EBB0(playerAvatar, (1 << 5))) {
if (sub_0205EBB0(playerAvatar, 1 << 5)) {
return TRUE;
}
@ -807,17 +807,17 @@ BOOL sub_0205F034(PlayerAvatar *playerAvatar)
void sub_0205F048(PlayerAvatar *playerAvatar)
{
sub_0205EB9C(playerAvatar, (1 << 6));
sub_0205EB9C(playerAvatar, 1 << 6);
}
void sub_0205F054(PlayerAvatar *playerAvatar)
{
sub_0205EBA4(playerAvatar, (1 << 6));
sub_0205EBA4(playerAvatar, 1 << 6);
}
BOOL sub_0205F060(PlayerAvatar *playerAvatar)
{
if (sub_0205EBB0(playerAvatar, (1 << 6))) {
if (sub_0205EBB0(playerAvatar, 1 << 6)) {
return TRUE;
}
@ -827,38 +827,38 @@ BOOL sub_0205F060(PlayerAvatar *playerAvatar)
void sub_0205F074(PlayerAvatar *playerAvatar, BOOL flag)
{
if (flag == TRUE) {
sub_0205EB9C(playerAvatar, (1 << 7));
sub_0205EB9C(playerAvatar, 1 << 7);
} else {
sub_0205EBA4(playerAvatar, (1 << 7));
sub_0205EBA4(playerAvatar, 1 << 7);
}
}
int sub_0205F08C(PlayerAvatar *playerAvatar)
{
return sub_0205EBB0(playerAvatar, (1 << 7));
return sub_0205EBB0(playerAvatar, 1 << 7);
}
void PlayerAvatar_SetDistortionState(PlayerAvatar *playerAvatar, enum AvatarDistortionState state)
{
sub_0205EBA4(playerAvatar, ((1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12)));
sub_0205EBA4(playerAvatar, (1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12));
switch (state) {
case AVATAR_DISTORTION_STATE_NONE:
return;
case AVATAR_DISTORTION_STATE_ACTIVE:
sub_0205EB9C(playerAvatar, (1 << 8));
sub_0205EB9C(playerAvatar, 1 << 8);
return;
case AVATAR_DISTORTION_STATE_FLOOR:
sub_0205EB9C(playerAvatar, (1 << 9));
sub_0205EB9C(playerAvatar, 1 << 9);
return;
case AVATAR_DISTORTION_STATE_WEST_WALL:
sub_0205EB9C(playerAvatar, (1 << 10));
sub_0205EB9C(playerAvatar, 1 << 10);
return;
case AVATAR_DISTORTION_STATE_EAST_WALL:
sub_0205EB9C(playerAvatar, (1 << 11));
sub_0205EB9C(playerAvatar, 1 << 11);
return;
case AVATAR_DISTORTION_STATE_CEILING:
sub_0205EB9C(playerAvatar, (1 << 12));
sub_0205EB9C(playerAvatar, 1 << 12);
return;
}
@ -868,7 +868,7 @@ void PlayerAvatar_SetDistortionState(PlayerAvatar *playerAvatar, enum AvatarDist
enum AvatarDistortionState PlayerAvatar_MapDistortionState(PlayerAvatar *const playerAvatar)
{
enum AvatarDistortionState state = AVATAR_DISTORTION_STATE_NONE;
u32 v1 = sub_0205EBB0(playerAvatar, ((1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12)));
u32 v1 = sub_0205EBB0(playerAvatar, (1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12));
switch (v1) {
case (1 << 8):

View File

@ -73,14 +73,13 @@
#include "overlay005/size_contest.h"
#include "overlay005/vs_seeker.h"
#include "overlay006/elevator_animation.h"
#include "overlay006/healing_machine_animation.h"
#include "overlay006/hm_cut_in.h"
#include "overlay006/npc_trade.h"
#include "overlay006/ov6_0223E140.h"
#include "overlay006/ov6_02242AF0.h"
#include "overlay006/ov6_02243004.h"
#include "overlay006/ov6_02246C24.h"
#include "overlay006/ov6_02247830.h"
#include "overlay006/ov6_02247D30.h"
#include "overlay006/ov6_02247F5C.h"
#include "overlay006/ov6_02248948.h"
#include "overlay006/pc_animation.h"
@ -490,7 +489,7 @@ static BOOL ScrCmd_155(ScriptContext *ctx);
static BOOL ScrCmd_29C(ScriptContext *ctx);
static BOOL ScrCmd_156(ScriptContext *ctx);
static BOOL ScrCmd_2BA(ScriptContext *ctx);
static BOOL ScrCmd_14B(ScriptContext *ctx);
static BOOL ScrCmd_BlackOutFromBattle2(ScriptContext *ctx);
static BOOL ScrCmd_14C(ScriptContext *ctx);
static BOOL ScrCmd_GetPlayerGender(ScriptContext *ctx);
static BOOL ScrCmd_HealParty(ScriptContext *ctx);
@ -620,7 +619,7 @@ static BOOL ScrCmd_GetPartyMonEVTotal(ScriptContext *ctx);
static BOOL ScrCmd_GetDayOfWeek(ScriptContext *ctx);
static BOOL ScrCmd_239(ScriptContext *ctx);
static BOOL ScrCmd_GetSpeciesFootprintType(ScriptContext *ctx);
static BOOL ScrCmd_23B(ScriptContext *ctx);
static BOOL ScrCmd_PlayPokecenterHealingAnimation(ScriptContext *ctx);
static BOOL ScrCmd_PlayElevatorAnimation(ScriptContext *ctx);
static BOOL ScrCmd_PlayBoatCutscene(ScriptContext *ctx);
static BOOL ScrCmd_243(ScriptContext *ctx);
@ -635,7 +634,7 @@ static BOOL ScrCmd_PlayPCShutDownAnimation(ScriptContext *ctx);
static BOOL ScrCmd_GetPCBoxesFreeSlotCount(ScriptContext *ctx);
static BOOL ScrCmd_258(ScriptContext *ctx);
static BOOL ScrCmd_259(ScriptContext *ctx);
static BOOL ScrCmd_25A(ScriptContext *ctx);
static BOOL ScrCmd_PlayHallOfFameHealingAnimation(ScriptContext *ctx);
static BOOL ScrCmd_InitPersistedMapFeaturesForPlatformLift(ScriptContext *ctx);
static BOOL ScrCmd_TriggerPlatformLift(ScriptContext *ctx);
static BOOL ScrCmd_CheckPlatformLiftNotUsedWhenEnteredMap(ScriptContext *ctx);
@ -1101,7 +1100,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_PokeMartSpecialties,
ScrCmd_PokeMartDecor,
ScrCmd_PokeMartSeal,
ScrCmd_14B,
ScrCmd_BlackOutFromBattle2,
ScrCmd_14C,
ScrCmd_GetPlayerGender,
ScrCmd_HealParty,
@ -1341,7 +1340,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_238,
ScrCmd_239,
ScrCmd_GetSpeciesFootprintType,
ScrCmd_23B,
ScrCmd_PlayPokecenterHealingAnimation,
ScrCmd_PlayElevatorAnimation,
ScrCmd_PlayBoatCutscene,
ScrCmd_MysteryGiftGive,
@ -1372,7 +1371,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_ShowAccessoryShop,
ScrCmd_258,
ScrCmd_259,
ScrCmd_25A,
ScrCmd_PlayHallOfFameHealingAnimation,
ScrCmd_InitPersistedMapFeaturesForPlatformLift,
ScrCmd_TriggerPlatformLift,
ScrCmd_CheckPlatformLiftNotUsedWhenEnteredMap,
@ -5331,9 +5330,9 @@ static BOOL ScrCmd_156(ScriptContext *ctx)
return FALSE;
}
static BOOL ScrCmd_14B(ScriptContext *ctx)
static BOOL ScrCmd_BlackOutFromBattle2(ScriptContext *ctx)
{
sub_02052C5C(ctx->task);
FieldTask_StartBlackOutFromBattle(ctx->task);
return TRUE;
}
@ -6386,11 +6385,11 @@ static BOOL ScrCmd_GetSpeciesFootprintType(ScriptContext *ctx)
return FALSE;
}
static BOOL ScrCmd_23B(ScriptContext *ctx)
static BOOL ScrCmd_PlayPokecenterHealingAnimation(ScriptContext *ctx)
{
u16 v0 = ScriptContext_GetVar(ctx);
u16 pokeballCount = ScriptContext_GetVar(ctx);
ov6_02246C24(ctx->fieldSystem, v0);
FieldSystem_PlayHealingAnimation_Pokecenter(ctx->fieldSystem, pokeballCount);
return TRUE;
}
@ -6539,11 +6538,11 @@ static BOOL ScrCmd_259(ScriptContext *ctx)
return TRUE;
}
static BOOL ScrCmd_25A(ScriptContext *ctx)
static BOOL ScrCmd_PlayHallOfFameHealingAnimation(ScriptContext *ctx)
{
u16 v0 = ScriptContext_GetVar(ctx);
u16 pokeballCount = ScriptContext_GetVar(ctx);
ov6_02247D30(ctx->fieldSystem, v0);
FieldSystem_PlayHealingAnimation_HallOfFame(ctx->fieldSystem, pokeballCount);
return TRUE;
}
@ -7381,9 +7380,9 @@ static BOOL ScrCmd_2B6(ScriptContext *ctx)
static BOOL ScrCmd_GetTrainerCardLevel(ScriptContext *ctx)
{
FieldSystem *fieldSystem = ctx->fieldSystem;
u16 *destTrainerCardStars = ScriptContext_GetVarPointer(ctx);
u16 *destVar = ScriptContext_GetVarPointer(ctx);
*destTrainerCardStars = TrainerCard_CalculateStars(fieldSystem);
*destVar = TrainerCard_CalculateLevel(fieldSystem);
return FALSE;
}

View File

@ -249,7 +249,7 @@ BOOL ScrCmd_PlayTrainerEncounterBGM(ScriptContext *ctx)
BOOL ScrCmd_BlackOutFromBattle(ScriptContext *ctx)
{
sub_02052C5C(ctx->task);
FieldTask_StartBlackOutFromBattle(ctx->task);
return TRUE;
}

View File

@ -39,7 +39,7 @@ typedef struct {
TrainerCard *unk_04;
} UnkStruct_02072204;
static void TrainerCard_SetFields(u8 badgesInteractable, u8 gameVersion, u8 stars, u8 gymLeadersToHide, u8 regionCode, TrainerCard *trainerCard);
static void TrainerCard_SetFields(u8 badgesInteractable, u8 gameVersion, u8 level, u8 gymLeadersToHide, u8 regionCode, TrainerCard *trainerCard);
static void TrainerCard_SetTrainerInfo(u16 id, u8 gender, const u16 *name, u32 money, u32 seenPokemon, BOOL pokedexObtained, u32 score, TrainerCard *trainerCard);
static void TrainerCard_SetDates(u8 gameCompleted, const PlayTime *playTime, const RTCDate *adventureStartedDate, const RTCDate *hofDebutDate, const RTCTime *hofDebutTime, u8 param5, TrainerCard *trainerCard);
static void TrainerCard_SetLinkDataAndSignature(u32 timesLinked, u32 linkBattleWins, u32 linkBattleLosses, u32 linkTrades, const u8 *signature, TrainerCard *trainerCard);
@ -54,7 +54,7 @@ void TrainerCard_Init(u8 badgesInteractable, u8 liveTimeDisplay, u8 gymLeadersTo
trainerCard->trainerAppearance = trainerAppearance;
TrainerCard_SetFields(badgesInteractable, GAME_VERSION, TrainerCard_CalculateStars(fieldSystem), gymLeadersToHide, TrainerInfo_RegionCode(trainerInfo), trainerCard);
TrainerCard_SetFields(badgesInteractable, GAME_VERSION, TrainerCard_CalculateLevel(fieldSystem), gymLeadersToHide, TrainerInfo_RegionCode(trainerInfo), trainerCard);
TrainerCard_SetTrainerInfo(TrainerInfo_ID_LowHalf(trainerInfo), TrainerInfo_Gender(trainerInfo), TrainerInfo_Name(trainerInfo), TrainerInfo_Money(trainerInfo), Pokedex_CountSeen(SaveData_GetPokedex(fieldSystem->saveData)), Pokedex_IsObtained(SaveData_GetPokedex(fieldSystem->saveData)), GameRecords_GetTrainerScore(gameRecords), trainerCard);
@ -102,45 +102,45 @@ void TrainerCard_Free(TrainerCard *trainerCard)
Heap_Free(trainerCard);
}
u8 TrainerCard_CalculateStars(FieldSystem *fieldSystem)
u8 TrainerCard_CalculateLevel(FieldSystem *fieldSystem)
{
u8 trainerCardStars;
u8 trainerCardLevel;
SaveData *saveData = FieldSystem_GetSaveData(fieldSystem);
GameRecords *gameRecords = SaveData_GetGameRecords(saveData);
VarsFlags *varsFlags = SaveData_GetVarsFlags(saveData);
UndergroundRecord *undergroundRecord = SaveData_UndergroundRecord(saveData);
BattleFrontier *frontier = SaveData_GetBattleFrontier(saveData);
trainerCardStars = 0;
trainerCardLevel = 0;
if (SystemFlag_CheckGameCompleted(varsFlags)) {
trainerCardStars++;
trainerCardLevel++;
}
if (Pokedex_NationalDexCompleted(SaveData_GetPokedex(saveData))) {
trainerCardStars++;
trainerCardLevel++;
}
if ((sub_02030698(frontier, 0, 0xff) >= 100) || (sub_02030698(frontier, 2, 0xff) >= 100) || (sub_02030698(frontier, 4, 0xff) >= 100) || (sub_02030698(frontier, 6, 0xff) >= 100) || (sub_02030698(frontier, 8, 0xff) >= 100)) {
trainerCardStars++;
trainerCardLevel++;
}
if (SystemFlag_CheckContestMaster(varsFlags, CONTEST_TYPE_COOL) || SystemFlag_CheckContestMaster(varsFlags, CONTEST_TYPE_BEAUTY) || SystemFlag_CheckContestMaster(varsFlags, CONTEST_TYPE_SMART) || SystemFlag_CheckContestMaster(varsFlags, CONTEST_TYPE_TOUGH) || SystemFlag_CheckContestMaster(varsFlags, CONTEST_TYPE_CUTE)) {
trainerCardStars++;
trainerCardLevel++;
}
if (UndergroundRecord_HasPlatBaseFlag(undergroundRecord) == TRUE) {
trainerCardStars++;
trainerCardLevel++;
}
return trainerCardStars;
return trainerCardLevel;
}
static void TrainerCard_SetFields(u8 badgesInteractable, u8 gameVersion, u8 stars, u8 gymLeadersToHide, u8 regionCode, TrainerCard *trainerCard)
static void TrainerCard_SetFields(u8 badgesInteractable, u8 gameVersion, u8 level, u8 gymLeadersToHide, u8 regionCode, TrainerCard *trainerCard)
{
trainerCard->badgesInteractable = badgesInteractable;
trainerCard->gameVersion = gameVersion;
trainerCard->stars = stars;
trainerCard->level = level;
trainerCard->regionCode = regionCode;
trainerCard->gymLeadersToHide_Unused = gymLeadersToHide;
}

View File

@ -3,6 +3,7 @@
#include <nitro.h>
#include <string.h>
#include "constants/trainer_card_levels.h"
#include "generated/genders.h"
#include "struct_defs/struct_02099F80.h"
@ -107,7 +108,7 @@ static BOOL TrainerCard_FlipTrainerCard(TrainerCardScreen *trainerCardScreen);
static BOOL TrainerCard_OpenCloseBadgeCase(TrainerCardScreen *trainerCardScreen);
static int TrainerCard_GetPlayerInput(TrainerCardScreen *trainerCardScreen);
static void TrainerCard_HandleBadgePolishing(TrainerCardScreen *trainerCardScreen);
static void TrainerCard_LoadCardPalette(u8 stars, u8 pokedexObtained, NARC *narc);
static void TrainerCard_LoadCardPalette(u8 level, u8 pokedexObtained, NARC *narc);
static void TrainerCard_LoadCasePalette(u8 gameVersion, NARC *narc);
static void TrainerCard_LoadTrainerAppearancePalette(u8 trainerAppearance, NARC *narc);
static void TrainerCard_RedrawBadgeCaseButton(TrainerCardScreen *trainerCardScreen, u8 buttonSpriteIndex);
@ -476,29 +477,29 @@ static void TrainerCard_SetVRAMBanks(void)
GXLayers_SetBanks(&banks);
}
static void TrainerCard_LoadCardPalette(u8 stars, u8 pokedexObtained, NARC *narc)
static void TrainerCard_LoadCardPalette(u8 level, u8 pokedexObtained, NARC *narc)
{
void *nclrBuffer;
NNSG2dPaletteData *paletteData;
if (pokedexObtained) {
switch (stars) {
case 0:
switch (level) {
case TRAINER_CARD_LEVEL_NORMAL:
nclrBuffer = Graphics_GetPlttDataFromOpenNARC(narc, 0, &paletteData, HEAP_ID_TRAINER_CARD_SCREEN);
break;
case 1:
case TRAINER_CARD_LEVEL_COBALT:
nclrBuffer = Graphics_GetPlttDataFromOpenNARC(narc, 1, &paletteData, HEAP_ID_TRAINER_CARD_SCREEN);
break;
case 2:
case TRAINER_CARD_LEVEL_BRONZE:
nclrBuffer = Graphics_GetPlttDataFromOpenNARC(narc, 2, &paletteData, HEAP_ID_TRAINER_CARD_SCREEN);
break;
case 3:
case TRAINER_CARD_LEVEL_SILVER:
nclrBuffer = Graphics_GetPlttDataFromOpenNARC(narc, 3, &paletteData, HEAP_ID_TRAINER_CARD_SCREEN);
break;
case 4:
case TRAINER_CARD_LEVEL_GOLD:
nclrBuffer = Graphics_GetPlttDataFromOpenNARC(narc, 4, &paletteData, HEAP_ID_TRAINER_CARD_SCREEN);
break;
case 5:
case TRAINER_CARD_LEVEL_BLACK:
nclrBuffer = Graphics_GetPlttDataFromOpenNARC(narc, 5, &paletteData, HEAP_ID_TRAINER_CARD_SCREEN);
break;
}
@ -677,7 +678,7 @@ static void TrainerCard_DrawTrainerCard(TrainerCardScreen *trainerCardScreen, NA
GXS_LoadBGPltt(paletteData->pRawData, 0, PALETTE_SIZE_EXT_BYTES);
Heap_Free(nclrBuffer);
TrainerCard_LoadCardPalette(trainerCardScreen->trainerCard->stars, trainerCardScreen->trainerCard->pokedexObtained, narc);
TrainerCard_LoadCardPalette(trainerCardScreen->trainerCard->level, trainerCardScreen->trainerCard->pokedexObtained, narc);
NNSG2dPaletteData *paletteData2;

View File

@ -58,7 +58,7 @@ static int MapSpawnIdToIndex(int spawnDestination)
return spawnDestination;
}
int sub_0203A7EC(void)
int FieldOverworldState_GetDefaultWarpID(void)
{
return 1;
}

View File

@ -198,7 +198,7 @@ static void sub_02052AA4(UnkStruct_02052AA4 *param0, u16 param1, u8 param2, u8 p
return;
}
BOOL sub_02052B2C(FieldTask *task)
BOOL FieldTask_BlackOutFromBattle(FieldTask *task)
{
FieldSystem *fieldSystem = FieldTask_GetFieldSystem(task);
int *state = FieldTask_GetState(task);
@ -208,20 +208,18 @@ BOOL sub_02052B2C(FieldTask *task)
if ((fieldSystem != NULL) && (fieldSystem->saveData != NULL)) {
Party_SetGiratinaForm(SaveData_GetParty(fieldSystem->saveData), GIRATINA_FORM_ALTERED);
}
}
{
Location location;
FieldOverworldState *fieldState = SaveData_GetFieldOverworldState(fieldSystem->saveData);
u16 warpId = FieldOverworldState_GetWarpId(fieldState);
Location location;
FieldOverworldState *fieldState = SaveData_GetFieldOverworldState(fieldSystem->saveData);
u16 warpId = FieldOverworldState_GetWarpId(fieldState);
Location_InitWhiteOut(warpId, &location);
Location_InitFly(warpId, FieldOverworldState_GetExitLocation(fieldState));
FieldTask_ChangeMapByLocation(task, &location);
FieldSystem_ClearPartnerTrainer(fieldSystem);
}
Location_InitWhiteOut(warpId, &location);
Location_InitFly(warpId, FieldOverworldState_GetExitLocation(fieldState));
FieldTask_ChangeMapByLocation(task, &location);
FieldSystem_ClearPartnerTrainer(fieldSystem);
(*state)++;
break;
}
case 1:
Sound_FadeOutBGM(0, 20);
(*state)++;
@ -245,11 +243,10 @@ BOOL sub_02052B2C(FieldTask *task)
case 5:
BrightnessController_SetScreenBrightness(0, GX_BLEND_PLANEMASK_BG0 | GX_BLEND_PLANEMASK_BG1 | GX_BLEND_PLANEMASK_BG2 | GX_BLEND_PLANEMASK_BG3 | GX_BLEND_PLANEMASK_OBJ | GX_BLEND_PLANEMASK_BD, BRIGHTNESS_BOTH_SCREENS);
if (sub_0203A7EC()
== FieldOverworldState_GetWarpId(SaveData_GetFieldOverworldState(fieldSystem->saveData))) {
ScriptManager_Start(task, 2020, NULL, NULL);
if (FieldOverworldState_GetDefaultWarpID() == FieldOverworldState_GetWarpId(SaveData_GetFieldOverworldState(fieldSystem->saveData))) {
ScriptManager_Start(task, 0x7E4, NULL, NULL);
} else {
ScriptManager_Start(task, 2021, NULL, NULL);
ScriptManager_Start(task, 0x7E5, NULL, NULL);
}
(*state)++;
@ -261,7 +258,7 @@ BOOL sub_02052B2C(FieldTask *task)
return 0;
}
void sub_02052C5C(FieldTask *task)
void FieldTask_StartBlackOutFromBattle(FieldTask *task)
{
FieldTask_InitCall(task, sub_02052B2C, NULL);
FieldTask_InitCall(task, FieldTask_BlackOutFromBattle, NULL);
}

View File

@ -665,8 +665,8 @@ void sub_0205AB10(FieldSystem *fieldSystem, UnkFuncPtr_0205AB10 *param1)
v0->unk_08 = param1;
v0->unk_28 = StringTemplate_Default(HEAP_ID_FIELD2);
v0->unk_2C = MessageLoader_Init(MESSAGE_LOADER_BANK_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, TEXT_BANK_UNK_0011, HEAP_ID_FIELD2);
v0->unk_0C = Strbuf_Init((100 * 2), HEAP_ID_FIELD2);
v0->unk_10 = Strbuf_Init((100 * 2), HEAP_ID_FIELD2);
v0->unk_0C = Strbuf_Init(100 * 2, HEAP_ID_FIELD2);
v0->unk_10 = Strbuf_Init(100 * 2, HEAP_ID_FIELD2);
Window_Init(&v0->unk_14);
Window_Init(&v0->unk_54);
@ -1008,10 +1008,10 @@ static BOOL sub_0205B140(FieldTask *param0)
case 0:
v1->unk_18 = StringTemplate_Default(HEAP_ID_FIELD1);
v1->unk_1C = MessageLoader_Init(MESSAGE_LOADER_BANK_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, TEXT_BANK_UNK_0011, HEAP_ID_FIELD1);
v1->unk_00 = Strbuf_Init((100 * 2), HEAP_ID_FIELD1);
v1->unk_04 = Strbuf_Init((100 * 2), HEAP_ID_FIELD1);
v1->unk_00 = Strbuf_Init(100 * 2, HEAP_ID_FIELD1);
v1->unk_04 = Strbuf_Init(100 * 2, HEAP_ID_FIELD1);
MessageLoader_GetStrbuf(v1->unk_1C, 2 + v2->stars, v1->unk_00);
MessageLoader_GetStrbuf(v1->unk_1C, 2 + v2->level, v1->unk_00);
StringTemplate_SetPlayerName(v1->unk_18, 0, CommInfo_TrainerInfo(v1->unk_24));
StringTemplate_Format(v1->unk_18, v1->unk_04, v1->unk_00);
FieldMessage_AddWindow(fieldSystem->bgConfig, &v1->unk_08, 3);

View File

@ -92,9 +92,9 @@ typedef struct UnkStruct_02066F88 {
u16 unk_0E;
} UnkStruct_02066F88;
typedef struct NurseJoyBowMovementData {
typedef struct PokecenterNurseBowMovementData {
int timer;
} NurseJoyBowMovementData;
} PokecenterNurseBowMovementData;
typedef struct RevealTrainerMovementData {
u32 jumpHeightIndex;
@ -1359,9 +1359,9 @@ static BOOL MovementAction_WalkEverSoSlightlyFast_Step1(MapObject *mapObj)
return MovementAction_WalkUneven(mapObj, sStepSizes_WalkEverSoSlightlyFast) == TRUE;
}
static BOOL MovementAction_NurseJoyBow_Step0(MapObject *mapObj)
static BOOL MovementAction_PokecenterNurseBow_Step0(MapObject *mapObj)
{
NurseJoyBowMovementData *data = MapObject_InitMovementData(mapObj, sizeof(NurseJoyBowMovementData));
PokecenterNurseBowMovementData *data = MapObject_InitMovementData(mapObj, sizeof(PokecenterNurseBowMovementData));
sub_02062A0C(mapObj, MAP_OBJ_UNK_A0_09);
MapObject_AdvanceMovementStep(mapObj);
@ -1369,9 +1369,9 @@ static BOOL MovementAction_NurseJoyBow_Step0(MapObject *mapObj)
return FALSE;
}
static BOOL MovementAction_NurseJoyBow_Step1(MapObject *mapObj)
static BOOL MovementAction_PokecenterNurseBow_Step1(MapObject *mapObj)
{
NurseJoyBowMovementData *data = MapObject_GetMovementData(mapObj);
PokecenterNurseBowMovementData *data = MapObject_GetMovementData(mapObj);
if (++(data->timer) >= 8) {
MapObject_TryFace(mapObj, DIR_SOUTH);
@ -2603,9 +2603,9 @@ BOOL (*const gMovementActionFuncs_WalkEverSoSlightlyFastEast[])(MapObject *) = {
MovementAction_End,
};
BOOL (*const gMovementActionFuncs_NurseJoyBow[])(MapObject *) = {
MovementAction_NurseJoyBow_Step0,
MovementAction_NurseJoyBow_Step1,
BOOL (*const gMovementActionFuncs_PokecenterNurseBow[])(MapObject *) = {
MovementAction_PokecenterNurseBow_Step0,
MovementAction_PokecenterNurseBow_Step1,
MovementAction_End,
};

View File

@ -120,7 +120,7 @@ void sub_02071F20(TrainerCard *param0)
u8 sub_02071F28(FieldSystem *fieldSystem)
{
u8 trainerCardStars;
u8 trainerCardLevel;
SaveData *saveData;
GameRecords *gameRecords;
VarsFlags *varsFlags;
@ -132,29 +132,29 @@ u8 sub_02071F28(FieldSystem *fieldSystem)
varsFlags = SaveData_GetVarsFlags(saveData);
undergroundRecord = SaveData_UndergroundRecord(saveData);
frontier = SaveData_GetBattleFrontier(saveData);
trainerCardStars = 0;
trainerCardLevel = 0;
if (SystemFlag_CheckGameCompleted(varsFlags)) {
trainerCardStars++;
trainerCardLevel++;
}
if (Pokedex_NationalDexCompleted(SaveData_GetPokedex(saveData))) {
trainerCardStars++;
trainerCardLevel++;
}
if ((sub_02030698(frontier, 0, 0xff) >= 100) || (sub_02030698(frontier, 2, 0xff) >= 100) || (sub_02030698(frontier, 4, 0xff) >= 100) || (sub_02030698(frontier, 6, 0xff) >= 100) || (sub_02030698(frontier, 8, 0xff) >= 100)) {
trainerCardStars++;
trainerCardLevel++;
}
if (SystemFlag_CheckContestMaster(varsFlags, 0) || SystemFlag_CheckContestMaster(varsFlags, 1) || SystemFlag_CheckContestMaster(varsFlags, 3) || SystemFlag_CheckContestMaster(varsFlags, 4) || SystemFlag_CheckContestMaster(varsFlags, 2)) {
trainerCardStars++;
trainerCardLevel++;
}
if (UndergroundRecord_HasPlatBaseFlag(undergroundRecord) == TRUE) {
trainerCardStars++;
trainerCardLevel++;
}
return trainerCardStars;
return trainerCardLevel;
}
static void sub_02072014(const u8 param0, const u8 param1, const u8 param2, const u8 param3, const u8 param4, TrainerCard *param5)

View File

@ -728,7 +728,7 @@ BOOL (*const *const gMovementActionFuncs[MAX_MOVEMENT_ACTION])(MapObject *) = {
[MOVEMENT_ACTION_WALK_EVER_SO_SLIGHTLY_FAST_SOUTH] = gMovementActionFuncs_WalkEverSoSlightlyFastSouth,
[MOVEMENT_ACTION_WALK_EVER_SO_SLIGHTLY_FAST_WEST] = gMovementActionFuncs_WalkEverSoSlightlyFastWest,
[MOVEMENT_ACTION_WALK_EVER_SO_SLIGHTLY_FAST_EAST] = gMovementActionFuncs_WalkEverSoSlightlyFastEast,
[MOVEMENT_ACTION_NURSE_JOY_BOW] = gMovementActionFuncs_NurseJoyBow,
[MOVEMENT_ACTION_POKECENTER_NURSE_BOW] = gMovementActionFuncs_PokecenterNurseBow,
[MOVEMENT_ACTION_REVEAL_TRAINER] = gMovementActionFuncs_RevealTrainer,
[MOVEMENT_ACTION_PLAYER_GIVE] = gMovementActionFuncs_PlayerGive,
[MOVEMENT_ACTION_EMOTE_DOUBLE_EXCLAMATION_MARK] = gMovementActionFuncs_EmoteDoubleExclamationMark,