mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-06 01:48:15 -04:00
d_a_obj_barrel2 (#826)
* d_a_obj_barrel2 * PR * PR * Fix issues caused by autoformatter --------- Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
This commit is contained in:
+3
-1
@@ -339,6 +339,8 @@ Equivalent = config.non_matching # Object should be linked when configured with
|
||||
def MatchingFor(*versions):
|
||||
return config.version in versions
|
||||
|
||||
def EquivalentFor(*versions):
|
||||
return False
|
||||
|
||||
config.warn_missing_config = True
|
||||
config.warn_missing_source = False
|
||||
@@ -1397,7 +1399,7 @@ config.libs = [
|
||||
ActorRel(Matching, "d_a_obj_Ygush00", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_akabe"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_barrel", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(NonMatching, "d_a_obj_barrel2"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_barrel2", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_bscurtain", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(Matching, "d_a_obj_cafelmp"),
|
||||
ActorRel(NonMatching, "d_a_obj_coming"),
|
||||
|
||||
@@ -4,19 +4,73 @@
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/actor/d_a_obj_buoyflag.h"
|
||||
#include "d/d_a_obj.h"
|
||||
|
||||
class mDoExt_brkAnm;
|
||||
class daRaceItem_c;
|
||||
|
||||
namespace daObjBarrel2 {
|
||||
enum Type_e {
|
||||
Type_01_e = 0x1,
|
||||
};
|
||||
|
||||
struct Attr_c {
|
||||
/* 0x00 */ u16 m00;
|
||||
/* 0x02 */ u16 m02;
|
||||
/* 0x04 */ u32 m04;
|
||||
/* 0x08 */ f32 m08;
|
||||
/* 0x0C */ f32 m0C;
|
||||
/* 0x10 */ f32 m10;
|
||||
/* 0x14 */ f32 m14;
|
||||
/* 0x18 */ f32 m18;
|
||||
/* 0x1C */ f32 m1C;
|
||||
/* 0x20 */ f32 m20;
|
||||
/* 0x24 */ f32 m24;
|
||||
/* 0x28 */ f32 m28;
|
||||
/* 0x2C */ f32 m2C;
|
||||
/* 0x30 */ f32 m30;
|
||||
/* 0x34 */ f32 m34;
|
||||
/* 0x38 */ f32 m38;
|
||||
/* 0x3C */ f32 m3C;
|
||||
/* 0x40 */ f32 m40;
|
||||
/* 0x44 */ f32 m44;
|
||||
/* 0x48 */ f32 m48;
|
||||
/* 0x4C */ f32 m4C;
|
||||
/* 0x50 */ f32 m50;
|
||||
/* 0x54 */ f32 m54;
|
||||
/* 0x58 */ s16 m58;
|
||||
/* 0x5C */ f32 m5C;
|
||||
/* 0x60 */ f32 m60;
|
||||
/* 0x64 */ f32 m64;
|
||||
/* 0x68 */ f32 m68;
|
||||
/* 0x6C */ f32 m6C;
|
||||
/* 0x70 */ f32 m70;
|
||||
}; // size = 0x74
|
||||
|
||||
class Act_c : public fopAc_ac_c {
|
||||
public:
|
||||
|
||||
void attr() const {}
|
||||
u8 chk_item_give() const {
|
||||
return unk_476;
|
||||
}
|
||||
enum Prm_e {
|
||||
PRM_ITEM_SAVE_W = 7,
|
||||
PRM_ITEM_SAVE_S = 0x10,
|
||||
|
||||
PRM_ITEM_NO_W = 6,
|
||||
PRM_ITEM_NO_S = 0,
|
||||
|
||||
PRM_BUOY_W = 1,
|
||||
PRM_BUOY_S = 8,
|
||||
|
||||
PRM_TYPE_W = 2,
|
||||
PRM_TYPE_S = 0x18,
|
||||
|
||||
PRM_TEXTURE_W = 1,
|
||||
PRM_TEXTURE_S = 10,
|
||||
|
||||
PRM_COMING_W = 1,
|
||||
PRM_COMING_S = 0x1C,
|
||||
};
|
||||
|
||||
const Attr_c* attr() const { return &M_attr[m410]; }
|
||||
u8 chk_item_give() const { return m476; }
|
||||
void delete_req() {}
|
||||
void exit_req() {}
|
||||
void get_item_id() {}
|
||||
@@ -30,41 +84,53 @@ namespace daObjBarrel2 {
|
||||
s32 a6 = arg4;
|
||||
return (item | (0x7F << 16)) | (arg0 << 24) | (tmp << 8) | ((hasFlag ? 0 : 1) << 10) | (a6 << 28);
|
||||
}
|
||||
void prm_get_buoy() const {}
|
||||
void prm_get_coming() const {}
|
||||
void prm_get_itemNo() const {}
|
||||
void prm_get_itemSave() const {}
|
||||
void prm_get_texture() const {}
|
||||
void prm_get_type() const {}
|
||||
s32 prm_get_buoy() const {
|
||||
return daObj::PrmAbstract(this, PRM_BUOY_W, PRM_BUOY_S);
|
||||
}
|
||||
bool prm_get_coming() const {
|
||||
return daObj::PrmAbstract(this, PRM_COMING_W, PRM_COMING_S);
|
||||
}
|
||||
s32 prm_get_itemNo() const {
|
||||
return daObj::PrmAbstract(this, PRM_ITEM_NO_W, PRM_ITEM_NO_S);
|
||||
}
|
||||
s32 prm_get_itemSave() const {
|
||||
return daObj::PrmAbstract(this, PRM_ITEM_SAVE_W, PRM_ITEM_SAVE_S);
|
||||
}
|
||||
daObjBuoyflag::Texture_e prm_get_texture() const {
|
||||
return daObjBuoyflag::Texture_e(daObj::PrmAbstract(this, PRM_TEXTURE_W, PRM_TEXTURE_S));
|
||||
}
|
||||
s32 prm_get_type() const {
|
||||
return daObj::PrmAbstract(this, PRM_TYPE_W, PRM_TYPE_S);
|
||||
}
|
||||
|
||||
void solidHeapCB(fopAc_ac_c*);
|
||||
void create_heap();
|
||||
static int solidHeapCB(fopAc_ac_c*);
|
||||
bool create_heap();
|
||||
cPhs_State _create();
|
||||
bool _delete();
|
||||
void tg_hitCB(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*);
|
||||
void co_hitCB(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*);
|
||||
static void tg_hitCB(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*);
|
||||
static void co_hitCB(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*);
|
||||
void cull_set_draw();
|
||||
void cull_set_move();
|
||||
void demo_mode_chk() const;
|
||||
bool demo_mode_chk() const;
|
||||
void mode_afl_init();
|
||||
void mode_afl();
|
||||
bool mode_afl();
|
||||
void mode_exit_v_init();
|
||||
void mode_exit_v();
|
||||
bool mode_exit_v();
|
||||
void mode_exit_h_init();
|
||||
void mode_exit_h();
|
||||
bool mode_exit_h();
|
||||
void mode_exit_mine_init();
|
||||
void mode_exit_mine();
|
||||
bool mode_exit_mine();
|
||||
void mode_explode_init();
|
||||
void mode_explode();
|
||||
bool mode_explode();
|
||||
void mode_demo_break0_init();
|
||||
void mode_demo_break0();
|
||||
bool mode_demo_break0();
|
||||
void mode_demo_break1_init();
|
||||
void mode_demo_break1();
|
||||
bool mode_demo_break1();
|
||||
void mode_demo_explode0_init();
|
||||
void mode_demo_explode0();
|
||||
bool mode_demo_explode0();
|
||||
void mode_demo_explode1_init();
|
||||
void mode_demo_explode1();
|
||||
void mode_proc_call();
|
||||
bool mode_demo_explode1();
|
||||
bool mode_proc_call();
|
||||
void set_pos_y();
|
||||
void set_mtx();
|
||||
void init_mtx();
|
||||
@@ -79,21 +145,56 @@ namespace daObjBarrel2 {
|
||||
void buoy_jump(float);
|
||||
void set_water_pos();
|
||||
void afl_sway();
|
||||
void mine_chk_range_flash();
|
||||
void mine_chk_range_explode();
|
||||
void mine_chk_range_damage();
|
||||
bool mine_chk_range_flash();
|
||||
bool mine_chk_range_explode();
|
||||
bool mine_chk_range_damage();
|
||||
void execute_sub();
|
||||
bool _execute();
|
||||
bool _draw();
|
||||
|
||||
static const char M_arcname[];
|
||||
static const char M_evname_brk[];
|
||||
static const Attr_c M_attr[4];
|
||||
static const dCcD_SrcCyl M_cyl_src;
|
||||
static daRaceItem_c* M_tmp_item_actor;
|
||||
|
||||
public:
|
||||
/* 0x290 */ char unk290[0x1C8];
|
||||
/* 0x458 */ fpc_ProcID unk_458;
|
||||
/* 0x45C */ char unk45C[0x18];
|
||||
/* 0x474 */ u8 unk_474;
|
||||
/* 0x475 */ char unk475[0x1];
|
||||
/* 0x476 */ u8 unk_476;
|
||||
};
|
||||
/* 0x290 */ request_of_phase_process_class mPhase;
|
||||
/* 0x298 */ J3DModel* m298;
|
||||
/* 0x29C */ mDoExt_brkAnm* m29C;
|
||||
/* 0x2A0 */ dCcD_Stts mStts;
|
||||
/* 0x2DC */ dCcD_Cyl mCyl;
|
||||
/* 0x40C */ s32 m40C;
|
||||
/* 0x410 */ s32 m410;
|
||||
/* 0x414 */ f32 m414;
|
||||
/* 0x418 */ f32 m418;
|
||||
/* 0x41C */ f32 m41C;
|
||||
/* 0x420 */ cXyz m420;
|
||||
/* 0x42C */ f32 m42C;
|
||||
/* 0x430 */ f32 m430;
|
||||
/* 0x434 */ f32 m434;
|
||||
/* 0x438 */ f32 m438;
|
||||
/* 0x43C */ s16 m43C;
|
||||
/* 0x440 */ f32 m440;
|
||||
/* 0x444 */ f32 m444;
|
||||
/* 0x448 */ f32 m448;
|
||||
/* 0x44C */ f32 m44C;
|
||||
/* 0x450 */ f32 m450;
|
||||
/* 0x458 */ f32 m454;
|
||||
/* 0x458 */ fpc_ProcID m458;
|
||||
/* 0x45C */ f32 m45C;
|
||||
/* 0x460 */ fpc_ProcID m460;
|
||||
/* 0x464 */ s32 m464;
|
||||
/* 0x468 */ u8 m468;
|
||||
/* 0x46A */ s16 m46A;
|
||||
/* 0x46C */ u8 m46C;
|
||||
/* 0x46D */ u8 m46D;
|
||||
/* 0x470 */ s32 m470;
|
||||
/* 0x474 */ u8 m474;
|
||||
/* 0x475 */ u8 m475;
|
||||
/* 0x476 */ u8 m476;
|
||||
/* 0x478 */ Mtx m478;
|
||||
}; // size = 0x4A8
|
||||
|
||||
namespace Method {
|
||||
cPhs_State Create(void*);
|
||||
|
||||
@@ -10,9 +10,12 @@ namespace daObjBuoyflag {
|
||||
class Act_c;
|
||||
|
||||
enum Type_e {
|
||||
|
||||
Type_UNK0_e = 0,
|
||||
Type_UNK1_e = 1,
|
||||
Type_UNK2_e = 2,
|
||||
};
|
||||
enum Texture_e {
|
||||
Texture_00_e = 0x0,
|
||||
Texture_01_e = 0x1,
|
||||
};
|
||||
|
||||
@@ -49,12 +52,12 @@ namespace daObjBuoyflag {
|
||||
class Act_c : public fopAc_ac_c {
|
||||
public:
|
||||
static fpc_ProcID make_norm(fpc_ProcID parentPId, cXyz* pos, int roomNo, csXyz* angle) {
|
||||
u32 params = prm_make(static_cast<Type_e>(0), static_cast<Texture_e>(0), false); // TODO: placeholder
|
||||
u32 params = prm_make(Type_UNK0_e, Texture_00_e, false);
|
||||
return fopAcM_createChild(PROC_Obj_Buoyflag, parentPId, params, pos, roomNo, angle);
|
||||
}
|
||||
static u32 prm_make(Type_e, Texture_e, bool) {
|
||||
// TODO: placeholder function
|
||||
return 0;
|
||||
static u32 prm_make(Type_e type, Texture_e texture, bool arg2) {
|
||||
s32 b = arg2 ? 1 : 0;
|
||||
return (type << 0) | (texture << 8) | (b << 31);
|
||||
}
|
||||
|
||||
void setup(MtxP mtx) { cMtx_copy(mtx, m1090); }
|
||||
@@ -63,8 +66,14 @@ namespace daObjBuoyflag {
|
||||
inline bool _draw();
|
||||
inline bool _execute();
|
||||
void jump_to_sea(float, float, short) {}
|
||||
void make_barrel2_mine(fpc_ProcID, cXyz*, int, csXyz*, Texture_e, bool) {}
|
||||
void make_barrel2_norm(fpc_ProcID, cXyz*, int, csXyz*, Texture_e) {}
|
||||
static fpc_ProcID make_barrel2_mine(fpc_ProcID parent, cXyz* pos, int room, csXyz* angle, Texture_e texture, bool arg5) {
|
||||
u32 params = prm_make(Type_UNK2_e, texture, arg5);
|
||||
return fopAcM_createChild(PROC_Obj_Buoyflag, parent, params, pos, room, angle);
|
||||
}
|
||||
static fpc_ProcID make_barrel2_norm(fpc_ProcID parent, cXyz* pos, int room, csXyz* angle, Texture_e texture) {
|
||||
u32 params = prm_make(Type_UNK1_e, texture, false);
|
||||
return fopAcM_createChild(PROC_Obj_Buoyflag, parent, params, pos, room, angle);
|
||||
}
|
||||
void attr_type() const; // weak but not inlined?
|
||||
void prm_get_noCull() const {}
|
||||
void prm_get_texture() const; // weak but not inlined?
|
||||
@@ -77,7 +86,11 @@ namespace daObjBuoyflag {
|
||||
public:
|
||||
/* 0x0290 */ u8 m0290[0x1090 - 0x0290];
|
||||
/* 0x1090 */ Mtx m1090;
|
||||
/* 0x10C0 */ u8 m10C0[0x113C - 0x10C0];
|
||||
/* 0x10C0 */ u8 m10C0[0x10F0 - 0x10C0];
|
||||
/* 0x10F0 */ Mtx m10F0;
|
||||
/* 0x1120 */ u8 m1120[0x1124 - 0x1120];
|
||||
/* 0x1124 */ s32 m1124;
|
||||
/* 0x1128 */ bool m1128;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -170,12 +170,12 @@ public:
|
||||
|
||||
void onCb1Ride() { mStateFlag |= 0x40000000; }
|
||||
void onCraneHookFlg() {}
|
||||
void onCrashFlg() {}
|
||||
void onCrashFlg() { onStateFlg(daSFLG_UNK4_e); }
|
||||
void onFantomGanonBattle() {}
|
||||
//TODO: Is this right?
|
||||
void onLinkSit() { onStateFlg(daSFLG_UNK4000000_e); }
|
||||
void onSceneChange() { onStateFlg(daSFLG_UNK20000000_e); }
|
||||
void onShortHitFlg() {}
|
||||
void onShortHitFlg() { onStateFlg(daSFLG_UNK20_e); }
|
||||
void onStateFlg(daSHIP_SFLG flag) { mStateFlag |= flag; }
|
||||
void onTornadoFlg(u32 tornadoID) { mTornadoID = tornadoID; }
|
||||
void onWhirlFlg(u32, s16) {}
|
||||
|
||||
@@ -37,4 +37,4 @@ private:
|
||||
/* 0x4C */ u32 m_flags;
|
||||
}; // Size: 0x50
|
||||
|
||||
#endif /* D_BG_D_BG_S_SPL_GRP_CHK_H */
|
||||
#endif /* D_BG_D_BG_S_SPL_GRP_CHK_H */
|
||||
|
||||
@@ -234,7 +234,7 @@ BOOL daComing2::Act_c::request_barrel_exitN(int idx) {
|
||||
|
||||
if (barrelProc != fpcM_ERROR_PROCESS_ID_e) {
|
||||
if (fopAcM_SearchByID(barrelProc, (fopAc_ac_c**)&barrel) != NULL && barrel != NULL) {
|
||||
barrel->unk_474 = 1;
|
||||
barrel->m474 = 1;
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
@@ -283,7 +283,7 @@ BOOL daComing2::Act_c::request_all_flag_exit() {
|
||||
daObjBarrel2::Act_c* buoy;
|
||||
|
||||
if (buoyProc != fpcM_ERROR_PROCESS_ID_e && fopAcM_SearchByID(buoyProc, (fopAc_ac_c**)&buoy) != NULL && buoy != NULL) {
|
||||
buoy->unk_474 = 1;
|
||||
buoy->m474 = 1;
|
||||
mStartBuoy[i].unk_00 = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ void daComing3::Act_c::coming_game_main() {
|
||||
unk_404 = 3;
|
||||
eff_break_tsubo();
|
||||
} else if ((unk_478 <= get_limit_dist()) && (barrel != NULL)) {
|
||||
barrel->unk_474 = 1;
|
||||
barrel->m474 = 1;
|
||||
unk_404 = 2;
|
||||
}
|
||||
break;
|
||||
@@ -286,8 +286,8 @@ void daComing3::Act_c::coming_wait_main() {
|
||||
|
||||
fopAcM_SearchByID(unk_400, &ac1);
|
||||
daObjBarrel2::Act_c* barrel = (daObjBarrel2::Act_c*)ac1;
|
||||
if (barrel != NULL && !fopAcM_SearchByID(barrel->unk_458, &ac2)) {
|
||||
barrel->unk_474 = 1;
|
||||
if (barrel != NULL && !fopAcM_SearchByID(barrel->m458, &ac2)) {
|
||||
barrel->m474 = 1;
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
}
|
||||
|
||||
+939
-80
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user