Merge decomp/main into dusk

Merges 44 upstream commits from zeldaret/tp decomp/main.

Conflict resolutions:
- .github/workflows/build.yml: keep deleted (not needed for PC port)
- README.md: keep PC port README
- J3DAnimation.h: keep OFFSET_PTR macro + add upstream forward decl
- J3DModelLoader.h: keep BE(u32) mBlockNum + add field_0x1c
- d_com_inf_game.h: keep PC port inlines + add upstream declarations
- global.h: keep MULTI_CHAR macro + add FABSF macro
- JUTConsole.cpp: keep uintptr_t cast for 64-bit
- JUTDbPrint.cpp: keep PC enter_() helper + add cstring include
- JUTResFont.cpp: take upstream loop/struct improvements with BE types
- JUTCacheFont.cpp: take upstream decomp fix
- float.h: use upstream !PLATFORM_GCN guard
- d_a_npc_bouS/theB.cpp: keep MULTI_CHAR() for PC portability
- d_a_npc_henna.cpp: keep uintptr_t + use upstream var name
- d_demo.cpp: keep near_/far_ field renames for PC
- d_resorce.cpp: keep uintptr_t + fix var name to res
- d_s_room.cpp, m_Do_graphic.cpp: keep dusk includes + add cstring
- m_Do_main.cpp: keep JHIComPortManager + use JAS_GLOBAL_INSTANCE_INIT
- angle_utils.h: remove redundant types.h include
This commit is contained in:
Luke Street
2026-02-28 13:28:42 -07:00
3803 changed files with 240344 additions and 16831 deletions
+20
View File
@@ -118,6 +118,26 @@ void mDoLib_pos2camera(Vec* src, Vec* dst) {
cMtx_multVec(dComIfGd_getView()->viewMtx, src, dst);
}
#if PLATFORM_WII
void mDoLib_2Dto3D(f32 i_x, f32 i_y, f32 i_z, Vec* o_dst) {
if (dComIfGd_getView() == NULL) {
o_dst->x = 0.0f;
o_dst->y = 0.0f;
o_dst->z = 0.0f;
return;
}
f32 fovy = dComIfGd_getView()->fovy;
f32 aspect = dComIfGd_getView()->aspect;
f32 temp_f3 = tan(DEG_TO_RAD(0.5f * fovy));
Vec sp8;
sp8.x = (-i_x * i_z) * (temp_f3 * aspect);
sp8.y = (i_y * -i_z) * temp_f3;
sp8.z = -i_z;
PSMTXMultVec(dComIfGd_getInvViewMtx(), &sp8, o_dst);
}
#endif
static void dummy() {
std::tan(0.0f);
J3DAlphaComp* alphaComp = NULL;