mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-23 06:54:16 -04:00
Fix beat/melody var names
This commit is contained in:
@@ -24,8 +24,8 @@ public:
|
||||
void melodyPlay(s32);
|
||||
void melodyStop();
|
||||
|
||||
u8 getBeat() { return mMelodyNum; }
|
||||
f32 getBeatFrames() { return field_0x30; }
|
||||
u8 getBeat() { return mBeat; }
|
||||
f32 getBeatFrames() { return mBeatFrames; }
|
||||
|
||||
public:
|
||||
/* 0x00 */ int field_0x0;
|
||||
@@ -35,12 +35,12 @@ public:
|
||||
/* 0x14 */ int field_0x14;
|
||||
/* 0x18 */ u8 field_0x18[0x1e - 0x18];
|
||||
/* 0x1E */ u8 field_0x1e;
|
||||
/* 0x1F */ u8 mMelodyNum;
|
||||
/* 0x1F */ u8 mBeat;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
/* 0x24 */ f32 field_0x24;
|
||||
/* 0x28 */ f32 field_0x28;
|
||||
/* 0x2C */ f32 field_0x2c;
|
||||
/* 0x30 */ f32 field_0x30;
|
||||
/* 0x30 */ f32 mBeatFrames;
|
||||
/* 0x34 */ u8 field_0x34;
|
||||
/* 0x38 */ int field_0x38;
|
||||
/* 0x3C */ int field_0x3c;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace daObjMknjD {
|
||||
void anmAtr(u16) {}
|
||||
u32 getMsg() {
|
||||
if (m0500 == 0) {
|
||||
dComIfGp_setMelodyNum(mTactMode);
|
||||
dComIfGp_setMelodyNum(mMelodyNum);
|
||||
return 0x05B3;
|
||||
}
|
||||
else {
|
||||
@@ -84,7 +84,7 @@ namespace daObjMknjD {
|
||||
/* 0x04E0 */ s16 mErrorEventIdx;
|
||||
/* 0x04E2 */ s16 mLessonEventIdx;
|
||||
/* 0x04E4 */ s8 mActionIdx;
|
||||
/* 0x04E5 */ u8 mTactMode;
|
||||
/* 0x04E5 */ u8 mMelodyNum;
|
||||
/* 0x04E6 */ u8 mGiveItemNo;
|
||||
/* 0x04E8 */ cXyz mGoalPos;
|
||||
/* 0x04F4 */ u32 mMsgNo;
|
||||
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
daPyRFlg0_UNK80000 = 0x00080000,
|
||||
daPyRFlg0_POISON_CURSE = 0x00100000,
|
||||
daPyRFlg0_GRAB_PUT_START = 0x00400000,
|
||||
daPyRFlg0_TACT_INPUT = 0x01000000,
|
||||
daPyRFlg0_TACT_INPUT = 0x01000000,
|
||||
daPyRFlg0_FAIRY_USE = 0x02000000,
|
||||
daPyRFlg0_UNK8000000 = 0x08000000,
|
||||
daPyRFlg0_UNK10000000 = 0x10000000,
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
/* 0xE18 */ s32 mNote[7];
|
||||
/* 0xE34 */ s32 mCurTimer;
|
||||
/* 0xE38 */ u8 field_0xE38;
|
||||
/* 0xE39 */ u8 mMelodyNum;
|
||||
/* 0xE39 */ u8 mBeat;
|
||||
/* 0xE3A */ u8 mAction;
|
||||
/* 0xE3B */ u8 mbOpen;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
+22
-22
@@ -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, ¬e[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;
|
||||
|
||||
Reference in New Issue
Block a user