Documentation, field naming throughout d_a_bomb_static.cpp (#597)

* change field 0x6F2 of daBomb_c to mBombFire

* add comments to functions involving mBombTimer, rename field 0x738 to mBombTimer

* fixes suggested by crain-32
This commit is contained in:
Kit
2024-02-08 03:10:43 +00:00
committed by GitHub
parent 8472920fda
commit 6c3bb08b77
5 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -188,7 +188,7 @@ private:
/* 0x6E4 */ daBomb_fuseSparksEcallBack mSparks;
/* 0x6F0 */ u8 field_0x6F0;
/* 0x6F1 */ u8 field_0x6F1;
/* 0x6F2 */ u8 field_0x6F2;
/* 0x6F2 */ u8 mBombFire;
/* 0x6F3 */ u8 field_0x6F3;
/* 0x6F4 */ u8 field_0x6F4;
/* 0x6F5 */ u8 field_0x6F5;
+1 -1
View File
@@ -197,7 +197,7 @@ namespace daBomb2 {
/* 0x6CC */ cXyz field_0x6CC;
/* 0x6D8 */ cXyz field_0x6D8;
/* 0x6E4 */ Env_c mEnv;
/* 0x738 */ int field_0x738;
/* 0x738 */ int mBombTimer;
/* 0x73C */ int field_0x73C;
/* 0x740 */ u8 field_0x740;
/* 0x741 */ u8 field_0x741;
+8 -8
View File
@@ -24,7 +24,7 @@ namespace daBomb2 {
/* 0x00 */ const char* resName;
/* 0x04 */ u32 heapSize;
/* 0x08 */ s16 field_0x8;
/* 0x0A */ s16 field_0xA;
/* 0x0A */ s16 field_0xA; // Appears to be the bomb timer cap
/* 0x0C */ f32 gravity;
/* 0x10 */ f32 maxFallSpeed;
/* 0x14 */ f32 field_0x14;
@@ -396,7 +396,7 @@ namespace daBomb2 {
current.pos = home.pos;
init_mtx();
field_0x738 = attr().field_0x8;
mBombTimer = attr().field_0x8;
field_0x740 = 0;
field_0x741 = 0;
field_0x742 = 0;
@@ -618,8 +618,8 @@ namespace daBomb2 {
}
void Act_c::set_nut_exp_interval() {
if(field_0x738 > attr().field_0xA) {
field_0x738 = attr().field_0xA;
if(mBombTimer > attr().field_0xA) {
mBombTimer = attr().field_0xA;
f32 frame = 0x87 - attr().field_0xA;
mBck0.getFrameCtrl()->setFrame(frame);
@@ -628,7 +628,7 @@ namespace daBomb2 {
}
void Act_c::anm_play() {
if(field_0x738 + 1 <= 0x87) {
if(mBombTimer + 1 <= 0x87) {
mBck0.play();
mBrk0.play();
}
@@ -844,7 +844,7 @@ namespace daBomb2 {
}
bool Act_c::chk_exp_cc() {
if(field_0x738 > 0) {
if(mBombTimer > 0) {
return chk_exp_cc_nut();
}
@@ -885,7 +885,7 @@ namespace daBomb2 {
bool Act_c::chk_exp_timer() {
bool ret = false;
if(field_0x738 > 0 && --field_0x738 == 0) {
if(mBombTimer > 0 && --mBombTimer == 0) {
eff_explode();
ret = true;
}
@@ -1066,7 +1066,7 @@ namespace daBomb2 {
mSph.OffCoSPrmBit(CO_SPRM_SET);
mSph.OnAtSPrmBit(AT_SPRM_SET);
fopAcM_cancelCarryNow(this);
field_0x738 = 0;
mBombTimer = 0;
field_0x73C = 4;
dComIfGp_getVibration().StartShock(7, -0x21, cXyz(0.0f, 1.0f, 0.0f));
}
+2 -2
View File
@@ -1026,9 +1026,9 @@ void daBomb_c::waitState_bomtyu() {
cLib_chaseF(&mScale.x, 1.0f, 0.05f);
cLib_chaseF(&mScale.y, 1.0f, 0.05f);
cLib_chaseF(&mScale.z, 1.0f, 0.05f);
if(field_0x6F2) {
if(mBombFire) {
setFuseEffect();
field_0x6F2 = 0;
mBombFire = 0;
field_0x6F4 = 1;
change_state(STATE_1);
}
+3 -3
View File
@@ -34,7 +34,7 @@ void daBomb_c::setBombCheck_Flag() {
void daBomb_c::setBombFire_ON() {
_prm_chk_version();
field_0x6F2 = true;
mBombFire = true;
}
/* 80068068-800680CC .text setBombNoHit__8daBomb_cFv */
@@ -158,12 +158,12 @@ void daBomb2::Act_c::remove_fuse_effect() {
/* 80068488-80068490 .text set_time__Q27daBomb25Act_cFi */
void daBomb2::Act_c::set_time(int time) {
field_0x738 = time;
mBombTimer = time;
}
/* 80068490-80068498 .text get_time__Q27daBomb25Act_cCFv */
int daBomb2::Act_c::get_time() const {
return field_0x738;
return mBombTimer;
}
/* 80068498-800684A0 .text chk_eat__Q27daBomb25Act_cCFv */