-8010
File diff suppressed because it is too large
Load Diff
@@ -639,8 +639,8 @@ struct SaveBlock1 /* 0x02025734 */
|
||||
{
|
||||
/*0x00*/ struct Coords16 pos;
|
||||
/*0x04*/ struct WarpData location;
|
||||
/*0x0C*/ struct WarpData warp1;
|
||||
/*0x14*/ struct WarpData warp2;
|
||||
/*0x0C*/ struct WarpData continueGameWarp;
|
||||
/*0x14*/ struct WarpData dynamicWarp;
|
||||
/*0x1C*/ struct WarpData lastHealLocation;
|
||||
/*0x24*/ struct WarpData warp4;
|
||||
/*0x2C*/ u16 savedMusic;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
gBGTilemapBuffers1
|
||||
gBGTilemapBuffers2
|
||||
gBGTilemapBuffers3
|
||||
gFieldCallback
|
||||
gFieldCallback2
|
||||
gHeldKeyCodeToSend
|
||||
gLocalLinkPlayerId
|
||||
gFieldLinkPlayerCount
|
||||
@@ -60,7 +60,7 @@ CinnabarIsland_OnFrame:: @ 8166F6E
|
||||
|
||||
CinnabarIsland_EventScript_ExitPokeCenterForOneIsland:: @ 8166F88
|
||||
lockall
|
||||
clearflag FLAG_SPECIAL_FLAG_0x4001
|
||||
clearflag FLAG_DONT_TRANSITION_MUSIC
|
||||
savebgm MUS_DUMMY
|
||||
textcolor 0
|
||||
setvar VAR_MAP_SCENE_CINNABAR_ISLAND_2, 2
|
||||
|
||||
@@ -36,7 +36,7 @@ CinnabarIsland_PokemonCenter_1F_EventScript_Bill:: @ 816E90A
|
||||
closemessage
|
||||
playbgm MUS_ANNAI, 1
|
||||
savebgm MUS_ANNAI
|
||||
setflag FLAG_SPECIAL_FLAG_0x4001
|
||||
setflag FLAG_DONT_TRANSITION_MUSIC
|
||||
setflag FLAG_HIDE_CINNABAR_POKECENTER_BILL
|
||||
delay 20
|
||||
compare VAR_FACING, DIR_SOUTH
|
||||
|
||||
@@ -224,7 +224,7 @@ PalletTown_EventScript_OakTrigger:: @ 8165605
|
||||
clearflag FLAG_HIDE_OAK_IN_HIS_LAB
|
||||
setvar VAR_MAP_SCENE_PALLET_TOWN_OAK, 1
|
||||
setflag FLAG_HIDE_OAK_IN_PALLET_TOWN
|
||||
setflag FLAG_SPECIAL_FLAG_0x4001
|
||||
setflag FLAG_DONT_TRANSITION_MUSIC
|
||||
warp MAP_PALLET_TOWN_PROFESSOR_OAKS_LAB, 255, 6, 12
|
||||
waitstate
|
||||
releaseall
|
||||
|
||||
@@ -238,7 +238,7 @@ PalletTown_ProfessorOaksLab_ChooseStarterScene:: @ 816923E
|
||||
waitmovement 0
|
||||
applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestUp
|
||||
waitmovement 0
|
||||
clearflag FLAG_SPECIAL_FLAG_0x4001
|
||||
clearflag FLAG_DONT_TRANSITION_MUSIC
|
||||
savebgm SE_STOP
|
||||
fadedefaultbgm
|
||||
msgbox PalletTown_ProfessorOaksLab_Text_RivalFedUpWithWaiting
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
"elevation": 3,
|
||||
"var": "VAR_TEMP_0",
|
||||
"var_value": "0",
|
||||
"script": "RecordCenter_EventScript_Spot"
|
||||
"script": "RecordCenter_EventScript_Spot0"
|
||||
},
|
||||
{
|
||||
"type": "trigger",
|
||||
@@ -76,7 +76,7 @@
|
||||
"elevation": 3,
|
||||
"var": "VAR_TEMP_0",
|
||||
"var_value": "0",
|
||||
"script": "RecordCenter_EventScript_Spot"
|
||||
"script": "RecordCenter_EventScript_Spot1"
|
||||
},
|
||||
{
|
||||
"type": "trigger",
|
||||
@@ -85,7 +85,7 @@
|
||||
"elevation": 3,
|
||||
"var": "VAR_TEMP_0",
|
||||
"var_value": "0",
|
||||
"script": "RecordCenter_EventScript_Spot"
|
||||
"script": "RecordCenter_EventScript_Spot2"
|
||||
},
|
||||
{
|
||||
"type": "trigger",
|
||||
@@ -94,7 +94,7 @@
|
||||
"elevation": 3,
|
||||
"var": "VAR_TEMP_0",
|
||||
"var_value": "0",
|
||||
"script": "RecordCenter_EventScript_Spot"
|
||||
"script": "RecordCenter_EventScript_Spot3"
|
||||
}
|
||||
],
|
||||
"bg_events": []
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
#include "constants/flags.h"
|
||||
#include "constants/maps.h"
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
.section .rodata
|
||||
.align 2, 0
|
||||
|
||||
sWhiteOutMoneyLossMultipliers:: @ 826D294
|
||||
.byte 2
|
||||
.byte 4
|
||||
.byte 6
|
||||
.byte 9
|
||||
.byte 12
|
||||
.byte 16
|
||||
.byte 20
|
||||
.byte 25
|
||||
.byte 30
|
||||
|
||||
.align 1
|
||||
sWhiteOutMoneyLossBadgeFlagIDs:: @ 826D29E
|
||||
.2byte FLAG_BADGE01_GET
|
||||
.2byte FLAG_BADGE02_GET
|
||||
.2byte FLAG_BADGE03_GET
|
||||
.2byte FLAG_BADGE04_GET
|
||||
.2byte FLAG_BADGE05_GET
|
||||
.2byte FLAG_BADGE06_GET
|
||||
.2byte FLAG_BADGE07_GET
|
||||
.2byte FLAG_BADGE08_GET
|
||||
|
||||
.align 2
|
||||
sDummyWarpData:: @ 826D2B0
|
||||
map MAP_UNDEFINED
|
||||
.byte 0xFF
|
||||
.align 1
|
||||
.2byte 0xFFFF, 0xFFFF
|
||||
|
||||
sUnusedData:: @ 826D2B8
|
||||
.4byte 1200
|
||||
.4byte 3600
|
||||
.4byte 1200
|
||||
.4byte 2400
|
||||
.4byte 50
|
||||
.4byte 80
|
||||
.4byte -44
|
||||
.4byte 44
|
||||
|
||||
gDirectionToVectors:: @ 826D2D8
|
||||
.4byte 0, 0
|
||||
.4byte 0, 1
|
||||
.4byte 0, -1
|
||||
.4byte -1, 0
|
||||
.4byte 1, 0
|
||||
.4byte -1, 1
|
||||
.4byte 1, 1
|
||||
.4byte -1, -1
|
||||
.4byte 1, -1
|
||||
|
||||
gUnknown_826D320:: @ 826D320
|
||||
.4byte 0x000001f8
|
||||
@ {
|
||||
@ .bg = 0,
|
||||
@ .charBaseIndex = 2,
|
||||
@ .mapBaseIndex = 31,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 0,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
.4byte 0x000011d1
|
||||
@ {
|
||||
@ .bg = 1,
|
||||
@ .charBaseIndex = 0,
|
||||
@ .mapBaseIndex = 29,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 1,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
.4byte 0x000021c2
|
||||
@ {
|
||||
@ .bg = 2,
|
||||
@ .charBaseIndex = 0,
|
||||
@ .mapBaseIndex = 28,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 2,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
.4byte 0x000031e3
|
||||
@ {
|
||||
@ .bg = 3,
|
||||
@ .charBaseIndex = 0,
|
||||
@ .mapBaseIndex = 30,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 3,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
|
||||
gFlashEffectParams:: @ 826D330
|
||||
.4byte REG_WIN0H
|
||||
.4byte (2 >> 1) | ((DMA_16BIT | DMA_DEST_RELOAD | DMA_SRC_INC | DMA_REPEAT | DMA_START_HBLANK | DMA_ENABLE) << 16)
|
||||
.byte 1, 0
|
||||
|
||||
.align 2
|
||||
gUnknown_826D33C:: @ 826D33C
|
||||
.4byte sub_8058684
|
||||
.4byte sub_80586A4
|
||||
.4byte sub_80586A8
|
||||
|
||||
gUnknown_826D348:: @ 826D348
|
||||
.4byte sub_80586C8
|
||||
.4byte sub_80586CC
|
||||
.4byte sub_80586CC
|
||||
.4byte sub_80586CC
|
||||
.4byte sub_80586CC
|
||||
.4byte sub_80586C8
|
||||
.4byte sub_80586C8
|
||||
.4byte sub_8058734
|
||||
.4byte sub_8058734
|
||||
.4byte sub_8058734
|
||||
.4byte sub_8058734
|
||||
|
||||
gUnknown_826D374:: @ 826D374
|
||||
.4byte sub_805874C
|
||||
.4byte sub_8058754
|
||||
@@ -702,7 +702,11 @@ TradeCenter_EventScript_Chair3:: @ 81BB974
|
||||
end
|
||||
|
||||
@ Nop in FRLG
|
||||
RecordCenter_EventScript_Spot:: @ 81BB980
|
||||
@ Separate labels to match GetDirectionForEventScript
|
||||
RecordCenter_EventScript_Spot0:: @ 81BB980
|
||||
RecordCenter_EventScript_Spot1:: @ 81BB980
|
||||
RecordCenter_EventScript_Spot2:: @ 81BB980
|
||||
RecordCenter_EventScript_Spot3:: @ 81BB980
|
||||
end
|
||||
|
||||
CableClub_EventScript_ReadTrainerCard:: @ 81BB981
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
#define GUARD_BG_REGS_H
|
||||
|
||||
extern const u8 gBGControlRegOffsets[];
|
||||
extern const u16 gOverworldBackgroundLayerFlags[];
|
||||
|
||||
#endif //GUARD_BG_REGS_H
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
void sub_8081A90(u8 taskId);
|
||||
u8 CreateTask_ReestablishLinkInCableClubRoom(void);
|
||||
void CB2_ReturnFromCableClubBattle(void);
|
||||
bool32 GetSeeingLinkPlayerCardMsg(u8 who);
|
||||
|
||||
#endif //GUARD_CABLE_CLUB_H
|
||||
|
||||
@@ -1319,6 +1319,7 @@
|
||||
|
||||
#define FLAG_SYS_SAFARI_MODE (SYS_FLAGS + 0x0)
|
||||
#define FLAG_SYS_VS_SEEKER_CHARGING (SYS_FLAGS + 0x1)
|
||||
#define FLAG_SYS_CRUISE_MODE (SYS_FLAGS + 0x2)
|
||||
#define FLAG_SYS_WHITE_FLUTE_ACTIVE (SYS_FLAGS + 0x3)
|
||||
#define FLAG_SYS_BLACK_FLUTE_ACTIVE (SYS_FLAGS + 0x4)
|
||||
#define FLAG_SYS_USE_STRENGTH (SYS_FLAGS + 0x5)
|
||||
@@ -1437,7 +1438,7 @@
|
||||
#define SPECIAL_FLAGS_START 0x4000
|
||||
#define SPECIAL_FLAGS_COUNT 16
|
||||
#define FLAG_SPECIAL_FLAG_0x4000 0x4000
|
||||
#define FLAG_SPECIAL_FLAG_0x4001 0x4001
|
||||
#define FLAG_DONT_TRANSITION_MUSIC 0x4001
|
||||
#define FLAG_SPECIAL_FLAG_0x4002 0x4002
|
||||
#define FLAG_SPECIAL_FLAG_0x4003 0x4003
|
||||
#define FLAG_SPECIAL_FLAG_0x4004 0x4004
|
||||
|
||||
@@ -3,4 +3,20 @@
|
||||
|
||||
extern bool8 gHasHallOfFameRecords;
|
||||
|
||||
#define CREDITSOVWLDCMD_FB 0xFB
|
||||
#define CREDITSOVWLDCMD_FC 0xFC
|
||||
#define CREDITSOVWLDCMD_END 0xFD
|
||||
#define CREDITSOVWLDCMD_LOADMAP 0xFE
|
||||
#define CREDITSOVWLDCMD_FF 0xFF
|
||||
|
||||
#define CREDITSOVWLDLOADMAP(_map, _x, _y, _delay) \
|
||||
{ CREDITSOVWLDCMD_LOADMAP, MAP_GROUP(_map), MAP_NUM(_map) }, \
|
||||
{ _x, _y, _delay }
|
||||
|
||||
#define CREDITSOVWLDSCROLL(_xspeed, _yspeed, _length) \
|
||||
{ _xspeed, _yspeed, _length }
|
||||
|
||||
#define CREDITSOVWLDEND \
|
||||
{ CREDITSOVWLDCMD_END, CREDITSOVWLDCMD_END, CREDITSOVWLDCMD_END }
|
||||
|
||||
#endif //GUARD_CREDITS_H
|
||||
|
||||
@@ -58,5 +58,6 @@ void ResetMysteryEventFlags(void);
|
||||
void ResetMysteryEventVars(void);
|
||||
bool32 IsNationalPokedexEnabled(void);
|
||||
void sub_806E190(void);
|
||||
void ClearTempFieldEventData(void);
|
||||
|
||||
#endif // GUARD_EVENT_DATA_H
|
||||
|
||||
@@ -71,7 +71,7 @@ void LoadPlayerObjectReflectionPalette(u16, u8);
|
||||
void LoadSpecialObjectReflectionPalette(u16, u8);
|
||||
void TryMoveObjectEventToMapCoords(u8, u8, u8, s16, s16);
|
||||
void PatchObjectPalette(u16, u8);
|
||||
void sub_808E16C(s16, s16);
|
||||
void sub_805EDF0(s16, s16);
|
||||
void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
|
||||
void sub_8063AD4(s16, s16, s16 *, s16 *);
|
||||
u8 GetFaceDirectionAnimNum(u8);
|
||||
@@ -221,5 +221,7 @@ u8 GetAcroPopWheelieMoveDirectionMovementAction(u32 direction);
|
||||
u8 GetAcroWheelieMoveDirectionMovementAction(u32 direction);
|
||||
u8 sub_80641EC(u32 direction);
|
||||
u8 GetFishingBiteDirectionAnimNum(u8 direction);
|
||||
void TrySpawnObjectEvents(s16 cameraX, s16 cameraY);
|
||||
void ResetObjectEvents(void);
|
||||
|
||||
#endif // GUARD_EVENT_OBJECT_MOVEMENT_H
|
||||
|
||||
@@ -1259,4 +1259,26 @@ extern const u8 EventScript_FieldPoison[];
|
||||
extern const u8 EventScript_EggHatch[];
|
||||
extern const u8 EventScript_1C1361[];
|
||||
|
||||
// overworld
|
||||
|
||||
extern const u8 EventScript_ResetEliteFourEnd[];
|
||||
extern const u8 CableClub_EventScript_DoLinkRoomExit[];
|
||||
extern const u8 CableClub_EventScript_TooBusyToNotice[];
|
||||
extern const u8 CableClub_EventScript_ReadTrainerCard[];
|
||||
extern const u8 CableClub_EventScript_ReadTrainerCardColored[];
|
||||
extern const u8 BattleColosseum_4P_EventScript_PlayerSpot0[];
|
||||
extern const u8 BattleColosseum_4P_EventScript_PlayerSpot1[];
|
||||
extern const u8 BattleColosseum_4P_EventScript_PlayerSpot2[];
|
||||
extern const u8 BattleColosseum_4P_EventScript_PlayerSpot3[];
|
||||
extern const u8 RecordCenter_EventScript_Spot0[];
|
||||
extern const u8 RecordCenter_EventScript_Spot1[];
|
||||
extern const u8 RecordCenter_EventScript_Spot2[];
|
||||
extern const u8 RecordCenter_EventScript_Spot3[];
|
||||
extern const u8 BattleColosseum_2P_EventScript_PlayerSpot0[];
|
||||
extern const u8 BattleColosseum_2P_EventScript_PlayerSpot1[];
|
||||
extern const u8 TradeCenter_EventScript_Chair0[];
|
||||
extern const u8 TradeCenter_EventScript_Chair1[];
|
||||
extern const u8 TradeCenter_ConfirmLeaveRoom[];
|
||||
extern const u8 TradeCenter_TerminateLink[];
|
||||
|
||||
#endif //GUARD_EVENT_SCRIPTS_H
|
||||
|
||||
@@ -32,5 +32,11 @@ void SetCameraPanning(s16 x, s16 y);
|
||||
void UpdateCameraPanning(void);
|
||||
void InstallCameraPanAheadCallback(void);
|
||||
void DrawDoorMetatileAt(int x, int y, const u16 *data);
|
||||
void move_tilemap_camera_to_upper_left_corner(void);
|
||||
void CameraUpdate(void);
|
||||
void FieldUpdateBgTilemapScroll(void);
|
||||
void ResetCameraUpdateInfo(void);
|
||||
u32 InitCameraUpdateCallback(u8 trackedSpriteId);
|
||||
void sub_805ACF0(void);
|
||||
|
||||
#endif //GUARD_FIELD_CAMERA_H
|
||||
|
||||
@@ -27,5 +27,6 @@ void ReturnToFieldFromFlyMapSelect(void);
|
||||
void MultiplyInvertedPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);
|
||||
void SpriteCB_PopOutOfAsh(struct Sprite * sprite);
|
||||
void SpriteCB_LavaridgeGymWarp(struct Sprite * sprite);
|
||||
void FieldEffectActiveListClear(void);
|
||||
|
||||
#endif //GUARD_FIELD_EFFECTS_H
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void sub_807DF7C(void);
|
||||
void FieldCB_RushInjuredPokemonToCenter(void);
|
||||
void DoWarp(void);
|
||||
void DoDiveWarp(void);
|
||||
void DoDoorWarp(void);
|
||||
@@ -11,9 +11,9 @@ void DoDoorWarp(void);
|
||||
void DoFallWarp(void);
|
||||
void DoTeleportWarp(void);
|
||||
void sub_807E500(void);
|
||||
void FieldCB_UnionRoomWarp(void);
|
||||
void FieldCB_DefaultWarpExit(void);
|
||||
void WarpFadeOutScreen(void);
|
||||
void FieldCallback_ReturnToEventScript2(void);
|
||||
void FieldCB_ContinueScriptHandleMusic(void);
|
||||
void FadeInFromBlack(void);
|
||||
void FadeTransition_FadeInOnReturnToStartMenu(void);
|
||||
void WarpFadeInScreen(void);
|
||||
@@ -28,5 +28,11 @@ void DoLavaridgeGymB1FWarp(void);
|
||||
void DoLavaridgeGym1FWarp(void);
|
||||
void DoTeleportWarp(void);
|
||||
void DoUnionRoomWarp(void);
|
||||
void FieldCB_ReturnToFieldWirelessLink(void);
|
||||
void FieldCB_ReturnToFieldCableLink(void);
|
||||
bool8 FieldCB_ReturnToFieldOpenStartMenu(void);
|
||||
void FieldCB_ContinueScript(void);
|
||||
void FieldCB_ContinueScriptHandleMusic(void);
|
||||
void FieldCB_WarpExitFadeFromBlack(void);
|
||||
|
||||
#endif // GUARD_FIELD_FADETRANSITION_H
|
||||
|
||||
@@ -9,5 +9,6 @@ bool8 ShowFieldAutoScrollMessage(const u8 *message);
|
||||
void HideFieldMessageBox(void);
|
||||
bool8 IsFieldMessageBoxHidden(void);
|
||||
bool8 textbox_any_visible(void);
|
||||
void sub_8069348(void);
|
||||
|
||||
#endif // GUARD_FIELD_MESSAGE_BOX_H
|
||||
|
||||
@@ -60,6 +60,8 @@ void sub_805C260(void);
|
||||
void player_step(u8 direction, u16 newKeys, u16 heldKeys);
|
||||
bool32 PlayerIsMovingOnRockStairs(u8 direction);
|
||||
void sub_805BEB8(void);
|
||||
void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender);
|
||||
void nullsub_24(u8 direction);
|
||||
u8 GetRSAvatarGraphicsIdByGender(u8 gender);
|
||||
|
||||
#endif //GUARD_FIELD_PLAYER_AVATAR_H
|
||||
|
||||
@@ -9,6 +9,9 @@ void sub_80B0244(void);
|
||||
void sub_807E3EC(void);
|
||||
void DoOutwardBarnDoorWipe(void);
|
||||
void Task_BarnDoorWipe(u8 taskId);
|
||||
void sub_807F5F0(void);
|
||||
void FieldCB_RushInjuredPokemonToCenter(void);
|
||||
void WriteFlashScanlineEffectBuffer(u8 flashLevel);
|
||||
|
||||
extern const s32 gMaxFlashLevel;
|
||||
|
||||
#endif // GUARD_FIELD_SCREEN_EFFECT_H
|
||||
|
||||
@@ -31,5 +31,10 @@ void CutMoveOpenDottedHoleDoor(void);
|
||||
void RunMassageCooldownStepCounter(void);
|
||||
void IncrementResortGorgeousStepCounter(void);
|
||||
void IncrementBirthIslandRockStepCount(void);
|
||||
void ResetCyclingRoadChallengeData(void);
|
||||
void ResetFieldTasksArgs(void);
|
||||
bool8 UsedPokemonCenterWarp(void);
|
||||
void sub_80CC534(void);
|
||||
void sub_80CC59C(void);
|
||||
|
||||
#endif // GUARD_FIELD_SPECIALS_H
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
#include "global.h"
|
||||
|
||||
void ActivatePerStepCallback(u8);
|
||||
void SetUpFieldTasks(void);
|
||||
|
||||
#endif // GUARD_FIELD_TASKS_H
|
||||
|
||||
@@ -143,6 +143,10 @@ void sub_807AC98(void);
|
||||
void SetRainStrengthFromSoundEffect(u16 soundEffect);
|
||||
void sub_807A790(s8 gammaIndex);
|
||||
void sub_807A7C4(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay);
|
||||
void ApplyWeatherGammaShiftToPal(u8 paletteIndex);
|
||||
void StartWeather(void);
|
||||
void ResumePausedWeather(void);
|
||||
void FadeSelectedPals(u8 mode, s8 delay, u32 selectedPalettes);
|
||||
|
||||
extern const u16 gCloudsWeatherPalette[];
|
||||
extern const u16 gSandstormWeatherPalette[];
|
||||
|
||||
+11
-1
@@ -24,7 +24,7 @@ void GetCameraCoords(u16*, u16*);
|
||||
bool8 MapGridIsImpassableAt(s32, s32);
|
||||
s32 GetMapBorderIdAt(s32, s32);
|
||||
bool32 CanCameraMoveInDirection(s32);
|
||||
u32 GetBehaviorByMetatileIdAndMapLayout(struct MapLayout *mapLayout, u16 metatile, u8 attr);
|
||||
u32 GetBehaviorByMetatileIdAndMapLayout(const struct MapLayout *mapLayout, u16 metatile, u8 attr);
|
||||
const struct MapHeader * mapconnection_get_mapheader(struct MapConnection * connection);
|
||||
struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y);
|
||||
void sub_8059948(u8 a0, u8 a1);
|
||||
@@ -34,5 +34,15 @@ u32 GetMetatileAttributeFromRawMetatileBehavior(u32 original, u8 bit);
|
||||
u32 MapGridGetMetatileAttributeAt(s16 x, s16 y, u8 attr);
|
||||
void MapGridSetMetatileImpassabilityAt(s32 x, s32 y, bool32 arg2);
|
||||
bool8 CameraMove(s32 x, s32 y);
|
||||
void copy_map_tileset1_tileset2_to_vram(struct MapLayout const * mapLayout);
|
||||
void apply_map_tileset1_tileset2_palette(struct MapLayout const * mapLayout);
|
||||
void InitMap(void);
|
||||
void copy_map_tileset2_to_vram_2(const struct MapLayout * mapLayout);
|
||||
void apply_map_tileset2_palette(const struct MapLayout * mapLayout);
|
||||
void InitMapFromSavedGame(void);
|
||||
void copy_map_tileset1_to_vram(const struct MapLayout *mapLayout);
|
||||
void copy_map_tileset2_to_vram(const struct MapLayout *mapLayout);
|
||||
void GetCameraFocusCoords(u16 *x, u16 *y);
|
||||
void SetCameraFocusCoords(u16 x, u16 y);
|
||||
|
||||
#endif //GUARD_FIELDMAP_H
|
||||
|
||||
@@ -16,6 +16,7 @@ u8 CreateFieldEffectShowMon(void);
|
||||
u8 MapTransitionIsExit(u8 lightLevel, u8 mapType);
|
||||
u8 MapTransitionIsEnter(u8 mapType1, u8 mapType2);
|
||||
bool8 SetUpFieldMove_Flash(void);
|
||||
void CB2_DoChangeMap(void);
|
||||
|
||||
// cut
|
||||
bool8 SetUpFieldMove_Cut(void);
|
||||
|
||||
@@ -185,22 +185,30 @@ struct MapConnections
|
||||
|
||||
struct MapHeader
|
||||
{
|
||||
/* 0x00 */ struct MapLayout *mapLayout;
|
||||
/* 0x04 */ struct MapEvents *events;
|
||||
/* 0x08 */ u8 *mapScripts;
|
||||
/* 0x0C */ struct MapConnections *connections;
|
||||
/* 0x00 */ const struct MapLayout *mapLayout;
|
||||
/* 0x04 */ const struct MapEvents *events;
|
||||
/* 0x08 */ const u8 *mapScripts;
|
||||
/* 0x0C */ const struct MapConnections *connections;
|
||||
/* 0x10 */ u16 music;
|
||||
/* 0x12 */ u16 mapLayoutId;
|
||||
/* 0x14 */ u8 regionMapSectionId;
|
||||
/* 0x15 */ u8 cave;
|
||||
/* 0x16 */ u8 weather;
|
||||
/* 0x17 */ u8 mapType;
|
||||
/* 0x18 */ u8 filler_18;
|
||||
/* 0x19 */ u8 escapeRope;
|
||||
/* 0x1A */ s8 flags;
|
||||
/* 0x18 */ bool8 bikingAllowed;
|
||||
/* 0x19 */ u8 flags;
|
||||
/* 0x1A */ s8 floorNum;
|
||||
/* 0x1B */ u8 battleType;
|
||||
};
|
||||
|
||||
// Flags for gMapHeader.flags, as defined in the map_header_flags macro
|
||||
#define MAP_ALLOW_ESCAPE_ROPE (1 << 0)
|
||||
#define MAP_ALLOW_RUN (1 << 1)
|
||||
#define MAP_SHOW_MAP_NAME (1 << 2)
|
||||
#define UNUSED_MAP_FLAGS (1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 7)
|
||||
|
||||
#define SHOW_MAP_NAME_ENABLED ((gMapHeader.flags & (MAP_SHOW_MAP_NAME | UNUSED_MAP_FLAGS)) == MAP_SHOW_MAP_NAME)
|
||||
|
||||
struct ObjectEvent
|
||||
{
|
||||
/*0x00*/ /* 0*/ u32 active:1;
|
||||
|
||||
+2
-2
@@ -743,8 +743,8 @@ struct SaveBlock1
|
||||
{
|
||||
/*0x0000*/ struct Coords16 pos;
|
||||
/*0x0004*/ struct WarpData location;
|
||||
/*0x000C*/ struct WarpData warp1;
|
||||
/*0x0014*/ struct WarpData warp2;
|
||||
/*0x000C*/ struct WarpData continueGameWarp;
|
||||
/*0x0014*/ struct WarpData dynamicWarp;
|
||||
/*0x001C*/ struct WarpData lastHealLocation;
|
||||
/*0x0024*/ struct WarpData escapeWarp;
|
||||
/*0x002C*/ u16 savedMusic;
|
||||
|
||||
@@ -11,7 +11,7 @@ struct HealLocation
|
||||
s16 y;
|
||||
};
|
||||
|
||||
const struct HealLocation *GetHealLocationPointer(u32 loc);
|
||||
const struct HealLocation *GetHealLocation(u32 loc);
|
||||
void SetWhiteoutRespawnWarpAndHealerNpc(struct WarpData * warp);
|
||||
|
||||
#endif // GUARD_HEAL_LOCATION_H
|
||||
|
||||
@@ -289,5 +289,7 @@ void sub_800A900(u8 a0);
|
||||
u8 sub_800A8A4(void);
|
||||
void sub_800A9A4(void);
|
||||
void SetLocalLinkPlayerId(u8 playerId);
|
||||
bool32 IsSendingKeysToLink(void);
|
||||
u32 GetLinkRecvQueueLength(void);
|
||||
|
||||
#endif // GUARD_LINK_H
|
||||
|
||||
+5
-5
@@ -88,7 +88,7 @@ struct UnkRfuStruct_2_Sub_124
|
||||
/* 0x57b */ vu8 full;
|
||||
};
|
||||
|
||||
struct UnkRfuStruct_2_Sub_9e8
|
||||
struct RfuSendQueue
|
||||
{
|
||||
/* 0x000 */ u8 slots[40][14];
|
||||
/* 0x230 */ vu8 recv_slot;
|
||||
@@ -148,7 +148,7 @@ typedef struct UnkRfuStruct_2
|
||||
/* 0x102 */ u8 unk_102;
|
||||
/* 0x104 */ struct RfuTgtData unk_104;
|
||||
/* 0x124 */ struct UnkRfuStruct_2_Sub_124 unk_124;
|
||||
/* 0x6a0 */ struct UnkRfuStruct_2_Sub_9e8 unk_9e8;
|
||||
/* 0x6a0 */ struct RfuSendQueue sendQueue;
|
||||
/* 0x8d4 */ struct UnkRfuStruct_2_Sub_c1c unk_c1c;
|
||||
/* 0x8f4 */ vu8 unk_c3c;
|
||||
/* 0x8f5 */ u8 reconnectedParentIdx;
|
||||
@@ -227,16 +227,16 @@ void InitRFU(void);
|
||||
bool32 RfuIsErrorStatus1or2(void);
|
||||
|
||||
void RFU_queue_20_70_reset(struct UnkRfuStruct_2_Sub_124 *ptr);
|
||||
void RFU_queue_40_14_reset(struct UnkRfuStruct_2_Sub_9e8 *ptr);
|
||||
void RFU_queue_40_14_reset(struct RfuSendQueue *ptr);
|
||||
|
||||
void RfuSetErrorStatus(u8 a0, u16 msg);
|
||||
u8 RfuGetErrorStatus(void);
|
||||
void RFU_queue_20_70_recv(struct UnkRfuStruct_2_Sub_124 *q1, u8 *q2);
|
||||
bool8 RFU_queue_40_14_send(struct UnkRfuStruct_2_Sub_9e8 *q1, u8 *q2);
|
||||
bool8 RFU_queue_40_14_send(struct RfuSendQueue *q1, u8 *q2);
|
||||
bool8 RFU_queue_2_14_send(struct UnkRfuStruct_2_Sub_c1c *q1, u8 *q2);
|
||||
void RFU_queue_2_14_recv(struct UnkRfuStruct_2_Sub_c1c *q1, const u8 *q2);
|
||||
bool8 RFU_queue_20_70_send(struct UnkRfuStruct_2_Sub_124 * a0, u8 *a1);
|
||||
void RFU_queue_40_14_recv(struct UnkRfuStruct_2_Sub_9e8 * a0, u8 *a1);
|
||||
void RFU_queue_40_14_recv(struct RfuSendQueue * a0, u8 *a1);
|
||||
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders);
|
||||
void UpdateGameData_GroupLockedIn(bool8 started);
|
||||
bool32 RfuSerialNumberIsValid(u32 a0);
|
||||
|
||||
+3
-1
@@ -30,6 +30,8 @@ void ApplyNewEncryptionKeyToWord(u32 * word, u32 encryptionKey);
|
||||
void ApplyNewEncryptionKeyToHword(u16 * hword, u32 encryptionKey);
|
||||
void ClearContinueGameWarpStatus2(void);
|
||||
void SetContinueGameWarpStatusToDynamicWarp(void);
|
||||
void sub_804C1AC(void);
|
||||
void SetContinueGameWarpStatus(void);
|
||||
bool32 UseContinueGameWarp(void);
|
||||
void ClearContinueGameWarpStatus();
|
||||
|
||||
#endif // GUARD_LOAD_SAVE_H
|
||||
|
||||
@@ -25,4 +25,6 @@ void m4aMPlayFadeOutTemporarily(struct MusicPlayerInfo *mplayInfo, u16 speed);
|
||||
void m4aMPlayFadeIn(struct MusicPlayerInfo *mplayInfo, u16 speed);
|
||||
void m4aMPlayImmInit(struct MusicPlayerInfo *mplayInfo);
|
||||
|
||||
extern const struct SongHeader mus_win_gym;
|
||||
|
||||
#endif //GUARD_M4A_H
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void CreateMapNamePopupIfNotAlreadyRunning(bool32 palIntoFadedBuffer);
|
||||
void ShowMapNamePopup(bool32 palIntoFadedBuffer);
|
||||
void DismissMapNamePopup(void);
|
||||
|
||||
#endif //GUARD_MAP_NAME_POPUP_H
|
||||
|
||||
@@ -59,5 +59,6 @@ void MapPreview_InitBgs(void);
|
||||
void MapPreview_LoadGfx(u8 mapsec);
|
||||
bool32 MapPreview_IsGfxLoadFinished(void);
|
||||
void MapPreview_Unload(s32 windowId);
|
||||
void MapPreview_StartForestTransition(u8 mapsec);
|
||||
|
||||
#endif //GUARD_MAP_PREVIEW_SCREEN_H
|
||||
|
||||
@@ -24,7 +24,7 @@ bool8 MetatileBehavior_IsUnknownWarp6F(u8 metatileBehavior);
|
||||
bool8 MetatileBehavior_IsUnknownWarp6C_to_6F(u8 metatileBehavior);
|
||||
bool8 MetatileBehavior_IsLadder(u8 metatileBehavior);
|
||||
bool8 MetatileBehavior_IsNonAnimDoor(u8 metatileBehavior);
|
||||
bool8 MetatileBehavior_ReturnFalse_2(u8 metatileBehavior);
|
||||
bool8 MetatileBehavior_IsDeepSouthWarp(u8 metatileBehavior);
|
||||
bool8 MetatileBehavior_IsSurfable(u8 metatileBehavior);
|
||||
bool8 MetatileBehavior_IsSemiDeepWater(u8 metatileBehavior);
|
||||
bool8 MetatileBehavior_IsEastArrowWarp(u8 metatileBehavior);
|
||||
|
||||
+28
-36
@@ -38,14 +38,14 @@ struct LinkPlayerObjectEvent
|
||||
u8 active;
|
||||
u8 linkPlayerId;
|
||||
u8 objEventId;
|
||||
u8 mode;
|
||||
u8 movementMode;
|
||||
};
|
||||
|
||||
struct CreditsOverworldCmd
|
||||
{
|
||||
s16 unk_0;
|
||||
u16 unk_2;
|
||||
u16 unk_4;
|
||||
s16 unk_2;
|
||||
s16 unk_4;
|
||||
};
|
||||
|
||||
/* gDisableMapMusicChangeOnMapLoad */
|
||||
@@ -53,13 +53,12 @@ struct CreditsOverworldCmd
|
||||
#define MUSIC_DISABLE_STOP 1
|
||||
#define MUSIC_DISABLE_KEEP 2
|
||||
|
||||
extern struct UCoords32 gDirectionToVectors[];
|
||||
extern const struct UCoords32 gDirectionToVectors[];
|
||||
|
||||
extern struct LinkPlayerObjectEvent gLinkPlayerObjectEvents[4];
|
||||
extern MainCallback gFieldCallback;
|
||||
|
||||
extern struct WarpData gUnknown_2031DB4;
|
||||
extern struct WarpData gUnknown_2031DBC;
|
||||
extern struct WarpData gLastUsedWarp;
|
||||
|
||||
extern u8 gUnknown_2031DE0;
|
||||
extern u8 gFieldLinkPlayerCount;
|
||||
@@ -68,7 +67,7 @@ extern u8 gLocalLinkPlayerId;
|
||||
void IncrementGameStat(u8 index);
|
||||
|
||||
void Overworld_SetMapObjTemplateCoords(u8, s16, s16);
|
||||
void Overworld_SetMapObjTemplateMovementType(u8, u8);
|
||||
void Overworld_SetObjEventTemplateMovementType(u8, u8);
|
||||
|
||||
void SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
|
||||
@@ -78,12 +77,8 @@ void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void Overworld_SetHealLocationWarp(u8);
|
||||
void sub_8084DD4(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void sub_8084E2C(s8, s8, s8, s8, s8);
|
||||
void sub_8084E80(s8, s8, s8, s8, s8);
|
||||
void sub_8084EBC(s16, s16);
|
||||
void sub_80555E0(void);
|
||||
void copy_saved_warp3_bank_and_enter_x_to_warp1(void);
|
||||
void SetWarpDestinationToEscapeWarp(void);
|
||||
void SetWarpDestinationToLastHealLocation(void);
|
||||
u8 IsMapTypeOutdoors(u8 mapType);
|
||||
void Overworld_ClearSavedMusic(void);
|
||||
bool32 sub_8056124(u16 song);
|
||||
@@ -100,23 +95,19 @@ void Overworld_ChangeMusicTo(u16);
|
||||
bool32 IsUpdateLinkStateCBActive(void);
|
||||
|
||||
void ClearLinkPlayerObjectEvents(void);
|
||||
const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16, u16);
|
||||
const struct MapHeader *const Overworld_GetMapHeaderByGroupAndId(u16, u16);
|
||||
void ObjectEventMoveDestCoords(struct ObjectEvent *, u32, s16 *, s16 *);
|
||||
void sub_8086230(void);
|
||||
void CB2_ReturnToField(void);
|
||||
bool32 sub_8087598(void);
|
||||
void CB2_ReturnToFieldContinueScriptPlayMapMusic(void);
|
||||
void WarpIntoMap(void);
|
||||
u8 get_map_light_level_by_bank_and_number(s8 mapGroup, s8 mapNum);
|
||||
void sub_8086194(void);
|
||||
void sub_8084CCC(u8 spawn);
|
||||
u8 GetMapTypeByGroupAndId(s8 mapGroup, s8 mapNum);
|
||||
void SetWarpDestinationToMapWarp(s8 mapGroup, s8 mapNum, s8 warpNum);
|
||||
void c2_load_new_map(void);
|
||||
void SetWarpDestinationToDynamicWarp(u8 unused);
|
||||
void mapldr_default(void);
|
||||
|
||||
u32 GetGameStat(u8 statId);
|
||||
u32 SetGameStat(u8 statId, u32 value);
|
||||
void SetGameStat(u8 statId, u32 value);
|
||||
|
||||
void CB2_ContinueSavedGame(void);
|
||||
void sub_8055D5C(struct WarpData *);
|
||||
@@ -141,8 +132,8 @@ extern u8 gUnknown_2036E28;
|
||||
extern bool8 (* gFieldCallback2)(void);
|
||||
|
||||
void SetLastHealLocationWarp(u8 healLocaionId);
|
||||
void sub_8055864(u8 mapGroup, u8 mapNum);
|
||||
void CB2_Overworld(void);
|
||||
void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum);
|
||||
void sub_80568FC(void);
|
||||
void CB2_OverworldBasic(void);
|
||||
void CB2_NewGame(void);
|
||||
bool8 IsMapTypeOutdoors(u8 mapType);
|
||||
@@ -153,13 +144,13 @@ void Overworld_FadeOutMapMusic(void);
|
||||
void CB2_LoadMap(void);
|
||||
bool8 BGMusicStopped(void);
|
||||
bool8 IsMapTypeIndoors(u8 mapType);
|
||||
bool32 sub_8055C9C(void);
|
||||
bool32 Overworld_IsBikingAllowed(void);
|
||||
void Overworld_ResetStateAfterDigEscRope(void);
|
||||
bool32 sub_8058244(void);
|
||||
u8 GetCurrentMapType(void);
|
||||
|
||||
u8 GetLastUsedWarpMapType(void);
|
||||
const struct MapHeader *warp1_get_mapheader(void);
|
||||
const struct MapHeader *const GetDestinationWarpMapHeader(void);
|
||||
void TryFadeOutOldMapMusic(void);
|
||||
void CB2_ReturnToFieldCableClub(void);
|
||||
void ResetGameStats(void);
|
||||
@@ -171,28 +162,29 @@ bool32 sub_8058318(void);
|
||||
|
||||
void CB2_ReturnToFieldWithOpenMenu(void);
|
||||
void CB2_WhiteOut(void);
|
||||
void c2_8056854(void);
|
||||
void sub_8054F38(u32 newKey);
|
||||
void sub_8055778(int);
|
||||
void CB2_ReturnToFieldFromMultiplayer(void);
|
||||
void ApplyNewEncryptionKeyToGameStats(u32 newKey);
|
||||
void SetContinueGameWarpToDynamicWarp(int);
|
||||
|
||||
void sub_8055738(u8 loc);
|
||||
void SetContinueGameWarpToHealLocation(u8 loc);
|
||||
|
||||
void sub_8056078(void *, void *);
|
||||
void sub_805546C(u8 a0);
|
||||
void UpdateAmbientCry(s16 *state, u16 *delayCounter);
|
||||
void SetWarpDestinationToHealLocation(u8 a0);
|
||||
bool32 sub_80582E0(void);
|
||||
bool32 sub_8058274(void);
|
||||
void OverworldWhiteOutGetMoneyLoss(void);
|
||||
u8 GetCurrentMapBattleScene(void);
|
||||
void Overworld_ResetStateAfterFly(void);
|
||||
bool8 sub_8055B38(u16 metatileBehavior);
|
||||
void sub_8055DB8(void);
|
||||
void sub_8057F5C(void);
|
||||
void sub_8057F34(void);
|
||||
void Overworld_ResetMapMusic(void);
|
||||
u16 QueueExitLinkRoomKey(void);
|
||||
u16 sub_8057F34(void);
|
||||
u32 sub_8057EC0(void);
|
||||
void sub_8057F70(void);
|
||||
void sub_8057F48(void);
|
||||
u16 sub_8057F70(void);
|
||||
u16 sub_8057F48(void);
|
||||
void SetMainCallback1(MainCallback cb);
|
||||
void CB1_Overworld(void);
|
||||
void sub_80568C4(void);
|
||||
void CB2_ReturnToFieldContinueScript(void);
|
||||
u8 GetLastUsedWarpMapSectionId(void);
|
||||
void StoreInitialPlayerAvatarState(void);
|
||||
void UpdateEscapeWarp(s16 x, s16 y);
|
||||
|
||||
+17
-14
@@ -4,24 +4,12 @@
|
||||
#include "global.h"
|
||||
#include "quest_log_battle.h"
|
||||
#include "constants/quest_log.h"
|
||||
|
||||
struct UnkStruct_3005E90
|
||||
{
|
||||
u8 unk_0;
|
||||
u8 unk_1_0:1;
|
||||
u8 unk_1_1:1;
|
||||
u8 unk_1_2:1;
|
||||
u8 unk_1_3:1;
|
||||
u8 unk_1_4:1;
|
||||
u8 unk_2;
|
||||
};
|
||||
#include "field_control_avatar.h"
|
||||
|
||||
extern u8 gQuestLogState;
|
||||
extern u8 gUnknown_3005E88;
|
||||
extern u16 sNumEventsInLogEntry;
|
||||
extern struct UnkStruct_3005E90 gUnknown_3005E90;
|
||||
extern struct QuestLogEntry * sCurQuestLogEntry;
|
||||
extern const u16 gUnknown_84566A8[];
|
||||
extern struct FieldInput gUnknown_3005E90;
|
||||
|
||||
void sub_8112720(u8);
|
||||
void SetQuestLogEvent(u16, const u16 *);
|
||||
@@ -59,5 +47,20 @@ void sub_8112628(u8 movementActionId);
|
||||
void sub_81126AC(u8 movementActionId, u8 duration);
|
||||
void sub_8112588(u8 localId, u8 mapNum, u8 mapGroup, u8 movementActionId, u8 duration);
|
||||
void sub_8112C9C(void);
|
||||
void sub_8110920(void);
|
||||
void sub_8111708(void);
|
||||
void sub_81127F8(struct FieldInput * a0);
|
||||
void sub_8112B3C(void);
|
||||
void RunQuestLogCB(void);
|
||||
void sub_8111C68(void);
|
||||
bool8 sub_8111CD0(void);
|
||||
void sub_8115798(void);
|
||||
bool8 sub_8113748(void);
|
||||
void sub_81119C8(void);
|
||||
void sub_8111F14(void);
|
||||
void sub_8110FCC(void);
|
||||
u8 sub_8110AC8(void);
|
||||
void sub_81113E4(void);
|
||||
void sub_8111438(void);
|
||||
|
||||
#endif //GUARD_QUEST_LOG_H
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
|
||||
void SetQuestLogObjectEventsData(struct QuestLog *);
|
||||
void SetSav1ObjectEventsFromQuestLog(struct QuestLog *, struct ObjectEventTemplate *);
|
||||
void sub_815A540(void);
|
||||
|
||||
#endif //GUARD_QUEST_LOG_OBJECTS_H
|
||||
|
||||
+5
-5
@@ -49,12 +49,12 @@ u8 *mapheader_get_tagged_pointer(u8 tag);
|
||||
void mapheader_run_script_by_tag(u8 tag);
|
||||
u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag);
|
||||
void RunOnLoadMapScript(void);
|
||||
void mapheader_run_script_with_tag_x3(void);
|
||||
void mapheader_run_script_with_tag_x5(void);
|
||||
void mapheader_run_script_with_tag_x7(void);
|
||||
void mapheader_run_script_with_tag_x6(void);
|
||||
void RunOnTransitionMapScript(void);
|
||||
void RunOnResumeMapScript(void);
|
||||
void RunOnReturnToFieldMapScript(void);
|
||||
void RunOnDiveWarpMapScript(void);
|
||||
bool8 TryRunOnFrameMapScript(void);
|
||||
void mapheader_run_first_tag4_script_list_match(void);
|
||||
void TryRunOnWarpIntoMapScript(void);
|
||||
u32 CalculateRamScriptChecksum(void);
|
||||
void ClearRamScript(void);
|
||||
bool8 InitRamScript(u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objectId);
|
||||
|
||||
+2
-2
@@ -1037,8 +1037,8 @@ extern const u8 gText_RegionMap_AreaDesc_PatternBush[];
|
||||
extern const u8 gText_RegionMap_AreaDesc_DottedHole[];
|
||||
|
||||
// field_screen_effect
|
||||
extern const u8 gUnknown_841B554[];
|
||||
extern const u8 gUnknown_841B5B6[];
|
||||
extern const u8 gText_PlayerScurriedToCenter[];
|
||||
extern const u8 gText_PlayerScurriedBackHome[];
|
||||
|
||||
// save_failed_screen
|
||||
extern const u8 gText_SaveFailedScreen_CheckingBackupMemory[];
|
||||
|
||||
@@ -15,5 +15,6 @@ u8 sub_810CF54();
|
||||
void sub_810D0D0(void);
|
||||
void sub_810CB90(void);
|
||||
bool8 sub_810C4EC(void);
|
||||
void TryUpdateRandomTrainerRematches(u16 mapGroup, u16 mapNum);
|
||||
|
||||
#endif //GUARD_VS_SEEKER_H
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ SECTIONS {
|
||||
src/trade_scene.o(.text);
|
||||
src/play_time.o(.text);
|
||||
src/new_game.o(.text);
|
||||
asm/overworld.o(.text);
|
||||
src/overworld.o(.text);
|
||||
src/fieldmap.o(.text);
|
||||
src/metatile_behavior.o(.text);
|
||||
src/field_camera.o(.text);
|
||||
@@ -427,7 +427,7 @@ SECTIONS {
|
||||
src/pokeball.o(.rodata);
|
||||
src/trade.o(.rodata);
|
||||
src/trade_scene.o(.rodata);
|
||||
data/overworld.o(.rodata);
|
||||
src/overworld.o(.rodata);
|
||||
data/tilesets.o(.rodata);
|
||||
data/maps.o(.rodata);
|
||||
src/fieldmap.o(.rodata);
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ vu16 *const gBGVOffsetRegs[] =
|
||||
};
|
||||
|
||||
const u16 gDISPCNTBGFlags[] = { DISPCNT_BG0_ON, DISPCNT_BG1_ON, DISPCNT_BG2_ON, DISPCNT_BG3_ON };
|
||||
const u16 gBLDCNTTarget2BGFlags[] = { BLDCNT_TGT2_BG0, BLDCNT_TGT2_BG1, BLDCNT_TGT2_BG2, BLDCNT_TGT2_BG3 };
|
||||
const u16 gOverworldBackgroundLayerFlags[] = { BLDCNT_TGT2_BG0, BLDCNT_TGT2_BG1, BLDCNT_TGT2_BG2, BLDCNT_TGT2_BG3 };
|
||||
const u16 gBLDCNTTarget1BGFlags[] = { BLDCNT_TGT1_BG0, BLDCNT_TGT1_BG1, BLDCNT_TGT1_BG2, BLDCNT_TGT1_BG3 };
|
||||
|
||||
const u8 gBGControlRegOffsets[] =
|
||||
|
||||
+1
-1
@@ -260,7 +260,7 @@ bool8 sub_80BD460(u8 r0)
|
||||
|
||||
bool32 IsRunningDisallowed(u8 metatileBehavior)
|
||||
{
|
||||
if (!(gMapHeader.escapeRope & 2)) // wrong name? probably a bitfield.
|
||||
if (!(gMapHeader.flags & MAP_ALLOW_RUN))
|
||||
return TRUE;
|
||||
if (sub_80BD4B8(metatileBehavior) != TRUE)
|
||||
return FALSE;
|
||||
|
||||
+3
-3
@@ -724,7 +724,7 @@ static void sub_8081624(void)
|
||||
void CB2_ReturnFromCableClubBattle(void)
|
||||
{
|
||||
gBattleTypeFlags &= (u16)~BATTLE_TYPE_20;
|
||||
sub_8055DB8();
|
||||
Overworld_ResetMapMusic();
|
||||
LoadPlayerParty();
|
||||
SavePlayerBag();
|
||||
Special_UpdateTrainerFansAfterLinkBattle();
|
||||
@@ -750,7 +750,7 @@ void CB2_ReturnFromCableClubBattle(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
gMain.savedCallback = c2_8056854;
|
||||
gMain.savedCallback = CB2_ReturnToFieldFromMultiplayer;
|
||||
}
|
||||
SetMainCallback2(CB2_SetUpSaveAfterLinkBattle);
|
||||
}
|
||||
@@ -767,7 +767,7 @@ void CleanupLinkRoomState(void)
|
||||
|
||||
void ExitLinkRoom(void)
|
||||
{
|
||||
sub_8057F5C();
|
||||
QueueExitLinkRoomKey();
|
||||
}
|
||||
|
||||
static void Task_EnterCableClubSeat(u8 taskId)
|
||||
|
||||
+40
-52
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "malloc.h"
|
||||
#include "bg.h"
|
||||
#include "credits.h"
|
||||
#include "palette.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "task.h"
|
||||
@@ -563,94 +564,81 @@ static const struct SpriteTemplate sGroundSpriteTemplate_Static = {
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_Route23[] = {
|
||||
{ 0x00fe, MAP_GROUP(ROUTE23), MAP_NUM(ROUTE23) },
|
||||
{ 0x000b, 0x006b, 0x0001 },
|
||||
{ 0x0000, 0x0001, 0x0500 }, // Scroll down
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(ROUTE23, 11, 107, 1),
|
||||
CREDITSOVWLDSCROLL(0, 1, 0x0500), // Scroll down
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_ViridianCity[] = {
|
||||
{ 0x00fe, MAP_GROUP(VIRIDIAN_CITY), MAP_NUM(VIRIDIAN_CITY) },
|
||||
{ 0x001e, 0x0022, 0x0001 },
|
||||
{ 0x0000, 0xffff, 0x0500 }, // Scroll up
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(VIRIDIAN_CITY, 30, 34, 1),
|
||||
CREDITSOVWLDSCROLL(0, -1, 0x0500), // Scroll up
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_PewterCity[] = {
|
||||
{ 0x00fe, MAP_GROUP(PEWTER_CITY), MAP_NUM(PEWTER_CITY) },
|
||||
{ 0x0014, 0x001a, 0x0001 },
|
||||
{ 0x0000, 0xffff, 0x0500 }, // Scroll up
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(PEWTER_CITY, 20, 26, 1),
|
||||
CREDITSOVWLDSCROLL(0, -1, 0x0500), // Scroll up
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_CeruleanCity[] = {
|
||||
{ 0x00fe, MAP_GROUP(CERULEAN_CITY), MAP_NUM(CERULEAN_CITY) },
|
||||
{ 0x0008, 0x0006, 0x0001 },
|
||||
{ 0x0001, 0x0001, 0x0500 }, // Scroll right and down
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(CERULEAN_CITY, 8, 6, 1),
|
||||
CREDITSOVWLDSCROLL(1, 1, 0x0500), // Scroll right and down
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_Route25[] = {
|
||||
{ 0x00fe, MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) },
|
||||
{ 0x0019, 0x0006, 0x0001 },
|
||||
{ 0x0001, 0x0000, 0x0500 }, // Scroll right
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(ROUTE25, 25, 6, 1),
|
||||
CREDITSOVWLDSCROLL(1, 0, 0x0500), // Scroll right
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_VermilionCity[] = {
|
||||
{ 0x00fe, MAP_GROUP(VERMILION_CITY), MAP_NUM(VERMILION_CITY) },
|
||||
{ 0x0009, 0x0007, 0x0001 },
|
||||
{ 0x0001, 0x0001, 0x0500 }, // Scroll right and down
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(VERMILION_CITY, 9, 7, 1),
|
||||
CREDITSOVWLDSCROLL(1, 1, 0x0500), // Scroll right and down
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_Route10[] = {
|
||||
{ 0x00fe, MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10) },
|
||||
{ 0x000b, 0x0044, 0x0001 },
|
||||
{ 0x0000, 0x0001, 0x0500 }, // Scroll down
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(ROUTE10, 11, 68, 1),
|
||||
CREDITSOVWLDSCROLL(0, 1, 0x0500), // Scroll down
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_CeladonCity[] = {
|
||||
{ 0x00fe, MAP_GROUP(CELADON_CITY), MAP_NUM(CELADON_CITY) },
|
||||
{ 0x0030, 0x0010, 0x0001 },
|
||||
{ 0xffff, 0x0000, 0x0500 }, // Scroll left
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(CELADON_CITY, 48, 16, 1),
|
||||
CREDITSOVWLDSCROLL(-1, 0, 0x0500), // Scroll left
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_SaffronCity[] = {
|
||||
{ 0x00fe, MAP_GROUP(SAFFRON_CITY), MAP_NUM(SAFFRON_CITY) },
|
||||
{ 0x0027, 0x0005, 0x0001 },
|
||||
{ 0x0000, 0x0001, 0x0500 }, // Scroll down
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(SAFFRON_CITY, 39, 5, 1),
|
||||
CREDITSOVWLDSCROLL(0, 1, 0x0500), // Scroll down
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_Route17[] = {
|
||||
{ 0x00fe, MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) },
|
||||
{ 0x0007, 0x002b, 0x0001 },
|
||||
{ 0x0000, 0x0001, 0x0500 }, // Scroll down
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(ROUTE17, 7, 43, 1),
|
||||
CREDITSOVWLDSCROLL(0, 1, 0x0500), // Scroll down
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_FuchsiaCity[] = {
|
||||
{ 0x00fe, MAP_GROUP(FUCHSIA_CITY), MAP_NUM(FUCHSIA_CITY) },
|
||||
{ 0x001c, 0x0005, 0x0001 },
|
||||
{ 0x0000, 0x0001, 0x0500 }, // Scroll down
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(FUCHSIA_CITY, 28, 5, 1),
|
||||
CREDITSOVWLDSCROLL(0, 1, 0x0500), // Scroll down
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_CinnabarIsland[] = {
|
||||
{ 0x00fe, MAP_GROUP(CINNABAR_ISLAND), MAP_NUM(CINNABAR_ISLAND) },
|
||||
{ 0x000d, 0x0011, 0x0001 },
|
||||
{ 0x0000, 0xffff, 0x0500 }, // Scroll up
|
||||
{ 0x00fd, 0x00fd, 0x00fd }
|
||||
CREDITSOVWLDLOADMAP(CINNABAR_ISLAND, 13, 17, 1),
|
||||
CREDITSOVWLDSCROLL(0, -1, 0x0500), // Scroll up
|
||||
CREDITSOVWLDEND
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd sOverworldCmd_Route21[] = {
|
||||
{ 0x00fe, MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) },
|
||||
{ 0x0008, 0x0014, 0x0001 },
|
||||
{ 0x0000, 0xffff, 0x0500 }, // Scroll up
|
||||
{ 0x00fd, 0x00fd, 0x00fd },
|
||||
CREDITSOVWLDLOADMAP(ROUTE21_NORTH, 8, 20, 1),
|
||||
CREDITSOVWLDSCROLL(0, -1, 0x0500), // Scroll up
|
||||
CREDITSOVWLDEND,
|
||||
};
|
||||
|
||||
static const struct CreditsOverworldCmd *const sOverworldMapScenes[] = {
|
||||
|
||||
+1
-1
@@ -1766,7 +1766,7 @@ static void Task_EggHatch(u8 taskID)
|
||||
{
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
SetMainCallback2(CB2_EggHatch_0);
|
||||
gFieldCallback = FieldCallback_ReturnToEventScript2;
|
||||
gFieldCallback = FieldCB_ContinueScriptHandleMusic;
|
||||
DestroyTask(taskID);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -193,7 +193,7 @@ static void Task_DiplomaReturnToOverworld(u8 taskId)
|
||||
DestroyTask(taskId);
|
||||
FreeAllWindowBuffers();
|
||||
FREE_AND_SET_NULL(gDiploma);
|
||||
SetMainCallback2(CB2_Overworld);
|
||||
SetMainCallback2(sub_80568FC);
|
||||
}
|
||||
|
||||
static void DiplomaBgInit(void)
|
||||
|
||||
+1
-1
@@ -279,7 +279,7 @@ void ShowEasyChatScreen(void)
|
||||
default:
|
||||
return;
|
||||
}
|
||||
DoEasyChatScreen(gSpecialVar_0x8004, words, sub_80568C4);
|
||||
DoEasyChatScreen(gSpecialVar_0x8004, words, CB2_ReturnToFieldContinueScript);
|
||||
}
|
||||
|
||||
static const u16 sECPhrase_MysteryEventIsExciting[] = {
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ void InitEventData(void)
|
||||
memset(sSpecialFlags, 0, SPECIAL_FLAGS_COUNT);
|
||||
}
|
||||
|
||||
void sub_806E110(void)
|
||||
void ClearTempFieldEventData(void)
|
||||
{
|
||||
memset(gSaveBlock1Ptr->flags, 0, 4);
|
||||
memset(gSaveBlock1Ptr->vars, 0, 16 * 2);
|
||||
|
||||
+2
-2
@@ -2064,7 +2064,7 @@ static void EscapeRopeFieldEffect_Step1(struct Task * task)
|
||||
if (data[4] == 1 && !gPaletteFade.active && BGMusicStopped() == TRUE)
|
||||
{
|
||||
SetObjectEventDirection(playerObj, task->data[15]);
|
||||
sub_80555E0();
|
||||
SetWarpDestinationToEscapeWarp();
|
||||
WarpIntoMap();
|
||||
gFieldCallback = FieldCallback_EscapeRopeExit;
|
||||
SetMainCallback2(CB2_LoadMap);
|
||||
@@ -2331,7 +2331,7 @@ static void TeleportFieldEffectTask4(struct Task * task)
|
||||
{
|
||||
if (BGMusicStopped() == TRUE)
|
||||
{
|
||||
copy_saved_warp3_bank_and_enter_x_to_warp1();
|
||||
SetWarpDestinationToLastHealLocation();
|
||||
WarpIntoMap();
|
||||
SetMainCallback2(CB2_LoadMap);
|
||||
gFieldCallback = FieldCallback_TeleportIn;
|
||||
|
||||
+13
-13
@@ -94,7 +94,7 @@ void FadeInFromBlack(void)
|
||||
|
||||
void WarpFadeOutScreen(void)
|
||||
{
|
||||
const struct MapHeader *header = warp1_get_mapheader();
|
||||
const struct MapHeader *header = GetDestinationWarpMapHeader();
|
||||
if (header->regionMapSectionId != gMapHeader.regionMapSectionId && MapHasPreviewScreen(header->regionMapSectionId, MPS_TYPE_CAVE))
|
||||
FadeScreen(FADE_TO_BLACK, 0);
|
||||
else
|
||||
@@ -113,7 +113,7 @@ void WarpFadeOutScreen(void)
|
||||
|
||||
static void sub_807DC70(void)
|
||||
{
|
||||
switch (MapTransitionIsEnter(GetCurrentMapType(), warp1_get_mapheader()->mapType))
|
||||
switch (MapTransitionIsEnter(GetCurrentMapType(), GetDestinationWarpMapHeader()->mapType))
|
||||
{
|
||||
case FALSE:
|
||||
FadeScreen(FADE_TO_BLACK, 3);
|
||||
@@ -152,7 +152,7 @@ static void task0A_asap_script_env_2_enable_and_set_ctx_running(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void FieldCallback_ReturnToEventScript2(void)
|
||||
void FieldCB_ContinueScriptHandleMusic(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
Overworld_PlaySpecialMapMusic();
|
||||
@@ -160,7 +160,7 @@ void FieldCallback_ReturnToEventScript2(void)
|
||||
CreateTask(task0A_asap_script_env_2_enable_and_set_ctx_running, 10);
|
||||
}
|
||||
|
||||
void sub_807DD44(void)
|
||||
void FieldCB_ContinueScript(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
FadeInFromBlack();
|
||||
@@ -193,7 +193,7 @@ static void task_mpl_807DD60(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void FieldCB_ReturnToFieldWiredLink(void)
|
||||
void FieldCB_ReturnToFieldCableLink(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
Overworld_PlaySpecialMapMusic();
|
||||
@@ -284,7 +284,7 @@ static void sub_807DF4C(bool8 a0)
|
||||
FadeInFromBlack();
|
||||
}
|
||||
|
||||
void FieldCB_UnionRoomWarp(void)
|
||||
void FieldCB_DefaultWarpExit(void)
|
||||
{
|
||||
Overworld_PlaySpecialMapMusic();
|
||||
sub_8111CF0();
|
||||
@@ -292,7 +292,7 @@ void FieldCB_UnionRoomWarp(void)
|
||||
ScriptContext2_Enable();
|
||||
}
|
||||
|
||||
void sub_807DF7C(void)
|
||||
void FieldCB_WarpExitFadeFromBlack(void)
|
||||
{
|
||||
Overworld_PlaySpecialMapMusic();
|
||||
sub_8111CF0();
|
||||
@@ -491,7 +491,7 @@ void FadeTransition_FadeInOnReturnToStartMenu(void)
|
||||
ScriptContext2_Enable();
|
||||
}
|
||||
|
||||
bool8 FieldCB2_ReturnToStartMenuInit(void)
|
||||
bool8 FieldCB_ReturnToFieldOpenStartMenu(void)
|
||||
{
|
||||
SetUpReturnToStartMenu();
|
||||
return FALSE;
|
||||
@@ -535,7 +535,7 @@ void DoWarp(void)
|
||||
WarpFadeOutScreen();
|
||||
PlayRainStoppingSoundEffect();
|
||||
PlaySE(SE_KAIDAN);
|
||||
gFieldCallback = FieldCB_UnionRoomWarp;
|
||||
gFieldCallback = FieldCB_DefaultWarpExit;
|
||||
CreateTask(sub_807E718, 10);
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ void DoDiveWarp(void)
|
||||
TryFadeOutOldMapMusic();
|
||||
WarpFadeOutScreen();
|
||||
PlayRainStoppingSoundEffect();
|
||||
gFieldCallback = FieldCB_UnionRoomWarp;
|
||||
gFieldCallback = FieldCB_DefaultWarpExit;
|
||||
CreateTask(sub_807E718, 10);
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ void sub_807E4A0(u16 metatileBehavior, u16 delay)
|
||||
void DoDoorWarp(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
gFieldCallback = FieldCB_UnionRoomWarp;
|
||||
gFieldCallback = FieldCB_DefaultWarpExit;
|
||||
CreateTask(sub_807E80C, 10);
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ void sub_807E500(void)
|
||||
void DoUnionRoomWarp(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
gFieldCallback = FieldCB_UnionRoomWarp;
|
||||
gFieldCallback = FieldCB_DefaultWarpExit;
|
||||
CreateTask(Task_TeleportWarp, 10);
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ static void sub_807E980(u8 taskId)
|
||||
data[0]++;
|
||||
break;
|
||||
default:
|
||||
gFieldCallback = FieldCB_UnionRoomWarp;
|
||||
gFieldCallback = FieldCB_DefaultWarpExit;
|
||||
WarpIntoMap();
|
||||
SetMainCallback2(CB2_LoadMap);
|
||||
DestroyTask(taskId);
|
||||
|
||||
@@ -1152,7 +1152,7 @@ u8 GetPlayerAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender)
|
||||
return sPlayerAvatarGfxIds[state][gender];
|
||||
}
|
||||
|
||||
u8 GetHoennLinkPartnerGraphicsIdByGender(u8 gender)
|
||||
u8 GetRSAvatarGraphicsIdByGender(u8 gender)
|
||||
{
|
||||
return sHoennLinkPartnerGfxIds[gender];
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ static void Task_BarnDoorWipeChild(u8 taskId)
|
||||
#undef DIR_WIPE_OUT
|
||||
#undef tChildOffset
|
||||
|
||||
static bool8 sub_807F3A4(u8 taskId, const u8 *text, u8 x, u8 y)
|
||||
static bool8 PrintWhiteOutRecoveryMessage(u8 taskId, const u8 *text, u8 x, u8 y)
|
||||
{
|
||||
u8 windowId = gTasks[taskId].data[1];
|
||||
|
||||
@@ -385,7 +385,7 @@ static bool8 sub_807F3A4(u8 taskId, const u8 *text, u8 x, u8 y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void sub_807F45C(u8 taskId)
|
||||
static void Task_RushInjuredPokemonToCenter(u8 taskId)
|
||||
{
|
||||
u8 windowId;
|
||||
const struct HealLocation *loc;
|
||||
@@ -399,7 +399,7 @@ static void sub_807F45C(u8 taskId)
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
|
||||
PutWindowTilemap(windowId);
|
||||
CopyWindowToVram(windowId, 3);
|
||||
loc = GetHealLocationPointer(1);
|
||||
loc = GetHealLocation(1);
|
||||
if (gSaveBlock1Ptr->lastHealLocation.mapGroup == loc->group
|
||||
&& gSaveBlock1Ptr->lastHealLocation.mapNum == loc->map
|
||||
&& gSaveBlock1Ptr->lastHealLocation.warpId == -1
|
||||
@@ -410,14 +410,14 @@ static void sub_807F45C(u8 taskId)
|
||||
gTasks[taskId].data[0] = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (sub_807F3A4(taskId, gUnknown_841B554, 2, 8))
|
||||
if (PrintWhiteOutRecoveryMessage(taskId, gText_PlayerScurriedToCenter, 2, 8))
|
||||
{
|
||||
ObjectEventTurn(&gObjectEvents[gPlayerAvatar.objectEventId], 2);
|
||||
++gTasks[taskId].data[0];
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (sub_807F3A4(taskId, gUnknown_841B5B6, 2, 8))
|
||||
if (PrintWhiteOutRecoveryMessage(taskId, gText_PlayerScurriedBackHome, 2, 8))
|
||||
{
|
||||
ObjectEventTurn(&gObjectEvents[gPlayerAvatar.objectEventId], 2);
|
||||
++gTasks[taskId].data[0];
|
||||
@@ -450,12 +450,12 @@ static void sub_807F45C(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_807F5F0(void)
|
||||
void FieldCB_RushInjuredPokemonToCenter(void)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
ScriptContext2_Enable();
|
||||
palette_bg_faded_fill_black();
|
||||
taskId = CreateTask(sub_807F45C, 10);
|
||||
taskId = CreateTask(Task_RushInjuredPokemonToCenter, 10);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
}
|
||||
|
||||
+15
-15
@@ -108,7 +108,7 @@ void ForcePlayerOntoBike(void)
|
||||
Overworld_ChangeMusicTo(MUS_CYCLING);
|
||||
}
|
||||
|
||||
void nullsub_74(void)
|
||||
void ResetCyclingRoadChallengeData(void)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -840,9 +840,9 @@ static const u8 sElevatorWindowAnimDuration[] = {
|
||||
void GetElevatorFloor(void)
|
||||
{
|
||||
u16 floor = 4;
|
||||
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F))
|
||||
if (gSaveBlock1Ptr->dynamicWarp.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F))
|
||||
{
|
||||
switch (gSaveBlock1Ptr->warp2.mapNum)
|
||||
switch (gSaveBlock1Ptr->dynamicWarp.mapNum)
|
||||
{
|
||||
case MAP_NUM(SILPH_CO_1F):
|
||||
floor = 4;
|
||||
@@ -888,9 +888,9 @@ void GetElevatorFloor(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F))
|
||||
if (gSaveBlock1Ptr->dynamicWarp.mapGroup == MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F))
|
||||
{
|
||||
switch (gSaveBlock1Ptr->warp2.mapNum)
|
||||
switch (gSaveBlock1Ptr->dynamicWarp.mapNum)
|
||||
{
|
||||
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_1F):
|
||||
floor = 4;
|
||||
@@ -909,9 +909,9 @@ void GetElevatorFloor(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(TRAINER_TOWER_1F))
|
||||
if (gSaveBlock1Ptr->dynamicWarp.mapGroup == MAP_GROUP(TRAINER_TOWER_1F))
|
||||
{
|
||||
switch (gSaveBlock1Ptr->warp2.mapNum)
|
||||
switch (gSaveBlock1Ptr->dynamicWarp.mapNum)
|
||||
{
|
||||
case MAP_NUM(TRAINER_TOWER_1F):
|
||||
case MAP_NUM(TRAINER_TOWER_2F):
|
||||
@@ -937,9 +937,9 @@ u16 InitElevatorFloorSelectMenuPos(void)
|
||||
sElevatorScroll = 0;
|
||||
sElevatorCursorPos = 0;
|
||||
|
||||
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F))
|
||||
if (gSaveBlock1Ptr->dynamicWarp.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F))
|
||||
{
|
||||
switch (gSaveBlock1Ptr->warp2.mapNum)
|
||||
switch (gSaveBlock1Ptr->dynamicWarp.mapNum)
|
||||
{
|
||||
case MAP_NUM(SILPH_CO_11F):
|
||||
sElevatorScroll = 0;
|
||||
@@ -999,9 +999,9 @@ u16 InitElevatorFloorSelectMenuPos(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F))
|
||||
if (gSaveBlock1Ptr->dynamicWarp.mapGroup == MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F))
|
||||
{
|
||||
switch (gSaveBlock1Ptr->warp2.mapNum)
|
||||
switch (gSaveBlock1Ptr->dynamicWarp.mapNum)
|
||||
{
|
||||
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_5F):
|
||||
sElevatorScroll = 0;
|
||||
@@ -1025,9 +1025,9 @@ u16 InitElevatorFloorSelectMenuPos(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(TRAINER_TOWER_1F))
|
||||
if (gSaveBlock1Ptr->dynamicWarp.mapGroup == MAP_GROUP(TRAINER_TOWER_1F))
|
||||
{
|
||||
switch (gSaveBlock1Ptr->warp2.mapNum)
|
||||
switch (gSaveBlock1Ptr->dynamicWarp.mapNum)
|
||||
{
|
||||
case MAP_NUM(TRAINER_TOWER_1F):
|
||||
case MAP_NUM(TRAINER_TOWER_2F):
|
||||
@@ -2037,10 +2037,10 @@ const u16 sPokeCenter1FMaps[] = {
|
||||
MAP_UNDEFINED
|
||||
};
|
||||
|
||||
bool8 sub_80CC87C(void)
|
||||
bool8 UsedPokemonCenterWarp(void)
|
||||
{
|
||||
s32 i;
|
||||
u16 mapno = (gUnknown_2031DB4.mapGroup << 8) + gUnknown_2031DB4.mapNum;
|
||||
u16 mapno = (gLastUsedWarp.mapGroup << 8) + gLastUsedWarp.mapNum;
|
||||
for (i = 0; sPokeCenter1FMaps[i] != MAP_UNDEFINED; i++)
|
||||
{
|
||||
if (sPokeCenter1FMaps[i] == mapno)
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ static void Task_RunTimeBasedEvents(u8 taskId)
|
||||
{
|
||||
if (gQuestLogState != 2 && gQuestLogState != 3)
|
||||
{
|
||||
sub_8056078(&data[1], &data[2]);
|
||||
UpdateAmbientCry(&data[1], &data[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -370,7 +370,7 @@ union Block
|
||||
s32 xprime; \
|
||||
s32 yprime; \
|
||||
\
|
||||
struct MapLayout *mapLayout = gMapHeader.mapLayout; \
|
||||
const struct MapLayout *mapLayout = gMapHeader.mapLayout; \
|
||||
\
|
||||
xprime = x - 7; \
|
||||
xprime += 8 * mapLayout->borderWidth; \
|
||||
@@ -485,7 +485,7 @@ void MapGridSetMetatileImpassabilityAt(s32 x, s32 y, bool32 arg2)
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetBehaviorByMetatileIdAndMapLayout(struct MapLayout *mapLayout, u16 metatile, u8 attr)
|
||||
u32 GetBehaviorByMetatileIdAndMapLayout(const struct MapLayout *mapLayout, u16 metatile, u8 attr)
|
||||
{
|
||||
u32 * attributes;
|
||||
|
||||
@@ -732,7 +732,7 @@ bool8 CameraMove(s32 x, s32 y)
|
||||
old_y = gSaveBlock1Ptr->pos.y;
|
||||
connection = sub_8059600(direction, gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y);
|
||||
sub_80594AC(connection, direction, x, y);
|
||||
sub_8055864(connection->mapGroup, connection->mapNum);
|
||||
LoadMapFromCameraTransition(connection->mapGroup, connection->mapNum);
|
||||
gCamera.active = TRUE;
|
||||
gCamera.x = old_x - gSaveBlock1Ptr->pos.x;
|
||||
gCamera.y = old_y - gSaveBlock1Ptr->pos.y;
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ static const struct HealLocation * GetHealLocationPointerFromMapGroupAndNum(u16
|
||||
return &sSpawnPoints[i - 1];
|
||||
}
|
||||
|
||||
const struct HealLocation * GetHealLocationPointer(u32 idx)
|
||||
const struct HealLocation * GetHealLocation(u32 idx)
|
||||
{
|
||||
if (idx == 0)
|
||||
return NULL;
|
||||
|
||||
+2
-2
@@ -268,7 +268,7 @@ void FieldUseFunc_MachBike(u8 taskId)
|
||||
|| MetatileBehavior_IsIsolatedVerticalRail(behavior) == TRUE
|
||||
|| MetatileBehavior_IsIsolatedHorizontalRail(behavior) == TRUE)
|
||||
sub_80A10C4(taskId, gTasks[taskId].data[3], 2, gUnknown_8416451);
|
||||
else if (sub_8055C9C() == TRUE && !sub_80BD540())
|
||||
else if (Overworld_IsBikingAllowed() == TRUE && !sub_80BD540())
|
||||
{
|
||||
sItemUseOnFieldCB = ItemUseOnFieldCB_Bicycle;
|
||||
sub_80A103C(taskId);
|
||||
@@ -618,7 +618,7 @@ static void sub_80A1B48(u8 taskId)
|
||||
|
||||
bool8 CanUseEscapeRopeOnCurrMap(void)
|
||||
{
|
||||
if (gMapHeader.escapeRope & 1)
|
||||
if (gMapHeader.flags & MAP_ALLOW_ESCAPE_ROPE)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@
|
||||
static void Task_NoResponse_CleanUp(u8 taskId);
|
||||
static void Task_ItemfinderResponseSoundsAndAnims(u8 taskId);
|
||||
static void Task_ItemfinderUnderfootSoundsAndAnims(u8 taskId);
|
||||
static bool8 HiddenItemIsWithinRangeOfPlayer(struct MapEvents * events, u8 taskId);
|
||||
static bool8 HiddenItemIsWithinRangeOfPlayer(const struct MapEvents * events, u8 taskId);
|
||||
static void SetUnderfootHiddenItem(u8 taskId, u32 hiddenItem);
|
||||
static void SetNormalHiddenItem(u8 taskId);
|
||||
static void FindHiddenItemsInConnectedMaps(u8 taskId);
|
||||
@@ -199,7 +199,7 @@ static void Task_ItemfinderUnderfootSoundsAndAnims(u8 taskId)
|
||||
tDingTimer++;
|
||||
}
|
||||
|
||||
static bool8 HiddenItemIsWithinRangeOfPlayer(struct MapEvents * events, u8 taskId)
|
||||
static bool8 HiddenItemIsWithinRangeOfPlayer(const struct MapEvents * events, u8 taskId)
|
||||
{
|
||||
s16 x, y, i, dx, dy;
|
||||
PlayerGetDestCoords(&x, &y);
|
||||
@@ -284,7 +284,7 @@ static void SetNormalHiddenItem(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 HiddenItemAtPos(struct MapEvents * events, s16 x, s16 y)
|
||||
static bool8 HiddenItemAtPos(const struct MapEvents * events, s16 x, s16 y)
|
||||
{
|
||||
u8 bgEventCount = events->bgEventCount;
|
||||
struct BgEvent * bgEvents = events->bgEvents;
|
||||
|
||||
+1
-1
@@ -286,7 +286,7 @@ static void Task_InitMoveRelearnerMenu(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
SetMainCallback2(CB2_MoveRelearner_Init);
|
||||
gFieldCallback = FieldCallback_ReturnToEventScript2;
|
||||
gFieldCallback = FieldCB_ContinueScriptHandleMusic;
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -201,7 +201,7 @@ void ResetLinkRfuGFLayer(void)
|
||||
}
|
||||
ResetSendDataManager(&Rfu.cmd_8800_sendbuf);
|
||||
RFU_queue_20_70_reset(&Rfu.unk_124);
|
||||
RFU_queue_40_14_reset(&Rfu.unk_9e8);
|
||||
RFU_queue_40_14_reset(&Rfu.sendQueue);
|
||||
CpuFill16(0, gSendCmd, sizeof gSendCmd);
|
||||
CpuFill16(0, gRecvCmds, sizeof gRecvCmds);
|
||||
CpuFill16(0, gLinkPlayers, sizeof gLinkPlayers);
|
||||
@@ -659,7 +659,7 @@ static void sub_80F906C(void)
|
||||
}
|
||||
if (Rfu.unk_c3c == 0)
|
||||
{
|
||||
RFU_queue_40_14_send(&Rfu.unk_9e8, Rfu.unk_4c);
|
||||
RFU_queue_40_14_send(&Rfu.sendQueue, Rfu.unk_4c);
|
||||
RFU_queue_2_14_recv(&Rfu.unk_c1c, Rfu.unk_4c);
|
||||
}
|
||||
}
|
||||
@@ -881,7 +881,7 @@ static bool32 RfuProcessEnqueuedRecvBlock(void)
|
||||
Rfu.unk_cd0--;
|
||||
CallRfuFunc();
|
||||
sub_80F94BC(gSendCmd, sp48);
|
||||
RFU_queue_40_14_recv(&Rfu.unk_9e8, sp48);
|
||||
RFU_queue_40_14_recv(&Rfu.sendQueue, sp48);
|
||||
for (i = 0; i < CMD_LENGTH - 1; i++)
|
||||
gSendCmd[i] = 0;
|
||||
}
|
||||
@@ -909,7 +909,7 @@ static void HandleSendFailure(u8 unused, u32 flags)
|
||||
|
||||
j++;j--; // Needed to match;
|
||||
}
|
||||
RFU_queue_40_14_recv(&Rfu.unk_9e8, sResendBlock8);
|
||||
RFU_queue_40_14_recv(&Rfu.sendQueue, sResendBlock8);
|
||||
Rfu.cmd_8800_sendbuf.failedFlags |= (1 << i);
|
||||
}
|
||||
flags >>= 1;
|
||||
@@ -1853,11 +1853,11 @@ static void RfuCheckErrorStatus(void)
|
||||
gWirelessCommType = 2;
|
||||
SetMainCallback2(CB2_LinkError);
|
||||
gMain.savedCallback = CB2_LinkError;
|
||||
SetLinkErrorFromRfu((Rfu.linkman_msg << 16) | (Rfu.linkman_param[0] << 8) | Rfu.linkman_param[1], Rfu.unk_124.count, Rfu.unk_9e8.count, RfuGetErrorStatus() == 2);
|
||||
SetLinkErrorFromRfu((Rfu.linkman_msg << 16) | (Rfu.linkman_param[0] << 8) | Rfu.linkman_param[1], Rfu.unk_124.count, Rfu.sendQueue.count, RfuGetErrorStatus() == 2);
|
||||
Rfu.errorState = 2;
|
||||
CloseLink();
|
||||
}
|
||||
else if (Rfu.unk_9e8.full == 1 || Rfu.unk_124.full == 1)
|
||||
else if (Rfu.sendQueue.full == 1 || Rfu.unk_124.full == 1)
|
||||
{
|
||||
if (lman.childClockSlave_flag)
|
||||
rfu_LMAN_requestChangeAgbClockMaster();
|
||||
@@ -2851,7 +2851,7 @@ static const char gUnknown_843EEA8[][8] = {
|
||||
|
||||
static u32 sub_80FC44C(void)
|
||||
{
|
||||
return Rfu.unk_9e8.count;
|
||||
return Rfu.sendQueue.count;
|
||||
}
|
||||
|
||||
u32 GetRfuRecvQueueLength(void)
|
||||
|
||||
+3
-3
@@ -184,7 +184,7 @@ void RFU_queue_20_70_reset(struct UnkRfuStruct_2_Sub_124 *queue)
|
||||
queue->full = 0;
|
||||
}
|
||||
|
||||
void RFU_queue_40_14_reset(struct UnkRfuStruct_2_Sub_9e8 *ptr)
|
||||
void RFU_queue_40_14_reset(struct RfuSendQueue *ptr)
|
||||
{
|
||||
s32 i;
|
||||
s32 j;
|
||||
@@ -260,7 +260,7 @@ void RFU_queue_20_70_recv(struct UnkRfuStruct_2_Sub_124 *queue, u8 *data)
|
||||
}
|
||||
}
|
||||
|
||||
void RFU_queue_40_14_recv(struct UnkRfuStruct_2_Sub_9e8 *queue, u8 *data)
|
||||
void RFU_queue_40_14_recv(struct RfuSendQueue *queue, u8 *data)
|
||||
{
|
||||
s32 i;
|
||||
u16 imeBak;
|
||||
@@ -325,7 +325,7 @@ bool8 RFU_queue_20_70_send(struct UnkRfuStruct_2_Sub_124 *queue, u8 *dest)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 RFU_queue_40_14_send(struct UnkRfuStruct_2_Sub_9e8 *queue, u8 *dest)
|
||||
bool8 RFU_queue_40_14_send(struct RfuSendQueue *queue, u8 *dest)
|
||||
{
|
||||
s32 i;
|
||||
u16 imeBak;
|
||||
|
||||
+5
-5
@@ -127,24 +127,24 @@ void MoveSaveBlocks_ResetHeap(void)
|
||||
gSaveBlock2Ptr->encryptionKey = encryptionKey;
|
||||
}
|
||||
|
||||
u32 sav2_x1_query_bit1(void)
|
||||
u32 UseContinueGameWarp(void)
|
||||
{
|
||||
return gSaveBlock2Ptr->specialSaveWarpFlags & CONTINUE_GAME_WARP;
|
||||
}
|
||||
|
||||
void sav2_x9_clear_bit1(void)
|
||||
void ClearContinueGameWarpStatus(void)
|
||||
{
|
||||
gSaveBlock2Ptr->specialSaveWarpFlags &= ~CONTINUE_GAME_WARP;
|
||||
}
|
||||
|
||||
void sub_804C1AC(void)
|
||||
void SetContinueGameWarpStatus(void)
|
||||
{
|
||||
gSaveBlock2Ptr->specialSaveWarpFlags |= CONTINUE_GAME_WARP;
|
||||
}
|
||||
|
||||
void SetContinueGameWarpStatusToDynamicWarp(void)
|
||||
{
|
||||
sub_8055778(0);
|
||||
SetContinueGameWarpToDynamicWarp(0);
|
||||
gSaveBlock2Ptr->specialSaveWarpFlags |= CONTINUE_GAME_WARP;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey)
|
||||
for(i = 0; i < NUM_TOWER_CHALLENGE_TYPES; i++)
|
||||
ApplyNewEncryptionKeyToWord(&gSaveBlock1Ptr->trainerTower[i].bestTime, encryptionKey);
|
||||
|
||||
sub_8054F38(encryptionKey);
|
||||
ApplyNewEncryptionKeyToGameStats(encryptionKey);
|
||||
ApplyNewEncryptionKeyToBagItems_(encryptionKey);
|
||||
ApplyNewEncryptionKeyToBerryPowder(encryptionKey);
|
||||
ApplyNewEncryptionKeyToWord(&gSaveBlock1Ptr->money, encryptionKey);
|
||||
|
||||
+12
-12
@@ -18,7 +18,7 @@ static u16 MapNamePopupCreateWindow(bool32 palIntoFadedBuffer);
|
||||
static void MapNamePopupPrintMapNameOnWindow(u16 windowId);
|
||||
static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 flags);
|
||||
|
||||
void CreateMapNamePopupIfNotAlreadyRunning(bool32 palIntoFadedBuffer)
|
||||
void ShowMapNamePopup(bool32 palIntoFadedBuffer)
|
||||
{
|
||||
u8 taskId;
|
||||
if (FlagGet(FLAG_SPECIAL_FLAG_0x4000) != TRUE && !(gQuestLogState == 2 || gQuestLogState == 3))
|
||||
@@ -151,9 +151,9 @@ static u16 MapNamePopupCreateWindow(bool32 palintoFadedBuffer)
|
||||
};
|
||||
u16 windowId;
|
||||
u16 r6 = 0x01D;
|
||||
if (gMapHeader.flags != 0)
|
||||
if (gMapHeader.floorNum != 0)
|
||||
{
|
||||
if (gMapHeader.flags != 0x7F)
|
||||
if (gMapHeader.floorNum != 0x7F)
|
||||
{
|
||||
windowTemplate.width += 5;
|
||||
r6 = 0x027;
|
||||
@@ -187,29 +187,29 @@ static void MapNamePopupPrintMapNameOnWindow(u16 windowId)
|
||||
u32 maxWidth = 112;
|
||||
u32 xpos;
|
||||
u8 *ptr = GetMapName(mapName, gMapHeader.regionMapSectionId, 0);
|
||||
if (gMapHeader.flags != 0)
|
||||
if (gMapHeader.floorNum != 0)
|
||||
{
|
||||
ptr = MapNamePopupAppendFloorNum(ptr, gMapHeader.flags);
|
||||
maxWidth = gMapHeader.flags != 0x7F ? 152 : 176;
|
||||
ptr = MapNamePopupAppendFloorNum(ptr, gMapHeader.floorNum);
|
||||
maxWidth = gMapHeader.floorNum != 0x7F ? 152 : 176;
|
||||
}
|
||||
xpos = (maxWidth - GetStringWidth(2, mapName, -1)) / 2;
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(windowId, 2, mapName, xpos, 2, 0xFF, NULL);
|
||||
}
|
||||
|
||||
static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 flags)
|
||||
static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 floorNum)
|
||||
{
|
||||
if (flags == 0)
|
||||
if (floorNum == 0)
|
||||
return dest;
|
||||
*dest++ = CHAR_SPACE;
|
||||
if (flags == 0x7F)
|
||||
if (floorNum == 0x7F)
|
||||
return StringCopy(dest, gUnknown_841D18D);
|
||||
if (flags < 0)
|
||||
if (floorNum < 0)
|
||||
{
|
||||
*dest++ = CHAR_B;
|
||||
flags *= -1;
|
||||
floorNum *= -1;
|
||||
}
|
||||
dest = ConvertIntToDecimalStringN(dest, flags, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
dest = ConvertIntToDecimalStringN(dest, floorNum, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
*dest++ = CHAR_F;
|
||||
*dest = EOS;
|
||||
return dest;
|
||||
|
||||
@@ -199,7 +199,7 @@ bool8 MetatileBehavior_IsNonAnimDoor(u8 metatileBehavior)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MetatileBehavior_ReturnFalse_2(u8 metatileBehavior) { return FALSE; }
|
||||
bool8 MetatileBehavior_IsDeepSouthWarp(u8 metatileBehavior) { return FALSE; }
|
||||
|
||||
bool8 MetatileBehavior_IsSurfable(u8 metatileBehavior)
|
||||
{
|
||||
|
||||
+1
-1
@@ -509,7 +509,7 @@ static void BufferOptionMenuString(u8 selection)
|
||||
|
||||
static void CloseAndSaveOptionMenu(u8 taskId)
|
||||
{
|
||||
gFieldCallback = FieldCB_UnionRoomWarp;
|
||||
gFieldCallback = FieldCB_DefaultWarpExit;
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
FreeAllWindowBuffers();
|
||||
gSaveBlock2Ptr->optionsTextSpeed = sOptionMenuPtr->option[MENUITEM_TEXTSPEED];
|
||||
|
||||
+3553
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@ void SelectMoveDeleterMove(void)
|
||||
{
|
||||
ShowSelectMovePokemonSummaryScreen(gPlayerParty, gSpecialVar_0x8004, gPlayerPartyCount - 1, CB2_ReturnToField, 0);
|
||||
sub_8138B38(3);
|
||||
gFieldCallback = FieldCallback_ReturnToEventScript2;
|
||||
gFieldCallback = FieldCB_ContinueScriptHandleMusic;
|
||||
}
|
||||
|
||||
void GetNumMovesSelectedMonHas(void)
|
||||
|
||||
@@ -1883,7 +1883,7 @@ static int sub_81497A8(void)
|
||||
|
||||
static bool32 sub_8149804(void)
|
||||
{
|
||||
return !Rfu.unk_124.count && !Rfu.unk_9e8.count;
|
||||
return !Rfu.unk_124.count && !Rfu.sendQueue.count;
|
||||
}
|
||||
|
||||
static int sub_8149834(u8 *arg0)
|
||||
|
||||
@@ -28,8 +28,8 @@ bool8 EnterHallOfFame(void)
|
||||
{
|
||||
SetGameStat(GAME_STAT_FIRST_HOF_PLAY_TIME, (gSaveBlock2Ptr->playTimeHours << 16) | (gSaveBlock2Ptr->playTimeMinutes << 8) | gSaveBlock2Ptr->playTimeSeconds);
|
||||
}
|
||||
sub_804C1AC();
|
||||
sub_8055738(SPAWN_PALLET_TOWN);
|
||||
SetContinueGameWarpStatus();
|
||||
SetContinueGameWarpToHealLocation(SPAWN_PALLET_TOWN);
|
||||
gaveAtLeastOneRibbon = FALSE;
|
||||
for (i = 0, r7 = &ribbonState; i < PARTY_SIZE; i++)
|
||||
{
|
||||
|
||||
+7
-7
@@ -96,7 +96,7 @@ struct UnkStruct_203B044
|
||||
|
||||
u8 gUnknown_3005E88;
|
||||
u16 sNumEventsInLogEntry;
|
||||
struct UnkStruct_3005E90 gUnknown_3005E90;
|
||||
struct FieldInput gUnknown_3005E90;
|
||||
struct QuestLogEntry * sCurQuestLogEntry;
|
||||
|
||||
static struct UnkStruct_300201C * sFlagOrVarRecords;
|
||||
@@ -600,7 +600,7 @@ bool8 sub_8111000(void)
|
||||
{
|
||||
LoadPalette(stdpal_get(4), 0xF0, 0x20);
|
||||
SetQuestLogState(QL_STATE_2);
|
||||
FieldCB_UnionRoomWarp();
|
||||
FieldCB_DefaultWarpExit();
|
||||
gUnknown_203AE94 = (struct UnkStruct_203AE94){};
|
||||
gUnknown_203AE94.unk_0_0 = 2;
|
||||
return 1;
|
||||
@@ -610,7 +610,7 @@ bool8 sub_8111038(void)
|
||||
{
|
||||
LoadPalette(stdpal_get(4), 0xF0, 0x20);
|
||||
SetQuestLogState(QL_STATE_2);
|
||||
sub_807DF7C();
|
||||
FieldCB_WarpExitFadeFromBlack();
|
||||
gUnknown_203AE94 = (struct UnkStruct_203AE94){};
|
||||
gUnknown_203AE94.unk_0_0 = 2;
|
||||
return 1;
|
||||
@@ -1217,7 +1217,7 @@ static bool8 sub_8111F60(void)
|
||||
{
|
||||
LoadPalette(stdpal_get(4), 0xF0, 0x20);
|
||||
DrawPreviouslyOnQuestHeader(0);
|
||||
sub_807DF7C();
|
||||
FieldCB_WarpExitFadeFromBlack();
|
||||
CreateTask(sub_8111F8C, 0xFF);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1313,7 +1313,7 @@ static void Task_EndQuestLog(u8 taskId)
|
||||
break;
|
||||
default:
|
||||
if (gUnknown_203AE94.unk_0_6 == 1)
|
||||
CreateMapNamePopupIfNotAlreadyRunning(1);
|
||||
ShowMapNamePopup(1);
|
||||
CpuCopy16(gUnknown_203AE90, gPlttBufferUnfaded, 0x400);
|
||||
Free(gUnknown_203AE90);
|
||||
gUnknown_203AE94 = (struct UnkStruct_203AE94){};
|
||||
@@ -1536,7 +1536,7 @@ void sub_811278C(u8 movementActionId, u8 duration)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81127F8(struct UnkStruct_3005E90 * a0)
|
||||
void sub_81127F8(struct FieldInput * a0)
|
||||
{
|
||||
if (sQuestLogCursor < sNumEventsInLogEntry)
|
||||
{
|
||||
@@ -1616,7 +1616,7 @@ static void SetUpQuestLogEntry(u8 kind, struct QuestLogEntry *entry, u16 size)
|
||||
}
|
||||
sQuestLogCursor = 0;
|
||||
gUnknown_203B01C = 0;
|
||||
gUnknown_3005E90 = (struct UnkStruct_3005E90){};
|
||||
gUnknown_3005E90 = (struct FieldInput){};
|
||||
sNextStepDelay = sCurQuestLogEntry[sQuestLogCursor].unk_4;
|
||||
sMovementScripts[0][0] = sCurQuestLogEntry[sQuestLogCursor].unk_3;
|
||||
sMovementScripts[0][1] = 0xFF;
|
||||
|
||||
+7
-7
@@ -3471,7 +3471,7 @@ static void GetPlayerPositionOnRegionMap(void)
|
||||
const struct MapHeader * mapHeader;
|
||||
struct WarpData * warp;
|
||||
|
||||
switch (get_map_light_level_by_bank_and_number(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum))
|
||||
switch (GetMapTypeByGroupAndId(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum))
|
||||
{
|
||||
default:
|
||||
case 1:
|
||||
@@ -3495,12 +3495,12 @@ static void GetPlayerPositionOnRegionMap(void)
|
||||
y = gSaveBlock1Ptr->escapeWarp.y;
|
||||
break;
|
||||
case 9:
|
||||
mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->warp2.mapGroup, gSaveBlock1Ptr->warp2.mapNum);
|
||||
mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->dynamicWarp.mapGroup, gSaveBlock1Ptr->dynamicWarp.mapNum);
|
||||
gUnknown_20399E4->field_014 = mapHeader->regionMapSectionId;
|
||||
width = mapHeader->mapLayout->width;
|
||||
height = mapHeader->mapLayout->height;
|
||||
x = gSaveBlock1Ptr->warp2.x;
|
||||
y = gSaveBlock1Ptr->warp2.y;
|
||||
x = gSaveBlock1Ptr->dynamicWarp.x;
|
||||
y = gSaveBlock1Ptr->dynamicWarp.y;
|
||||
break;
|
||||
case 8:
|
||||
if ((gUnknown_20399E4->field_014 = gMapHeader.regionMapSectionId) != MAPSEC_SPECIAL_AREA)
|
||||
@@ -3510,7 +3510,7 @@ static void GetPlayerPositionOnRegionMap(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
warp = &gSaveBlock1Ptr->warp2;
|
||||
warp = &gSaveBlock1Ptr->dynamicWarp;
|
||||
mapHeader = Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum);
|
||||
gUnknown_20399E4->field_014 = mapHeader->regionMapSectionId;
|
||||
}
|
||||
@@ -4318,7 +4318,7 @@ static void sub_80C4F08(u8 taskId)
|
||||
case 4:
|
||||
if ((sub_80C3AC8(0) == 2 || sub_80C3AC8(0) == 4) && GetRegionMapPermission(MAPPERM_3) == TRUE)
|
||||
{
|
||||
switch (get_map_light_level_by_bank_and_number(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum))
|
||||
switch (GetMapTypeByGroupAndId(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum))
|
||||
{
|
||||
case 4:
|
||||
case 8:
|
||||
@@ -4388,7 +4388,7 @@ static void sub_80C527C(u16 mapsec)
|
||||
u16 idx = mapsec - MAPSECS_KANTO;
|
||||
if (sMapsecToSpawn[idx][2])
|
||||
{
|
||||
sub_805546C(sMapsecToSpawn[idx][2]);
|
||||
SetWarpDestinationToHealLocation(sMapsecToSpawn[idx][2]);
|
||||
SetUsedFlyQuestLogEvent(sMapsecToSpawn[idx]);
|
||||
}
|
||||
else
|
||||
|
||||
+1
-1
@@ -1168,7 +1168,7 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext * ctx)
|
||||
u16 localId = VarGet(ScriptReadHalfword(ctx));
|
||||
u8 movementType = ScriptReadByte(ctx);
|
||||
|
||||
Overworld_SetMapObjTemplateMovementType(localId, movementType);
|
||||
Overworld_SetObjEventTemplateMovementType(localId, movementType);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -358,7 +358,7 @@ void ScriptContext2_RunNewScript(const u8 *ptr)
|
||||
|
||||
u8 *mapheader_get_tagged_pointer(u8 tag)
|
||||
{
|
||||
u8 *mapScripts = gMapHeader.mapScripts;
|
||||
const u8 *mapScripts = gMapHeader.mapScripts;
|
||||
|
||||
if (mapScripts == NULL)
|
||||
return NULL;
|
||||
@@ -370,7 +370,7 @@ u8 *mapheader_get_tagged_pointer(u8 tag)
|
||||
if (*mapScripts == tag)
|
||||
{
|
||||
mapScripts++;
|
||||
return (u8 *)(mapScripts[0] + (mapScripts[1] << 8) + (mapScripts[2] << 16) + (mapScripts[3] << 24));
|
||||
return T2_READ_PTR(mapScripts);
|
||||
}
|
||||
mapScripts += 5;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ u8 *mapheader_get_tagged_pointer(u8 tag)
|
||||
void mapheader_run_script_by_tag(u8 tag)
|
||||
{
|
||||
u8 *ptr = mapheader_get_tagged_pointer(tag);
|
||||
if (ptr)
|
||||
if (ptr != NULL)
|
||||
ScriptContext2_RunNewScript(ptr);
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag)
|
||||
{
|
||||
u8 *ptr = mapheader_get_tagged_pointer(tag);
|
||||
|
||||
if (!ptr)
|
||||
if (ptr == NULL)
|
||||
return NULL;
|
||||
|
||||
while (1)
|
||||
@@ -411,22 +411,22 @@ void RunOnLoadMapScript(void)
|
||||
mapheader_run_script_by_tag(1);
|
||||
}
|
||||
|
||||
void mapheader_run_script_with_tag_x3(void)
|
||||
void RunOnTransitionMapScript(void)
|
||||
{
|
||||
mapheader_run_script_by_tag(3);
|
||||
}
|
||||
|
||||
void mapheader_run_script_with_tag_x5(void)
|
||||
void RunOnResumeMapScript(void)
|
||||
{
|
||||
mapheader_run_script_by_tag(5);
|
||||
}
|
||||
|
||||
void mapheader_run_script_with_tag_x7(void)
|
||||
void RunOnReturnToFieldMapScript(void)
|
||||
{
|
||||
mapheader_run_script_by_tag(7);
|
||||
}
|
||||
|
||||
void mapheader_run_script_with_tag_x6(void)
|
||||
void RunOnDiveWarpMapScript(void)
|
||||
{
|
||||
mapheader_run_script_by_tag(6);
|
||||
}
|
||||
@@ -447,7 +447,7 @@ bool8 TryRunOnFrameMapScript(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void mapheader_run_first_tag4_script_list_match(void)
|
||||
void TryRunOnWarpIntoMapScript(void)
|
||||
{
|
||||
u8 *ptr = mapheader_get_first_match_from_tagged_ptr_list(4);
|
||||
if (ptr)
|
||||
|
||||
+1
-1
@@ -322,7 +322,7 @@ static void Task_Seagallop_3(void)
|
||||
SetWarpDestination(warpInfo[0], warpInfo[1], -1, warpInfo[2], warpInfo[3]);
|
||||
PlayRainStoppingSoundEffect();
|
||||
PlaySE(SE_KAIDAN);
|
||||
gFieldCallback = FieldCB_UnionRoomWarp;
|
||||
gFieldCallback = FieldCB_DefaultWarpExit;
|
||||
WarpIntoMap();
|
||||
SetMainCallback2(CB2_LoadMap);
|
||||
ResetInitialPlayerAvatarState();
|
||||
|
||||
+2
-2
@@ -958,8 +958,8 @@ const u8 gText_Sorry[] = _("SORRY");
|
||||
const u8 gText_YaySmileEmoji[] = _("YAY{EXTRA 0xF9}");
|
||||
const u8 gText_ThankYou[] = _("THANK YOU");
|
||||
const u8 gText_ByeBye[] = _("BYE-BYE!");
|
||||
const u8 gUnknown_841B554[] = _("{PLAYER} scurried to a POKéMON CENTER,\nprotecting the exhausted and fainted\nPOKéMON from further harm‥\p");
|
||||
const u8 gUnknown_841B5B6[] = _("{PLAYER} scurried back home, protecting\nthe exhausted and fainted POKéMON from\nfurther harm‥\p");
|
||||
const u8 gText_PlayerScurriedToCenter[] = _("{PLAYER} scurried to a POKéMON CENTER,\nprotecting the exhausted and fainted\nPOKéMON from further harm‥\p");
|
||||
const u8 gText_PlayerScurriedBackHome[] = _("{PLAYER} scurried back home, protecting\nthe exhausted and fainted POKéMON from\nfurther harm‥\p");
|
||||
const u8 gUnknown_841B60E[] = _("PLAYER: {DYNAMIC 0x00}");
|
||||
const u8 gUnknown_841B619[] = _("This document is issued in\nrecognition of your magnificent\nachievement - the completion of\nthe {DYNAMIC 0x01} POKéDEX.");
|
||||
const u8 gUnknown_841B684[] = _("GAME FREAK");
|
||||
|
||||
+2
-2
@@ -2022,7 +2022,7 @@ static void sub_804E944(void)
|
||||
Free(sTradeMenuResourcesPtr);
|
||||
FreeAllWindowBuffers();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
SetMainCallback2(c2_8056854);
|
||||
SetMainCallback2(CB2_ReturnToFieldFromMultiplayer);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2032,7 +2032,7 @@ static void sub_804E944(void)
|
||||
Free(sSpriteTextTileBuffer);
|
||||
Free(sTradeMenuResourcesPtr);
|
||||
FreeAllWindowBuffers();
|
||||
SetMainCallback2(c2_8056854);
|
||||
SetMainCallback2(CB2_ReturnToFieldFromMultiplayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2747,7 +2747,7 @@ static void Task_WaitFadeAndStartInGameTradeAnim(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
SetMainCallback2(CB2_InitTradeAnim_InGameTrade);
|
||||
gFieldCallback = FieldCallback_ReturnToEventScript2;
|
||||
gFieldCallback = FieldCB_ContinueScriptHandleMusic;
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -681,7 +681,7 @@ bool8 sub_810C4EC(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_810C578(void)
|
||||
void TryUpdateRandomTrainerRematches(u16 mapGroup, u16 mapNum)
|
||||
{
|
||||
FlagClear(FLAG_SYS_VS_SEEKER_CHARGING);
|
||||
sub_810C640();
|
||||
|
||||
+1
-14
@@ -20,21 +20,8 @@
|
||||
.include "src/trade.o"
|
||||
.align 2
|
||||
.include "src/play_time.o"
|
||||
|
||||
.align 2
|
||||
@ .include "src/overworld.o"
|
||||
gUnknown_3000E80: @ 3000E80
|
||||
.space 0x4
|
||||
|
||||
gUnknown_3000E84: @ 3000E84
|
||||
.space 0x4
|
||||
|
||||
gUnknown_3000E88: @ 3000E88
|
||||
.space 0x1
|
||||
|
||||
gUnknown_3000E89: @ 3000E89
|
||||
.space 0x7
|
||||
|
||||
.include "src/overworld.o"
|
||||
.align 3
|
||||
.include "src/field_camera.o"
|
||||
.align 3
|
||||
|
||||
+1
-26
@@ -18,33 +18,8 @@
|
||||
.include "random.o"
|
||||
.align 2
|
||||
.include "load_save.o"
|
||||
|
||||
.align 2
|
||||
@ .include "overworld.o"
|
||||
gBGTilemapBuffers1: @ 3005014
|
||||
.space 0x4
|
||||
|
||||
gBGTilemapBuffers2: @ 3005018
|
||||
.space 0x4
|
||||
|
||||
gBGTilemapBuffers3: @ 300501C
|
||||
.space 0x4
|
||||
|
||||
gFieldCallback: @ 3005020
|
||||
.space 0x4
|
||||
|
||||
gFieldCallback2: @ 3005024
|
||||
.space 0x4
|
||||
|
||||
gHeldKeyCodeToSend: @ 3005028
|
||||
.space 0x4
|
||||
|
||||
gLocalLinkPlayerId: @ 300502C
|
||||
.space 0x4
|
||||
|
||||
gFieldLinkPlayerCount: @ 3005030
|
||||
.space 0x10
|
||||
|
||||
.include "overworld.o"
|
||||
.align 4
|
||||
.include "fieldmap.o"
|
||||
.align 4
|
||||
|
||||
+1
-41
@@ -32,48 +32,8 @@
|
||||
.include "src/trade_scene.o"
|
||||
.align 2
|
||||
.include "src/new_game.o"
|
||||
|
||||
.align 2
|
||||
@ .include "src/overworld.o"
|
||||
gUnknown_2031DB4: @ 2031DB4
|
||||
.space 0x8
|
||||
|
||||
gUnknown_2031DBC: @ 2031DBC
|
||||
.space 0x8
|
||||
|
||||
gUnknown_2031DC4: @ 2031DC4
|
||||
.space 0x8
|
||||
|
||||
gUnknown_2031DCC: @ 2031DCC
|
||||
.space 0x8
|
||||
|
||||
gUnknown_2031DD4: @ 2031DD4
|
||||
.space 0x4
|
||||
|
||||
gDisableMapMusicChangeOnMapLoad: @ 2031DD8
|
||||
.space 0x2
|
||||
|
||||
gUnknown_2031DDA: @ 2031DDA
|
||||
.space 0x2
|
||||
|
||||
gUnknown_2031DDC: @ 2031DDC
|
||||
.space 0x4
|
||||
|
||||
gUnknown_2031DE0: @ 2031DE0
|
||||
.space 0x4
|
||||
|
||||
gUnknown_2031DE4: @ 2031DE4
|
||||
.space 0x4
|
||||
|
||||
gUnknown_2031DE8: @ 2031DE8
|
||||
.space 0x2
|
||||
|
||||
gUnknown_2031DEA: @ 2031DEA
|
||||
.space 0x2
|
||||
|
||||
gLinkPlayerObjectEvents: @ 2031DEC
|
||||
.space 0x10
|
||||
|
||||
.include "src/overworld.o"
|
||||
.align 2
|
||||
.include "src/fieldmap.o"
|
||||
.align 2
|
||||
|
||||
Reference in New Issue
Block a user