From c19d9b02be5d894f91cd45884eed67152dffffa4 Mon Sep 17 00:00:00 2001 From: hatal175 Date: Tue, 6 Feb 2024 07:04:35 +0200 Subject: J3D work (#2064) --- libs/JSystem/J3DGraphBase/J3DStruct.cpp | 42 ++++++++------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) (limited to 'libs/JSystem/J3DGraphBase/J3DStruct.cpp') diff --git a/libs/JSystem/J3DGraphBase/J3DStruct.cpp b/libs/JSystem/J3DGraphBase/J3DStruct.cpp index 6b1cec2e2a..b2d537934d 100644 --- a/libs/JSystem/J3DGraphBase/J3DStruct.cpp +++ b/libs/JSystem/J3DGraphBase/J3DStruct.cpp @@ -1,15 +1,9 @@ // -// Generated By: dol2asm -// Translation Unit: J3DStruct +// J3DStruct // #include "JSystem/J3DGraphBase/J3DStruct.h" #include "JSystem/JMath/JMath.h" -#include "dol2asm.h" - -// -// Declarations: -// /* 803256C4-80325718 320004 0054+00 0/0 11/11 24/24 .text __as__12J3DLightInfoFRC12J3DLightInfo */ J3DLightInfo& J3DLightInfo::operator=(J3DLightInfo const& param_0) { @@ -29,39 +23,23 @@ J3DTexMtxInfo& J3DTexMtxInfo::operator=(J3DTexMtxInfo const& param_0) { return *this; } -/* ############################################################################################## */ -/* 80456410-80456414 004A10 0004+00 1/1 0/0 0/0 .sdata2 @409 */ -SECTION_SDATA2 static f32 lit_409 = 1.0f; - -/* 80456414-80456418 004A14 0004+00 1/1 0/0 0/0 .sdata2 @410 */ -SECTION_SDATA2 static u8 lit_410[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; +// Helper functions to set float literal order +static f32 dummyLiteralOrder() { + return 1.0f; +} /* 80325794-803257DC 3200D4 0048+00 0/0 2/2 7/7 .text setEffectMtx__13J3DTexMtxInfoFPA4_f */ -// needs inline asm? -#ifdef NONMATCHING void J3DTexMtxInfo::setEffectMtx(Mtx param_0) { JMath::gekko_ps_copy12(&mEffectMtx, param_0); - mEffectMtx[3][0] = 0.0f; - mEffectMtx[3][1] = 0.0f; + register f32 zero = 0.0f; + register f32* mtx = (f32*)mEffectMtx; + asm { + psq_st zero, 0x30(mtx), 0, 0 + }; mEffectMtx[3][2] = 0.0f; mEffectMtx[3][3] = 1.0f; } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DTexMtxInfo::setEffectMtx(f32 (*param_0)[4]) { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DStruct/setEffectMtx__13J3DTexMtxInfoFPA4_f.s" -} -#pragma pop -#endif /* 803257DC-80325800 32011C 0024+00 0/0 5/5 0/0 .text * __as__16J3DIndTexMtxInfoFRC16J3DIndTexMtxInfo */ -- cgit v1.2.3