Skip to content

Commit

Permalink
d_operate_wind work
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Jul 12, 2024
1 parent 7916599 commit a597a19
Show file tree
Hide file tree
Showing 3 changed files with 252 additions and 40 deletions.
23 changes: 22 additions & 1 deletion include/d/d_com_inf_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ class dComIfG_play_c {
u8 getScopeType() { return mScopeType; }
void setScopeType(u8 type) { mScopeType = type; }

u8 getOperateWind() { return mOperateWind; }
void setOperateWindCancelOff() { mOperateWind = 0; }
void setOperateWindChangeOff() { mOperateWind = 1; }
void setOperateWindOn() { mOperateWind = 2; }

u8 checkMesgSendButton() { return mMesgSendButton; }
u8 checkMesgCancelButton() { return mMesgCancelButton; }

Expand Down Expand Up @@ -664,7 +669,7 @@ class dComIfG_play_c {
/* 0x4943 */ u8 field_0x4943;
/* 0x4944 */ u8 field_0x4944;
/* 0x4945 */ u8 mScopeType;
/* 0x4946 */ u8 field_0x4946;
/* 0x4946 */ u8 mOperateWind;
/* 0x4947 */ u8 field_0x4947;
/* 0x4948 */ u8 mMesgSendButton;
/* 0x4949 */ u8 mMesgCancelButton;
Expand Down Expand Up @@ -2337,6 +2342,22 @@ inline void dComIfGp_setScopeType(u8 type) {
g_dComIfG_gameInfo.play.setScopeType(type);
}

inline u8 dComIfGp_getOperateWind() {
return g_dComIfG_gameInfo.play.getOperateWind();
}

inline void dComIfGp_setOperateWindCancelOff() {
g_dComIfG_gameInfo.play.setOperateWindCancelOff();
}

inline void dComIfGp_setOperateWindChangeOff() {
g_dComIfG_gameInfo.play.setOperateWindChangeOff();
}

inline void dComIfGp_setOperateWindOn() {
g_dComIfG_gameInfo.play.setOperateWindOn();
}

inline u8 dComIfGp_checkMesgSendButton() {
return g_dComIfG_gameInfo.play.checkMesgSendButton();
}
Expand Down
89 changes: 69 additions & 20 deletions include/d/d_operate_wind.h
Original file line number Diff line number Diff line change
@@ -1,41 +1,70 @@
#ifndef D_OPERATE_WIND_H
#define D_OPERATE_WIND_H

#include "dolphin/types.h"
#include "d/d_drawlist.h"
#include "f_op/f_op_msg.h"
#include "f_op/f_op_msg_mng.h"
#include "m_Do/m_Do_hostIO.h"
#include "JSystem/JUtility/TColor.h"

class fopMsgM_pane_class;
class JKRExpHeap;
class J2DScreen;
class STControl;

class dOw_HIO_c {
class dOw_HIO_c : public mDoHIO_entry_c {
public:
dOw_HIO_c();

public:
/* 0x04 */ f32 field_0x04;
/* 0x08 */ s16 field_0x08;
/* 0x0A */ s16 field_0x0a;
/* 0x0C */ s16 field_0x0c;
/* 0x0E */ s16 field_0x0e;
/* 0x10 */ s16 field_0x10;
/* 0x12 */ s16 field_0x12;
/* 0x14 */ s16 field_0x14;
/* 0x16 */ s16 field_0x16;
/* 0x18 */ u8 field_0x18;
};

class dDlst_Ow_main_c {
class dDlst_Ow_main_c : public dDlst_base_c {
public:
void drawLine(int, f32, f32, f32, f32) {}
void setLineColor(JUtility::TColor) {}
void setLineMax(int) {}
void setScreen(J2DScreen*) {}
inline void drawLine(int, f32, f32, f32, f32);
void setLineColor(JUtility::TColor c) { color = c; }
void setLineMax(int v) { mLineMax = v; }
void setScreen(J2DScreen* s) { scrn = s; }

void draw();

public:
/* 0x004 */ J2DScreen* scrn;
/* 0x008 */ JUtility::TColor color;
/* 0x00C */ int mLineMax;
/* 0x010 */ f32 mX1[50];
/* 0x0D8 */ f32 mY1[50];
/* 0x1A0 */ f32 mX2[50];
/* 0x268 */ f32 mY2[50];
};

class dDlst_Ow_mask_c {
class dDlst_Ow_mask_c : public dDlst_base_c {
public:
void setScreen(J2DScreen*) {}

void draw();

public:
/* 0x004 */ J2DScreen* scrn;
};

class dOperate_wind_c {
public:
virtual ~dOperate_wind_c() {}
void setTimer(s16) {}

void dOw_angleRegular(f32);
void dOw_stickControl(int, s16);
static int dOw_angleRegular(f32);
int dOw_stickControl(int, s16);
void screenSet();
void alphaSet(f32);
void arrowColor1();
Expand All @@ -53,24 +82,44 @@ class dOperate_wind_c {
void _delete();
void _move();
void _draw();
void _open();
void _close();
bool _open();
bool _close();

public:
/* 0x004 */ J2DScreen* scrn1;
/* 0x008 */ J2DScreen* scrn2;
/* 0x00C */ fopMsgM_pane_class field_0x0c[5];
/* 0x124 */ fopMsgM_pane_class field_0x124[2];
/* 0x194 */ fopMsgM_pane_class field_0x194;
/* 0x1CC */ fopMsgM_pane_class field_0x1cc[4];
/* 0x2AC */ fopMsgM_pane_class field_0x2ac[8];
/* 0x46C */ fopMsgM_pane_class field_0x46c[4];
/* 0x54C */ fopMsgM_pane_alpha_class field_0x54c;
/* 0x554 */ fopMsgM_pane_alpha_class field_0x554;
/* 0x55C */ STControl* stick;
/* 0x560 */ dDlst_Ow_main_c* mMain;
/* 0x564 */ dDlst_Ow_mask_c* mMask;
};

class dOw_c {
class dOw_c : public msg_class {
public:
void _close() {}
void _draw() {}
void _move() {}
void _open() {}
void getHeap() {}
inline void _close();
inline bool _draw();
inline void _move();
inline void _open();
JKRExpHeap* getHeap() { return heap; }
void getStatus() {}
void setHeap(JKRExpHeap*) {}
void setHeap(JKRExpHeap* h) { heap = h; }
void setStatus(u8) {}
void setTimer(s16) {}

void _create();
void _delete();

public:
/* 0x0FC */ JKRExpHeap* heap;
/* 0x100 */ dOperate_wind_c* dOw_scrn;
/* 0x104 */ u8 field_0x104;
};

#endif /* D_OPERATE_WIND_H */
Loading

0 comments on commit a597a19

Please sign in to comment.