mirror of
https://github.com/zeldaret/tp
synced 2026-05-22 22:44:28 -04:00
fix push pull callback UB in other compilers (#3134)
This commit is contained in:
@@ -37,7 +37,7 @@ public:
|
||||
ACTION_DEAD_e,
|
||||
};
|
||||
|
||||
static void PPCallBack(fopAc_ac_c*, fopAc_ac_c*, s16, dBgW_Base::PushPullLabel);
|
||||
static fopAc_ac_c* PPCallBack(fopAc_ac_c*, fopAc_ac_c*, s16, dBgW_Base::PushPullLabel);
|
||||
void initBaseMtx();
|
||||
void setBaseMtx();
|
||||
u16 getPointNo();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "f_pc/f_pc_name.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
static void PPCallBack(fopAc_ac_c* i_this, fopAc_ac_c* i_unused, s16 i_unused2,
|
||||
static fopAc_ac_c* PPCallBack(fopAc_ac_c* i_this, fopAc_ac_c* i_unused, s16 i_unused2,
|
||||
dBgW_Base::PushPullLabel param_3) {
|
||||
if (cLib_checkBit(param_3, dBgW_Base::PPLABEL_PUSH) != 0) {
|
||||
daDoorPush_c* l_this = (daDoorPush_c*)i_this;
|
||||
@@ -19,9 +19,11 @@ static void PPCallBack(fopAc_ac_c* i_this, fopAc_ac_c* i_unused, s16 i_unused2,
|
||||
l_this->field_0x62e[1] = 0;
|
||||
l_this->field_0x62c[0] = 1;
|
||||
}
|
||||
|
||||
return i_this;
|
||||
}
|
||||
|
||||
static void PPCallBack2(fopAc_ac_c* i_this, fopAc_ac_c* i_unused, s16 i_unused2,
|
||||
static fopAc_ac_c* PPCallBack2(fopAc_ac_c* i_this, fopAc_ac_c* i_unused, s16 i_unused2,
|
||||
dBgW_Base::PushPullLabel param_3) {
|
||||
if (cLib_checkBit(param_3, dBgW_Base::PPLABEL_PUSH) != 0) {
|
||||
daDoorPush_c* l_this = (daDoorPush_c*)i_this;
|
||||
@@ -29,6 +31,8 @@ static void PPCallBack2(fopAc_ac_c* i_this, fopAc_ac_c* i_unused, s16 i_unused2,
|
||||
l_this->field_0x62e[0] = 0;
|
||||
l_this->field_0x62c[1] = 1;
|
||||
}
|
||||
|
||||
return i_this;
|
||||
}
|
||||
|
||||
void daDoorPush_c::initBaseMtx() {
|
||||
|
||||
@@ -25,7 +25,7 @@ enum WALK_TYPE {
|
||||
WALK_IRON_BALL_HIT,
|
||||
};
|
||||
|
||||
void daObjIceBlk_c::PPCallBack(fopAc_ac_c* i_bgActor, fopAc_ac_c* i_pushActor, s16 i_angle,
|
||||
fopAc_ac_c* daObjIceBlk_c::PPCallBack(fopAc_ac_c* i_bgActor, fopAc_ac_c* i_pushActor, s16 i_angle,
|
||||
dBgW_Base::PushPullLabel i_label) {
|
||||
bool temp_r3 = cLib_checkBit<u8>(i_label, dBgW::PPLABEL_PUSH) != 0;
|
||||
bool temp_r3_2 = cLib_checkBit<u8>(i_label, dBgW::PPLABEL_PUSH) != 0;
|
||||
@@ -54,6 +54,7 @@ void daObjIceBlk_c::PPCallBack(fopAc_ac_c* i_bgActor, fopAc_ac_c* i_pushActor, s
|
||||
}
|
||||
|
||||
((daObjIceBlk_c*)i_bgActor)->mPPLabel = i_label;
|
||||
return i_bgActor;
|
||||
}
|
||||
|
||||
static void rideCallBack(dBgW* i_bgw, fopAc_ac_c* i_bgActor, fopAc_ac_c* i_rideActor) {
|
||||
|
||||
Reference in New Issue
Block a user