d_a_obj_ss_drink equivalent (#2708)

* d_a_obj_ss_drink equivalent

* SomeFunc -> ProcessFunc

* fixes for taka

* rm FLT_MIN

* G_CM3D_F_INF
This commit is contained in:
Howard Luck 2025-09-27 23:03:27 -06:00 committed by GitHub
parent 5dc86158bc
commit 21bff2ba25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 487 additions and 600 deletions

View File

@ -2157,7 +2157,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_snow_soup"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_so"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_spinLift"), # extra weak dtors?
ActorRel(NonMatching, "d_a_obj_ss_drink"),
ActorRel(Equivalent, "d_a_obj_ss_drink"), # vtable order
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_ss_item"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stairBlock"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stone"),

View File

@ -24,6 +24,6 @@ public:
/* 0x30 */ u32 mFlags;
/* 0x34 */ f32 mNowY;
/* 0x38 */ u32 mWallPrecheck;
};
}; // size 0x3C
#endif /* C_BG_S_GND_CHK_H */

View File

@ -19,6 +19,7 @@ struct cM3d_Range {
/* 0x4 */ f32 mMax;
};
#define G_CM3D_F_INF (1000000000.0f)
extern const f32 G_CM3D_F_ABS_MIN;
static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);

View File

@ -121,9 +121,9 @@ public:
daMyna_c() {}
void onEventFlag(u8 flag) { field_0x92F |= (1 << flag); }
void offEventFlag(u8 flag) { field_0x92F &= ~(1 << flag); }
bool isEventFlag(u8 flag) { return field_0x92F & (1 << flag); }
void onEventFlag(u8 flag) { field_0x92F |= (u8)(1 << flag); }
void offEventFlag(u8 flag) { field_0x92F &= (u8)~(u8)(1 << flag); }
bool isEventFlag(u8 flag) { return field_0x92F & (u8)(1 << flag); }
fopAc_ac_c* getSpeakActorPtr() { return field_0x828; }

View File

@ -25,4 +25,6 @@ private:
/* 0x574 */ u16 mValueNum;
};
STATIC_ASSERT(sizeof(daObj_SSBase_c) == 0x578);
#endif /* A_OBJ_D_A_OBJ_SS_BASE_H */

View File

@ -1,7 +1,7 @@
#ifndef D_A_OBJ_SS_DRINK_H
#define D_A_OBJ_SS_DRINK_H
#include "f_op/f_op_actor_mng.h"
#include "d/actor/d_a_obj_ss_item.h"
/**
* @ingroup actors-objects
@ -11,26 +11,26 @@
* @details
*
*/
class daObj_SSDrink_c : public fopAc_ac_c {
class daObj_SSDrink_c : public daObj_SSBase_c {
public:
/* 80CE4F78 */ ~daObj_SSDrink_c();
/* 80CE51C8 */ void create();
/* 80CE53EC */ void CreateHeap();
/* 80CE55F0 */ void Delete();
/* 80CE5624 */ void Execute();
/* 80CE5858 */ void Draw();
/* 80CE59DC */ void createHeapCallBack(fopAc_ac_c*);
/* 80CE59FC */ void setSoldOut();
/* 80CE5A50 */ void getResName();
/* 80CE5A60 */ void getTypeFromParam();
/* 80CE5B0C */ void getSwitchFromParam();
/* 80CE5B18 */ void getCapacityFromParam();
/* 80CE5B3C */ void getFlowNodeNum();
/* 80CE5B74 */ void getValue();
typedef int (daObj_SSDrink_c::*ProcessFunc)(void*);
/* 80CE51C8 */ int create();
/* 80CE53EC */ int CreateHeap();
/* 80CE55F0 */ int Delete();
/* 80CE5624 */ int Execute();
/* 80CE5858 */ int Draw();
/* 80CE59DC */ static int createHeapCallBack(fopAc_ac_c*);
/* 80CE5A50 */ char* getResName();
/* 80CE5A60 */ u8 getTypeFromParam();
/* 80CE5B0C */ u8 getSwitchFromParam();
/* 80CE5B18 */ u8 getCapacityFromParam();
/* 80CE5B3C */ u16 getFlowNodeNum();
/* 80CE5B74 */ u16 getValue();
/* 80CE5B80 */ void restart();
/* 80CE5BF0 */ void initialize();
/* 80CE5DB0 */ void checkProcess(int (daObj_SSDrink_c::*)(void*));
/* 80CE5DDC */ void setProcess(int (daObj_SSDrink_c::*)(void*));
/* 80CE5DB0 */ int checkProcess(ProcessFunc);
/* 80CE5DDC */ int setProcess(ProcessFunc);
/* 80CE5EC8 */ void setParam();
/* 80CE5FE4 */ void setEnvTevColor();
/* 80CE6040 */ void setRoomNo();
@ -38,20 +38,42 @@ public:
/* 80CE60E8 */ void setAttnPos();
/* 80CE6170 */ void animeEntry();
/* 80CE61E4 */ void animePlay();
/* 80CE622C */ void chkEvent();
/* 80CE63AC */ void orderEvent();
/* 80CE644C */ bool wait(void*);
/* 80CE6454 */ void talk(void*);
/* 80CE6514 */ void drink(void*);
/* 80CE622C */ int chkEvent();
/* 80CE63AC */ int orderEvent();
/* 80CE644C */ int wait(void*);
/* 80CE6454 */ int talk(void*);
/* 80CE6514 */ int drink(void*);
static u8 const mCcDObjInfo[48];
static u8 mCcDCyl[68];
/* 80CE59FC */ virtual void setSoldOut();
/* 80CE4F78 */ virtual ~daObj_SSDrink_c();
static dCcD_SrcGObjInf const mCcDObjInfo;
static dCcD_SrcCyl mCcDCyl;
private:
/* 0x568 */ u8 field_0x568[0xb10 - 0x568];
/* 0x578 */ mDoExt_btpAnm* mpBtpAnm;
/* 0x57C */ mDoExt_brkAnm* mpBrkAnm;
/* 0x580 */ u8 field_0x580;
/* 0x584 */ request_of_phase_process_class mPhase;
/* 0x58C */ J3DModel* mpModel;
/* 0x590 */ dBgS_ObjAcch mAcch;
/* 0x768 */ dCcD_Stts mStts;
/* 0x7A4 */ dBgS_AcchCir mAcchCir;
/* 0x7E4 */ dCcD_Cyl mCyl1;
/* 0x920 */ dCcD_Cyl mCyl2;
/* 0xA5C */ cBgS_GndChk mGndChk;
/* 0xA98 */ cXyz field_0xa98;
/* 0xAA4 */ dMsgFlow_c mFlow;
/* 0xAF0 */ ProcessFunc field_0xaf0;
/* 0xAFC */ f32 field_0xafc;
/* 0xB00 */ f32 mLeftHandPosY;
/* 0xB04 */ u8 field_0xb04[4];
/* 0xB08 */ u16 field_0xb08;
/* 0xB0A */ u8 field_0xb0a;
/* 0xB0B */ u8 field_0xb0b;
/* 0xB0C */ u8 field_0xb0c;
};
STATIC_ASSERT(sizeof(daObj_SSDrink_c) == 0xb10);
#endif /* D_A_OBJ_SS_DRINK_H */

View File

@ -222,6 +222,6 @@ private:
/* 0x46 */ u8 mSelType;
/* 0x47 */ u8 field_0x47;
/* 0x48 */ u8 mNonStopJunpFlowFlag;
};
}; // size 0x4c
#endif /* D_MSG_D_MSG_FLOW_H */

File diff suppressed because it is too large Load Diff

View File

@ -154,8 +154,10 @@ int daObj_SSItem_c::Draw() {
mDoExt_modelUpdateDL(mpModel);
if (field_0xB00 != -1000000000.0f) {
cM3dGPla plane;
if (dComIfG_Bgsp().GetTriPla(mGndChk, &plane)) {
dComIfGd_setSimpleShadow(&current.pos, field_0xB00, 20.0f, &plane.mNormal, 0, 1.0f,
bool tri_pla = dComIfG_Bgsp().GetTriPla(mGndChk, &plane);
if (tri_pla) {
f32 param2 = 20.0f;
dComIfGd_setSimpleShadow(&current.pos, field_0xB00, param2, &plane.mNormal, 0, 1.0f,
dDlst_shadowControl_c::getSimpleTex());
}
}