Decompile Game_16#167
Conversation
Yanis002
left a comment
There was a problem hiding this comment.
just some ctor stuff, otherwise looks good to me
| mFadeControl.Register(); | ||
| mFadeControl.mUnk_20 = false; | ||
| gFadeController.func_0202d77c(&mFadeControl); | ||
| if (*(s32 *) 0x027ffc20 == 2) { |
There was a problem hiding this comment.
I wonder what this is, I can't find it on gbatek 🤔 it's some bios stuff I think but no idea what exactly
There was a problem hiding this comment.
I got an update on this, I asked on the ds decomp server and apparently it's called HW_RESET_PARAMETER_BUF
| func_ov016_0211fab8(mUnk_00c, (void (*)()) _ZN4Game13func_0202cf44Ev, this, 0); | ||
| _ZN11FadeControlC2Ev(&mFadeControl); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Closes #105
First PR on the project, let me know if anything needs fixing!