mirror of
https://github.com/zeldaret/tp
synced 2026-08-21 22:41:04 -04:00
daTagQs_c OK (#2200)
* daTagQs_c OK * clean up d_a_tag_shop_camera * daTagTWGate_c OK * daTagWljump_c: Update names and includes * Make fopAcM_cullingCheck compilable * Remove dolasm include * dMenu_Collect2D_c::screenSet matches * Minor work on d_menu files * dMenu_Option_c OK
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "d/msg/d_msg_object.h"
|
||||
#include "d/msg/d_msg_string.h"
|
||||
#include "d/pane/d_pane_class.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_lib.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/os.h"
|
||||
#include "dolphin/types.h"
|
||||
@@ -1169,7 +1171,7 @@ SECTION_SDATA2 static f32 lit_5173 = 0.5f;
|
||||
SECTION_SDATA2 static f32 lit_5174 = -1000.0f;
|
||||
|
||||
/* 801B074C-801B1C3C 1AB08C 14F0+00 1/1 0/0 0/0 .text screenSet__17dMenu_Collect2D_cFv */
|
||||
// issues with addi instructions
|
||||
// Matches with literals
|
||||
#ifdef NONMATCHING
|
||||
void dMenu_Collect2D_c::screenSet() {
|
||||
static_cast<J2DTextBox*>(mpScreen->search('f_t00'))->setFont(mDoExt_getRubyFont());
|
||||
@@ -1187,8 +1189,8 @@ void dMenu_Collect2D_c::screenSet() {
|
||||
0x60, static_cast<J2DTextBox*>(mpScreen->search(ftext_sv[i]))->getStringPtr(), NULL);
|
||||
dMeter2Info_getStringKanji(
|
||||
0x5F, static_cast<J2DTextBox*>(mpScreen->search(ftext_op[i]))->getStringPtr(), NULL);
|
||||
mpScreen->search(ftext_sv[i])->hide();
|
||||
mpScreen->search(ftext_op[i])->hide();
|
||||
mpScreen->search(text_sv[i])->hide();
|
||||
mpScreen->search(text_op[i])->hide();
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
@@ -1444,8 +1446,8 @@ void dMenu_Collect2D_c::screenSet() {
|
||||
field_0x1d8[0][3] = field_0x184[0][3] + 0x100;
|
||||
field_0x1d8[1][3] = field_0x184[1][3] + 0x100;
|
||||
field_0x1d8[2][3] = 0x5b9;
|
||||
field_0x1d8[2][3] = 0x5b1;
|
||||
field_0x1d8[3][3] = 0;
|
||||
field_0x1d8[3][3] = 0x5b1;
|
||||
field_0x1d8[4][3] = 0;
|
||||
field_0x1d8[5][3] = 0;
|
||||
field_0x1d8[6][3] = 0;
|
||||
field_0x1d8[0][4] = dMsgObject_getSmellTypeMessageID() + 0x100;
|
||||
@@ -1735,6 +1737,227 @@ SECTION_SDATA2 static f32 lit_5531 = -1.0f;
|
||||
|
||||
/* 801B1FAC-801B27EC 1AC8EC 0840+00 1/1 0/0 0/0 .text cursorMove__17dMenu_Collect2D_cFv
|
||||
*/
|
||||
// goto logic is wrong
|
||||
#ifdef NONMATCHING
|
||||
void dMenu_Collect2D_c::cursorMove() {
|
||||
u8 dVar1 = mCursorX;
|
||||
u8 dVar2 = mCursorY;
|
||||
mpStick->checkTrigger();
|
||||
if (mpStick->checkRightTrigger()) {
|
||||
if (mCursorX < 6) {
|
||||
if (mCursorX == 0 && mCursorY == 0 &&
|
||||
field_0x259 >= 3 && field_0x25a < 3)
|
||||
{
|
||||
mCursorX = field_0x259;
|
||||
mCursorY = field_0x25a;
|
||||
} else {
|
||||
do {
|
||||
mCursorX++;
|
||||
if (mCursorX == 6 && mCursorY < 3) {
|
||||
if (field_0x22d[6][0] != 0) {
|
||||
if (getItemTag(6, 0, false) && field_0x22d[6][0] != 0) {
|
||||
mCursorX = 6;
|
||||
mCursorY = 0;
|
||||
}
|
||||
} else {
|
||||
mCursorX = dVar1;
|
||||
mCursorY = dVar2;
|
||||
goto LAB_802ba744;
|
||||
}
|
||||
}
|
||||
if (dVar1 == 4 && dVar2 == 1) {
|
||||
mCursorX = 5;
|
||||
mCursorY = 0;
|
||||
goto LAB_802ba744;
|
||||
}
|
||||
if (getItemTag(mCursorX, mCursorY, true)) {
|
||||
goto LAB_802ba744;
|
||||
}
|
||||
} while (mCursorX < 6);
|
||||
mCursorX = dVar1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mpStick->checkLeftTrigger() && mCursorX != 0) {
|
||||
if (mCursorX == 6 &&
|
||||
mCursorY == 0 && field_0x259 >= 3 &&
|
||||
field_0x25a < 3)
|
||||
{
|
||||
mCursorX = field_0x259;
|
||||
mCursorY = field_0x25a;
|
||||
} else if (dVar1 == 5 && dVar2 == 0 &&
|
||||
field_0x259 == 4 &&
|
||||
field_0x25a == 1)
|
||||
{
|
||||
mCursorX = field_0x259;
|
||||
mCursorY = field_0x25a;
|
||||
} else {
|
||||
do {
|
||||
mCursorX--;
|
||||
if (getItemTag(mCursorX, mCursorY, true)) {
|
||||
goto LAB_802ba744;
|
||||
}
|
||||
} while (mCursorX != 0);
|
||||
mCursorX = dVar1;
|
||||
}
|
||||
}
|
||||
}
|
||||
LAB_802ba744:
|
||||
if (mpStick->checkUpTrigger()) {
|
||||
if (mCursorY != 0) {
|
||||
bool bVar3;
|
||||
restart_loop:
|
||||
do {
|
||||
mCursorY--;
|
||||
if (mCursorY == 2) {
|
||||
u8 local_3c[9] = {3,3,4,3,4,5,4,5,5};
|
||||
u8 local_48[9] = {2,1,2,0,1,2,0,1,0};
|
||||
for (int i = 0; i < 9; i++) {
|
||||
if (getItemTag(local_3c[i], local_48[i], true)) {
|
||||
mCursorX = local_3c[i];
|
||||
mCursorY = local_48[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dVar2 == 5) {
|
||||
|
||||
if (dVar1 == 0) {
|
||||
if (field_0x25a < 5) {
|
||||
mCursorX = field_0x259;
|
||||
mCursorY = field_0x25a;
|
||||
break;
|
||||
}
|
||||
bVar3 = false;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (getItemTag(i, mCursorY, true)) {
|
||||
mCursorX = i;
|
||||
bVar3 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (mCursorY == 0) {
|
||||
mCursorX = dVar1;
|
||||
mCursorY = dVar2;
|
||||
bVar3 = true;
|
||||
}
|
||||
if (bVar3) {
|
||||
break;
|
||||
}
|
||||
goto restart_loop;
|
||||
}
|
||||
if (field_0x25a < 5) {
|
||||
mCursorX = field_0x259;
|
||||
mCursorY = field_0x25a;
|
||||
break;
|
||||
}
|
||||
bVar3 = false;
|
||||
for (int i = 3; i < 7; i++) {
|
||||
if (getItemTag(i, mCursorY, true)) {
|
||||
mCursorX = i;
|
||||
bVar3 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (mCursorY == 0) {
|
||||
mCursorX = dVar1;
|
||||
mCursorY = dVar2;
|
||||
bVar3 = true;
|
||||
}
|
||||
}
|
||||
} while (!bVar3);
|
||||
if (!getItemTag(mCursorX, mCursorY, true)) {
|
||||
if (mCursorY != 0) {
|
||||
goto restart_loop;
|
||||
}
|
||||
}
|
||||
mCursorY = dVar2;
|
||||
}
|
||||
} else {
|
||||
if (mpStick->checkDownTrigger()) {
|
||||
if (mCursorY < 4) {
|
||||
do {
|
||||
mCursorY++;
|
||||
if (mCursorY == 3) {
|
||||
u8 local_50[8] = {3, 2, 3, 1, 2, 0, 1, 0};
|
||||
u8 local_58[8] = {3, 3, 4, 3, 4, 3, 4, 4};
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (getItemTag(local_50[i], local_58[i], true)) {
|
||||
mCursorX = local_50[i];
|
||||
mCursorY = local_58[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (getItemTag(mCursorX, mCursorY, true)) {
|
||||
goto LAB_802bab54;
|
||||
}
|
||||
} while (mCursorY < 4);
|
||||
mCursorY = 5;
|
||||
if (mCursorX <= 2) {
|
||||
mCursorX = 0;
|
||||
} else {
|
||||
mCursorX = 1;
|
||||
}
|
||||
} else if (mCursorY == 4) {
|
||||
mCursorY = 5;
|
||||
if (mCursorX <= 3) {
|
||||
mCursorX = 0;
|
||||
} else {
|
||||
mCursorX = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LAB_802bab54:
|
||||
if (mCursorX != dVar1 || mCursorY != dVar2) {
|
||||
field_0x259 = dVar1;
|
||||
field_0x25a = dVar2;
|
||||
if ((mCursorX == 1 && mCursorY == 5) || (mCursorX == 0 && mCursorY == 5)) {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f,
|
||||
0);
|
||||
} else {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_ITEM, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
}
|
||||
cursorPosSet();
|
||||
setItemNameString(mCursorX, mCursorY);
|
||||
}
|
||||
if (field_0x44[0] != g_drawHIO.mCollectScreen.mUnselectItemScale ||
|
||||
field_0x44[1] != g_drawHIO.mCollectScreen.mSelectItemScale ||
|
||||
field_0x4c[0] != g_drawHIO.mCollectScreen.mUnselectSaveOptionScale ||
|
||||
field_0x4c[1] != g_drawHIO.mCollectScreen.mSelectSaveOptionScale)
|
||||
{
|
||||
field_0x44[0] = g_drawHIO.mCollectScreen.mUnselectItemScale;
|
||||
field_0x44[1] = g_drawHIO.mCollectScreen.mSelectItemScale;
|
||||
field_0x4c[0] = g_drawHIO.mCollectScreen.mUnselectSaveOptionScale;
|
||||
field_0x4c[1] = g_drawHIO.mCollectScreen.mSelectSaveOptionScale;
|
||||
for (int i = 0; i < 7; i++) {
|
||||
for (int j = 0; j < 6; j++) {
|
||||
if (getItemTag(i, j, true)) {
|
||||
J2DPane* pane = mpScreen->search(getItemTag(i, j, true));
|
||||
if ((i != 0 || j != 0) && (i != 6 || j != 0)) {
|
||||
if (j == 5) {
|
||||
if (i == mCursorX && j == mCursorY) {
|
||||
pane->scale(g_drawHIO.mCollectScreen.mSelectSaveOptionScale,
|
||||
g_drawHIO.mCollectScreen.mSelectSaveOptionScale);
|
||||
} else {
|
||||
pane->scale(g_drawHIO.mCollectScreen.mUnselectSaveOptionScale,
|
||||
g_drawHIO.mCollectScreen.mUnselectSaveOptionScale);
|
||||
}
|
||||
} else if (i == mCursorX && j == mCursorY) {
|
||||
pane->scale(g_drawHIO.mCollectScreen.mSelectItemScale,
|
||||
g_drawHIO.mCollectScreen.mSelectItemScale);
|
||||
} else {
|
||||
pane->scale(g_drawHIO.mCollectScreen.mUnselectItemScale,
|
||||
g_drawHIO.mCollectScreen.mUnselectItemScale);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -1743,6 +1966,7 @@ asm void dMenu_Collect2D_c::cursorMove() {
|
||||
#include "asm/d/menu/d_menu_collect/cursorMove__17dMenu_Collect2D_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80453F64-80453F68 002564 0004+00 1/1 0/0 0/0 .sdata2 @5611 */
|
||||
|
||||
+35
-1294
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,6 @@
|
||||
#include "d/meter/d_meter_hakusha.h"
|
||||
#include "d/meter/d_meter_map.h"
|
||||
#include "d/meter/d_meter_string.h"
|
||||
#include "dol2asm.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "rel/d/a/d_a_horse/d_a_horse.h"
|
||||
|
||||
@@ -3129,14 +3128,14 @@ static int dMeter2_Create(msg_class* i_this) {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803BFA54-803BFA68 -00001 0014+00 1/0 0/0 0/0 .data l_dMeter2_Method */
|
||||
SECTION_DATA static leafdraw_method_class l_dMeter2_Method = {
|
||||
static leafdraw_method_class l_dMeter2_Method = {
|
||||
(process_method_func)dMeter2_Create, (process_method_func)dMeter2_Delete,
|
||||
(process_method_func)dMeter2_Execute, (process_method_func)dMeter2_IsDelete,
|
||||
(process_method_func)dMeter2_Draw,
|
||||
};
|
||||
|
||||
/* 803BFA68-803BFA90 -00001 0028+00 0/0 0/0 1/0 .data g_profile_METER2 */
|
||||
SECTION_DATA extern msg_process_profile_definition g_profile_METER2 = {
|
||||
extern msg_process_profile_definition g_profile_METER2 = {
|
||||
-3,
|
||||
12,
|
||||
-3,
|
||||
|
||||
+12
-12
@@ -1088,11 +1088,11 @@ s32 fopAcM_cullingCheck(fopAc_ac_c const* i_actor) {
|
||||
|
||||
if (fopAcM_getCullSizeFar(i_actor) > 0.0f) {
|
||||
mDoLib_clipper::changeFar(cullsize_far * mDoLib_clipper::getFar());
|
||||
u32 ret = mDoLib_clipper::clip(mtx_p, &box->mMax, &box->mMin);
|
||||
u32 ret = mDoLib_clipper::clip(mtx_p, &box->max, &box->min);
|
||||
mDoLib_clipper::resetFar();
|
||||
return ret;
|
||||
} else {
|
||||
return mDoLib_clipper::clip(mtx_p, &box->mMax, &box->mMin);
|
||||
return mDoLib_clipper::clip(mtx_p, &box->max, &box->min);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1101,22 +1101,22 @@ s32 fopAcM_cullingCheck(fopAc_ac_c const* i_actor) {
|
||||
mDoLib_clipper::changeFar(cullsize_far * mDoLib_clipper::getFar());
|
||||
|
||||
f32 radius = fopAcM_getCullSizeSphereR(i_actor);
|
||||
const Vec* center_p = fopAcM_getCullSizeSphereCenter(i_actor);
|
||||
const Vec& center_p = fopAcM_getCullSizeSphereCenter(i_actor);
|
||||
Vec center;
|
||||
center.x = center_p->x;
|
||||
center.y = center_p->y;
|
||||
center.z = center_p->z;
|
||||
center.x = center_p.x;
|
||||
center.y = center_p.y;
|
||||
center.z = center_p.z;
|
||||
|
||||
u32 ret = mDoLib_clipper::clip(mtx_p, center, radius);
|
||||
mDoLib_clipper::resetFar();
|
||||
return ret;
|
||||
} else {
|
||||
f32 radius = fopAcM_getCullSizeSphereR(i_actor);
|
||||
const Vec* center_p = fopAcM_getCullSizeSphereCenter(i_actor);
|
||||
const Vec& center_p = fopAcM_getCullSizeSphereCenter(i_actor);
|
||||
Vec center;
|
||||
center.x = center_p->x;
|
||||
center.y = center_p->y;
|
||||
center.z = center_p->z;
|
||||
center.x = center_p.x;
|
||||
center.y = center_p.y;
|
||||
center.z = center_p.z;
|
||||
return mDoLib_clipper::clip(mtx_p, center, radius);
|
||||
}
|
||||
} else {
|
||||
@@ -1124,11 +1124,11 @@ s32 fopAcM_cullingCheck(fopAc_ac_c const* i_actor) {
|
||||
|
||||
if (fopAcM_getCullSizeFar(i_actor) > 0.0f) {
|
||||
mDoLib_clipper::changeFar(cullsize_far * mDoLib_clipper::getFar());
|
||||
u32 ret = mDoLib_clipper::clip(mtx_p, sphere->mCenter, sphere->mRadius);
|
||||
u32 ret = mDoLib_clipper::clip(mtx_p, sphere->center, sphere->radius);
|
||||
mDoLib_clipper::resetFar();
|
||||
return ret;
|
||||
} else {
|
||||
return mDoLib_clipper::clip(mtx_p, sphere->mCenter, sphere->mRadius);
|
||||
return mDoLib_clipper::clip(mtx_p, sphere->center, sphere->radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user