mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-26 06:16:24 -04:00
Misc Matches using debug (#2388)
This commit is contained in:
+34
-18
@@ -1,6 +1,5 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: msg/scrn/d_msg_scrn_item
|
||||
// Item Message Screen
|
||||
//
|
||||
|
||||
#include "d/d_msg_scrn_item.h"
|
||||
@@ -13,7 +12,9 @@
|
||||
#include "d/d_meter_HIO.h"
|
||||
#include "d/d_item_data.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "JSystem/J2DGraph/J2DAnmLoader.h"
|
||||
#include "JSystem/J2DGraph/J2DScreen.h"
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
@@ -32,6 +33,13 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
|
||||
int iVar6 = dMsgObject_getMessageID();
|
||||
bool bVar5 = false;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (dMsgObject_getMessageID() >= 0x10cc && dMsgObject_getMessageID() < 0x11cc) {
|
||||
mItemIndex = dMsgObject_getMessageID() - 0x10cc;
|
||||
bVar5 = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (iVar6 >= 0x645 && iVar6 <= 0x648) {
|
||||
mItemIndex = iVar6 - 0x641;
|
||||
bVar5 = true;
|
||||
@@ -95,6 +103,7 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isOugiID()) {
|
||||
JKRReadIdxResource(mpItemTex[0], 0xc00, 0x3d, dComIfGp_getItemIconArchive());
|
||||
field_0x0e0[0] = (ResTIMG*)mpItemTex[0];
|
||||
@@ -348,23 +357,29 @@ void dMsgScrnItem_c::exec() {
|
||||
}
|
||||
|
||||
/* 8023FB24-8023FF30 23A464 040C+00 1/0 0/0 0/0 .text drawSelf__14dMsgScrnItem_cFv */
|
||||
// NONMATCHING Issues with float regs order
|
||||
void dMsgScrnItem_c::drawSelf() {
|
||||
J2DGrafContext* grafContext = dComIfGp_getCurrentGrafPort();
|
||||
grafContext->setup2D();
|
||||
u8* iVar6 = (u8*)mCharInfoPtr;
|
||||
if (*(s16*)(iVar6 + 0x1068) > 0) {
|
||||
s16* pLen = (short*)((u8*)mCharInfoPtr + 0x1068);
|
||||
if (*pLen > 0) {
|
||||
f32 dVar12 = mpTm_c[0]->getAlphaRate();
|
||||
for (int i = 0; i < *(short*)(iVar6 + 0x1068); i = i + 1) {
|
||||
for (int i = 0; i < *pLen; i = i + 1) {
|
||||
mpLight_c->draw(&mCharInfoPtr[i].field_0x14, mCharInfoPtr[i].field_0x00,
|
||||
mCharInfoPtr[i].field_0x04, mCharInfoPtr[i].field_0x08,
|
||||
mCharInfoPtr[i].field_0x0c,
|
||||
dVar12 * g_MsgObject_HIO_c.mBoxItemHaloAlpha, mCharInfoPtr[i].mColorNo);
|
||||
}
|
||||
}
|
||||
mpTm_c[0]->getGlobalPosX();
|
||||
drawOutFont(g_MsgObject_HIO_c.mBoxItemTextPosX - 2.0f, g_MsgObject_HIO_c.mBoxItemTextPosY,
|
||||
1.0f);
|
||||
|
||||
f32 globalPosX = mpTm_c[0]->getGlobalPosX();
|
||||
if (mDoGph_gInf_c::isWide()) {
|
||||
drawOutFont(g_MsgObject_HIO_c.mBoxItemTextPosX + 7.0f + YREG_F(2),
|
||||
g_MsgObject_HIO_c.mBoxItemTextPosY, 1.0f);
|
||||
} else {
|
||||
drawOutFont(g_MsgObject_HIO_c.mBoxItemTextPosX - 2.0f + YREG_F(2),
|
||||
g_MsgObject_HIO_c.mBoxItemTextPosY, 1.0f);
|
||||
}
|
||||
|
||||
mpTxScreen->draw(0.0f, 0.0f, grafContext);
|
||||
mpSelect_c->draw(0.0f, 0.0f);
|
||||
mpArrow_c->draw();
|
||||
@@ -414,17 +429,19 @@ void dMsgScrnItem_c::drawSelf() {
|
||||
if (g_drawHIO.mItemScaleAdjustON == true) {
|
||||
texScale = (g_drawHIO.mItemScalePercent / 100.0f);
|
||||
} else if (mItemIndex >= 0 && mItemIndex <= 0xff) {
|
||||
texScale = dItem_data::item_resource[(u8)mItemIndex].getTexScale() / 100.0f;
|
||||
texScale = dItem_data::getTexScale(mItemIndex) / 100.0f;
|
||||
} else {
|
||||
texScale = 1.0f;
|
||||
};
|
||||
// operation order is wrong here
|
||||
mpItemPane[i]->draw(
|
||||
mpScreen->search('set_it_n')->getGlbBounds().i.x + g_MsgObject_HIO_c.mBoxItemPosX +
|
||||
(field_0x174 - (field_0x17c * texScale)) / 2,
|
||||
mpScreen->search('set_it_n')->getGlbBounds().i.y + g_MsgObject_HIO_c.mBoxItemPosY +
|
||||
(field_0x170 - (field_0x178 * texScale)) / 2,
|
||||
field_0x19e, false, false);
|
||||
|
||||
mpItemPane[i]->draw(mpScreen->search('set_it_n')->getGlbBounds().i.x +
|
||||
0.5f * (field_0x170 - (field_0x178 * texScale)) +
|
||||
g_MsgObject_HIO_c.mBoxItemPosX,
|
||||
mpScreen->search('set_it_n')->getGlbBounds().i.y +
|
||||
0.5f * (field_0x174 - (field_0x17c * texScale)) +
|
||||
g_MsgObject_HIO_c.mBoxItemPosY,
|
||||
field_0x178 * texScale, field_0x17c * texScale, field_0x19e, false,
|
||||
false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -596,7 +613,6 @@ void dMsgScrnItem_c::fukiPosCalc(u8 param_1) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 8024074C-802407E8 23B08C 009C+00 1/1 0/0 0/0 .text
|
||||
* setBtk0Animation__14dMsgScrnItem_cFP19J2DAnmTextureSRTKey */
|
||||
void dMsgScrnItem_c::setBtk0Animation(J2DAnmTextureSRTKey* param_1) {
|
||||
|
||||
Reference in New Issue
Block a user