mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-29 04:02:29 +01: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>
80 lines
1.9 KiB
C++
80 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include "Game/Screen/LayoutActor.hpp"
|
|
|
|
class NameObjAdaptor;
|
|
|
|
namespace MR {
|
|
class FunctorBase;
|
|
}; // namespace MR
|
|
|
|
class OdhConverter : public LayoutActor {
|
|
public:
|
|
/// @brief Creates a new `OdhConverter`.
|
|
OdhConverter();
|
|
|
|
/// @brief Intializes the `OdhConverter` while being placed into a scene.
|
|
/// @param rIter The reference to an iterator over a `JMapInfo`.
|
|
virtual void init(const JMapInfoIter& rIter);
|
|
|
|
/// @brief Draws the `OdhConverter` to the screen.
|
|
virtual void draw() const;
|
|
|
|
void capture() {
|
|
convert();
|
|
|
|
mIsRequestedCapture = false;
|
|
}
|
|
|
|
void requestCapture() {
|
|
mIsRequestedCapture = true;
|
|
}
|
|
|
|
bool isRequestedCapture() const {
|
|
return mIsRequestedCapture;
|
|
}
|
|
|
|
u8* getImage() const {
|
|
return mImage;
|
|
}
|
|
|
|
u32 getImageSize() const {
|
|
return mImageSize;
|
|
}
|
|
|
|
void convert();
|
|
|
|
private:
|
|
/// @brief The width of the frame buffer, in bytes.
|
|
/* 0x20 */ u32 mCaptureWidth;
|
|
|
|
/// @brief The height of the frame buffer, in bytes.
|
|
/* 0x24 */ u32 mCaptureHeight;
|
|
|
|
/// @brief The capacity of the AJPG data buffer, in bytes.
|
|
/* 0x28 */ u32 mLimitSize;
|
|
|
|
/// @brief Determines if a screen capture was queued.
|
|
/* 0x2C */ bool mIsRequestedCapture;
|
|
|
|
/// @brief The size of the AJPG data buffer, in bytes.
|
|
/* 0x30 */ u32 mImageSize;
|
|
|
|
/// @brief A pointer to the AJPG data buffer.
|
|
/* 0x34 */ u8* mImage;
|
|
|
|
/// @brief A pointer to the frame buffer.
|
|
/* 0x38 */ u8* mCaptureImage;
|
|
};
|
|
|
|
namespace MR {
|
|
void createOdhConverter();
|
|
void requestCaptureOdhImage();
|
|
bool isRequestedCaptureOdhImage();
|
|
void captureOdhImage();
|
|
void setPortCaptureOdhImage();
|
|
const u8* getOdhImage();
|
|
u32 getOdhImageSize();
|
|
NameObjAdaptor* createAdaptorAndConnectToWiiMessageBoard(const char*, const FunctorBase&);
|
|
}; // namespace MR
|