Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 68 additions & 35 deletions include/GC2D/PauseMenu2.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GC2D_PAUSE_MENU_2_HPP
#define GC2D_PAUSE_MENU_2_HPP

#include <JSystem/J2D/J2DScreen.hpp>
#include <JSystem/JDrama/JDRViewObj.hpp>
#include <JSystem/JParticle/JPAEmitter.hpp>

class J2DPicture;
class J2DSetScreen;
Expand All @@ -18,46 +20,77 @@ class TPauseMenu2 : public JDrama::TViewObj {
void loadAfter();
void appearWindow();
void disappearWindow();
void perform(u32, JDrama::TGraphics*);
void perform(u32 flags, JDrama::TGraphics* gfx);
u8 getNextState();
void setDrawStart();
void setDrawEnd();
void drawAppearPane(J2DPicture*, f32, JUTRect&, f32);
void drawAppearPane(J2DPicture* picture, f32 anim, JUTRect& rect,
f32 rotation);

// fabricated; smells fake
void setEmitterScale(f32 x, f32 y, f32 z)
{
mEmitter->setScale2(JGeometry::TVec3<f32>(x, y, z));
}

// fabricated
inline void draw(JDrama::TGraphics* gfx);

public:
/* 0x10 */ u32 unk10;
/* 0x14 */ J2DSetScreen* unk14;
/* 0x18 */ J2DPane* unk18;
/* 0x1C */ J2DPane* unk1C;
/* 0x20 */ J2DPane* unk20[5];
/* 0x34 */ JUTRect unk34[5];
/* 0x84 */ f32 unk84;
/* 0x88 */ f32 unk88;
/* 0x8C */ f32 unk8C;
/* 0x90 */ f32 unk90;
/* 0x94 */ u32 unk94;
/* 0x98 */ J2DPane* unk98[3];
/* 0xA4 */ JUTRect unkA4[3];
/* 0xD4 */ J2DTextBox* unkD4;
/* 0xD8 */ J2DPane* unkD8;
/* 0xDC */ J2DTextBox* unkDC;
/* 0xE0 */ u8 unkE0;
/* 0xE4 */ u32 unkE4;
/* 0xE8 */ u32 unkE8;
/* 0xEC */ u32 unkEC;
/* 0xF0 */ char unkF0[4];
/* 0xF4 */ u32 unkF4;
/* 0xF8 */ u16 unkF8;
/* 0xFC */ u32 unkFC;
/* 0x100 */ u16 unk100;
/* 0x102 */ u16 unk102;
/* 0x104 */ int unk104;
/* 0x108 */ u8 unk108;
/* 0x109 */ u8 unk109;
/* 0x110 */ JPABaseEmitter* unk110;
/* 0x10C */ TMarioGamePad* unk10C;
/* 0x114 */ u32 unk114;
/* 0x118 */ TCardSave* unk118;
enum PauseMenuState {
MENU_APPEARING = 0,
MENU_OPEN = 1,
UNK2 = 2,
MENU_SAVING = 3,
MENU_DISAPPEARING = 4,
MENU_CLOSED = 5
};

// Menu state.
/* 0x10 */ PauseMenuState mState;

// Screen and menu/background panes.
/* 0x14 */ J2DSetScreen* mScreen;
/* 0x18 */ J2DPane* mBackground;
/* 0x1C */ J2DPane* mMenuPane;

// "Pause" letters.
/* 0x20 */ J2DPicture* mPauseLetters[5];
/* 0x34 */ JUTRect mOrigLetterBounds[5];
/* 0x84 */ f32 mOrigLetterAngles[5];

// Menu items.
/* 0x98 */ J2DPicture* mMenuItems[3];
/* 0xA4 */ JUTRect mOrigItemBounds[3];

// Stage and scenario name.
/* 0xD4 */ J2DTextBox* mStageName;
/* 0xD8 */ J2DPane* mStagePane;
/* 0xDC */ J2DTextBox* mScenarioName;

// Menu option items.
/* 0xE0 */ u8 mSelectedItem;
/* 0xE4 */ u32 mItemColor;
/* 0xE8 */ f32 mBounceAnim;

// Appear/disappear animation.
/* 0xEC */ f32 mFadeAnim;
/* 0xF0 */ u8 mBackgroundAlpha;
/* 0xF4 */ f32 mBackgroundFadeInSpeed;
/* 0xF8 */ s16 mFirstItemAngle;
/* 0xFC */ u32 unkFC; // unused?

// "Spark" effect for the bouncing animation.
/* 0x100 */ s16 mEffectKeyFrame;
/* 0x102 */ u16 mEffectStretch;

/* 0x104 */ s32 mNumItems;
/* 0x108 */ bool mPressedB;
/* 0x109 */ bool mSelectionConfirmed;
/* 0x10C */ TMarioGamePad* mGamePad;
/* 0x110 */ JPABaseEmitter* mEmitter;
/* 0x114 */ u32 unk114; // unused?
/* 0x118 */ TCardSave* mCardSave;
};

#endif
7 changes: 7 additions & 0 deletions include/JSystem/J2D/J2DPane.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ class J2DPane {
// fabricated
const JUTRect& getBounds() const { return mBounds; }
void setBounds(const JUTRect& bounds) { mBounds = bounds; }
void setBounds(s32 x1, s32 x2, s32 y1, s32 y2)
{
mBounds = JUTRect(x1, x2, y1, y2);
}
const JUTRect& getGlobalBounds() const { return mGlobalBounds; }
f32 getRotation() const { return mRotation; }

const JUTRect& getScissorBounds() const { return mScissorBounds; }

void setInfluenceAlpha(bool influence) { mIsInfluencedAlpha = influence; }

Expand Down
3 changes: 3 additions & 0 deletions include/JSystem/J2D/J2DPicture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ class J2DPicture : public J2DPane {
setBlendKonstAlpha();
}

// fabricated
JUtility::TColor getWhite() const { return mWhite; }

public:
/* 0xEC */ JUTTexture* mTextures[4];
/* 0xFC */ u8 mTextureNum;
Expand Down
6 changes: 6 additions & 0 deletions include/JSystem/JParticle/JPAEmitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ class JPABaseEmitter {

void setUnk190(f32 x, f32 y, f32 z) { mScale.set(x, y, z); }

// fabricated
void setScale2(JGeometry::TVec3<f32> scale)
{
mScale.x = scale.x, mScale.y = scale.y, mScale.z = scale.z;
}

void setRotation(s16 x, s16 y, s16 z)
{
unk16C.x = x;
Expand Down
Loading
Loading