Skip to content

Decompile Game_16#167

Draft
0Aurel wants to merge 2 commits into
zeldaret:mainfrom
0Aurel:main
Draft

Decompile Game_16#167
0Aurel wants to merge 2 commits into
zeldaret:mainfrom
0Aurel:main

Conversation

@0Aurel
Copy link
Copy Markdown

@0Aurel 0Aurel commented May 16, 2026

Closes #105

First PR on the project, let me know if anything needs fixing!

Copy link
Copy Markdown
Collaborator

@Yanis002 Yanis002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some ctor stuff, otherwise looks good to me

mFadeControl.Register();
mFadeControl.mUnk_20 = false;
gFadeController.func_0202d77c(&mFadeControl);
if (*(s32 *) 0x027ffc20 == 2) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what this is, I can't find it on gbatek 🤔 it's some bios stuff I think but no idea what exactly

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an update on this, I asked on the ds decomp server and apparently it's called HW_RESET_PARAMETER_BUF

Comment on lines +16 to +17
func_ov016_0211fab8(mUnk_00c, (void (*)()) _ZN4Game13func_0202cf44Ev, this, 0);
_ZN11FadeControlC2Ev(&mFadeControl);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks a little bit wrong, C2 is a constructor used to initialise a base class when a class is derived from another, I think this ctor is probably like ARM Game::Game() : mModeId(1), mPrevModeId(1), mMode(NULL), mUnk_00c(Game::func_0202cf44, this, 0) {...}

mUnk_00c must be defined as:

typedef void (*UnkCallback)();
class Game_0c {
public:
    Game_0c(UnkCallback callback, void* param2, unk32 param3); // func_ov016_0211fab8
};

then for mFadeControl the type must be FadeControl, the class is already existing iirc, also Game::func_0202cf44 must be static, looks like it's a static function taking Game as a parameter according to what ghidra shows me

idk how much you know about c++ but basically I think this requires a ctor init list (iirc that's how it's called) to initialize members before those ctor calls

btw feel free to join the discord server if you have any questions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was curious about the fadecontrol stuff so: https://decomp.me/scratch/XfIou, I'm not sure if it's supposed to be derived or if the symbol is simply mislabeled, either way that scratch should be more explicit than my previous explanations

if you have any questions feel free to ask of course

@0Aurel 0Aurel marked this pull request as draft May 16, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

src/16_Startup/Game/Game.cpp

2 participants