Compare commits
1 Commits
main
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
780d148f44 |
@@ -97,6 +97,10 @@ namespace ipl {
|
||||
void startLeftEvent(const char* paneName);
|
||||
|
||||
bool isActive() const;
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
bool isLeftArrowVisible() const { return mbArrowVisible[ARROW_BTN_LEFT]; }
|
||||
static const char* getButtonName(int button) { return smButtonName[button]; }
|
||||
#endif
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_CPP
|
||||
void setEventHandler(::gui::EventHandler * event,
|
||||
|
||||
@@ -39,7 +39,11 @@ namespace ipl {
|
||||
void hideLeftArrow();
|
||||
void hideRightArrow();
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
s32 updateState();
|
||||
void drawTransferTitles();
|
||||
void onDialogState0();
|
||||
@@ -149,8 +153,10 @@ namespace ipl {
|
||||
scroller mScroller;
|
||||
s32 mButtonState;
|
||||
u8 mControllerFlags[4];
|
||||
#ifndef IPL_SD_CHANNEL_TITLE_CPP
|
||||
u32 mFinalState[3];
|
||||
u8 mFinalFlags[4];
|
||||
#endif
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -28,7 +28,11 @@ namespace ipl {
|
||||
int getIndex() const { return mIndex; }
|
||||
nw4r::math::VEC3& getTranslate() const;
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
friend class SDChannelSelect;
|
||||
|
||||
nw4r::ut::Link mListLink;
|
||||
@@ -172,7 +176,11 @@ namespace ipl {
|
||||
static const char* mscClockPaneNames[3];
|
||||
static const char* mscMaskPaneName;
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_CPP
|
||||
friend class SDChannelSelectEventHandler;
|
||||
friend class SDChannelSelectButtonEventHandler;
|
||||
|
||||
@@ -3,15 +3,104 @@
|
||||
|
||||
#include "iplSceneHeader.h"
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
#include "math/iplInterporation.h"
|
||||
#include "scene/sdChannelMemory/iplSDMemory.h"
|
||||
#include "system/iplChannelRsoThread.h"
|
||||
#include "utility/iplCapture.h"
|
||||
#include <private/es.h>
|
||||
#include <nw4r/snd/SoundHandle.h>
|
||||
#endif
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
class SDChannelSelect;
|
||||
class SDButtonEventHandlerBase;
|
||||
FADER_SCENE_CLASS(SDChannelTitle) {
|
||||
public:
|
||||
SDChannelTitle(EGG::Heap * heap, SDChannelSelect * chanSel);
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
virtual ~SDChannelTitle();
|
||||
virtual void prepare();
|
||||
virtual void create();
|
||||
virtual void calcCommon();
|
||||
virtual FaderSceneCommand calcFadein();
|
||||
virtual FaderSceneCommand calcNormal();
|
||||
virtual void initCalcFadeout();
|
||||
virtual FaderSceneCommand calcFadeout();
|
||||
virtual void draw();
|
||||
virtual void destroy();
|
||||
BOOL isResetAcceptable();
|
||||
virtual void startResetting();
|
||||
|
||||
using Base::reserveAllSceneDestruction;
|
||||
using Base::createChildScene;
|
||||
|
||||
s32 mState;
|
||||
EGG::ExpHeap* mpBannerHeap;
|
||||
EGG::ExpHeap* mpCaptureHeap;
|
||||
s32 mPage;
|
||||
s32 mIndex;
|
||||
s32 mPageCount;
|
||||
s32 mNextScene;
|
||||
s32 mParentalResult;
|
||||
math::VEC3 mPosition;
|
||||
u32 mLaunchFrame;
|
||||
s32 mStartButtonState;
|
||||
bool mbBannerStarting;
|
||||
layout::Animator* mpButtonAnimations[7][6];
|
||||
math::HermiteIntp<f32>* mpFade;
|
||||
SDChannelSelect* mpChannelSelect;
|
||||
nand::LayoutFile* mpLayoutFile;
|
||||
layout::Object* mpLayout;
|
||||
gui::PaneManager* mpPaneManager;
|
||||
layout::Object* mpIconLayout;
|
||||
EGG::ExpHeap* mpIconHeap;
|
||||
layout::Object* mpProgressLayout;
|
||||
s32 mLoadedIndex;
|
||||
nand::LayoutFile* mpBannerFiles[2];
|
||||
nand::File* mpSoundFiles[2];
|
||||
layout::Object* mpBannerLayout;
|
||||
layout::Animator* mpBannerAnimations[3];
|
||||
nw4r::snd::SoundHandle* mpSoundHandle;
|
||||
nand::File* mpSaveFile;
|
||||
u32 mWpadStopTick;
|
||||
s32 mHoverCounts[2];
|
||||
SDButtonEventHandlerBase* mpButtonEventHandler;
|
||||
utility::Capture* mpScreenCapture;
|
||||
utility::Capture* mpBannerCapture;
|
||||
ESTmdView* mpTmd;
|
||||
u8 mbTmdReady;
|
||||
u8 mTitleFlags;
|
||||
u16 mMakerCode;
|
||||
u8 mbStartAnimation;
|
||||
s32 mScriptState;
|
||||
s32 mScriptEnabled;
|
||||
bool mbStopScript;
|
||||
u32 mScriptFrame;
|
||||
u32 mScriptDuration;
|
||||
nand::File* mpScriptFile;
|
||||
EGG::ExpHeap* mpScriptHeaps[2];
|
||||
s32 mScriptHeapIndex;
|
||||
channel::RsoThread* mpRsoThread;
|
||||
EGG::ExpHeap* mpRsoHeap;
|
||||
layout::Animator* mpScriptAnimations[16];
|
||||
bool mbScriptFailed;
|
||||
EGG::ExpHeap* mpScriptHeap;
|
||||
ESTitleId mTitleId;
|
||||
SDMemory::TitleRange mTitleRange;
|
||||
u8 mUnknownTitleWork[0x800];
|
||||
SDMemory mMemory;
|
||||
u32 mErrorMessage;
|
||||
s32 mChangeFrame;
|
||||
u8 mbCopiedTitle;
|
||||
u8 mbResetAcceptable;
|
||||
nw4r::snd::SoundHandle* mpCopySound;
|
||||
#else
|
||||
private:
|
||||
u8 unk_0x58[0x3460];
|
||||
#endif
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -34,6 +34,9 @@ namespace ipl {
|
||||
void initManager();
|
||||
|
||||
void setPrevPage(int prevPage);
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
int& getSDPrevPage() { return mData.prevSDPage; }
|
||||
#endif
|
||||
void setChanInfo(int page, int index, const channel::SInfo& chanInfo);
|
||||
void setMemoSetting(const textinput::extend::savedata::MemoSetting& memoSetting);
|
||||
|
||||
|
||||
1563
src/scene/sdChannelTitle/iplSDChannelTitle.cpp
Normal file
1563
src/scene/sdChannelTitle/iplSDChannelTitle.cpp
Normal file
File diff suppressed because it is too large
Load Diff
57
tools/decomp-assist/iplSDChannelTitle.attempts.md
Normal file
57
tools/decomp-assist/iplSDChannelTitle.attempts.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# SDChannelTitle attempts
|
||||
|
||||
Unit: `src/scene/sdChannelTitle/iplSDChannelTitle`, Wii Menu 4.3U.
|
||||
All 69 original functions have C++ definitions. The source follows original object order;
|
||||
the 55-string pool is identical. The unit remains NonMatching.
|
||||
|
||||
The default gate baseline `70970038` is absent from this checkout. Checks use the
|
||||
available ancestor `e265d9664e73912f2dbf8dd02425f9dc64eac55b` through the gate's
|
||||
supported `--base` option. Its unit baseline is zero instruction-exact functions.
|
||||
|
||||
## Remaining functions
|
||||
|
||||
| Function | Distinct source attempts | Final instruction evidence |
|
||||
| --- | --- | --- |
|
||||
| `calcFadein` | Reversed fade-playing branch; cached event-handler pointer; explicitly typed null callback; named fade-playing condition. The latter three all kept 48/47 instructions. | One extra `li r5,0` for the declared unused second `SDButton::setEventHandler` argument. |
|
||||
| `initCalcFadeout` | Cached empty handler (50/49); explicitly typed null arguments (50/49); reloaded SDButton directly at cleanup (54/49, reverted). | One extra `li r5,0` for the same unused argument. |
|
||||
| `813E6CCC` | Combined positive early-return guards corrected the final animation branch; passed the actual title-range output pointer; cached title halves (89/86); cached selector (88/86); named enqueue result (87/86). Reverted the latter three. | 87/86; explicit ignored controller argument adds `li r4,0`; call setup also schedules differently. |
|
||||
| `813E6E24` | Explicit range copies replaced reference-only arguments; reversed usage-enough branch; combined positive early-return guards; named copied ranges and cached memory receiver; reversed copy declaration order and original range declaration order. Named copies produced 6, 8, or 9 differing instructions; restored temporary copies. | 95/95; five differences in copy-load register selection and receiver/argument setup order. |
|
||||
| `813E7074` | Reversed title comparison operands and copied-title branch; cached title halves (77/76); cached selector (77/76); named enqueue result (77/76). Reverted the latter three. | 77/76; explicit ignored controller argument adds `li r4,0`, with argument-move ordering differing. |
|
||||
| `813E8A20` | Supplied page/index output locals to `hasChannel`; stored the SD previous page through a scoped inline setter; evaluated save heap separately; used a scoped reference accessor instead of the setter. | 37/37; six register/load-order differences around save-manager and heap access. |
|
||||
|
||||
## Resolved iterations
|
||||
|
||||
Constructor, destructor/thunk, layout creation, common calculation, normal calculation,
|
||||
fadeout calculation, drawing, destruction, reset checks and most state handlers now
|
||||
match instruction-exactly. Notable successful source changes were:
|
||||
|
||||
- Original function order and event-case order restored all pooled strings.
|
||||
- Explicit nullable-file checks reproduced virtual-destructor branches.
|
||||
- Dialog last-result access corrected offset 0x24.
|
||||
- Arrow visibility access used the real byte at offset 0x81.
|
||||
- Text-pane names used a normal pointer table instead of direct literals.
|
||||
- Named pane-handler and text-box temporaries restored allocation/call order.
|
||||
- Script-data aggregate initialization and a real low-title-ID mask restored 120/120 instructions.
|
||||
- Script-state heap-index temporary restored register selection.
|
||||
- Separate result switch cases preserved the original dispatch tree.
|
||||
- Event switches and a hover-count reference restored both event handlers.
|
||||
- Combined positive early-return scene-state checks restored script calculation (66/66).
|
||||
- Named capture-dimension table restored the full .rodata section.
|
||||
- Fadeout used two-byte maker-code access and separately timed vector construction.
|
||||
|
||||
## Layout and interface uncertainties
|
||||
|
||||
The 0x800 bytes following the title-range output are preserved as opaque scene work
|
||||
storage; their internal type is not recovered. This is instance layout, not linker padding.
|
||||
The embedded SDMemory's original following-member offset requires size 0x2a78; its
|
||||
existing header's unused 16-byte tail is excluded only for this translation unit.
|
||||
|
||||
The original nonconst `isResetAcceptable` symbol differs from Base's existing const
|
||||
virtual declaration. This needs review before linking. The event handler classes use
|
||||
ordinary forwarding virtual methods, whose weak metadata may differ from the original.
|
||||
The original extracted object's weak data can be zero-filled after linker deduplication;
|
||||
no artificial data or force-active workaround was added.
|
||||
|
||||
The two notice APIs declare an ignored controller argument that the target callers do
|
||||
not initialize. The source supplies zero rather than depending on an uninitialized value.
|
||||
The title-range output pointer is passed as the fourth channel-notice argument.
|
||||
Reference in New Issue
Block a user