mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-30 07:34:37 -04:00
Misc Matches using debug (#2388)
This commit is contained in:
@@ -236,7 +236,6 @@ u32 const JAUStdSoundTableType::STRM_CH_SHIFT = 2;
|
||||
|
||||
/* 802BB8E0-802BBA10 2B6220 0130+00 1/0 0/0 0/0 .text
|
||||
* getStreamInfo__11Z2SoundInfoCF10JAISoundIDP9JAIStream */
|
||||
// NONMATCHING regalloc
|
||||
void Z2SoundInfo::getStreamInfo(JAISoundID param_1, JAIStream* param_2) const {
|
||||
int numChild;
|
||||
JAUSoundTableItem* data;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: Z2SpeechMgr2
|
||||
// Z2SpeechMgr2
|
||||
//
|
||||
|
||||
#include "Z2AudioLib/Z2SpeechMgr2.h"
|
||||
@@ -364,7 +363,7 @@ Z2SpeechMgr2::Z2SpeechMgr2() : JASGlobalInstance<Z2SpeechMgr2>(true), random(0)
|
||||
|
||||
/* 802CBD88-802CBF60 2C66C8 01D8+00 1/0 1/1 0/0 .text setString__12Z2SpeechMgr2FPCUssUcUs
|
||||
*/
|
||||
void Z2SpeechMgr2::setString(u16 const* i_text, s16 i_textNum, u8 i_speaker, u16 i_mood) {
|
||||
void Z2SpeechMgr2::setString(u16 const* s, s16 i_textNum, u8 i_speaker, u16 i_mood) {
|
||||
switch (i_speaker) {
|
||||
case 0x13:
|
||||
case 0x15:
|
||||
@@ -487,15 +486,21 @@ void Z2SpeechMgr2::setString(u16 const* i_text, s16 i_textNum, u8 i_speaker, u16
|
||||
mText[i] = 0;
|
||||
}
|
||||
|
||||
JUT_ASSERT(383, s != 0);
|
||||
|
||||
if (i_textNum > 500) {
|
||||
mTextNum = 500;
|
||||
JUT_WARN(387, "TOO MANY TEXT : now(%d) > max(%d)", i_textNum, 500);
|
||||
JUT_WARN_1(387, "TOO MANY TEXT : now(%d) > max(%d)", i_textNum, 500);
|
||||
} else {
|
||||
mTextNum = i_textNum;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
for (int i = 0; i <= mTextNum; i++) {
|
||||
#else
|
||||
for (int i = 0; i < mTextNum; i++) {
|
||||
mText[i] = i_text[i];
|
||||
#endif
|
||||
mText[i] = s[i];
|
||||
}
|
||||
|
||||
mTextCount = 0;
|
||||
@@ -514,7 +519,11 @@ void Z2SpeechMgr2::setString(u16 const* i_text, s16 i_textNum, u8 i_speaker, u16
|
||||
void Z2SpeechMgr2::setTextCount(s16 i_textCount) {
|
||||
if (mVoice != 99) {
|
||||
field_0x3ff = 0x0;
|
||||
|
||||
#ifndef DEBUG
|
||||
i_textCount = (i_textCount == 0) ? 0 : i_textCount - 1;
|
||||
#endif
|
||||
|
||||
bool all_text = false;
|
||||
if (mTextCount == 0 && i_textCount >= mTextNum) {
|
||||
all_text = true;
|
||||
@@ -587,8 +596,8 @@ void Z2SpeechMgr2::speakOneWord(bool param_0) {
|
||||
}
|
||||
u32 sound = mMood + Z2SE_HYL_MDN_RPLY;
|
||||
f32 fVar1 = Z2GetSceneMgr()->getRoomReverb() / 127.0f;
|
||||
mSpeech.startSound(sound, &field_0x0, NULL, 0,
|
||||
fVar1, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
bool soundStarted =
|
||||
mSpeech.startSound(sound, &field_0x0, NULL, 0, fVar1, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
mSpeech.setPortData(&field_0x0, 8, field_0x402[field_0x401 - 1] + 1, -1);
|
||||
if (field_0x400 == 0) {
|
||||
selectUnit(param_0);
|
||||
@@ -690,7 +699,6 @@ typedef struct {
|
||||
} Z2ConnectCost;
|
||||
|
||||
/* 802CC4C0-802CC738 2C6E00 0278+00 2/2 0/0 0/0 .text selectUnit__12Z2SpeechMgr2Fb */
|
||||
// NONMATCHING minor regalloc
|
||||
void Z2SpeechMgr2::selectUnit(bool param_0) {
|
||||
Z2ConnectCost cost[5];
|
||||
|
||||
@@ -705,14 +713,14 @@ void Z2SpeechMgr2::selectUnit(bool param_0) {
|
||||
|
||||
if (field_0x401 != 0 && param_0) {
|
||||
cVar5 = 0;
|
||||
ZVar2 = field_0x402[field_0x401 - 1];
|
||||
s8 ZVar4 = field_0x402[field_0x401 - 1];
|
||||
|
||||
while (true) {
|
||||
bool bVar1 = false;
|
||||
ZVar3 = random.get_uint8(Z2MdnPrm::sPrm[mMood].field_0x8);
|
||||
ZVar2 = random.get_uint8(Z2MdnPrm::sPrm[mMood].field_0x8);
|
||||
|
||||
for (int i = 0; i < field_0x401; i++) {
|
||||
if (field_0x402[i] == ZVar3) {
|
||||
if (field_0x402[i] == ZVar2) {
|
||||
bVar1 = true;
|
||||
break;
|
||||
}
|
||||
@@ -723,7 +731,7 @@ void Z2SpeechMgr2::selectUnit(bool param_0) {
|
||||
}
|
||||
|
||||
for (int i = 0; i < cVar5; i++) {
|
||||
if (ZVar3 == cost[i].field_0x0) {
|
||||
if (ZVar2 == cost[i].field_0x0) {
|
||||
bVar1 = true;
|
||||
break;
|
||||
}
|
||||
@@ -733,23 +741,25 @@ void Z2SpeechMgr2::selectUnit(bool param_0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
u8 local_3f = JMAAbs(Z2MdnPrm::sPrm[mMood].field_0x0[ZVar3 * 2]
|
||||
- Z2MdnPrm::sPrm[mMood].field_0x0[ZVar2 * 2 + 1]);
|
||||
cost[cVar5] = (Z2ConnectCost){ZVar3, local_3f};
|
||||
const u8 (*prm)[2] = (u8 (*)[2])Z2MdnPrm::sPrm[mMood].field_0x0;
|
||||
u8 local_3f = JMAAbs(prm[ZVar2][0] - prm[ZVar4][1]);
|
||||
Z2ConnectCost connectCost = {ZVar2, local_3f};
|
||||
cost[cVar5] = connectCost;
|
||||
cVar5++;
|
||||
|
||||
if (cVar5 == 5) {
|
||||
u16 tmp = cost[0].field_0x1;
|
||||
ZVar2 = cost[0].field_0x0;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (cost[i].field_0x1 < tmp) {
|
||||
tmp = cost[i].field_0x1;
|
||||
ZVar2 = cost[i].field_0x0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
u16 tmp = cost[0].field_0x1;
|
||||
ZVar2 = cost[0].field_0x0;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (cost[i].field_0x1 < tmp) {
|
||||
tmp = cost[i].field_0x1;
|
||||
ZVar2 = cost[i].field_0x0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
field_0x402[field_0x401] = ZVar2;
|
||||
@@ -757,7 +767,6 @@ void Z2SpeechMgr2::selectUnit(bool param_0) {
|
||||
}
|
||||
|
||||
/* 802CC738-802CC9D0 2C7078 0298+00 1/1 0/0 0/0 .text selectTail__12Z2SpeechMgr2Fv */
|
||||
// NONMATCHING minor regalloc
|
||||
void Z2SpeechMgr2::selectTail() {
|
||||
Z2ConnectCost cost[5];
|
||||
s8 cVar9 = 0;
|
||||
@@ -791,7 +800,8 @@ void Z2SpeechMgr2::selectTail() {
|
||||
if (!bVar5) {
|
||||
u8 local_3f = JMAAbs(Z2MdnPrm::sPrm[mMood].field_0x4[ZVar6]
|
||||
- Z2MdnPrm::sPrm[mMood].field_0x0[ZVar1 * 2 + 1]);
|
||||
cost[cVar9] = (Z2ConnectCost){ZVar6, local_3f};
|
||||
Z2ConnectCost connectCost = {ZVar6, local_3f};
|
||||
cost[cVar9] = connectCost;
|
||||
cVar9++;
|
||||
|
||||
if (cVar9 == bVar3 || cVar9 == 5) {
|
||||
|
||||
Reference in New Issue
Block a user