msg inline fixes, remove some fake jsystem inlines

This commit is contained in:
LagoLunatic
2026-08-07 16:40:56 -04:00
parent 5e00819c5b
commit 07b55421f9
15 changed files with 95 additions and 119 deletions
+30 -44
View File
@@ -346,17 +346,15 @@ void dMesg_tSequenceProcessor::do_character(int param_1) {
}
#endif
}
JUTFont::TWidth twidth;
f32 f31 = f32(mesgControl->getNowFontSize()) / f32(mesgControl->getMainFont()->getCellWidth());
int char_code = mesgControl->getCharCode();
mesgControl->getMainFont()->getWidthEntry(char_code, &twidth);
int tmp = twidth.field_0x1;
int width = mesgControl->getMainFont()->getWidth(char_code);
if (!mesgControl->isHeader()) {
field_0x44 += tmp * f31;
field_0x44 += width * f31;
mesgControl->setHeaderOn();
} else {
field_0x44 += tmp * f31 + mesgControl->getCharSpace();
field_0x44 += width * f31 + mesgControl->getCharSpace();
}
if (field_0x74 > 0) {
field_0x74--;
@@ -487,15 +485,14 @@ bool dMesg_tSequenceProcessor::do_tag(u32 param_1, const void* param_2, u32 para
sp14[0] = sp54[r30++];
sp14[1] = 0;
}
JUTFont::TWidth twidth;
f32 f29 = f32(mesgControl->getNowFontSize()) / f32(mesgControl->getMainFont()->getCellWidth());
mesgControl->getMainFont()->getWidthEntry(char_code, &twidth);
int temp = twidth.field_0x1;
int width = mesgControl->getMainFont()->getWidth(char_code);
if (field_0x44 == 0.0f) {
f32 temp2 = temp * f29;
f32 temp2 = width * f29;
field_0x44 = temp2;
} else {
f32 temp2 = temp * f29;
f32 temp2 = width * f29;
field_0x44 += temp2 + mesgControl->getCharSpace();
}
strcat(mMesg->text[0], sp14);
@@ -595,15 +592,13 @@ bool dMesg_tSequenceProcessor::do_tag(u32 param_1, const void* param_2, u32 para
sp10[1] = 0;
}
JUTFont::TWidth twidth;
int r25 = mesgControl->getNowFontSize();
f32 f29 = f32(r25) / f32(mesgControl->getMainFont()->getCellWidth());
mesgControl->getMainFont()->getWidthEntry(char_code, &twidth);
int tmp = twidth.field_0x1;
int width = mesgControl->getMainFont()->getWidth(char_code);
if (field_0x44 == 0.0f) {
field_0x44 = tmp * f29;
field_0x44 = width * f29;
} else {
field_0x44 += tmp * f29 + mesgControl->getCharSpace();
field_0x44 += width * f29 + mesgControl->getCharSpace();
}
strcat(mMesg->text[0], sp10);
strcat(mMesg->text[2], sp10);
@@ -667,9 +662,7 @@ char* dMesg_tSequenceProcessor::ruby_character(char* param_1, int param_2) {
int char_code = (byte << 8);
byte = src[1];
char_code |= byte;
JUTFont::TWidth twidth;
mesgControl->getRubyFont()->getWidthEntry(char_code, &twidth);
f32 tmp = (int)twidth.field_0x1;
f32 tmp = (f32)mesgControl->getRubyFont()->getWidth(char_code);
if (param_2 == 1) {
if (field_0x50 == 0.0f) {
field_0x54 = tmp * f31;
@@ -784,7 +777,6 @@ void dMesg_tMeasureProcessor::do_character(int param_1) {
dMesg_tControl* mesgControl = (dMesg_tControl*)getControl();
int r30 = field_0x50 - field_0x4c;
bool r29 = false;
JUTFont::TWidth twidth;
if (param_1 == 10) {
if (r30 >= 0 && r30 < linemax - 1) {
retFlag++;
@@ -810,13 +802,12 @@ void dMesg_tMeasureProcessor::do_character(int param_1) {
if (r29 && r30 >= 0 && r30 <= linemax) {
f32 f31 = f32(mesgControl->getNowFontSize()) / f32(mesgControl->getMainFont()->getCellWidth());
int char_code = mesgControl->getCharCode();
mesgControl->getMainFont()->getWidthEntry(char_code, &twidth);
int tmp = twidth.field_0x1;
int width = mesgControl->getMainFont()->getWidth(char_code);
if (!mesgControl->isHeader()) {
field_0x38[r30] += tmp * f31;
field_0x38[r30] += width * f31;
mesgControl->setHeaderOn();
} else {
field_0x38[r30] += mesgControl->getCharSpace() + tmp * f31;
field_0x38[r30] += mesgControl->getCharSpace() + width * f31;
}
}
}
@@ -900,16 +891,14 @@ bool dMesg_tMeasureProcessor::do_tag(u32 param_1, const void* param_2, u32 param
char_code = byte;
}
JUTFont::TWidth twidth;
int r23 = mesgControl->getNowFontSize();
f32 f30 = f32(r23) / f32(mesgControl->getMainFont()->getCellWidth());
mesgControl->getMainFont()->getWidthEntry(char_code, &twidth);
int tmp = twidth.field_0x1;
int width = mesgControl->getMainFont()->getWidth(char_code);
if (r27 >= 0 && r27 <= linemax) {
if (field_0x38[r27] == 0.0f) {
field_0x38[r27] = tmp * f30;
field_0x38[r27] = width * f30;
} else {
field_0x38[r27] += tmp * f30 + mesgControl->getCharSpace();
field_0x38[r27] += width * f30 + mesgControl->getCharSpace();
}
}
}
@@ -964,14 +953,13 @@ bool dMesg_tMeasureProcessor::do_tag(u32 param_1, const void* param_2, u32 param
#else
int char_code = 'H';
#endif
JUTFont::TWidth twidth;
f32 f29 = f32(mesgControl->getNowFontSize()) / f32(mesgControl->getMainFont()->getCellWidth());
mesgControl->getMainFont()->getWidthEntry(char_code, &twidth);
int tmp = twidth.field_0x1;
int width = mesgControl->getMainFont()->getWidth(char_code);
if (field_0x48 == 0.0f) {
field_0x48 = tmp * f29;
field_0x48 = width * f29;
} else {
field_0x48 += mesgControl->getCharSpace() + tmp * f29;
field_0x48 += mesgControl->getCharSpace() + width * f29;
}
}
r26 = true;
@@ -985,14 +973,13 @@ bool dMesg_tMeasureProcessor::do_tag(u32 param_1, const void* param_2, u32 param
#else
int char_code = 'H';
#endif
JUTFont::TWidth twidth;
f32 f29 = f32(mesgControl->getNowFontSize()) / f32(mesgControl->getMainFont()->getCellWidth());
mesgControl->getMainFont()->getWidthEntry(char_code, &twidth);
int tmp = twidth.field_0x1;
int width = mesgControl->getMainFont()->getWidth(char_code);
if (field_0x48 == 0.0f) {
field_0x48 = tmp * f29;
field_0x48 = width * f29;
} else {
field_0x48 += mesgControl->getCharSpace() + tmp * f29;
field_0x48 += mesgControl->getCharSpace() + width * f29;
}
}
r26 = true;
@@ -1021,15 +1008,14 @@ bool dMesg_tMeasureProcessor::do_tag(u32 param_1, const void* param_2, u32 param
byte = sp18[r25++];
char_code = byte;
}
JUTFont::TWidth twidth;
f32 f30 = f32(mesgControl->getNowFontSize()) / f32(mesgControl->getMainFont()->getCellWidth());
mesgControl->getMainFont()->getWidthEntry(char_code, &twidth);
int tmp = twidth.field_0x1;
int width = mesgControl->getMainFont()->getWidth(char_code);
if (r27 >= 0 && r27 <= linemax) {
if (field_0x38[r27] == 0.0f) {
field_0x38[r27] = tmp * f30;
field_0x38[r27] = width * f30;
} else {
field_0x38[r27] += tmp * f30 + mesgControl->getCharSpace();
field_0x38[r27] += width * f30 + mesgControl->getCharSpace();
}
}
}
+1 -4
View File
@@ -781,11 +781,8 @@ void dName_c::setNameText() {
for (int i = 0; i < 8; i++) {
if (chrInfo[i].field_0x3 != 0) {
JUTFont::TWidth twidth;
int character = chrInfo[i].character;
nameIn.font->getWidthEntry(character, &twidth);
f32 temp = (int)twidth.field_0x1;
f32 temp = (f32)nameIn.font->getWidth(character);
temp *= ratio;
int sp50 = temp * 10000.0f;