Skip to content

Commit

Permalink
Merge pull request #592 from Eebit/finish_worldmap
Browse files Browse the repository at this point in the history
Finish world map - decompile WM text, minimap/radar, and base menu
  • Loading branch information
RevoSucks authored Mar 18, 2024
2 parents 2929412 + 206d158 commit 16ca5b8
Show file tree
Hide file tree
Showing 17 changed files with 1,019 additions and 1,875 deletions.
1,592 changes: 0 additions & 1,592 deletions asm/code_80BF13C.s

This file was deleted.

18 changes: 0 additions & 18 deletions data/const_data_20688C.s

This file was deleted.

171 changes: 5 additions & 166 deletions data/data_A3E4D4.s
Original file line number Diff line number Diff line change
@@ -1,167 +1,6 @@
.section .data

.global gUnknown_08A3EE28
gUnknown_08A3EE28: @ 0x08A3EE28
.incbin "baserom.gba", 0xA3EE28, 0x1C

.global gUnknown_08A3EE44
gUnknown_08A3EE44: @ 0x08A3EE44
@ PROC_MARK
.short 0xf, 0x8
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C35C4
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_80C35EC
@ PROC_END
.short 0x0, 0x0
.word 0x0


.global gUnknown_08A3EE6C
gUnknown_08A3EE6C: @ 0x08A3EE6C
.incbin "baserom.gba", 0x00a3ee6c, 0x4

.global gUnknown_08A3EE70
gUnknown_08A3EE70: @ 0x08A3EE70
.incbin "baserom.gba", 0xA3EE70, 0x4

.global ProcScr_GmapRader
ProcScr_GmapRader: @ 0x08A3EE74
@ PROC_NAME
.short 0x1, 0x0
.word 0x8206b84
@ PROC_MARK
.short 0xf, 0x8
.word 0x0
@ PROC_15
.short 0x15, 0x0
.word 0x0
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3D9C
@ PROC_LABEL
.short 0xb, 0x0
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_80C3AB8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_80C3D24
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_80C3B40
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_80C3D5C
@ PROC_GOTO
.short 0xc, 0x0
.word 0x0
@ PROC_END
.short 0x0, 0x0
.word 0x0


.global gUnknown_08A3EED4
gUnknown_08A3EED4: @ 0x08A3EED4
@ PROC_MARK
.short 0xf, 0x8
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3DAC
@ PROC_END
.short 0x0, 0x0
.word 0x0


.global ProcScr_GmapBaseMenu
ProcScr_GmapBaseMenu: @ 0x08A3EEEC
@ PROC_NAME
.short 0x1, 0x0
.word 0x8206b90
@ PROC_MARK
.short 0xf, 0x8
.word 0x0
@ PROC_SET_END_CB
.short 0x4, 0x0
.word nullsub_71
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3EC8
@ PROC_LABEL
.short 0xb, 0x0
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3EDC
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3F24
@ PROC_LABEL
.short 0xb, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3F88
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_GOTO
.short 0xc, 0x4
.word 0x0
@ PROC_LABEL
.short 0xb, 0x2
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3FB4
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_GOTO
.short 0xc, 0x4
.word 0x0
@ PROC_LABEL
.short 0xb, 0x3
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3FE0
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_GOTO
.short 0xc, 0x4
.word 0x0
@ PROC_LABEL
.short 0xb, 0x4
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80C3F04
@ PROC_GOTO
.short 0xc, 0x0
.word 0x0
@ PROC_LABEL
.short 0xb, 0x5
.word 0x0
@ PROC_END
.short 0x0, 0x0
.word 0x0
.incbin "baserom.gba", 0xA3EEEC + 0xC8, 0x824 - 0xC8
.incbin "baserom.gba", 0xA3EFB4, 0x75C

.global gPal_CharacterEndingMenu
gPal_CharacterEndingMenu: @ 0x08A3F710
Expand Down Expand Up @@ -1295,12 +1134,12 @@ Pal_WmPlaceDot_Standard: @ 0x08AA11B0
gUnknown_08AA11D0: @ 0x08AA11D0
.incbin "baserom.gba", 0xAA11D0, 0xB0

.global gUnknown_08AA1280
gUnknown_08AA1280: @ 0x08AA1280
.global Img_WorldmapMinimap
Img_WorldmapMinimap: @ 0x08AA1280
.incbin "baserom.gba", 0xAA1280, 0x60C

.global gUnknown_08AA188C
gUnknown_08AA188C: @ 0x08AA188C
.global Pal_WorldmapMinimap
Pal_WorldmapMinimap: @ 0x08AA188C
.incbin "baserom.gba", 0xAA188C, 0x20

.global gUnknown_08AA18AC
Expand Down
10 changes: 0 additions & 10 deletions include/prepscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@ struct PrepItemSupplyProc {
/* 4C */ u16 yOffsetPerPage[9];
};

// TODO: Move to a common "worldmap.h"
struct GMapBaseMenuProc {
/* 00 */ PROC_HEADER;
/* 29 */ u8 unk_29;
/* 2A */ u8 unk_2a;
/* 2B */ u8 unk_2b;
};

struct GMapBaseMenuProc* sub_80C4048(void);

struct PrepItemListProc {
/* 00 */ PROC_HEADER;
/* 2C */ struct Unit * unit;
Expand Down
2 changes: 1 addition & 1 deletion include/soundwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct SoundSt {
extern struct SoundSt gSoundSt;

int GetCurrentBgmSong(void);
// ??? IsBgmPlaying(???);
s8 IsBgmPlaying(void);
void Sound_SetBGMVolume(int volume);
void Sound_SetSEVolume(int vol);
void Sound_FadeOutBGM(int speed);
Expand Down
6 changes: 3 additions & 3 deletions include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -1284,9 +1284,9 @@ extern u8 Img_WorldMapPlaceDot[];
extern u16 Pal_WmPlaceDot_Highlight[];
extern u16 Pal_WmPlaceDot_Standard[];
extern u8 gUnknown_08AA11D0[]; // tsa?
// extern ??? gUnknown_08AA1280
// extern ??? gUnknown_08AA188C
// extern ??? gUnknown_08AA18AC
extern u8 Img_WorldmapMinimap[];
extern u16 Pal_WorldmapMinimap[];
extern u8 gUnknown_08AA18AC[];
// extern ??? gUnknown_08AA1930
// extern ??? gUnknown_08AA1950
extern u8 gImg_WorldmapSkirmish[]; // gfx
Expand Down
122 changes: 78 additions & 44 deletions include/worldmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,9 @@ void Worlmap_WaitGmapSogu(ProcPtr proc);
// ??? sub_80B9E64(???);
void ResetWorldMapScreen(void);
void NULL_080B9F08(void);
void sub_80B9F14(ProcPtr proc);
void sub_80B9F24(ProcPtr proc);
void sub_80B9F34(ProcPtr proc);
void WorldMap_StartArmory(ProcPtr proc);
void WorldMap_StartVendor(ProcPtr proc);
void WorldMap_StartSecretShop(ProcPtr proc);
void sub_80B9F44(ProcPtr proc);
void sub_80B9F54(ProcPtr unused);
void sub_80B9FC0(void);
Expand Down Expand Up @@ -1189,45 +1189,79 @@ ProcPtr StartGmapAutoMu_Type1(struct Sub80C33D4 *, int, ProcPtr);
void EndGmAutoMuFor(int);
bool IsGmAutoMuActiveFor(int);

/* worldmap_text.h */

// ??? sub_80C34D0(???);
// ??? sub_80C3590(???);
// ??? sub_80C35C4(???);
// ??? sub_80C35EC(???);
void StartWmText(int);
void RemoveWmText(void);
void sub_80C368C(ProcPtr);
void sub_80C36A0(int);
// ??? sub_80C36E8(???);
// ??? sub_80C3770(???);
// ??? sub_80C380C(???);
// ??? sub_80C38BC(???);
// ??? sub_80C3A28(???);
// ??? sub_80C3A64(???);
// ??? sub_80C3A8C(???);
// ??? sub_80C3AB8(???);
// ??? sub_80C3B40(???);
// ??? sub_80C3BE4(???);
// ??? sub_80C3D24(???);
// ??? sub_80C3D5C(???);
// ??? sub_80C3D9C(???);
// ??? sub_80C3DAC(???);
void sub_80C3E80(void);
void sub_80C3E94(void);
// ??? nullsub_71(???);
// ??? sub_80C3EC8(???);
// ??? sub_80C3EDC(???);
// ??? sub_80C3F04(???);
// ??? sub_80C3F24(???);
// ??? sub_80C3F88(???);
// ??? sub_80C3FB4(???);
// ??? sub_80C3FE0(???);
void sub_80C400C(int, ProcPtr);
// ??? sub_80C4038(???);
// ??? sub_80C4048(???);
// ??? sub_80C4058(???);
int sub_80C4070(void);
int sub_80C4088();
void sub_80C409C(int);
// ??? ClearWmTextVram(???);
// ??? WmText_Init(???);
// ??? WmText_Loop_DrawText(???);
void ShowWmText(u8);
void HideWmText(void);
ProcPtr StartWmTextHandler(ProcPtr);
void StartWmTextMsg(int);

/* worldmap_radar.h */

struct GMapRadarProc
{
/* 00 */ PROC_HEADER;
/* 29 */ s8 unk_29;
/* 2A */ s8 unk_2a;
/* 2B */ u8 unk_2b;
/* 2C */ u8 unk_2c;
/* 2D */ u8 unk_2d;
/* 2E */ u8 unk_2e;
/* 2F */ s8 unk_2f;
/* 30 */ s8 unk_30;
/* 34 */ int unk_34;
};

// ??? WmMinimap_PutCursorIcon(???);
// ??? WmMinimap_PutStoryNodeIcon(???);
// ??? WmMinimap_PutLordIcon(???);
// ??? WmMinimap_PutSkirmishIcons(???);
// ??? WmMinimap_BlinkPalette(???);
// ??? PutWmMinimapSprites(???);
// ??? GMapRadar_80C3A8C(???);
// ??? GMapRadar_80C3AB8(???);
// ??? GMapRadar_80C3B40(???);
// ??? PutWmMinimapGfx(???);
// ??? GMapRadar_SlideIn(???);
// ??? GMapRadar_SlideOut(???);
// ??? GMapRadar_Init(???);
// ??? StartWorldMapMinimapCore(???);
ProcPtr StartWorldmapMinimap(ProcPtr);
void EndWorldmapMinimap(void);

/* worldmap_basemenu.h */

struct GMapBaseMenuProc
{
/* 00 */ PROC_HEADER;
/* 29 */ u8 kind;
/* 2A */ u8 unk_2a;
/* 2B */ u8 unk_2b;
/* 2C */ int pid;
/* 30 */ s8 wasBgmPlaying;
STRUCT_PAD(0x31, 0x34);
/* 34 */ int bgmSongId;
};

// ??? GMapBaseMenu_OnEnd_Null(???);
// ??? GMapBaseMenu_Init(???);
// ??? GMapBaseMenu_StartItemScreen(???);
// ??? GMapBaseMenu_RestoreBgm(???);
// ??? GMapBaseMenu_ShopFromItemScreen(???);
// ??? GMapBaseMenu_StartArmory(???);
// ??? GMapBaseMenu_StartVendor(???);
// ??? GMapBaseMenu_StartSecretShop(???);
ProcPtr StartGMapBaseMenu(int, ProcPtr);
// ??? EndGMapBaseMenu(???);
struct GMapBaseMenuProc * FindGMapBaseMenu(void);
// ??? IsGMapBaseMenuActive(???);
int GetGMapBaseMenuKind(void);
int GetGMapBaseMenuPid();
void SetGMapBaseMenuPid(int);

// extern ??? gFont_0201AFC0
// extern ??? gUnknown_0201AFF0
Expand Down Expand Up @@ -1315,12 +1349,12 @@ extern struct ProcCmd ProcScr_WmDotPalAnim[];
// extern ??? Sprite_WmPlaceDot
// extern ??? ProcScr_WmPlaceDot
// extern ??? ProcScr_GmapAutoMu
// extern ??? gUnknown_08A3EE28
// extern ??? gUnknown_08A3EE44
// extern ??? Sprite_WmText
// extern ??? ProcScr_WorldMapTextHandler
// extern ??? gUnknown_08A3EE6C
// extern ??? gUnknown_08A3EE70
// extern ??? ProcScr_GmapRader
// extern ??? gUnknown_08A3EED4
// extern ??? ProcScr_WorldmapMinimapWrapper
// extern ??? ProcScr_GmapBaseMenu

#endif // GUARD_WORLDMAP_H
Loading

0 comments on commit 16ca5b8

Please sign in to comment.