summaryrefslogtreecommitdiff
path: root/src/d
diff options
context:
space:
mode:
authorTrueffel <106771418+Trueffeloot@users.noreply.github.com>2024-04-21 14:27:36 +0200
committerGitHub <noreply@github.com>2024-04-21 15:27:36 +0300
commit151c5099abdddb91c8c4cf3565c0c5075a0e0146 (patch)
tree223f48042d2e51c81aeadceb3cb3d589e1c0f5d8 /src/d
parentd253deb2b95e96323d9b8fddd3e4aa629203ebd4 (diff)
d_a_obj_chest OK (#2136)
* obj_chest all functions matchin * obj_chest OK & some renaming * update progress & remove asm
Diffstat (limited to 'src/d')
-rw-r--r--src/d/file/d_file_select.cpp12
-rw-r--r--src/d/menu/d_menu_collect.cpp4
2 files changed, 10 insertions, 6 deletions
diff --git a/src/d/file/d_file_select.cpp b/src/d/file/d_file_select.cpp
index 9b07814dc5..3cb6c76fde 100644
--- a/src/d/file/d_file_select.cpp
+++ b/src/d/file/d_file_select.cpp
@@ -3854,15 +3854,19 @@ bool dFile_select_c::copySelectWakuAlpahAnm(u8 param_1) {
/* 80188950-80188994 183290 0044+00 1/1 0/0 0/0 .text getCptoNum__14dFile_select_cFUc */
u8 dFile_select_c::getCptoNum(u8 param_0) {
- // !@bug It returns the value in this if field_0x026a is not in the range
+ u8 cptoNum;
switch (field_0x026a) {
case 0:
- return param_0 + 1;
+ cptoNum = param_0 + 1;
+ break;
case 1:
- return param_0 * 2;
+ cptoNum = param_0 * 2;
+ break;
case 2:
- return param_0;
+ cptoNum = param_0;
+ break;
}
+ return cptoNum;
}
/* 80188994-80188B54 1832D4 01C0+00 1/0 0/0 0/0 .text copyToSelBack__14dFile_select_cFv
diff --git a/src/d/menu/d_menu_collect.cpp b/src/d/menu/d_menu_collect.cpp
index 11d7f7fff1..bffd7a8f80 100644
--- a/src/d/menu/d_menu_collect.cpp
+++ b/src/d/menu/d_menu_collect.cpp
@@ -3726,7 +3726,7 @@ SECTION_SDATA2 static f64 lit_7963 = 0.39269909262657166;
/* 801B7660-801B774C 1B1FA0 00EC+00 1/1 0/0 0/0 .text toItem3Dpos__17dMenu_Collect3D_cFfffP4cXyz
*/
-// This is mostly matching like this using O2 but still regalloc (f29/f31)
+// This is mostly matching like this using O2 but still regalloc (f29/f31). The main issue is the use of dVar12
#ifdef NONMATCHING
#pragma push
#pragma optimization_level 2
@@ -3740,7 +3740,7 @@ void dMenu_Collect3D_c::toItem3Dpos(f32 param_0, f32 param_1, f32 param_2, cXyz*
MTXInverse(adStack_98, auStack_c8);
f32 tangent = tan(0.39269909262657166);
f32 dVar12 = -param_2;
- cXyz cStack_d4((dVar7 * param_2) * (tangent * mDoGph_gInf_c::getAspect()),
+ cXyz cStack_d4((dVar7 * param_2) * (mDoGph_gInf_c::getAspect() * tangent),
(tangent * (dVar11 * dVar12)), dVar12);
MTXMultVec(auStack_c8, &cStack_d4, param_3);
}