Files
bigmak94andClaude Opus 5.5 4b395efe5c Add the Petari decompilation (SMGCommunity/Petari@0a5c660)
The sources of Petari (https://github.com/SMGCommunity/Petari), the
Super Mario Galaxy decompilation by the SMGCommunity, at commit
0a5c6608dc3b4c44a9aa68c2535d1793dc565f02, unchanged but for LF line
endings: LICENSE (as LICENSE-Petari.txt; CC0 1.0), include/, libs/ and
src/.  Left out: the game data Petari keeps from the original
executable, the error message archive (include/Game/System/
ErrorArchive.hpp) and two tables (src/Game/System/GalaxyID.bcsv and
StoryEvent.bcsv); GalaxyQuest's converter takes them from the player's
own disc.  The port's changes follow in the next commit, so
`git diff petari-base -- decomp` shows them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 01:59:38 +02:00

123 lines
3.2 KiB
C++

#pragma once
#include "Game/Map/FileSelectIconID.hpp"
#include "Game/Screen/LayoutActor.hpp"
namespace nw4r {
namespace lyt {
class TexMap;
} // namespace lyt
} // namespace nw4r
namespace MR {
class BitArray;
} // namespace MR
namespace MiiSelectSub {
class Page;
} // namespace MiiSelectSub
class ButtonPaneController;
class MiiSelectIcon;
class MiiSelect : public LayoutActor {
friend class MiiSelectSub::Page;
public:
/// @brief Creates a new `MiiSelect`.
/// @param pName A pointer to the null-terminated name of the object.
MiiSelect(const char* pName);
/// @brief Intializes the `MiiSelect` while being placed into a scene.
/// @param[in] rIter The reference to an iterator over a `JMapInfo`.
virtual void init(const JMapInfoIter& rIter);
virtual void calcAnim();
virtual void appear();
virtual void control();
void disappear();
bool isAppearing() const;
bool isSelected();
bool isDummySelected();
void getSelectedID(FileSelectIconID*);
nw4r::lyt::TexMap* getSelectedMiiTexMap();
void admitIcon();
void prohibitIcon(const FileSelectIconID&);
void invalidateSpecialMii(FileSelectIconID::EFellowID);
void validateAllSpecialMii();
void exeAppear();
void exeWait();
void exeScrollRight();
void exeScrollLeft();
void exeSelected();
void exeDisappear();
void exeDummySelected();
void createButtons();
void callbackLeft();
void callbackRight();
void appearButtons();
void disappearButtons();
void updateButtons();
void collectValidMiiIndex();
void createPage();
void flipPage();
void setCurrentPageGroupA();
void setCurrentPageGroupB();
void setCurrentPageNum();
void validateAllIcon();
void refresh();
void getIconID(FileSelectIconID*, s32) const;
void onSelect(s32, nw4r::lyt::TexMap*);
void onSelectDummy();
s32 getIconNum();
bool isExistMiiIcon() const {
return mMiiNum != 0 || mFavoriteMiiNum != 0;
}
FileSelectIconID makeIconID(u32 id) const {
FileSelectIconID iconID;
getIconID(&iconID, id);
return iconID;
}
private:
/* 0x020 */ ButtonPaneController* _20[2];
/* 0x028 */ MR::BitArray* _28;
/* 0x02C */ u16 mFellowIconNum;
/* 0x02E */ u16 mFavoriteMiiNum;
/* 0x030 */ u32 mFavoriteMiiIndices[10];
/* 0x058 */ u16 mMiiNum;
/* 0x05C */ u32 mMiiIndices[10];
/* 0x084 */ u8 _84[360];
/* 0x1EC */ s32 _1EC;
/* 0x1F0 */ s32 _1F0;
/* 0x1F4 */ nw4r::lyt::TexMap* _1F4;
/* 0x1F8 */ MiiSelectSub::Page* _1F8;
/* 0x1FC */ MiiSelectSub::Page* _1FC;
/* 0x200 */ u8 _200;
/* 0x204 */ FileSelectIconID* _204;
};
namespace MiiSelectSub {
class Page {
public:
/// @brief Creates a new `Page`.
/// @param pHost A pointer to the owning actor instance.
Page(MiiSelect* pHost);
void refresh(s32);
void movement();
void calcAnim();
void invalidateAllIcon();
void validateAllIcon();
void prohibitIcon(const FileSelectIconID&);
/* 0x00 */ MiiSelectIcon* mIconArray[8];
/* 0x20 */ bool _20;
/* 0x24 */ MiiSelect* mHost;
/* 0x28 */ s32 mBaseIndex;
};
} // namespace MiiSelectSub