mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-18 14:01:12 +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>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
|
|
/// @brief The evaluator for a change in Boolean value.
|
|
class TriggerChecker {
|
|
public:
|
|
/// @brief Creates a new `TriggerChecker`.
|
|
TriggerChecker();
|
|
|
|
/// @brief Updates the state of the trigger.
|
|
/// @param input The new state of the trigger.
|
|
void update(bool input);
|
|
|
|
/// @brief Initializes the state of the trigger.
|
|
/// @param input The new state of the trigger.
|
|
void setInput(bool input);
|
|
|
|
/// @brief Returns the current state of the trigger.
|
|
/// @return The current state of the trigger.
|
|
bool getLevel() const;
|
|
|
|
/// @brief Determines if the trigger was just turned on.
|
|
/// @return `true` if the trigger was just turned on, `false` otherwise.
|
|
bool getOnTrigger() const;
|
|
|
|
/// @brief Determines if the trigger was just turned off.
|
|
/// @return `true` if the trigger was just turned off, `false` otherwise.
|
|
bool getOffTrigger() const;
|
|
|
|
private:
|
|
/// @brief The previous state of the trigger.
|
|
/* 0x00 */ bool mPrevLevel;
|
|
|
|
/// @brief The current state of the trigger.
|
|
/* 0x01 */ bool mCurrLevel;
|
|
};
|