mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-22 09:01:35 +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>
66 lines
2.0 KiB
C++
66 lines
2.0 KiB
C++
#pragma once
|
|
|
|
#include "Game/Util/Functor.hpp"
|
|
#include "Game/Util/JMapInfo.hpp"
|
|
#include <revolution/types.h>
|
|
|
|
|
|
/// @brief The most basic form of an object.
|
|
class NameObj {
|
|
public:
|
|
/// @brief Creates a new `NameObj`.
|
|
/// @param pName A pointer to the null-terminated name of the object.
|
|
NameObj(const char* pName);
|
|
|
|
/// @brief Destroys the `NameObj`.
|
|
/* 0x08 */ virtual ~NameObj();
|
|
|
|
/// @brief Intializes the `NameObj` while being placed into a scene.
|
|
/// @param rIter A reference to an iterator over a `JMapInfo`.
|
|
/* 0x0C */ virtual void init(const JMapInfoIter& rIter);
|
|
|
|
/// @brief Intializes the `NameObj` after being placed into a scene.
|
|
/* 0x10 */ virtual void initAfterPlacement();
|
|
|
|
/* 0x14 */ virtual void movement();
|
|
|
|
/// @brief Draws the `NameObj` to the screen.
|
|
/* 0x18 */ virtual void draw() const;
|
|
|
|
/* 0x1C */ virtual void calcAnim();
|
|
/* 0x20 */ virtual void calcViewAndEntry();
|
|
|
|
/// @brief Initializes the `NameObj` without an iterator over a `JMapInfo`.
|
|
void initWithoutIter();
|
|
|
|
/// @brief Updates the name of the `NameObj`.
|
|
/// @param pName A pointer to the new null-terminated name of the object.
|
|
void setName(const char* pName);
|
|
|
|
/// @brief Returns the name of the `NameObj`.
|
|
/// @return A pointer to the null-terminated name of the object.
|
|
const char* getName() const {
|
|
return mName;
|
|
}
|
|
|
|
u16 getFlag() const {
|
|
return mFlag;
|
|
}
|
|
|
|
void executeMovement();
|
|
void requestSuspend();
|
|
void requestResume();
|
|
void syncWithFlags();
|
|
|
|
/* 0x04 */ const char* mName; ///< A string to identify the NameObj.
|
|
/* 0x08 */ u16 mFlag; ///< Flags in relation to movement.
|
|
/* 0x0A */ s16 mExecutorIdx; ///< The index into the NameObjExecuteInfo array.
|
|
};
|
|
|
|
/// @brief Contains static functions to begin and end movement in a NameObj.
|
|
class NameObjFunction {
|
|
public:
|
|
static void requestMovementOn(NameObj*);
|
|
static void requestMovementOff(NameObj*);
|
|
};
|