mirror of
https://github.com/zeldaret/tp
synced 2026-05-31 01:16:02 -04:00
fix some nonmatching functions (#2141)
This commit is contained in:
+14
-90
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: d/d_lib
|
||||
//
|
||||
/**
|
||||
* d_lib.cpp
|
||||
* Utility Functions
|
||||
*/
|
||||
|
||||
#include "d/d_lib.h"
|
||||
#include "d/event/d_event.h"
|
||||
@@ -9,58 +9,9 @@
|
||||
#include "JSystem/JKernel/JKRAramArchive.h"
|
||||
#include "JSystem/JKernel/JKRAram.h"
|
||||
#include "JSystem/JKernel/JKRDecomp.h"
|
||||
#include "dol2asm.h"
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__9STControlFssssffss();
|
||||
extern "C" void setWaitParm__9STControlFssssffss();
|
||||
extern "C" void init__9STControlFv();
|
||||
extern "C" void Xinit__9STControlFv();
|
||||
extern "C" void Yinit__9STControlFv();
|
||||
extern "C" void getValueStick__9STControlFv();
|
||||
extern "C" void getAngleStick__9STControlFv();
|
||||
extern "C" void getValueStick__10CSTControlFv();
|
||||
extern "C" void getAngleStick__10CSTControlFv();
|
||||
extern "C" void checkTrigger__9STControlFv();
|
||||
extern "C" void checkLeftTrigger__9STControlFv();
|
||||
extern "C" void checkRightTrigger__9STControlFv();
|
||||
extern "C" void checkUpTrigger__9STControlFv();
|
||||
extern "C" void checkDownTrigger__9STControlFv();
|
||||
extern "C" void dLib_getEventSwitchNo__Fi();
|
||||
extern "C" void dLib_checkActorInRectangle__FP10fopAc_ac_cP10fopAc_ac_cPC4cXyzPC4cXyz();
|
||||
extern "C" void dLib_getExpandSizeFromAramArchive__FP14JKRAramArchivePCc();
|
||||
extern "C" void getTime__11dLib_time_cFv();
|
||||
extern "C" void stopTime__11dLib_time_cFv();
|
||||
extern "C" void startTime__11dLib_time_cFv();
|
||||
extern "C" u8 m_diffTime__11dLib_time_c[4];
|
||||
extern "C" u8 m_stopTime__11dLib_time_c[4];
|
||||
extern "C" extern u8 struct_80450DF0[8];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void mDoMtx_YrotS__FPA4_fs();
|
||||
extern "C" void searchMapEventData__14dEvt_control_cFUc();
|
||||
extern "C" void __mi__4cXyzCFRC3Vec();
|
||||
extern "C" void aramToMainRam__7JKRAramFUlPUcUl15JKRExpandSwitchUlP7JKRHeapiPUl();
|
||||
extern "C" void findFsResource__10JKRArchiveCFPCcUl();
|
||||
extern "C" void getAramAddress__14JKRAramArchiveFPCc();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" u8 m_cpadInfo__8mDoCPd_c[256];
|
||||
extern "C" u8 now__14mDoMtx_stack_c[48];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A7240-803A7250 004360 0010+00 0/0 0/0 6/6 .data ZeroQuat */
|
||||
Quaternion ZeroQuat = {
|
||||
0.0f,
|
||||
@@ -69,22 +20,6 @@ Quaternion ZeroQuat = {
|
||||
1.0f
|
||||
};
|
||||
|
||||
/* 803A7250-803A7260 004370 0010+00 0/0 1/1 0/0 .data __vt__10CSTControl */
|
||||
SECTION_DATA extern void* __vt__10CSTControl[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)getValueStick__10CSTControlFv,
|
||||
(void*)getAngleStick__10CSTControlFv,
|
||||
};
|
||||
|
||||
/* 803A7260-803A7270 004380 0010+00 1/1 1/1 0/0 .data __vt__9STControl */
|
||||
SECTION_DATA extern void* __vt__9STControl[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)getValueStick__9STControlFv,
|
||||
(void*)getAngleStick__9STControlFv,
|
||||
};
|
||||
|
||||
STControl::STControl(s16 delayY, s16 delayX, s16 param_2, s16 param_3, f32 threshold, f32 param_5,
|
||||
s16 param_6, s16 param_7) {
|
||||
setWaitParm(delayY, delayX, param_2, param_3, threshold, param_5, param_6, param_7);
|
||||
@@ -152,7 +87,6 @@ s16 CSTControl::getAngleStick() {
|
||||
}
|
||||
|
||||
/* 8003219C-8003242C 02CADC 0290+00 0/0 24/24 0/0 .text checkTrigger__9STControlFv */
|
||||
#ifdef NONMATCHING
|
||||
u8 STControl::checkTrigger() {
|
||||
field_0x0d = mDirectionTrig;
|
||||
f32 stickValue = getValueStick();
|
||||
@@ -161,21 +95,21 @@ u8 STControl::checkTrigger() {
|
||||
s16 temp_r7 = 0x2000 - field_0x26 >> 1;
|
||||
|
||||
if (!cM3d_IsZero(stickValue)) {
|
||||
if (stickAngle < field_0x22 + temp_r7 - 0x7000) {
|
||||
if (stickAngle < field_0x22 - 0x7000 + temp_r7) {
|
||||
var_r6 |= TRIG_UP;
|
||||
} else if (stickAngle < (field_0x22 - 0x5000) - temp_r7) {
|
||||
} else if (stickAngle < field_0x22 - 0x5000 - temp_r7) {
|
||||
var_r6 |= TRIG_UP_LEFT;
|
||||
} else if (stickAngle < field_0x22 + temp_r7 - 0x3000) {
|
||||
} else if (stickAngle < field_0x22 - 0x3000 + temp_r7) {
|
||||
var_r6 |= TRIG_LEFT;
|
||||
} else if (stickAngle < (field_0x22 - 0x1000) - temp_r7) {
|
||||
} else if (stickAngle < field_0x22 - 0x1000 - temp_r7) {
|
||||
var_r6 |= TRIG_DOWN_LEFT;
|
||||
} else if (stickAngle < field_0x22 + temp_r7 + 0x1000) {
|
||||
} else if (stickAngle < field_0x22 + 0x1000 + temp_r7) {
|
||||
var_r6 |= TRIG_DOWN;
|
||||
} else if (stickAngle < (field_0x22 + 0x3000) - temp_r7) {
|
||||
} else if (stickAngle < field_0x22 + 0x3000 - temp_r7) {
|
||||
var_r6 |= TRIG_DOWN_RIGHT;
|
||||
} else if (stickAngle < field_0x22 + temp_r7 + 0x5000) {
|
||||
} else if (stickAngle < field_0x22 + 0x5000 + temp_r7) {
|
||||
var_r6 |= TRIG_RIGHT;
|
||||
} else if (stickAngle < (field_0x22 + 0x7000) - temp_r7) {
|
||||
} else if (stickAngle < field_0x22 + 0x7000 - temp_r7) {
|
||||
var_r6 |= TRIG_UP_RIGHT;
|
||||
} else {
|
||||
var_r6 |= TRIG_UP;
|
||||
@@ -222,16 +156,6 @@ u8 STControl::checkTrigger() {
|
||||
|
||||
return mDirectionTrig;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm u8 STControl::checkTrigger() {
|
||||
nofralloc
|
||||
#include "asm/d/d_lib/checkTrigger__9STControlFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
bool STControl::checkLeftTrigger() {
|
||||
if (field_0x0e == 0 && mDirectionTrig & TRIG_LEFT) {
|
||||
@@ -334,7 +258,8 @@ u32 dLib_getExpandSizeFromAramArchive(JKRAramArchive* i_aramArchive, char const*
|
||||
if (address == 0) {
|
||||
return 0;
|
||||
}
|
||||
u8* readAddress = JKRAramToMainRam(address, header, 0x20, EXPAND_SWITCH_UNKNOWN0, 0, 0, 0xffffffff, 0);
|
||||
u8* readAddress = JKRAramToMainRam(address, header, 0x20, EXPAND_SWITCH_UNKNOWN0,
|
||||
0, 0, 0xffffffff, 0);
|
||||
JUT_ASSERT(1260, readAddress == header);
|
||||
JKRArchive::SDIFileEntry* entry = i_aramArchive->findFsResource(param_2, 0);
|
||||
JUT_ASSERT(1263, entry != 0);
|
||||
@@ -346,7 +271,6 @@ u32 dLib_getExpandSizeFromAramArchive(JKRAramArchive* i_aramArchive, char const*
|
||||
return uVar5;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450DD8-80450DDC 0002D8 0004+00 2/2 0/0 0/0 .sbss m_diffTime__11dLib_time_c */
|
||||
OSTime dLib_time_c::m_diffTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user