mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-18 20:01:20 +02:00
A native port built on the Petari decompilation (previous commit): an HLE platform layer (OS, DVD, GX, audio, input, NAND) under the game's own code, an OpenXR presentation (a diorama around the player, a giant screen, the HUD and settings as compositor layers, SpaceWarp, dynamic resolution), Touch Plus controls, the tools that convert your own game files (tools/cook, which also takes the few pieces of data the game's executable holds from your sys/main.dol), and the port's changes to the decompilation (`git diff petari-base -- decomp`). README.md explains installing and building, docs/TECHNICAL.md how it works. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
162 lines
4.3 KiB
C++
162 lines
4.3 KiB
C++
#pragma once
|
|
|
|
#include "Game/Screen/LayoutActor.hpp"
|
|
#include <JSystem/JGeometry/TMatrix.hpp>
|
|
|
|
class LiveActor;
|
|
class StarPointerCommandStream;
|
|
class StarPointerDirector;
|
|
class StarPointerBlur;
|
|
class StarPointerNumber;
|
|
|
|
// TODO: what are the missing values?
|
|
enum StarPointerKind {
|
|
StarPointerKind_NULL = -1,
|
|
StarPointerKind_StarPointer = 0,
|
|
StarPointerKind_HandPointer = 1,
|
|
StarPointerKind_2 = 2,
|
|
StarPointerKind_HandPointerReactionWithCrossCursor = 3,
|
|
StarPointerKind_FingerPointer = 4,
|
|
StarPointerKind_5 = 5,
|
|
StarPointerKind_StarPointerNozzle = 6,
|
|
};
|
|
|
|
enum AnimType {
|
|
AnimType_NULL = -1,
|
|
AnimType_Finger = 0,
|
|
AnimType_HandGuu = 1,
|
|
AnimType_HandPaa = 2,
|
|
AnimType_StarPointer = 3,
|
|
};
|
|
|
|
class StarPointerLayout : public LayoutActor {
|
|
public:
|
|
StarPointerLayout(const char* pName = "\x83\x58\x83\x5e\x81\x5b\x83\x7c\x83\x43\x83\x93\x83\x5e\x83\x8c\x83\x43\x83\x41\x83\x45\x83\x67");
|
|
|
|
virtual void draw() const;
|
|
virtual void calcAnim();
|
|
virtual void appear();
|
|
virtual void kill();
|
|
virtual void control();
|
|
|
|
void initWithPort(s32);
|
|
bool startCommandStream(const LiveActor*, const TVec3f*, bool);
|
|
void endCommandStream(const LiveActor*);
|
|
void forceEndCommandStream();
|
|
bool isCommandStream(const LiveActor*);
|
|
|
|
void exeWait();
|
|
void exeOnReaction();
|
|
void endOnReaction();
|
|
void exeGrip();
|
|
void exeHold();
|
|
void endHold();
|
|
void exeRelease();
|
|
void exeOutScreen();
|
|
void exeNotConnected();
|
|
void endNotConnected();
|
|
void exeHide();
|
|
void endHide();
|
|
|
|
void tearDownHold();
|
|
void updateTouch();
|
|
bool isTouch();
|
|
void hideAll();
|
|
void tearDownHide();
|
|
void drawDecoration() const;
|
|
void setPosition();
|
|
void rotateTest();
|
|
void calcPoseNozzle(const TVec2f&, const TVec2f&);
|
|
void changeLayout(StarPointerKind);
|
|
bool isChanceToRumble() const;
|
|
void hideBlur();
|
|
void resetSameNerve();
|
|
void changeToStarPointer();
|
|
void changeToHandPointer();
|
|
void startAnimStarPointer(const char*);
|
|
void startAnimHandPaa();
|
|
void startAnimHandGuu();
|
|
void startAnimHandFinger();
|
|
void updateDecoration();
|
|
|
|
void show() {
|
|
if (!mIsAppear) {
|
|
mAppearTime = -3;
|
|
}
|
|
mIsAppear = true;
|
|
}
|
|
|
|
void hide() {
|
|
mIsAppear = false;
|
|
}
|
|
|
|
void validate() {
|
|
mIsPointerValid = true;
|
|
}
|
|
|
|
void invalidate() {
|
|
mIsPointerValid = false;
|
|
}
|
|
|
|
bool isAppear() const {
|
|
return mIsAppear && mAppearTime >= 0;
|
|
}
|
|
|
|
AnimType getAnimType() const {
|
|
return mAnimType;
|
|
}
|
|
|
|
bool isSingleTouch() {
|
|
return mSingleTouch || mStartSingleTouch;
|
|
}
|
|
|
|
f32 getRadius() const {
|
|
return mRadius;
|
|
}
|
|
|
|
/* 0x20 */ TVec2f mPosition;
|
|
/* 0x28 */ StarPointerKind mPointerKind;
|
|
/* 0x2C */ AnimType mAnimType;
|
|
/* 0x30 */ s32 mTouchTimer;
|
|
/* 0x34 */ s32 mPadChannel;
|
|
/* 0x38 */ f32 mRadius;
|
|
/* 0x3C */ f32 _3C;
|
|
/* 0x40 */ f32 mRotateAngle;
|
|
/* 0x44 */ StarPointerDirector* mDirector;
|
|
/* 0x48 */ StarPointerBlur* mBlur;
|
|
/* 0x4C */ StarPointerCommandStream* mCommandStream;
|
|
/* 0x50 */ StarPointerNumber* mNumber;
|
|
/* 0x54 */ const LiveActor* mActor;
|
|
/* 0x58 */ u64
|
|
mNewTouchedID; // NOTE: The use of this variable is a bit strange. It holds a unique identifier to check if the last touched object has
|
|
// changed (usually via pointer), but this identifier can be pretty much anything: actor pointer, layout pointer + pane string
|
|
// pointer, pointer to raw position data, etc. Basically: a pointer comparison with extra steps.
|
|
/* 0x60 */ u64 mTouchedID;
|
|
/* 0x68 */ bool mIsNewTouch;
|
|
/* 0x69 */ bool mStartTouch;
|
|
/* 0x6A */ bool mStartDisableShoot;
|
|
/* 0x6B */ bool mSingleTouch;
|
|
/* 0x6C */ bool mStartSingleTouch;
|
|
/* 0x6D */ bool mShootDisabled;
|
|
/* 0x6E */ bool mIsPointerValid;
|
|
/* 0x6F */ bool mIsAppear;
|
|
/* 0x70 */ s32 mAppearTime;
|
|
/* 0x74 */ u32 _74;
|
|
};
|
|
|
|
class StarPointerNumber : public LayoutActor {
|
|
public:
|
|
StarPointerNumber(StarPointerLayout*, s32, const char*);
|
|
|
|
virtual void control();
|
|
|
|
bool isOffState() const;
|
|
void startAnimPosition(u32) NO_INLINE;
|
|
|
|
/* 0x20 */ StarPointerLayout* mParent;
|
|
/* 0x24 */ s32 mPadChannel;
|
|
/* 0x28 */ AnimType mAnimType;
|
|
/* 0x2C */ bool mIsAppear;
|
|
/* 0x30 */ s32 mAppearTime;
|
|
};
|