summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2024-06-06 19:06:39 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2024-06-06 19:06:39 -0400
commitbd5853cb5ae29be5a233b7e571494f5931d0ca25 (patch)
treeb47ea6a57fae8b6a7b04e0cb78e7a8a81ef6c0f0 /src
parenteec24f6c27cb3c8c6034b53cc4c10a434cbafeda (diff)
Fix beat/melody var names
Diffstat (limited to 'src')
-rw-r--r--src/JAZelAudio/JAIZelInst.cpp4
-rw-r--r--src/d/actor/d_a_obj_mknjd.cpp4
-rw-r--r--src/d/d_metronome.cpp44
3 files changed, 26 insertions, 26 deletions
diff --git a/src/JAZelAudio/JAIZelInst.cpp b/src/JAZelAudio/JAIZelInst.cpp
index c51ced80..d6c48cd2 100644
--- a/src/JAZelAudio/JAIZelInst.cpp
+++ b/src/JAZelAudio/JAIZelInst.cpp
@@ -12,12 +12,12 @@ JAIZelInst::JAIZelInst() {
field_0xc = 0;
field_0x10 = -1;
field_0x14 = 0x2f;
- mMelodyNum = 3;
+ mBeat = 3;
field_0x20 = 0.6f;
field_0x24 = 3.0f;
field_0x28 = 60.f;
field_0x2c = 1.0f;
- field_0x30 = field_0x2c * 30.0f;
+ mBeatFrames = field_0x2c * 30.0f;
field_0x1e = 0;
field_0x48 = 0;
field_0x34 = 0x37;
diff --git a/src/d/actor/d_a_obj_mknjd.cpp b/src/d/actor/d_a_obj_mknjd.cpp
index 5480b9b3..568118ea 100644
--- a/src/d/actor/d_a_obj_mknjd.cpp
+++ b/src/d/actor/d_a_obj_mknjd.cpp
@@ -255,7 +255,7 @@ int daObjMknjD::Act_c::Create() {
mErrorEventIdx = dComIfGp_evmng_getEventIdx(daObjMknjD_EventName[5]);
mLessonEventIdx = dComIfGp_evmng_getEventIdx(daObjMknjD_EventName[7]);
- mTactMode = 4;
+ mMelodyNum = 4;
mGiveItemNo = TACT_SONG5;
eventInfo.setEventName("MKNJD_K_TALK");
m0430 = 0x2910;
@@ -266,7 +266,7 @@ int daObjMknjD::Act_c::Create() {
mErrorEventIdx = dComIfGp_evmng_getEventIdx(daObjMknjD_EventName[4]);
mLessonEventIdx = dComIfGp_evmng_getEventIdx(daObjMknjD_EventName[6]);
- mTactMode = 3;
+ mMelodyNum = 3;
mGiveItemNo = TACT_SONG4;
eventInfo.setEventName("MKNJD_D_TALK");
m0430 = 0x2920;
diff --git a/src/d/d_metronome.cpp b/src/d/d_metronome.cpp
index 6046b284..45627656 100644
--- a/src/d/d_metronome.cpp
+++ b/src/d/d_metronome.cpp
@@ -192,7 +192,7 @@ void dMetronome_c::metronomeMove() {
}
/* 802222D8-802224E4 .text melodyInit__12dMetronome_cFUc */
-void dMetronome_c::melodyInit(u8 melodyNum) {
+void dMetronome_c::melodyInit(u8 beat) {
pane_wn[2].mUserArea = 0;
pane_wn[3].mUserArea = 0;
pane_wn[4].mUserArea = 0;
@@ -208,7 +208,7 @@ void dMetronome_c::melodyInit(u8 melodyNum) {
for (u32 i = 0; i < 21; i++)
pane_timing[i].mUserArea = 0;
- switch (melodyNum) {
+ switch (beat) {
case 3:
mPosX = (pane_bs[1].mPosCenterOrig.x + pane_bs[2].mPosCenterOrig.x) / 2.0f;
break;
@@ -237,7 +237,7 @@ void dMetronome_c::melodyInit(u8 melodyNum) {
fopMsgM_cposMove(&pane_i12[i]);
fopMsgM_cposMove(&pane_bs[i]);
- if (i < melodyNum) {
+ if (i < beat) {
fopMsgM_setInitAlpha(&pane_wn[i]);
fopMsgM_setInitAlpha(&pane_bs[i]);
} else {
@@ -324,7 +324,7 @@ void dMetronome_c::melodyShow() {
pos.z = 0.0f;
s32 note = daPy_getPlayerLinkActorClass()->m34D6;
- if (pane_wn[0].mUserArea < mMelodyNum) {
+ if (pane_wn[0].mUserArea < mBeat) {
mNote[pane_wn[0].mUserArea] = note;
melodyGuideShow(note, pane_wn[0].mUserArea);
pane_bs[pane_wn[0].mUserArea].mUserArea = 1;
@@ -332,11 +332,11 @@ void dMetronome_c::melodyShow() {
pos.y = pane_wn[pane_wn[0].mUserArea].mPosCenter.y - 240.0f;
pane_wn[0].mUserArea++;
} else {
- mNote[mMelodyNum - 1] = note;
- melodyGuideShow(note, mMelodyNum - 1);
- pane_bs[mMelodyNum - 1].mUserArea = 1;
- pos.x = pane_wn[mMelodyNum - 1].mPosCenter.x - 320.0f;
- pos.y = pane_wn[mMelodyNum - 1].mPosCenter.y - 240.0f;
+ mNote[mBeat - 1] = note;
+ melodyGuideShow(note, mBeat - 1);
+ pane_bs[mBeat - 1].mUserArea = 1;
+ pos.x = pane_wn[mBeat - 1].mPosCenter.x - 320.0f;
+ pos.y = pane_wn[mBeat - 1].mPosCenter.y - 240.0f;
}
dComIfGp_particle_set2Dfore(0x23e, &pos);
@@ -374,7 +374,7 @@ void dMetronome_c::melodyShow() {
for (s32 i = 0; i < 7; i++) {
if (pane_bs[i].mUserArea != 0) {
f32 alpha = fopMsgM_valueIncrease(5, pane_bs[i].mUserArea, 0);
- if (i == mMelodyNum) {
+ if (i == mBeat) {
fopMsgM_setNowAlpha(&pane_wn[i], alpha);
fopMsgM_setNowAlpha(&pane_bs[i], alpha);
fopMsgM_setNowAlphaZero(&pane_cn[i]);
@@ -393,7 +393,7 @@ void dMetronome_c::melodyShow() {
pane_bs[i].mUserArea = 0;
}
- if (pane_wn[0].mUserArea >= mMelodyNum && pane_wn[3].mUserArea == 0 && pane_bs[mMelodyNum - 1].mUserArea == 5) {
+ if (pane_wn[0].mUserArea >= mBeat && pane_wn[3].mUserArea == 0 && pane_bs[mBeat - 1].mUserArea == 5) {
pane_wn[2].mUserArea = 5;
pane_wn[0].mUserArea = 0;
pane_wn[6].mUserArea = 0;
@@ -412,11 +412,11 @@ void dMetronome_c::melodyDemo() {
u32 melody_no = daPy_getPlayerLinkActorClass()->getTactMusic();
frames[0] = 1;
- for (s32 i = 0; i < mMelodyNum; i++) {
+ for (s32 i = 0; i < mBeat; i++) {
frames[i + 1] = frames[i] + mDoAud_tact_getMelodyPattern(melody_no, i, &note[i]);
}
- if (mMelodyNum > pane_wn[5].mUserArea) {
+ if (mBeat > pane_wn[5].mUserArea) {
if (pane_wn[4].mUserArea == frames[pane_wn[5].mUserArea]) {
pane_bs[pane_wn[5].mUserArea].mUserArea = 1;
pane_wn[5].mUserArea++;
@@ -440,7 +440,7 @@ void dMetronome_c::melodyFlash() {
pane_pk[0].mUserArea++;
if (pane_pk[0].mUserArea >= 3) {
pane_pk[0].mUserArea = 0;
- for (s32 i = 0; i < mMelodyNum; i++) {
+ for (s32 i = 0; i < mBeat; i++) {
fopMsgM_setNowAlphaZero(&pane_cn[i]);
fopMsgM_setNowAlphaZero(&pane_i11[i]);
fopMsgM_setNowAlphaZero(&pane_i12[i]);
@@ -451,7 +451,7 @@ void dMetronome_c::melodyFlash() {
alpha = fopMsgM_valueIncrease(g_mnHIO.mFlashTiming, g_mnHIO.mFlashTiming * 2 - pane_pk[1].mUserArea, 0);
}
- for (s32 i = 0; i < mMelodyNum; i++) {
+ for (s32 i = 0; i < mBeat; i++) {
pane_pk[i].mInitAlpha = g_mnHIO.mAlphaOrig;
fopMsgM_setNowAlpha(&pane_pk[i], alpha);
}
@@ -462,7 +462,7 @@ void dMetronome_c::melodyShift() {
if (pane_wn[6].mUserArea < g_mnHIO.mShiftTiming) {
pane_wn[6].mUserArea++;
} else {
- melodyInit(mMelodyNum);
+ melodyInit(mBeat);
f32 sepX = pane_bs[2].mPosCenterOrig.x - pane_bs[1].mPosCenterOrig.x;
@@ -492,7 +492,7 @@ void dMetronome_c::initialize() {
mCurRate = daPy_getPlayerLinkActorClass()->getTactMetronomeRate();
mPosX = 0.0f;
field_0xE38 = 0;
- mMelodyNum = mDoAud_zelAudio_c::mTact.mMelodyNum;
+ mBeat = mDoAud_tact_getBeat();
mAction = ACT_INIT;
field_0xE14 = 0;
@@ -522,8 +522,8 @@ void dMetronome_c::_delete() {
/* 802231F4-80223314 .text _move__12dMetronome_cFv */
void dMetronome_c::_move() {
metronomeMove();
- if (pane_wn[3].mUserArea == 0 && mMelodyNum != mDoAud_zelAudio_c::mTact.mMelodyNum) {
- mMelodyNum = mDoAud_zelAudio_c::mTact.mMelodyNum;
+ if (pane_wn[3].mUserArea == 0 && mBeat != mDoAud_tact_getBeat()) {
+ mBeat = mDoAud_tact_getBeat();
pane_wn[0].mUserArea = 0;
mAction = ACT_SHRINK;
}
@@ -532,7 +532,7 @@ void dMetronome_c::_move() {
mAction = ACT_GROW;
pane_wn[1].mUserArea = 0;
pane_wn[0].mUserArea = 0;
- melodyInit(mMelodyNum);
+ melodyInit(mBeat);
} else if (mAction == ACT_GROW) {
pane_wn[1].mUserArea++;
melodyMove();
@@ -579,12 +579,12 @@ BOOL dMetronome_c::_open() {
fopMsgM_setInitAlpha(&pane_timing[i]);
}
- mMelodyNum = mDoAud_zelAudio_c::mTact.mMelodyNum;
+ mBeat = mDoAud_tact_getBeat();
pane_wn[1].mUserArea = 0;
pane_wn[0].mUserArea = 0;
- melodyInit(mMelodyNum);
+ melodyInit(mBeat);
}
mbOpen = true;
return TRUE;