Skip to content

Commit 6637765

Browse files
TakaRikkahatal175
andauthored
e_md / coach2D done (#2418)
* e_md / coach2D done * Update d_a_e_md.cpp --------- Co-authored-by: hatal175 <hatal175@users.noreply.github.com>
1 parent 211e5f1 commit 6637765

File tree

6 files changed

+812
-640
lines changed

6 files changed

+812
-640
lines changed

configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ def MatchingFor(*versions) -> bool:
16241624
ActorRel(MatchingFor("GZ2E01"), "d_a_b_zant_sima"),
16251625
ActorRel(NonMatching, "d_a_balloon_2D"),
16261626
ActorRel(NonMatching, "d_a_bullet"),
1627-
ActorRel(NonMatching, "d_a_coach_2D"),
1627+
ActorRel(Equivalent, "d_a_coach_2D"), # weak func order
16281628
ActorRel(MatchingFor("GZ2E01"), "d_a_coach_fire"),
16291629
ActorRel(Equivalent, "d_a_cow"),
16301630
ActorRel(NonMatching, "d_a_cstatue"),
@@ -1671,7 +1671,7 @@ def MatchingFor(*versions) -> bool:
16711671
ActorRel(Equivalent, "d_a_e_kk"), # weak func order
16721672
ActorRel(NonMatching, "d_a_e_kr"),
16731673
ActorRel(MatchingFor("GZ2E01"), "d_a_e_mb"),
1674-
ActorRel(NonMatching, "d_a_e_md"),
1674+
ActorRel(MatchingFor("GZ2E01"), "d_a_e_md"),
16751675
ActorRel(NonMatching, "d_a_e_mf"),
16761676
ActorRel(NonMatching, "d_a_e_mk"),
16771677
ActorRel(NonMatching, "d_a_e_mk_bo"),

include/JSystem/J2DGraph/J2DPane.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ class J2DPane {
160160
calcMtx();
161161
}
162162

163+
void rotateY(f32 rotate) {
164+
mRotateY = rotate;
165+
calcMtx();
166+
}
167+
163168
int getKind() const { return mKind; }
164169

165170
bool isVisible() const { return mVisible; }

include/d/actor/d_a_coach_2D.h

Lines changed: 128 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#ifndef D_A_COACH_2D_H
22
#define D_A_COACH_2D_H
33

4-
#include "dolphin/types.h"
54
#include "f_op/f_op_actor_mng.h"
5+
#include "d/d_pane_class.h"
6+
#include "d/d_msg_scrn_light.h"
7+
#include "d/d_drawlist.h"
68

79
/**
810
* @ingroup actors-unsorted
@@ -12,33 +14,144 @@
1214
* @details
1315
*
1416
*/
15-
class daCoach2D_c : public fopAc_ac_c {
17+
class daCoach2D_c : public fopAc_ac_c, public request_of_phase_process_class {
1618
public:
17-
struct c_list {
18-
/* 806569CC */ void draw();
19-
/* 806577DC */ ~c_list();
19+
class c_list : public dDlst_base_c {
20+
public:
21+
c_list() { mpCoach2D = NULL; }
22+
23+
/* 806569CC */ virtual void draw();
24+
/* 806577DC */ virtual ~c_list() {}
25+
26+
void set(daCoach2D_c* i_coach2D) {
27+
mpCoach2D = i_coach2D;
28+
}
29+
30+
/* 0x4 */ daCoach2D_c* mpCoach2D;
2031
};
2132

22-
/* 80656A38 */ void createHeap();
23-
/* 80656D18 */ void create();
24-
/* 80656D94 */ void destroy();
25-
/* 80656DE4 */ void draw();
26-
/* 80656E94 */ void execute();
33+
/* 80656A38 */ int createHeap();
34+
/* 80656D18 */ int create();
35+
/* 80656D94 */ int destroy();
36+
/* 80656DE4 */ int draw();
37+
/* 80656E94 */ int execute();
2738
/* 80656ED0 */ void drawMeter();
2839
/* 8065722C */ void initiate();
2940
/* 80657260 */ void update();
3041
/* 80657490 */ void setBrkAnime(bool);
31-
/* 80657824 */ ~daCoach2D_c();
3242

33-
private:
34-
/* 0x568 */ u8 field_0x568[0x784 - 0x568];
43+
daCoach2D_c() { initiate(); }
44+
/* 80657824 */ virtual ~daCoach2D_c() {}
45+
46+
void show() { mIsVisible = true; }
47+
void hide() { mIsVisible = false; }
48+
bool isVisible() { return mIsVisible ? true : false; }
49+
50+
/* 0x574 */ J2DScreen* mpScrn;
51+
/* 0x578 */ J2DAnmTevRegKey* mpFireIconBrk;
52+
/* 0x57C */ dMsgScrnLight_c* mMsgLight;
53+
/* 0x580 */ CPaneMgr* mpPaneAll;
54+
/* 0x584 */ CPaneMgr* mpPaneBasha;
55+
/* 0x588 */ CPaneMgr* mpPaneFire;
56+
/* 0x58C */ CPaneMgr* mpPaneFireB;
57+
struct {
58+
/* 0x00 */ f32 pos_x;
59+
/* 0x04 */ f32 pos_y;
60+
/* 0x08 */ f32 pikari_pos_x;
61+
/* 0x0C */ f32 pikari_pos_y;
62+
/* 0x10 */ f32 pikari_anm_frame;
63+
/* 0x14 */ u8 field_0x14;
64+
/* 0x15 */ u8 field_0x15;
65+
}
66+
/* 0x590 */ mIconInfo[20];
67+
/* 0x770 */ c_list mList;
68+
/* 0x778 */ f32 mBrkFrame;
69+
/* 0x77C */ f32 mBrkSpeed;
70+
/* 0x780 */ u8 mHitCount;
71+
/* 0x781 */ u8 mMaxHitCount;
72+
/* 0x782 */ u8 mIsVisible;
3573
};
3674

3775
STATIC_ASSERT(sizeof(daCoach2D_c) == 0x784);
3876

39-
class daCoach2D_HIO_c {
77+
class daCoach2D_HIO_c : public mDoHIO_entry_c {
4078
public:
41-
/* 80657738 */ ~daCoach2D_HIO_c();
79+
struct Param {
80+
/* 0x00 */ f32 pos_x;
81+
/* 0x04 */ f32 pos_y;
82+
/* 0x08 */ f32 size;
83+
/* 0x0C */ f32 alpha;
84+
/* 0x10 */ f32 icon_space_x;
85+
/* 0x14 */ f32 icon_pos_x;
86+
/* 0x18 */ f32 icon_pos_y;
87+
/* 0x1C */ f32 icon_size;
88+
/* 0x20 */ f32 icon_alpha;
89+
/* 0x24 */ f32 coach_pos_x;
90+
/* 0x28 */ f32 coach_pos_y;
91+
/* 0x2C */ f32 coach_size;
92+
/* 0x30 */ f32 coach_alpha;
93+
/* 0x34 */ f32 blink_speed_min;
94+
/* 0x38 */ f32 blink_speed_max;
95+
/* 0x3C */ f32 pikari_scale;
96+
/* 0x40 */ f32 pikari_anim_speed;
97+
/* 0x44 */ u8 pikari_moyaR0_R;
98+
/* 0x45 */ u8 pikari_moyaR0_G;
99+
/* 0x46 */ u8 pikari_moyaR0_B;
100+
/* 0x47 */ u8 pikari_moyaR0_A;
101+
/* 0x48 */ u8 pikari_moyaR1_R;
102+
/* 0x49 */ u8 pikari_moyaR1_G;
103+
/* 0x4A */ u8 pikari_moyaR1_B;
104+
/* 0x4B */ u8 pikari_moyaR1_A;
105+
/* 0x4C */ u8 unk_0x4C;
106+
/* 0x4D */ u8 unk_0x4D;
107+
/* 0x4E */ u8 unk_0x4E;
108+
/* 0x4F */ u8 unk_0x4F;
109+
/* 0x50 */ u8 unk_0x50;
110+
/* 0x51 */ u8 unk_0x51;
111+
/* 0x52 */ u8 unk_0x52;
112+
/* 0x53 */ u8 unk_0x53;
113+
/* 0x54 */ u8 debug_ON;
114+
/* 0x55 */ u8 max_damage_num;
115+
/* 0x56 */ u8 now_damage_num;
116+
/* 0x57 */ u8 reverse_flag;
117+
};
118+
119+
daCoach2D_HIO_c() {
120+
static Param aParam = {
121+
45.0f,
122+
-15.0f,
123+
1.0f,
124+
1.0f,
125+
7.5f,
126+
-6.5f,
127+
0.0f,
128+
0.5f,
129+
1.0f,
130+
0.0f,
131+
0.0f,
132+
1.0f,
133+
1.0f,
134+
1.0f,
135+
5.0f,
136+
3.0f,
137+
8.0f,
138+
0xFF, 0xFF, 0xFF, 0xB9,
139+
0x00, 0x9B, 0x00, 0x00,
140+
0xFF, 0xFF, 0xFF, 0x57,
141+
0x00, 0x73, 0x00, 0x00,
142+
false,
143+
20,
144+
0,
145+
1,
146+
};
147+
148+
memcpy(&param, &aParam, sizeof(Param));
149+
}
150+
151+
/* 80657738 */ virtual ~daCoach2D_HIO_c() {}
152+
void genMessage(JORMContext*) {}
153+
154+
/* 0x4 */ Param param;
42155
};
43156

44157
#endif /* D_A_COACH_2D_H */

include/d/actor/d_a_e_md.h

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef D_A_E_MD_H
22
#define D_A_E_MD_H
3+
34
#include "f_op/f_op_actor_mng.h"
5+
#include "d/d_bg_s_acch.h"
6+
#include "d/d_cc_d.h"
7+
#include "d/d_cc_uty.h"
48

59
/**
610
* @ingroup actors-enemies
@@ -11,23 +15,52 @@
1115
*
1216
*/
1317
class daE_MD_c : public fopEn_enemy_c {
18+
public:
1419
/* 80708DF8 */ void initCcCylinder();
1520
/* 80708E70 */ void setCcCylinder(f32);
1621
/* 807091F0 */ void SetAnm(mDoExt_McaMorfSO*, int, int, f32, f32);
1722
/* 807092C8 */ void At_Check();
1823
/* 80709378 */ void CheckHit();
1924
/* 8070992C */ void WaitAction();
2025
/* 8070994C */ void HalfBreakAction();
21-
/* 80709A04 */ void VibAction();
26+
/* 80709A04 */ bool VibAction();
2227
/* 80709ABC */ void DummyAction();
2328
/* 80709BB4 */ void RealAction();
2429
/* 80709C3C */ void Action();
25-
/* 80709CFC */ void Execute();
26-
/* 80709D58 */ void Delete();
30+
/* 80709CFC */ int Execute();
31+
/* 80709D58 */ int Delete();
2732
/* 80709DA8 */ void setBaseMtx();
28-
/* 8070A044 */ void create();
29-
private:
30-
/* 0x5ac */ u8 field_0x5ac[0xa50 - 0x5ac];
33+
/* 8070A044 */ int create();
34+
35+
inline int CreateHeap();
36+
inline int Draw();
37+
38+
/* 0x5AC */ int mAction;
39+
/* 0x5B0 */ int mType;
40+
/* 0x5B4 */ int mInvulnerabilityTimer;
41+
/* 0x5B8 */ int mAnm;
42+
/* 0x5BC */ f32 field_0x5bc;
43+
/* 0x5C0 */ u8 field_0x5C0[0x5C8 - 0x5C0];
44+
/* 0x5C8 */ s16 field_0x5c8;
45+
/* 0x5CA */ s16 field_0x5ca;
46+
/* 0x5CC */ s16 field_0x5cc;
47+
/* 0x5CE */ s16 field_0x5ce;
48+
/* 0x5D0 */ u8 mSwbit;
49+
/* 0x5D4 */ int mBreakTimer;
50+
/* 0x5D8 */ u8 mHalfBreakMode;
51+
/* 0x5D9 */ u8 mCanCreateBu;
52+
/* 0x5DC */ request_of_phase_process_class mPhase;
53+
/* 0x5E4 */ Z2CreatureEnemy mSound;
54+
/* 0x688 */ u32 mShadowId;
55+
/* 0x68C */ mDoExt_McaMorfSO* mpModelMorf;
56+
/* 0x690 */ mDoExt_McaMorfSO* mpYariModelMorf;
57+
/* 0x694 */ J3DModel* mpTbModel;
58+
/* 0x698 */ dBgS_AcchCir mAcchCir;
59+
/* 0x6D8 */ dBgS_ObjAcch mAcch;
60+
/* 0x8B0 */ dCcD_Stts mCcStts;
61+
/* 0x8EC */ dCcD_Cyl mCyl;
62+
/* 0xA28 */ dCcU_AtInfo mAtInfo;
63+
/* 0xA4C */ u8 field_0xa4c[0xA50 - 0xA4C];
3164
};
3265

3366
STATIC_ASSERT(sizeof(daE_MD_c) == 0xa50);

0 commit comments

Comments
 (0)