Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start decompiling overlay 74 (main menu + other things) #364

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,650 changes: 12 additions & 3,638 deletions asm/overlay_74_thumb.s

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions include/application/main_menu/main_menu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef POKEHEARTGOLD_APPLICATION_MAIN_MENU_MAIN_MENU_H
#define POKEHEARTGOLD_APPLICATION_MAIN_MENU_MAIN_MENU_H

#include "overlay_manager.h"

FS_EXTERN_OVERLAY(OVY_74);

extern const OVY_MGR_TEMPLATE gApp_MainMenu;

BOOL MainMenuApp_Init(OVY_MANAGER *manager, int *state);
BOOL MainMenuApp_Main(OVY_MANAGER *manager, int *state);
BOOL MainMenuApp_Exit(OVY_MANAGER *manager, int *state);

#endif
2 changes: 1 addition & 1 deletion include/bg_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,6 @@ void DoScheduledBgGpuUpdates(BgConfig *bgConfig);
void ScheduleBgTilemapBufferTransfer(BgConfig *bgConfig, u8 bgId);
void ScheduleSetBgPosText(BgConfig *bgConfig, u8 bgId, enum BgPosAdjustOp op, int value);
void ScheduleSetBgAffineScale(BgConfig *bgConfig, u8 bgId, enum BgPosAdjustOp op, int value);
BOOL DoesPixelAtScreenXYMatchPtrVal(BgConfig *bgConfig, u8 bgId, u8 x, u8 y, u16 *src);
BOOL DoesPixelAtScreenXYMatchPtrVal(BgConfig *bgConfig, u8 bgId, u16 x, u16 y, u16 *src);

#endif // POKEHEARTGOLD_BG_WINDOW_H
2 changes: 1 addition & 1 deletion include/font.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ BOOL FontID_String_AllCharsValid(FontID fontId, String *str0, String *str1);
u8 GetFontAttribute(FontID fontId, int attr);
void LoadFontPal0(enum GFPalLoadLocation location, enum GFPalSlotOffset palSlotOffset, HeapID heapId);
void LoadFontPal1(enum GFPalLoadLocation location, enum GFPalSlotOffset palSlotOffset, HeapID heapId);
u32 FontID_String_GetWidthMultiline(FontID fontId, String *string, u32 letterSpacing);
u32 FontID_String_GetWidthMultiline(u32 fontId, String *string, u32 letterSpacing);
u32 FontID_String_GetCenterAlignmentX(FontID fontId, String *string, u32 letterSpacing, u32 windowWidth);
u32 FontID_GetGlyphWidth(FontID fontId, u16 glyph);

Expand Down
1 change: 1 addition & 0 deletions include/heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ typedef enum HeapID {
HEAP_ID_CREDITS = 73,
HEAP_ID_INTRO_MOVIE = 74,
HEAP_ID_OV36 = 75,
HEAP_ID_MAIN_MENU = 79,
HEAP_ID_OAKS_SPEECH = 80,
HEAP_ID_CERTIFICATES = 82,
HEAP_ID_DELETE_SAVEDATA = 86,
Expand Down
3 changes: 3 additions & 0 deletions include/overlay_36.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#include "overlay_manager.h"

FS_EXTERN_OVERLAY(OVY_36);
extern const OVY_MGR_TEMPLATE ov36_App_MainMenu_SelectOption_Continue;
extern const OVY_MGR_TEMPLATE ov36_App_MainMenu_SelectOption_NewGame;
extern const OVY_MGR_TEMPLATE ov36_App_InitGameState_AfterOakSpeech;

#endif // GUARD_POKEHEARTGOLD_OVERLAY_36_H
1 change: 1 addition & 0 deletions main.lsf
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ Overlay OVY_73
Overlay OVY_74
{
After OVY_38
Object src/application/main_menu/main_menu.o
Object asm/overlay_74_thumb.o
Object asm/nitrocrypto.o
}
Expand Down
3 changes: 1 addition & 2 deletions src/application/check_savedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "global.h"

#include "application/main_menu/main_menu.h"
#include "msgdata/msg.naix"
#include "msgdata/msg/msg_0229.h"

Expand Down Expand Up @@ -184,8 +185,6 @@ BOOL CheckSavedataApp_Exit(OVY_MANAGER *manager, int *state) {
OverlayManager_FreeData(manager);
DestroyHeap(heapId);

FS_EXTERN_OVERLAY(OVY_74);
extern const OVY_MGR_TEMPLATE gApp_MainMenu;
RegisterMainOverlay(FS_OVERLAY_ID(OVY_74), &gApp_MainMenu);

return TRUE;
Expand Down
Loading