From dd89a1c344152636b9b5c27ad45816abe692a0b8 Mon Sep 17 00:00:00 2001 From: Gnome! <45660393+GnomedDev@users.noreply.github.com> Date: Thu, 2 Feb 2023 04:01:51 +0000 Subject: [PATCH] Start decompiling `game/ui/Page` (#257) * Decompile Page::setAnimationDirection and Page::initChildren * Decompile Page::startReplace * Implement suggestions * Decompile Page::insert and Page::setInputManager * Decompile Page::skipInAnimation * Decompile Page::skipOutAnimation * Decompile Page::draw --- pack/rel_objects.txt | 6 +- pack/rel_slices.csv | 1 + pack/symbols.yml | 16 +- source/game/ui/ControlGroup.hpp | 3 +- source/game/ui/Page.cpp | 376 ++++++++++++++++++++++++++++++++ source/game/ui/Page.hpp | 127 +++++++++++ sources.py | 1 + 7 files changed, 518 insertions(+), 12 deletions(-) create mode 100644 source/game/ui/Page.cpp diff --git a/pack/rel_objects.txt b/pack/rel_objects.txt index c3a532c8d..59932b5e8 100644 --- a/pack/rel_objects.txt +++ b/pack/rel_objects.txt @@ -37,7 +37,7 @@ out/rel/rodata_80890d0c_80891370.o out/rel/data_808b3c2c_808b42e0.o out/Random.o out/rel/text_8055572c_80590128.o -out/rel/rodata_80891380_80891c5c.o +out/rel/rodata_80891380_80891c58.o out/rel/data_808b42ec_808dd3d4.o out/rel/bss_809bd73c_809c1900.o out/KartObjectProxy.o @@ -46,7 +46,9 @@ out/ControlGroup.o out/rel/text_805c2c18_805f8b34.o out/rel/rodata_80891c80_80896148.o out/MessageGroup.o -out/rel/text_805f8d5c_80786e60.o +out/rel/text_805f8d5c_8060197c.o +out/Page.o +out/rel/text_80602d2c_80786e60.o out/BoxColManager.o out/rel/rodata_80896158_808a4800.o out/BoxColUnit.o diff --git a/pack/rel_slices.csv b/pack/rel_slices.csv index ea7588efd..7c7f022dd 100644 --- a/pack/rel_slices.csv +++ b/pack/rel_slices.csv @@ -14,5 +14,6 @@ enabled,name,textStart,textEnd,ctorsStart,ctorsEnd,dtorsStart,dtorsEnd,rodataSta 1,source/game/kart/KartObjectProxy.cpp,0x80590128,0x805919f4,,,,,0x80891c58,0x80891c80,,,0x809c1900,0x809c1910 1,source/game/ui/ControlGroup.cpp,0x805c23e4,0x805c2c18,,,,,,,,,, 1,source/game/ui/MessageGroup.cpp,0x805f8b34,0x805f8d5c,,,,,0x80896148,0x80896158,,,, +1,source/game/ui/Page.cpp,0x8060197c,0x80602d2c,,,,,,,,,, 1,source/game/geo/BoxColManager.cpp,0x80786E60,0x80786ED0,,,,,,,,,, 1,source/game/geo/BoxColUnit.cpp,0x80786ED0,0x80786F98,,,,,0x808A4800,0x808A4804,,,, diff --git a/pack/symbols.yml b/pack/symbols.yml index 3886f290e..e75345a23 100644 --- a/pack/symbols.yml +++ b/pack/symbols.yml @@ -14607,19 +14607,19 @@ global: 0x80602144: 'unk_80602144' 0x806022cc: 'Page_calc' 0x80602338: 'unk_80602338' - 0x8060235c: 'Page_draw' + 0x8060235c: 'draw__Q22UI4PageFUl' 0x80602378: 'unk_80602378' 0x8060238c: 'unk_8060238c' 0x80602390: 'Page_refocus' 0x80602428: 'unk_80602428' 0x80602448: 'unk_80602448' - 0x8060244c: 'unk_8060244c' - 0x8060245c: 'Page_initChildren' - 0x8060246c: 'Page_insert' - 0x80602474: 'Page_setInputManager' - 0x8060247c: 'unk_8060247c' - 0x80602488: 'Page_startReplace' - 0x806024a4: 'unk_806024a4' + 0x8060244c: 'setAnimationDirection__Q22UI4PageFl' + 0x8060245c: 'initChildren__Q22UI4PageFl' + 0x8060246c: 'insert__Q22UI4PageFlPQ22UI9UIControlUl' + 0x80602474: 'setInputManager__Q22UI4PageFPQ26System12InputManager' + 0x8060247c: 'skipInAnimation__Q22UI4PageFv' + 0x80602488: 'startReplace__Q22UI4PageFlf' + 0x806024a4: 'skipOutAnimation__Q22UI4PageFv' 0x806024b0: 'Page_changeSection' 0x80602530: 'unk_80602530' 0x806025b0: 'Page_push' diff --git a/source/game/ui/ControlGroup.hpp b/source/game/ui/ControlGroup.hpp index 29b6be431..9e41f16e0 100644 --- a/source/game/ui/ControlGroup.hpp +++ b/source/game/ui/ControlGroup.hpp @@ -2,11 +2,10 @@ #include -#include - namespace UI { class UIControl; +class Page; class ControlGroup { public: diff --git a/source/game/ui/Page.cpp b/source/game/ui/Page.cpp new file mode 100644 index 000000000..879dc43cb --- /dev/null +++ b/source/game/ui/Page.cpp @@ -0,0 +1,376 @@ +#include "Page.hpp" +#include "ControlGroup.hpp" + +// --- EXTERN DECLARATIONS BEGIN --- + +extern "C" { + +// Extern function references. +// PAL: 0x80021584 +extern UNKNOWN_FUNCTION(_savegpr_20); +// PAL: 0x800215d0 +extern UNKNOWN_FUNCTION(_restgpr_20); +// PAL: 0x805c23e4 +extern UNKNOWN_FUNCTION(__ct__Q22UI12ControlGroupFv); +// PAL: 0x805c2400 +extern UNKNOWN_FUNCTION(__dt__Q22UI12ControlGroupFv); +// PAL: 0x805c2620 +extern UNKNOWN_FUNCTION(create__Q22UI12ControlGroupFPQ22UI4Pagei); +// PAL: 0x805c27dc +extern UNKNOWN_FUNCTION(insert__Q22UI12ControlGroupFiPQ22UI9UIControli); +// PAL: 0x805c2868 +extern UNKNOWN_FUNCTION(init__Q22UI12ControlGroupFv); +// PAL: 0x805c28d8 +extern UNKNOWN_FUNCTION(calc__Q22UI12ControlGroupFv); +// PAL: 0x805c2948 +extern UNKNOWN_FUNCTION(draw__Q22UI12ControlGroupFi); +// PAL: 0x805c2ad0 +extern UNKNOWN_FUNCTION(transform__Q22UI12ControlGroupFRQ32UI12ControlGroup7Functor); +// PAL: 0x805eed70 +extern UNKNOWN_FUNCTION(InputThing_activate); +// PAL: 0x805f2100 +extern UNKNOWN_FUNCTION(unk_805f2100); +// PAL: 0x8060265c +extern UNKNOWN_FUNCTION(unk_8060265c); +// PAL: 0x80602b04 +extern UNKNOWN_FUNCTION(unk_80602b04); +// PAL: 0x80622e00 +extern UNKNOWN_FUNCTION(Section_activatePage); +// PAL: 0x80635a3c +extern UNKNOWN_FUNCTION(SectionManager_setNextSection); +// PAL: 0x80635ac8 +extern UNKNOWN_FUNCTION(SectionManager_startChangeSection); +// PAL: 0x80635b2c +extern UNKNOWN_FUNCTION(SectionManager_startReinit); +// PAL: 0x8063d0b8 +extern UNKNOWN_FUNCTION(UIControl_solve); +// PAL: 0x8063d0e0 +extern UNKNOWN_FUNCTION(UIControl_onPageEvent); +// PAL: 0x8063d284 +extern UNKNOWN_FUNCTION(UIControl_getAnimStartFrame); +// PAL: 0x807146a8 +extern UNKNOWN_FUNCTION(unk_807146a8); +// PAL: 0x8071476c +extern UNKNOWN_FUNCTION(unk_8071476c);// Extern data references. +// PAL: 0x80385fc8 +extern UNKNOWN_DATA(lbl_80385fc8); +// PAL: 0x80896820 +extern UNKNOWN_DATA(lbl_80896820); +// PAL: 0x80896824 +extern UNKNOWN_DATA(lbl_80896824); +// PAL: 0x80896828 +extern UNKNOWN_DATA(lbl_80896828); +// PAL: 0x80896838 +extern UNKNOWN_DATA(lbl_80896838); +// PAL: 0x808ba5c0 +extern UNKNOWN_DATA(lbl_808ba5c0); +// PAL: 0x808ba624 +extern UNKNOWN_DATA(lbl_808ba624); +// PAL: 0x808ba630 +extern UNKNOWN_DATA(lbl_808ba630); +// PAL: 0x808ba63c +extern UNKNOWN_DATA(lbl_808ba63c); +// PAL: 0x809c1c90 +extern UNKNOWN_DATA(lbl_809c1c90); +// PAL: 0x809c1e38 +extern UNKNOWN_DATA(lbl_809c1e38); +} + +// --- EXTERN DECLARATIONS END --- + +// .rodata + +// .data + + +// .bss + + +// Symbol: Page_construct +// PAL: 0x8060197c..0x80601a04 +MARK_BINARY_BLOB(Page_construct, 0x8060197c, 0x80601a04); +asm UNKNOWN_FUNCTION(Page_construct) { + #include "asm/8060197c.s" +} + +// Symbol: Page_destroy +// PAL: 0x80601a04..0x80601a60 +MARK_BINARY_BLOB(Page_destroy, 0x80601a04, 0x80601a60); +asm UNKNOWN_FUNCTION(Page_destroy) { + #include "asm/80601a04.s" +} + +// Symbol: Page_init +// PAL: 0x80601a60..0x80601ad8 +MARK_BINARY_BLOB(Page_init, 0x80601a60, 0x80601ad8); +asm UNKNOWN_FUNCTION(Page_init) { + #include "asm/80601a60.s" +} + +// Symbol: Page_onInit +// PAL: 0x80601ad8..0x80601adc +MARK_BINARY_BLOB(Page_onInit, 0x80601ad8, 0x80601adc); +asm UNKNOWN_FUNCTION(Page_onInit) { + #include "asm/80601ad8.s" +} + +// Symbol: Page_fini +// PAL: 0x80601adc..0x80601aec +MARK_BINARY_BLOB(Page_fini, 0x80601adc, 0x80601aec); +asm UNKNOWN_FUNCTION(Page_fini) { + #include "asm/80601adc.s" +} + +// Symbol: Page_activate +// PAL: 0x80601aec..0x80601c08 +MARK_BINARY_BLOB(Page_activate, 0x80601aec, 0x80601c08); +asm UNKNOWN_FUNCTION(Page_activate) { + #include "asm/80601aec.s" +} + +// Symbol: Page_deactivate +// PAL: 0x80601c08..0x80601c48 +MARK_BINARY_BLOB(Page_deactivate, 0x80601c08, 0x80601c48); +asm UNKNOWN_FUNCTION(Page_deactivate) { + #include "asm/80601c08.s" +} + +// Symbol: unk_80601c48 +// PAL: 0x80601c48..0x80601c64 +MARK_BINARY_BLOB(unk_80601c48, 0x80601c48, 0x80601c64); +asm UNKNOWN_FUNCTION(unk_80601c48) { + #include "asm/80601c48.s" +} + +// Symbol: unk_80601c64 +// PAL: 0x80601c64..0x80601d24 +MARK_BINARY_BLOB(unk_80601c64, 0x80601c64, 0x80601d24); +asm UNKNOWN_FUNCTION(unk_80601c64) { + #include "asm/80601c64.s" +} + +// Symbol: unk_80601d24 +// PAL: 0x80601d24..0x80601f44 +MARK_BINARY_BLOB(unk_80601d24, 0x80601d24, 0x80601f44); +asm UNKNOWN_FUNCTION(unk_80601d24) { + #include "asm/80601d24.s" +} + +// Symbol: unk_80601f44 +// PAL: 0x80601f44..0x80602144 +MARK_BINARY_BLOB(unk_80601f44, 0x80601f44, 0x80602144); +asm UNKNOWN_FUNCTION(unk_80601f44) { + #include "asm/80601f44.s" +} + +// Symbol: unk_80602144 +// PAL: 0x80602144..0x806022cc +MARK_BINARY_BLOB(unk_80602144, 0x80602144, 0x806022cc); +asm UNKNOWN_FUNCTION(unk_80602144) { + #include "asm/80602144.s" +} + +// Symbol: Page_calc +// PAL: 0x806022cc..0x80602338 +MARK_BINARY_BLOB(Page_calc, 0x806022cc, 0x80602338); +asm UNKNOWN_FUNCTION(Page_calc) { + #include "asm/806022cc.s" +} + +// Symbol: unk_80602338 +// PAL: 0x80602338..0x8060235c +MARK_BINARY_BLOB(unk_80602338, 0x80602338, 0x8060235c); +asm UNKNOWN_FUNCTION(unk_80602338) { + #include "asm/80602338.s" +} + +namespace UI { + +void Page::draw(u32 pass) { + if (mState > 5 || mState < 3) { + return; + } + + mControlGroup.draw(pass); +} + +} + +// Symbol: unk_80602378 +// PAL: 0x80602378..0x8060238c +MARK_BINARY_BLOB(unk_80602378, 0x80602378, 0x8060238c); +asm UNKNOWN_FUNCTION(unk_80602378) { + #include "asm/80602378.s" +} + +// Symbol: unk_8060238c +// PAL: 0x8060238c..0x80602390 +MARK_BINARY_BLOB(unk_8060238c, 0x8060238c, 0x80602390); +asm UNKNOWN_FUNCTION(unk_8060238c) { + #include "asm/8060238c.s" +} + +// Symbol: Page_refocus +// PAL: 0x80602390..0x80602428 +MARK_BINARY_BLOB(Page_refocus, 0x80602390, 0x80602428); +asm UNKNOWN_FUNCTION(Page_refocus) { + #include "asm/80602390.s" +} + +// Symbol: unk_80602428 +// PAL: 0x80602428..0x8060244c +MARK_BINARY_BLOB(unk_80602428, 0x80602428, 0x8060244c); +asm UNKNOWN_FUNCTION(unk_80602428) { + #include "asm/80602428.s" +} + +namespace UI { + +void Page::setAnimationDirection(s32 animationDirection) { + if (animationDirection == -1) { + return; + } + + mAnimationDirection = animationDirection; +} + +void Page::initChildren(s32 capacity) { + mControlGroup.create(this, capacity); +} + +void Page::insert(s32 index, UIControl* control, u32 drawPass) { + mControlGroup.insert(index, control, drawPass); +} + +void Page::setInputManager(System::InputManager* inputManager) { + mInputManager = inputManager; +} + +void Page::skipInAnimation(void) { + mNextStateRequested = true; +} + +void Page::startReplace(s32 animationDirection, f32 delay) { + setAnimationDirection(animationDirection); + mAnimationDelay = delay; + mNextStateRequested = true; +} + +void Page::skipOutAnimation(void) { + mNextStateRequested = true; +} + +} + +// Symbol: Page_changeSection +// PAL: 0x806024b0..0x80602530 +MARK_BINARY_BLOB(Page_changeSection, 0x806024b0, 0x80602530); +asm UNKNOWN_FUNCTION(Page_changeSection) { + #include "asm/806024b0.s" +} + +// Symbol: unk_80602530 +// PAL: 0x80602530..0x806025b0 +MARK_BINARY_BLOB(unk_80602530, 0x80602530, 0x806025b0); +asm UNKNOWN_FUNCTION(unk_80602530) { + #include "asm/80602530.s" +} + +// Symbol: Page_push +// PAL: 0x806025b0..0x8060265c +MARK_BINARY_BLOB(Page_push, 0x806025b0, 0x8060265c); +asm UNKNOWN_FUNCTION(Page_push) { + #include "asm/806025b0.s" +} + +// Symbol: unk_8060265c +// PAL: 0x8060265c..0x806027ac +MARK_BINARY_BLOB(unk_8060265c, 0x8060265c, 0x806027ac); +asm UNKNOWN_FUNCTION(unk_8060265c) { + #include "asm/8060265c.s" +} + +// Symbol: unk_806027ac +// PAL: 0x806027ac..0x806028cc +MARK_BINARY_BLOB(unk_806027ac, 0x806027ac, 0x806028cc); +asm UNKNOWN_FUNCTION(unk_806027ac) { + #include "asm/806027ac.s" +} + +// Symbol: unk_806028cc +// PAL: 0x806028cc..0x80602920 +MARK_BINARY_BLOB(unk_806028cc, 0x806028cc, 0x80602920); +asm UNKNOWN_FUNCTION(unk_806028cc) { + #include "asm/806028cc.s" +} + +// Symbol: unk_80602920 +// PAL: 0x80602920..0x80602960 +MARK_BINARY_BLOB(unk_80602920, 0x80602920, 0x80602960); +asm UNKNOWN_FUNCTION(unk_80602920) { + #include "asm/80602920.s" +} + +// Symbol: unk_80602960 +// PAL: 0x80602960..0x80602970 +MARK_BINARY_BLOB(unk_80602960, 0x80602960, 0x80602970); +asm UNKNOWN_FUNCTION(unk_80602960) { + #include "asm/80602960.s" +} + +// Symbol: unk_80602970 +// PAL: 0x80602970..0x806029f4 +MARK_BINARY_BLOB(unk_80602970, 0x80602970, 0x806029f4); +asm UNKNOWN_FUNCTION(unk_80602970) { + #include "asm/80602970.s" +} + +// Symbol: unk_806029f4 +// PAL: 0x806029f4..0x80602b04 +MARK_BINARY_BLOB(unk_806029f4, 0x806029f4, 0x80602b04); +asm UNKNOWN_FUNCTION(unk_806029f4) { + #include "asm/806029f4.s" +} + +// Symbol: unk_80602b04 +// PAL: 0x80602b04..0x80602c60 +MARK_BINARY_BLOB(unk_80602b04, 0x80602b04, 0x80602c60); +asm UNKNOWN_FUNCTION(unk_80602b04) { + #include "asm/80602b04.s" +} + +// Symbol: unk_80602c60 +// PAL: 0x80602c60..0x80602ce8 +MARK_BINARY_BLOB(unk_80602c60, 0x80602c60, 0x80602ce8); +asm UNKNOWN_FUNCTION(unk_80602c60) { + #include "asm/80602c60.s" +} + +// Symbol: unk_80602ce8 +// PAL: 0x80602ce8..0x80602cf8 +MARK_BINARY_BLOB(unk_80602ce8, 0x80602ce8, 0x80602cf8); +asm UNKNOWN_FUNCTION(unk_80602ce8) { + #include "asm/80602ce8.s" +} + +// Symbol: Page_playSfx +// PAL: 0x80602cf8..0x80602d0c +MARK_BINARY_BLOB(Page_playSfx, 0x80602cf8, 0x80602d0c); +asm UNKNOWN_FUNCTION(Page_playSfx) { + #include "asm/80602cf8.s" +} + +// Symbol: unk_80602d0c +// PAL: 0x80602d0c..0x80602d20 +MARK_BINARY_BLOB(unk_80602d0c, 0x80602d0c, 0x80602d20); +asm UNKNOWN_FUNCTION(unk_80602d0c) { + #include "asm/80602d0c.s" +} + +// Symbol: unk_80602d20 +// PAL: 0x80602d20..0x80602d2c +MARK_BINARY_BLOB(unk_80602d20, 0x80602d20, 0x80602d2c); +asm UNKNOWN_FUNCTION(unk_80602d20) { + #include "asm/80602d20.s" +} + diff --git a/source/game/ui/Page.hpp b/source/game/ui/Page.hpp index cbfaeba7f..a8de8623a 100644 --- a/source/game/ui/Page.hpp +++ b/source/game/ui/Page.hpp @@ -1,11 +1,138 @@ #pragma once +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// PAL: 0x8060197c..0x80601a04 +UNKNOWN_FUNCTION(Page_construct); +// PAL: 0x80601a04..0x80601a60 +UNKNOWN_FUNCTION(Page_destroy); +// PAL: 0x80601a60..0x80601ad8 +UNKNOWN_FUNCTION(Page_init); +// PAL: 0x80601ad8..0x80601adc +UNKNOWN_FUNCTION(Page_onInit); +// PAL: 0x80601adc..0x80601aec +UNKNOWN_FUNCTION(Page_fini); +// PAL: 0x80601aec..0x80601c08 +UNKNOWN_FUNCTION(Page_activate); +// PAL: 0x80601c08..0x80601c48 +UNKNOWN_FUNCTION(Page_deactivate); +// PAL: 0x80601c48..0x80601c64 +UNKNOWN_FUNCTION(unk_80601c48); +// PAL: 0x80601c64..0x80601d24 +UNKNOWN_FUNCTION(unk_80601c64); +// PAL: 0x80601d24..0x80601f44 +UNKNOWN_FUNCTION(unk_80601d24); +// PAL: 0x80601f44..0x80602144 +UNKNOWN_FUNCTION(unk_80601f44); +// PAL: 0x80602144..0x806022cc +UNKNOWN_FUNCTION(unk_80602144); +// PAL: 0x806022cc..0x80602338 +UNKNOWN_FUNCTION(Page_calc); +// PAL: 0x80602338..0x8060235c +UNKNOWN_FUNCTION(unk_80602338); +// PAL: 0x8060235c..0x80602378 +UNKNOWN_FUNCTION(draw__Q22UI4PageFUl); +// PAL: 0x80602378..0x8060238c +UNKNOWN_FUNCTION(unk_80602378); +// PAL: 0x8060238c..0x80602390 +UNKNOWN_FUNCTION(unk_8060238c); +// PAL: 0x80602390..0x80602428 +UNKNOWN_FUNCTION(Page_refocus); +// PAL: 0x80602428..0x8060244c +UNKNOWN_FUNCTION(unk_80602428); +// PAL: 0x8060244c..0x8060245c +UNKNOWN_FUNCTION(setAnimationDirection__Q22UI4PageFl); +// PAL: 0x8060245c..0x8060246c +UNKNOWN_FUNCTION(initChildren__Q22UI4PageFl); +// PAL: 0x8060246c..0x80602474 +UNKNOWN_FUNCTION(insert__Q22UI4PageFlPQ22UI9UIControlUl); +// PAL: 0x80602474..0x8060247c +UNKNOWN_FUNCTION(setInputManager__Q22UI4PageFPQ26System12InputManager); +// PAL: 0x8060247c..0x80602488 +UNKNOWN_FUNCTION(skipInAnimation__Q22UI4PageFv); +// PAL: 0x80602488..0x806024a4 +UNKNOWN_FUNCTION(startReplace__Q22UI4PageFlf); +// PAL: 0x806024a4..0x806024b0 +UNKNOWN_FUNCTION(skipOutAnimation__Q22UI4PageFv); +// PAL: 0x806024b0..0x80602530 +UNKNOWN_FUNCTION(Page_changeSection); +// PAL: 0x80602530..0x806025b0 +UNKNOWN_FUNCTION(unk_80602530); +// PAL: 0x806025b0..0x8060265c +UNKNOWN_FUNCTION(Page_push); +// PAL: 0x8060265c..0x806027ac +UNKNOWN_FUNCTION(unk_8060265c); +// PAL: 0x806027ac..0x806028cc +UNKNOWN_FUNCTION(unk_806027ac); +// PAL: 0x806028cc..0x80602920 +UNKNOWN_FUNCTION(unk_806028cc); +// PAL: 0x80602920..0x80602960 +UNKNOWN_FUNCTION(unk_80602920); +// PAL: 0x80602960..0x80602970 +UNKNOWN_FUNCTION(unk_80602960); +// PAL: 0x80602970..0x806029f4 +UNKNOWN_FUNCTION(unk_80602970); +// PAL: 0x806029f4..0x80602b04 +UNKNOWN_FUNCTION(unk_806029f4); +// PAL: 0x80602b04..0x80602c60 +UNKNOWN_FUNCTION(unk_80602b04); +// PAL: 0x80602c60..0x80602ce8 +UNKNOWN_FUNCTION(unk_80602c60); +// PAL: 0x80602ce8..0x80602cf8 +UNKNOWN_FUNCTION(unk_80602ce8); +// PAL: 0x80602cf8..0x80602d0c +UNKNOWN_FUNCTION(Page_playSfx); +// PAL: 0x80602d0c..0x80602d20 +UNKNOWN_FUNCTION(unk_80602d0c); +// PAL: 0x80602d20..0x80602d2c +UNKNOWN_FUNCTION(unk_80602d20); + +#ifdef __cplusplus +} +#endif + + +#include "game/ui/ControlGroup.hpp" +#include "game/system/InputManager.hpp" + namespace UI { class Page { public: Page(); virtual ~Page(); + + void draw(u32 pass); + void setAnimationDirection(s32 animationDirection); + void initChildren(s32 capacity); + void insert(s32 index, UIControl* control, u32 drawPass); + void setInputManager(System::InputManager* inputManager); + void skipInAnimation(void); + void startReplace(s32 animationDirection, f32 delay); + void skipOutAnimation(void); + +private: + s32 mId; + s32 mState; + bool mNextStateRequested; + u8 _0d[0x10 - 0x0d]; + s32 mAnimationDirection; + f32 mAnimationStartFrame; + f32 mAnimationDelay; + s32 mFrame; + u32 mUnknown; + ControlGroup mControlGroup; + System::InputManager* mInputManager; + u32 mNextAnimationSfxId; + u32 mPrevAnimationSfxId; }; +static_assert(sizeof(Page) == 0x44); + } // namespace UI diff --git a/sources.py b/sources.py index 3b892f23f..d22bf18e7 100644 --- a/sources.py +++ b/sources.py @@ -456,6 +456,7 @@ class Source: Source(src="source/game/ui/MessageGroup.cpp", cc='4201_127', opts=REL_OPTS), Source(src="source/game/ui/ControlGroup.cpp", cc='4201_127', opts=REL_OPTS), Source(src="source/game/ui/UIControl.cpp", cc='4201_127', opts=REL_OPTS), + Source(src="source/game/ui/Page.cpp", cc='4201_127', opts=REL_OPTS), Source(src="source/game/system/CourseMap.cpp", cc='4201_127', opts=REL_OPTS), Source(src="source/game/system/DvdArchive.cpp", cc='4201_127', opts=REL_OPTS), Source(src="source/game/system/GhostFile.cpp", cc='4201_127', opts=REL_OPTS),