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

64 lines
1.7 KiB
C++

#pragma once
#include <JSystem/JGeometry/TVec.hpp>
#include <revolution/kpad.h>
#include <revolution/types.h>
#include <revolution/wpad.h>
class WPadAcceleration;
class WPadButton;
class WPadHVSwing;
class WPadInfoChecker;
class WPadLeaveWatcher;
class WPadPointer;
class WPadReadDataInfo;
class WPadRumble;
class WPadStick;
struct KPADStatus;
class WPad {
public:
WPad(s32);
void setReadInfo(WPadReadDataInfo*);
void update();
WPadRumble* getRumbleInstance() const;
void startLeaveWatcher();
void stopLeaveWatcher();
void restartLeaveWatcher();
s32 getBattery() const;
void resetPad();
void connected();
void disconnected();
static void connectCallback(s32, s32);
static void extensionCallback(s32, s32);
static void getInfoCallback(s32, s32);
KPADStatus* getKPadStatus(u32) const;
s32 getValidStatusCount() const;
s32 getEnableAccelPastCount(u32) const;
bool getAcceleration(TVec3f*, u32) const;
bool getPastAcceleration(TVec3f*, s32, u32) const;
/* 0x00 */ s32 mChannel;
/* 0x04 */ WPadReadDataInfo* mReadInfo;
/* 0x08 */ WPadButton* mButton;
/* 0x0C */ WPadPointer* mPointer;
/* 0x10 */ WPadAcceleration* mCorePadAccel;
/* 0x14 */ WPadHVSwing* mCorePadSwing;
/* 0x18 */ WPadRumble* _18;
/* 0x1C */ WPadRumble* _1C;
/* 0x20 */ WPadStick* mStick;
/* 0x24 */ WPadAcceleration* mSubPadAccel;
/* 0x28 */ WPadHVSwing* mSubPadSwing;
/* 0x2C */ WPadLeaveWatcher* mLeaveWatcher;
/* 0x30 */ WPadInfoChecker* mInfoChecker;
/* 0x34 */ bool _34;
/* 0x35 */ bool mIsConnected;
/* 0x36 */ bool mIsSubPadConnected;
};
namespace MR {
bool isDeviceFreeStyle(const KPADStatus*);
void getPadDataForExceptionNoInit(u32, u32*, u32*);
}; // namespace MR