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
+2 -6
View File
@@ -54,13 +54,9 @@ public:
virtual void move(f32 x, f32 y);
virtual void add(f32 x, f32 y);
// fakematch, this fake inline is only needed by the J2DPane::resize call inside of J2DWindow::resize
f32 resize__getMinX() const { return mBounds.i.x; }
virtual void resize(f32 w, f32 h) {
f32 x = resize__getMinX();
x += w;
mBounds.f.x = x;
mBounds.f.y = mBounds.i.y + h;
JGeometry::TVec2<f32> size(w, h);
mBounds.setSize(size);
}
virtual bool setConnectParent(bool connected) {
mIsConnectParent = 0;
+7 -3
View File
@@ -306,6 +306,11 @@ struct TVec2 {
y += other.y;
}
void add(const TVec2<T>& a, const TVec2<T>& b) {
x = a.x + b.x;
y = a.y + b.y;
}
bool isAbove(const TVec2<T>& other) const {
return (x >= other.x) && (y >= other.y) ? true : false;
}
@@ -346,9 +351,8 @@ template<> struct TBox<TVec2<f32> > {
addPos(TVec2<f32>(x, y));
}
void setSize(TVec2<f32> size) {
f.x = size.x;
f.y = size.y;
void setSize(const TVec2<f32>& size) {
f.add(i, size);
}
void addPos(const TVec2<f32>& pos) {
+3 -3
View File
@@ -173,15 +173,15 @@ public:
JSUTree<T>* getLastChild() const { return (JSUTree<T>*)this->getLast(); }
JSUTree<T>* getNextChild() const { return (JSUTree<T>*)this->getNext(); }
JSUTree<T>* getNextChild() const { return (JSUTree<T>*)this->mNext; }
JSUTree<T>* getPrevChild() const { return (JSUTree<T>*)this->getPrev(); }
JSUTree<T>* getPrevChild() const { return (JSUTree<T>*)this->mPrev; }
u32 getNumChildren() const { return this->getNumLinks(); }
T* getObject() const { return (T*)this->getObjectPtr(); }
JSUTree<T>* getParent() const { return (JSUTree<T>*)this->getList(); }
JSUTree<T>* getParent() const { return (JSUTree<T>*)this->mList; }
};
template <typename T>
-4
View File
@@ -8,10 +8,6 @@
struct JUTDataBlockHeader {
/* 0x00 */ u32 mType;
/* 0x04 */ u32 mSize;
const JUTDataBlockHeader* getNext() const { // fake inline
return reinterpret_cast<const JUTDataBlockHeader*>(reinterpret_cast<const u8*>(this) + mSize);
}
};
struct JUTDataFileHeader { // actual struct name unknown
+2 -2
View File
@@ -14,7 +14,7 @@ u32 fopScnM_ReRequest(s16, u32);
void fopScnM_Management(void);
void fopScnM_Init(void);
inline u32 fpcM_LayerID(const void* pProc) {
inline u32 fpcM_LayerID(void* pProc) {
if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)pProc)->mSubType)) {
return ((scene_class*)pProc)->base.mLayer.mLayerID;
} else {
@@ -22,7 +22,7 @@ inline u32 fpcM_LayerID(const void* pProc) {
}
}
inline layer_class * fpcM_Layer(const void* pProc) {
inline layer_class* fpcM_Layer(void* pProc) {
return &((process_node_class*)pProc)->mLayer;
}
+1 -3
View File
@@ -237,9 +237,7 @@ f32 J2DPrint::parse(const u8* param_1, int param_2, int param_3, u16* param_4, J
if (mFont->isFixed()) {
field_0x34 = mFont->getFixedWidth();
} else {
JUTFont::TWidth uStack_ec;
mFont->getWidthEntry(r27, &uStack_ec);
field_0x34 = uStack_ec.field_0x1;
field_0x34 = (u32)mFont->getWidth(r27);
}
field_0x34 *= field_0x18 / mFont->getCellWidth();
+4 -4
View File
@@ -205,7 +205,7 @@ J3DAnmBase* J3DAnmFullLoader_v15::load(const void* dst) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
return mAnm;
}
@@ -250,7 +250,7 @@ void J3DAnmFullLoader_v15::setResource(J3DAnmBase* dst, const void* data) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
}
@@ -397,7 +397,7 @@ J3DAnmBase* J3DAnmKeyLoader_v15::load(const void* dst) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
return mAnm;
}
@@ -442,7 +442,7 @@ void J3DAnmKeyLoader_v15::setResource(J3DAnmBase* dst, const void* data) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
}
@@ -45,7 +45,7 @@ void* J3DClusterLoader_v15::load(const void* i_data) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
return mpDeformData;
@@ -104,7 +104,7 @@ J3DModelData* J3DModelLoader::load(const void* i_data, u32 i_flags) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
const J3DModelHierarchy* hierarchy = mpModelData->getHierarchy();
mpModelData->makeHierarchy(NULL, &hierarchy);
@@ -139,7 +139,7 @@ J3DMaterialTable* J3DModelLoader::loadMaterialTable(const void* i_data) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
if (mpMaterialTable->getTexture() == NULL) {
mpMaterialTable->setTexture(new J3DTexture(0, NULL));
@@ -199,7 +199,7 @@ J3DModelData* J3DModelLoader::loadBinaryDisplayList(const void* i_data, u32 i_fl
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
J3DModelHierarchy const* hierarchy = mpModelData->getHierarchy();
mpModelData->makeHierarchy(NULL, &hierarchy);
@@ -17,10 +17,11 @@
u16 J3DModelLoader::countMaterialNum(const void* i_data) {
const JUTDataFileHeader* header = (const JUTDataFileHeader*)i_data;
const JUTDataBlockHeader* block = &header->mFirstBlock;
for (int i = 0; i < header->mBlockNum; block = block->getNext(), i++) {
for (int i = 0; i < header->mBlockNum; i++) {
if (block->mType == 'MAT3') {
return ((const J3DMaterialBlock*)block)->mMaterialNum;
}
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
return 0;
}
@@ -63,7 +64,7 @@ u32 J3DModelLoader::calcLoadSize(const void* i_data, u32 i_flags) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
return size;
}
@@ -91,7 +92,7 @@ u32 J3DModelLoader::calcLoadMaterialTableSize(const void* i_data) {
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
if (!hasTextureTable) {
@@ -150,7 +151,7 @@ u32 J3DModelLoader::calcLoadBinaryDisplayListSize(const void* i_data, u32 i_flag
OSReport("Unknown data block\n");
break;
}
block = block->getNext();
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
return size;
}
+12 -10
View File
@@ -110,9 +110,9 @@ void JUTResFont::countBlock() {
mGlyphBlockNum = 0;
mMapBlockNum = 0;
const JUTDataBlockHeader* header = (JUTDataBlockHeader*)mResFont->data;
for (u32 i = 0; i < mResFont->numBlocks; i++, header = header->getNext()) {
switch (header->mType) {
const JUTDataBlockHeader* block = (JUTDataBlockHeader*)mResFont->data;
for (u32 i = 0; i < mResFont->numBlocks; i++) {
switch (block->mType) {
case 'WID1':
mWidthBlockNum++;
break;
@@ -127,6 +127,7 @@ void JUTResFont::countBlock() {
default:
JUTReportConsole("JUTResFont: Unknown data block\n");
}
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
}
@@ -137,26 +138,26 @@ void JUTResFont::setBlock() {
int mapNum = 0;
mMaxCode = -1;
const JUTDataBlockHeader* header = (JUTDataBlockHeader*)mResFont->data;
for (u32 i = 0; i < mResFont->numBlocks; i++, header = header->getNext()) {
switch (header->mType) {
const JUTDataBlockHeader* block = (JUTDataBlockHeader*)mResFont->data;
for (u32 i = 0; i < mResFont->numBlocks; i++) {
switch (block->mType) {
case 'INF1': {
mInfoBlock = (ResFONT::INF1*)header;
mInfoBlock = (ResFONT::INF1*)block;
u32 u = mInfoBlock->fontType;
JUT_ASSERT(0xF3, u < suAboutEncoding_)
mIsLeadByte = (IsLeadByte_func*)&saoAboutEncoding_[u];
break;
}
case 'WID1':
mpWidthBlocks[widthNum] = (ResFONT::WID1*)header;
mpWidthBlocks[widthNum] = (ResFONT::WID1*)block;
widthNum++;
break;
case 'GLY1':
mpGlyphBlocks[glyphNum] = (ResFONT::GLY1*)header;
mpGlyphBlocks[glyphNum] = (ResFONT::GLY1*)block;
glyphNum++;
break;
case 'MAP1':
mpMapBlocks[mapNum] = (ResFONT::MAP1*)header;
mpMapBlocks[mapNum] = (ResFONT::MAP1*)block;
if (mMaxCode > mpMapBlocks[mapNum]->startCode) {
mMaxCode = mpMapBlocks[mapNum]->startCode;
}
@@ -166,6 +167,7 @@ void JUTResFont::setBlock() {
JUTReportConsole("Unknown data block\n");
break;
}
block = (JUTDataBlockHeader*)((u8*)block + block->mSize);
}
}
+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;
+20 -24
View File
@@ -1556,14 +1556,14 @@ mesg_header* fopMsgM_msgGet_c::getMesgHeader(u32 i_msgNo) {
sprintf(path, "zel_e%02d.bmg", mGroupID);
}
JKRArchive* arc = dComIfGp_getMsgDtArchive();
return (mesg_header*)JKRArchive::getGlbResource('ROOT', path, arc);
return (mesg_header*)JKRGetTypeResource('ROOT', path, arc);
#else
if (fopMsgM_hyrule_language_check(i_msgNo)) {
JKRArchive* arc = dComIfGp_getMsgDt2Archive();
return (mesg_header*)JKRArchive::getGlbResource('ROOT', "zel_01.bmg", arc);
return (mesg_header*)JKRGetTypeResource('ROOT', "zel_01.bmg", arc);
} else {
JKRArchive* arc = dComIfGp_getMsgDtArchive();
return (mesg_header*)JKRArchive::getGlbResource('ROOT', "zel_00.bmg", arc);
return (mesg_header*)JKRGetTypeResource('ROOT', "zel_00.bmg", arc);
}
#endif
}
@@ -1575,7 +1575,8 @@ mesg_info* fopMsgM_msgGet_c::getMesgInfo(mesg_header* i_head) {
/* 8002E2E0-8002E308 .text getMesgData__16fopMsgM_msgGet_cFP11mesg_header */
mesg_data* fopMsgM_msgGet_c::getMesgData(mesg_header* i_head) {
return (mesg_data*)getMesgInfo(i_head)->getNext();
mesg_info* info = getMesgInfo(i_head);
return (mesg_data*)((u8*)info + info->mSize);
}
/* 8002E308-8002E378 .text getMesgEntry__16fopMsgM_msgGet_cFP11mesg_header */
@@ -1621,14 +1622,14 @@ mesg_header* fopMsgM_itemMsgGet_c::getMesgHeader(u32 i_msgNo) {
sprintf(path, "zel_e%02d.bmg", groupID);
}
JKRArchive* arc = dComIfGp_getMsgDtArchive();
return (mesg_header*)JKRArchive::getGlbResource('ROOT', path, arc);
return (mesg_header*)JKRGetTypeResource('ROOT', path, arc);
#else
if (fopMsgM_hyrule_language_check(i_msgNo)) {
JKRArchive* arc = dComIfGp_getMsgDt2Archive();
return (mesg_header*)JKRArchive::getGlbResource('ROOT', "zel_01.bmg", arc);
return (mesg_header*)JKRGetTypeResource('ROOT', "zel_01.bmg", arc);
} else {
JKRArchive* arc = dComIfGp_getMsgDtArchive();
return (mesg_header*)JKRArchive::getGlbResource('ROOT', "zel_00.bmg", arc);
return (mesg_header*)JKRGetTypeResource('ROOT', "zel_00.bmg", arc);
}
#endif
}
@@ -1640,7 +1641,8 @@ mesg_info* fopMsgM_itemMsgGet_c::getMesgInfo(mesg_header* i_head) {
/* 8002E4B4-8002E4DC .text getMesgData__20fopMsgM_itemMsgGet_cFP11mesg_header */
mesg_data* fopMsgM_itemMsgGet_c::getMesgData(mesg_header* i_head) {
return (mesg_data*)getMesgInfo(i_head)->getNext();
mesg_info* info = getMesgInfo(i_head);
return (mesg_data*)((u8*)info + info->mSize);
}
/* 8002E4DC-8002E54C .text getMesgEntry__20fopMsgM_itemMsgGet_cFP11mesg_header */
@@ -1743,7 +1745,7 @@ fopMsgM_msgDataProc_c::fopMsgM_msgDataProc_c() {
actorPosition = NULL;
field_0x299 = 0;
field_0x29A = 0;
selectFlag = Select_OFF;
setSelectFlagOff();
field_0x29B = 0;
autoSendFlag = 0;
handSendFlag = 0;
@@ -1825,7 +1827,7 @@ void fopMsgM_msgDataProc_c::dataInit() {
}
field_0x299 = 0;
field_0x29A = 0;
selectFlag = Select_OFF;
setSelectFlagOff();
field_0x29B = 0;
autoSendFlag = 0;
handSendFlag = 0;
@@ -1838,9 +1840,7 @@ void fopMsgM_msgDataProc_c::dataInit() {
/* 8002E95C-8002EA58 .text charLength__21fopMsgM_msgDataProc_cFiib */
f32 fopMsgM_msgDataProc_c::charLength(int i_scale, int i_charNo, bool param_2) {
JUTFont::TWidth width;
font->getWidthEntry(i_charNo, &width);
f32 charWidth = (f32)(int)width.field_0x1;
f32 charWidth = (f32)font->getWidth(i_charNo);
f32 cellWidth = (f32)i_scale / (f32)font->getCellWidth();
if (param_2) {
@@ -1852,22 +1852,18 @@ f32 fopMsgM_msgDataProc_c::charLength(int i_scale, int i_charNo, bool param_2) {
/* 8002EA58-8002EB4C .text rubyLength__21fopMsgM_msgDataProc_cFib */
f32 fopMsgM_msgDataProc_c::rubyLength(int i_charNo, bool param_2) {
JUTFont::TWidth width;
rubyFont->getWidthEntry(i_charNo, &width);
s32 advance = width.field_0x1;
int width = rubyFont->getWidth(i_charNo);
f32 cellWidth = rubyFont->getCellWidth();
f32 temp = ((s32)rubyFontSize / cellWidth);
if (param_2) {
#if VERSION == VERSION_DEMO
JUTFont::TWidth width2;
rubyFont->getWidthEntry(i_charNo, &width2);
return (f32)(advance + width2.field_0x0) * temp;
return (f32)(width + rubyFont->getOffset(i_charNo)) * temp;
#else
return (f32)advance * temp;
return (f32)width * temp;
#endif
}
return (s32)rubyCharSpace + advance * temp;
return (s32)rubyCharSpace + width * temp;
}
/* 8002EB4C-80031064 .text stringLength__21fopMsgM_msgDataProc_cFv */
@@ -4158,8 +4154,8 @@ void fopMsgM_msgDataProc_c::stringSet() {
) {
#if VERSION <= VERSION_JPN
int i = 0;
char buf[20];
int num = dComIfGp_getMessageCountNumber();
fopMsgM_int_to_char(buf, num, false);
@@ -5800,7 +5796,7 @@ u8 fopMsgM_itemNum(u8 i_itemNo) {
/* 80035060-800350B8 .text fopMsgM_getColorTable__FUs */
u32 fopMsgM_getColorTable(u16 i_colorNo) {
JKRArchive* arc = dComIfGp_getMsgDtArchive();
JUTDataFileHeader* bmc = (JUTDataFileHeader*)JKRArchive::getGlbResource('ROOT', "color.bmc", arc);
JUTDataFileHeader* bmc = (JUTDataFileHeader*)JKRGetTypeResource('ROOT', "color.bmc", arc);
clt1_header* clt1 = (clt1_header*)&bmc->mFirstBlock;
return clt1->mColors[i_colorNo];
}
@@ -10194,7 +10190,7 @@ void fopMsgM_setFontsizeCenter2(char* param_1, char* param_2, char* param_3, cha
/* 8003C414-8003C450 .text fopMsgM_createExpHeap__FUl */
JKRExpHeap* fopMsgM_createExpHeap(u32 i_size) {
return JKRExpHeap::create(i_size, mDoExt_getGameHeap(), FALSE);
return JKRCreateExpHeap(i_size, mDoExt_getGameHeap(), FALSE);
}
/* 8003C450-8003C470 .text fopMsgM_destroyExpHeap__FP10JKRExpHeap */
+4 -4
View File
@@ -849,7 +849,7 @@ JKRExpHeap* gameHeap;
/* 80011734-800117E4 .text mDoExt_createGameHeap__FUlP7JKRHeap */
JKRExpHeap* mDoExt_createGameHeap(u32 heapSize, JKRHeap* i_heap) {
JUT_ASSERT(VERSION_SELECT(2036, 2035, 2050, 2050), gameHeap == NULL || heapSize == 0);
gameHeap = JKRExpHeap::create(heapSize, i_heap, true);
gameHeap = JKRCreateExpHeap(heapSize, i_heap, true);
#if VERSION > VERSION_DEMO
gameHeap->setAllocationMode(JKRExpHeap::ALLOC_MODE_1);
#endif
@@ -880,7 +880,7 @@ JKRExpHeap* zeldaHeap;
/* 8001181C-800118C0 .text mDoExt_createZeldaHeap__FUlP7JKRHeap */
JKRExpHeap* mDoExt_createZeldaHeap(u32 heapSize, JKRHeap* i_heap) {
JUT_ASSERT(VERSION_SELECT(2081, 2097, 2112, 2112), zeldaHeap == NULL || heapSize == 0);
return zeldaHeap = JKRExpHeap::create(heapSize, i_heap, true);
return zeldaHeap = JKRCreateExpHeap(heapSize, i_heap, true);
}
/* 800118C0-800118C8 .text mDoExt_getZeldaHeap__Fv */
@@ -907,7 +907,7 @@ JKRExpHeap* commandHeap;
/* 800118F8-8001199C .text mDoExt_createCommandHeap__FUlP7JKRHeap */
JKRExpHeap* mDoExt_createCommandHeap(u32 heapSize, JKRHeap* i_heap) {
JUT_ASSERT(VERSION_SELECT(2126, 2158, 2173, 2173), commandHeap == NULL || heapSize == 0);
return commandHeap = JKRExpHeap::create(heapSize, i_heap, true);
return commandHeap = JKRCreateExpHeap(heapSize, i_heap, true);
}
/* 8001199C-800119A4 .text mDoExt_getCommandHeap__Fv */
@@ -934,7 +934,7 @@ JKRExpHeap* archiveHeap;
/* 800119D4-80011A84 .text mDoExt_createArchiveHeap__FUlP7JKRHeap */
JKRExpHeap* mDoExt_createArchiveHeap(u32 heapSize, JKRHeap* i_heap) {
JUT_ASSERT(VERSION_SELECT(2173, 2222, 2237, 2237), archiveHeap == NULL || heapSize == 0);
archiveHeap = JKRExpHeap::create(heapSize, i_heap, true);
archiveHeap = JKRCreateExpHeap(heapSize, i_heap, true);
#if VERSION > VERSION_DEMO
archiveHeap->setAllocationMode(JKRExpHeap::ALLOC_MODE_1);
#endif