mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-18 15:01:26 +02:00
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>
65 lines
2.3 KiB
C++
65 lines
2.3 KiB
C++
#pragma once
|
|
|
|
#include "Game/System/BinaryDataChunkHolder.hpp"
|
|
|
|
class GameDataPlayerStatus : public BinaryDataChunkBase {
|
|
public:
|
|
/// @brief Creates a new `GameDataPlayerStatus`.
|
|
GameDataPlayerStatus();
|
|
|
|
/// @brief Returns the identifying hash code for this object.
|
|
/// @return The identifying hash code.
|
|
virtual u32 makeHeaderHashCode() const;
|
|
|
|
/// @brief Returns the identifying magic number for this object.
|
|
/// @return The identifying magic number.
|
|
virtual u32 getSignature() const;
|
|
|
|
/// @brief Writes the member variables of this object to the given data buffer.
|
|
/// @param pBuffer The pointer to the data buffer.
|
|
/// @param size The size of the data buffer, in bytes.
|
|
/// @return The number of bytes written.
|
|
virtual s32 serialize(u8* pBuffer, u32 size) const;
|
|
|
|
/// @brief Reads the member variables of this object from the given data buffer.
|
|
/// @param pBuffer The pointer to the data buffer.
|
|
/// @param size The size of the data buffer, in bytes.
|
|
/// @return `0` or `1` if successful, unsuccessful otherwise.
|
|
virtual s32 deserialize(const u8* pBuffer, u32 size);
|
|
|
|
/// @brief Initializes the member variables of this object.
|
|
virtual void initializeData();
|
|
|
|
/// @brief Returns the number of extra lives.
|
|
/// @return The number of extra lives.
|
|
s32 getPlayerLeft() const;
|
|
|
|
/// @brief Adds to the number of extra lives by the given term.
|
|
/// @param num The number of extra lives to add.
|
|
void addPlayerLeft(int num);
|
|
|
|
/// @brief Determines if enough extra lives were earned during the previous session.
|
|
/// @return `true` if enough extra lives were earned, `false` otherwise.
|
|
bool isPlayerLeftSupply() const;
|
|
|
|
/// @brief Reduces the number of extra lives from the previous session to zero.
|
|
void offPlayerLeftSupply();
|
|
|
|
/// @brief Adds to the number of universally collected Star Bits by the given term.
|
|
/// @param num The number of Star Bits to add.
|
|
void addStockedStarPiece(int num);
|
|
|
|
/// @brief The number of extra lives.
|
|
/* 0x04 */ u16 mPlayerLeft;
|
|
|
|
/// @brief The number of universally collected Star Bits.
|
|
/* 0x08 */ u32 mStockedStarPiece;
|
|
|
|
/// @brief TODO.
|
|
/* 0x0C */ u8 mStoryProgress;
|
|
|
|
private:
|
|
/// @brief The number of extra lives from the previous session.
|
|
/* 0x0E */ u16 mPlayerLeftSupply;
|
|
};
|