diff options
| author | Kit <129910473+Eclipse32767@users.noreply.github.com> | 2024-02-08 03:10:43 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-07 22:10:43 -0500 |
| commit | 6c3bb08b774aa3c830aad59d430da2d99bc97a13 (patch) | |
| tree | 84920e926c45b7cc20f16decc4c6c8800f4df0f8 /src | |
| parent | 8472920fda85dda422d6b1243d699ed8aaa27abf (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/d/actor/d_a_bomb2.cpp | 16 | ||||
| -rw-r--r-- | src/d/actor/d_a_bomb3.inc | 4 | ||||
| -rw-r--r-- | src/d/d_a_bomb_static.cpp | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/d/actor/d_a_bomb2.cpp b/src/d/actor/d_a_bomb2.cpp index f2699cb5..7d532145 100644 --- a/src/d/actor/d_a_bomb2.cpp +++ b/src/d/actor/d_a_bomb2.cpp @@ -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)); } diff --git a/src/d/actor/d_a_bomb3.inc b/src/d/actor/d_a_bomb3.inc index 403d90b6..a83527b4 100644 --- a/src/d/actor/d_a_bomb3.inc +++ b/src/d/actor/d_a_bomb3.inc @@ -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); } diff --git a/src/d/d_a_bomb_static.cpp b/src/d/d_a_bomb_static.cpp index 8681af84..724290ea 100644 --- a/src/d/d_a_bomb_static.cpp +++ b/src/d/d_a_bomb_static.cpp @@ -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 */ |
