Merge branch 'Rainchus:main' into main

This commit is contained in:
CreateSource 2024-01-23 17:18:03 -05:00 committed by GitHub
commit e8af9d5ef4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 141 additions and 139 deletions

View file

@ -11,59 +11,59 @@ TitleProc = .text:0x00002474; // type:function size:0x4D0 scope:local
logoReadNintendo = .text:0x00002944; // type:function size:0x84
_ctors = .ctors:0x00000000; // type:label scope:global data:4byte
_dtors = .dtors:0x00000000; // type:label scope:global data:4byte
lbl_1_rodata_10 = .rodata:0x00000010; // type:object size:0x4 data:float
lbl_1_rodata_14 = .rodata:0x00000014; // type:object size:0x4 data:float
lbl_1_rodata_18 = .rodata:0x00000018; // type:object size:0x4 data:float
lbl_1_rodata_1C = .rodata:0x0000001C; // type:object size:0x4 data:float
lbl_1_rodata_20 = .rodata:0x00000020; // type:object size:0x4 data:float
lbl_1_rodata_24 = .rodata:0x00000024; // type:object size:0x4 data:float
lbl_1_rodata_28 = .rodata:0x00000028; // type:object size:0x4 data:float
lbl_1_rodata_2C = .rodata:0x0000002C; // type:object size:0x4 data:float
lbl_1_rodata_30 = .rodata:0x00000030; // type:object size:0x4 data:float
lbl_1_rodata_34 = .rodata:0x00000034; // type:object size:0x4 data:float
lbl_1_rodata_38 = .rodata:0x00000038; // type:object size:0x4 data:float
lbl_1_rodata_3C = .rodata:0x0000003C; // type:object size:0x4 data:float
lbl_1_rodata_40 = .rodata:0x00000040; // type:object size:0x4 data:float
lbl_1_rodata_44 = .rodata:0x00000044; // type:object size:0x4 data:float
lbl_1_rodata_48 = .rodata:0x00000048; // type:object size:0x4 data:float
lbl_1_rodata_4C = .rodata:0x0000004C; // type:object size:0x4 data:float
lbl_1_rodata_50 = .rodata:0x00000050; // type:object size:0x4 data:float
lbl_1_rodata_54 = .rodata:0x00000054; // type:object size:0x4 data:float
lbl_1_rodata_58 = .rodata:0x00000058; // type:object size:0x4 data:float
lbl_1_rodata_60 = .rodata:0x00000060; // type:object size:0x8 data:double
lbl_1_rodata_68 = .rodata:0x00000068; // type:object size:0x8 data:double
lbl_1_rodata_70 = .rodata:0x00000070; // type:object size:0x8 data:double
lbl_1_rodata_78 = .rodata:0x00000078; // type:object size:0x4 data:float
lbl_1_rodata_7C = .rodata:0x0000007C; // type:object size:0x4 data:float
lbl_1_rodata_80 = .rodata:0x00000080; // type:object size:0x8 data:double
lbl_1_rodata_88 = .rodata:0x00000088; // type:object size:0x4 data:float
lbl_1_rodata_90 = .rodata:0x00000090; // type:object size:0x8 data:double
lbl_1_rodata_98 = .rodata:0x00000098; // type:object size:0x4 data:float
lbl_1_rodata_9C = .rodata:0x0000009C; // type:object size:0x4 data:float
lbl_1_rodata_A0 = .rodata:0x000000A0; // type:object size:0x4 data:float
lbl_1_rodata_A8 = .rodata:0x000000A8; // type:object size:0x8 data:double
lbl_1_rodata_B0 = .rodata:0x000000B0; // type:object size:0x8 data:double
lbl_1_rodata_B8 = .rodata:0x000000B8; // type:object size:0x8 data:double
lbl_1_rodata_C0 = .rodata:0x000000C0; // type:object size:0x8 data:double
lbl_1_rodata_C8 = .rodata:0x000000C8; // type:object size:0x8 data:double
lbl_1_rodata_D0 = .rodata:0x000000D0; // type:object size:0x8 data:double
lbl_1_rodata_D8 = .rodata:0x000000D8; // type:object size:0x4 data:float
lbl_1_data_0 = .data:0x00000000; // type:object size:0x24 data:string
lbl_1_data_24 = .data:0x00000024; // type:object size:0x14 data:string
lbl_1_rodata_10 = .rodata:0x00000010; // type:object size:0x4 scope:local data:float
lbl_1_rodata_14 = .rodata:0x00000014; // type:object size:0x4 scope:local data:float
lbl_1_rodata_18 = .rodata:0x00000018; // type:object size:0x4 scope:local data:float
lbl_1_rodata_1C = .rodata:0x0000001C; // type:object size:0x4 scope:local data:float
lbl_1_rodata_20 = .rodata:0x00000020; // type:object size:0x4 scope:local data:float
lbl_1_rodata_24 = .rodata:0x00000024; // type:object size:0x4 scope:local data:float
lbl_1_rodata_28 = .rodata:0x00000028; // type:object size:0x4 scope:local data:float
lbl_1_rodata_2C = .rodata:0x0000002C; // type:object size:0x4 scope:local data:float
lbl_1_rodata_30 = .rodata:0x00000030; // type:object size:0x4 scope:local data:float
lbl_1_rodata_34 = .rodata:0x00000034; // type:object size:0x4 scope:local data:float
lbl_1_rodata_38 = .rodata:0x00000038; // type:object size:0x4 scope:local data:float
lbl_1_rodata_3C = .rodata:0x0000003C; // type:object size:0x4 scope:local data:float
lbl_1_rodata_40 = .rodata:0x00000040; // type:object size:0x4 scope:local data:float
lbl_1_rodata_44 = .rodata:0x00000044; // type:object size:0x4 scope:local data:float
lbl_1_rodata_48 = .rodata:0x00000048; // type:object size:0x4 scope:local data:float
lbl_1_rodata_4C = .rodata:0x0000004C; // type:object size:0x4 scope:local data:float
lbl_1_rodata_50 = .rodata:0x00000050; // type:object size:0x4 scope:local data:float
lbl_1_rodata_54 = .rodata:0x00000054; // type:object size:0x4 scope:local data:float
lbl_1_rodata_58 = .rodata:0x00000058; // type:object size:0x4 scope:local data:float
lbl_1_rodata_60 = .rodata:0x00000060; // type:object size:0x8 scope:local data:double
lbl_1_rodata_68 = .rodata:0x00000068; // type:object size:0x8 scope:local data:double
lbl_1_rodata_70 = .rodata:0x00000070; // type:object size:0x8 scope:local data:double
lbl_1_rodata_78 = .rodata:0x00000078; // type:object size:0x4 scope:local data:float
lbl_1_rodata_7C = .rodata:0x0000007C; // type:object size:0x4 scope:local data:float
lbl_1_rodata_80 = .rodata:0x00000080; // type:object size:0x8 scope:local data:double
lbl_1_rodata_88 = .rodata:0x00000088; // type:object size:0x4 scope:local data:float
lbl_1_rodata_90 = .rodata:0x00000090; // type:object size:0x8 scope:local data:double
lbl_1_rodata_98 = .rodata:0x00000098; // type:object size:0x4 scope:local data:float
lbl_1_rodata_9C = .rodata:0x0000009C; // type:object size:0x4 scope:local data:float
lbl_1_rodata_A0 = .rodata:0x000000A0; // type:object size:0x4 scope:local data:float
lbl_1_rodata_A8 = .rodata:0x000000A8; // type:object size:0x8 scope:local data:double
lbl_1_rodata_B0 = .rodata:0x000000B0; // type:object size:0x8 scope:local data:double
lbl_1_rodata_B8 = .rodata:0x000000B8; // type:object size:0x8 scope:local data:double
lbl_1_rodata_C0 = .rodata:0x000000C0; // type:object size:0x8 scope:local data:double
lbl_1_rodata_C8 = .rodata:0x000000C8; // type:object size:0x8 scope:local data:double
lbl_1_rodata_D0 = .rodata:0x000000D0; // type:object size:0x8 scope:local data:double
lbl_1_rodata_D8 = .rodata:0x000000D8; // type:object size:0x4 scope:local data:float
lbl_1_data_0 = .data:0x00000000; // type:object size:0x24 scope:local data:string
lbl_1_data_24 = .data:0x00000024; // type:object size:0x14 scope:local data:string
demoTimingTbl = .data:0x00000038; // type:object size:0x18 scope:local data:2byte
progressivePosTbl = .data:0x00000050; // type:object size:0x8 scope:local
lbl_1_data_58 = .data:0x00000058; // type:object size:0x4
lbl_1_data_5C = .data:0x0000005C; // type:object size:0x1A data:string
lbl_1_data_76 = .data:0x00000076; // type:object size:0x13 data:string
lbl_1_data_89 = .data:0x00000089; // type:object size:0x17
lbl_1_data_58 = .data:0x00000058; // type:object size:0x4 scope:local
lbl_1_data_5C = .data:0x0000005C; // type:object size:0x1A scope:local data:string
lbl_1_data_76 = .data:0x00000076; // type:object size:0x13 scope:local data:string
lbl_1_data_89 = .data:0x00000089; // type:object size:0x17 scope:local
logoNintendoData = .data:0x000000A0; // type:object size:0x307D align:32
lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4
lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x2
titleGroup = .bss:0x00000006; // type:object size:0x2 scope:local data:2byte
titleModel = .bss:0x00000008; // type:object size:0x6 scope:local data:2byte
demoWin = .bss:0x0000000E; // type:object size:0x2 data:2byte
demoWin = .bss:0x0000000E; // type:object size:0x2 scope:local data:2byte
lbl_1_bss_10 = .bss:0x00000010; // type:object size:0xC
lbl_1_bss_1C = .bss:0x0000001C; // type:object size:0x8 data:float
lbl_1_bss_24 = .bss:0x00000024; // type:object size:0x18 data:float
lbl_1_bss_3C = .bss:0x0000003C; // type:object size:0x18 data:float
objman = .bss:0x00000054; // type:object size:0x8 data:4byte
objman = .bss:0x00000054; // type:object size:0x8 scope:local data:4byte

View file

@ -8,10 +8,11 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w01Dll/main.c:
.text start:0x000000E0 end:0x00009D00
.rodata start:0x00000000 end:0x00000198
.rodata start:0x00000010 end:0x00000198
.data start:0x00000000 end:0x00000658
.bss start:0x00000000 end:0x00000708

View file

@ -8,10 +8,11 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w02Dll/main.c:
.text start:0x000000E0 end:0x00001254
.rodata start:0x00000000 end:0x00000038
.rodata start:0x00000010 end:0x00000038
.data start:0x00000000 end:0x000002A8
.bss start:0x00000000 end:0x00000050

View file

@ -8,10 +8,11 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w03Dll/main.c:
.text start:0x000000E0 end:0x000012C8
.rodata start:0x00000000 end:0x00000038
.rodata start:0x00000010 end:0x00000038
.data start:0x00000000 end:0x00000280
.bss start:0x00000000 end:0x00000028

View file

@ -8,10 +8,11 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w04Dll/main.c:
.text start:0x000000E0 end:0x000012FC
.rodata start:0x00000000 end:0x00000040
.rodata start:0x00000010 end:0x00000040
.data start:0x00000000 end:0x00000298
.bss start:0x00000000 end:0x00000038

View file

@ -8,10 +8,11 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w05Dll/main.c:
.text start:0x000000E0 end:0x000013D4
.rodata start:0x00000000 end:0x00000048
.rodata start:0x00000010 end:0x00000048
.data start:0x00000000 end:0x00000150
.bss start:0x00000000 end:0x00000028

View file

@ -8,10 +8,11 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w06Dll/main.c:
.text start:0x000000E0 end:0x00000D70
.rodata start:0x00000000 end:0x00000040
.rodata start:0x00000010 end:0x00000040
.data start:0x00000000 end:0x000001A8
.bss start:0x00000000 end:0x00000018

View file

@ -8,10 +8,11 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w10Dll/main.c:
.text start:0x000000E0 end:0x00000AEC
.rodata start:0x00000000 end:0x00000038
.rodata start:0x00000010 end:0x00000038
.data start:0x00000000 end:0x00000078
.bss start:0x00000000 end:0x00000038

View file

@ -8,9 +8,10 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w21Dll/main.c:
.text start:0x000000E0 end:0x00000678
.rodata start:0x00000000 end:0x00000030
.rodata start:0x00000010 end:0x00000030
.data start:0x00000000 end:0x00000034
.bss start:0x00000000 end:0x0000000E

View file

@ -7,8 +7,9 @@ Sections:
REL/board_executor.c:
.text start:0x00000000 end:0x000000E0
.rodata start:0x00000000 end:0x00000010
REL/w21Dll/main.c:
.text start:0x000000E0 end:0x000003E0
.rodata start:0x00000000 end:0x00000018
.rodata start:0x00000010 end:0x00000018
.data start:0x00000000 end:0x00000010

View file

@ -767,7 +767,7 @@ config.libs = [
Rel('bootDll',
objects = {
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/bootDll/main.c"),
Object(Matching, "REL/bootDll/main.c"),
Object(Matching, "REL/bootDll/nintendo_data.c"),
}
),

View file

@ -79,9 +79,9 @@ f32 BoardPlayerRotYGet(s32);
void BoardPlayerScaleSetV(s32, Vec*);
void BoardPlayerScaleSet(s32, f32, f32, f32);
s16 BoardPlayerCurrMotionGet(s32);
void BoardPlayerMotionCreate(s32, s32);
s32 BoardPlayerMotionCreate(s32, s32);
void BoardPlayerMotionKill(s32, s32);
void BoardPlayerMotionEndCheck(s32);
s32 BoardPlayerMotionEndCheck(s32);
void BoardPlayerMotionEndWait(s32);
void BoardPlayerMotionStart(s32, s32, s32);
void BoardPlayerMotionShiftSet(s32, s32, f32, f32, u32);

View file

@ -7,24 +7,6 @@
#define _MATH_INLINE static inline
#endif
#ifdef MATH_EXPORT_CONST
extern inline float sqrtf(float x)
{
static const double _half=.5;
static const double _three=3.0;
volatile float y;
if(x > 0.0f)
{
double guess = __frsqrte((double)x); // returns an approximation to
guess = _half*guess*(_three - guess*guess*x); // now have 12 sig bits
guess = _half*guess*(_three - guess*guess*x); // now have 24 sig bits
guess = _half*guess*(_three - guess*guess*x); // now have 32 sig bits
y=(float)(x*guess);
return y;
}
return x;
}
#else
extern inline float sqrtf(float x)
{
volatile float y;
@ -39,7 +21,6 @@ extern inline float sqrtf(float x)
}
return x;
}
#endif
double atan(double x);
double copysign(double x, double y);

View file

@ -0,0 +1,8 @@
#ifndef _REL_SQRT_CONSTS
#define _REL_SQRT_CONSTS
const double __fakeHalf = 0.5;
const double __fakeThree = 3.0;
#endif

View file

@ -1,4 +1,5 @@
#include "REL/board_executor.h"
#include "rel_sqrt_consts.h"
static void InitBoard(void) {
BoardCommonInit(BoardCreate, BoardDestroy);

View file

@ -12,6 +12,7 @@
#include "game/thpmain.h"
#include "game/msm.h"
#include "math.h"
#include "rel_sqrt_consts.h"
#define HU_PAD_BTN_ALL (HuPadBtn[0] | HuPadBtn[1] | HuPadBtn[2] | HuPadBtn[3])
#define HU_PAD_BTNDOWN_ALL (HuPadBtnDown[0] | HuPadBtnDown[1] | HuPadBtnDown[2] | HuPadBtnDown[3])
@ -386,60 +387,62 @@ void fn_1_1178(void)
}
}
//NON_MATCHING, only one in file
void fn_1_152C(void) {
Point3d temp_f0;
Point3d temp_f0_4;
Point3d temp_f0_7;
Point3d sp8;
Vec pos;
Vec offset;
Vec dir;
Vec y_offset;
f32 temp_f31;
s32 var_r30;
s8 temp_r31;
f32 z_rot;
s8 stick_pos;
if ((HuPadBtnDown[0] & 0x800)) {
if (lbl_1_bss_0 != 0) {
var_r30 = 0;
} else {
var_r30 = 1;
}
lbl_1_bss_0 = var_r30;
lbl_1_bss_0 = (lbl_1_bss_0) ? 0 : 1;
}
if (lbl_1_bss_0 != 0) {
lbl_1_bss_3C->y += 0.1f * HuPadStkX[0];
lbl_1_bss_3C->x += 0.1f * HuPadStkY[0];
*lbl_1_bss_1C += HuPadTrigL[0] / 2;
*lbl_1_bss_1C -= HuPadTrigR[0] / 2;
if (*lbl_1_bss_1C < 100.0f) {
*lbl_1_bss_1C = 100.0f;
lbl_1_bss_3C[0].y += 0.1f * HuPadStkX[0];
lbl_1_bss_3C[0].x += 0.1f * HuPadStkY[0];
lbl_1_bss_1C[0] += HuPadTrigL[0] / 2;
lbl_1_bss_1C[0] -= HuPadTrigR[0] / 2;
if (lbl_1_bss_1C[0] < 100.0f) {
lbl_1_bss_1C[0] = 100.0f;
}
temp_f0.x = lbl_1_bss_24->x + (*lbl_1_bss_1C * (sin((M_PI * lbl_1_bss_3C->y) / 180.0) * cos((M_PI * lbl_1_bss_3C->x) / 180.0)));
temp_f0.y = (lbl_1_bss_24->y + (*lbl_1_bss_1C * -sin((M_PI * lbl_1_bss_3C->x) / 180.0)));
temp_f0.z = (lbl_1_bss_24->z + (*lbl_1_bss_1C * (cos((M_PI * lbl_1_bss_3C->y) / 180.0) * cos((M_PI * lbl_1_bss_3C->x) / 180.0))));
temp_f0_4.x = lbl_1_bss_24->x - temp_f0.x;
temp_f0_4.y = lbl_1_bss_24->y - temp_f0.y;
temp_f0_4.z = lbl_1_bss_24->z - temp_f0.z;
temp_f0_7.x = (sin((M_PI * lbl_1_bss_3C->y) / 180.0) * sin((M_PI * lbl_1_bss_3C->x) / 180.0));
temp_f0_7.y = cos((M_PI * lbl_1_bss_3C->x) / 180.0);
temp_f0_7.z = (cos((M_PI * lbl_1_bss_3C->y) / 180.0) * sin((M_PI * lbl_1_bss_3C->x) / 180.0));
temp_f31 = lbl_1_bss_3C->z;
sp8.x = ((temp_f0_7.x * ((temp_f0_4.x * temp_f0_4.x) + ((1.0f - (temp_f0_4.x * temp_f0_4.x)) * cos((M_PI * temp_f31) / 180.0)))) + temp_f0_7.y * (((temp_f0_4.x * temp_f0_4.y) * (1.0 - cos((M_PI * temp_f31) / 180.0))) - temp_f0_4.z * sin((M_PI * temp_f31) / 180.0)) + temp_f0_7.z * (((temp_f0_4.x * temp_f0_4.z) * (1.0 - cos((M_PI * temp_f31) / 180.0))) + temp_f0_4.y * sin((M_PI * temp_f31) / 180.0)));
sp8.y = ((temp_f0_7.y * ((temp_f0_4.y * temp_f0_4.y) + ((1.0f - (temp_f0_4.y * temp_f0_4.y)) * cos((M_PI * temp_f31) / 180.0)))) + temp_f0_7.x * (((temp_f0_4.x * temp_f0_4.y) * (1.0 - cos((M_PI * temp_f31) / 180.0))) + temp_f0_4.z * sin((M_PI * temp_f31) / 180.0)) + temp_f0_7.z * (((temp_f0_4.y * temp_f0_4.z) * (1.0 - cos((M_PI * temp_f31) / 180.0))) - temp_f0_4.x * sin((M_PI * temp_f31) / 180.0)));
sp8.z = ((temp_f0_7.z * (temp_f0_4.z * temp_f0_4.z + ((1.0f - (temp_f0_4.z * temp_f0_4.z)) * cos((M_PI * temp_f31) / 180.0)))) + (temp_f0_7.x * (((temp_f0_4.x * temp_f0_4.z) * (1.0 - cos((M_PI * temp_f31) / 180.0))) - temp_f0_4.y * sin((M_PI * temp_f31) / 180.0))) + temp_f0_7.y * (((temp_f0_4.y * temp_f0_4.z) * (1.0 - cos((M_PI * temp_f31) / 180.0))) + temp_f0_4.x * sin((M_PI * temp_f31) / 180.0)));
PSVECCrossProduct(&temp_f0_7, &temp_f0_4, &temp_f0_4);
PSVECNormalize(&temp_f0_4, &temp_f0_4);
temp_r31 = (HuPadSubStkX[0] & 0xF8);
if (temp_r31 != 0) {
lbl_1_bss_24->x += 0.05f * (temp_f0_4.x * temp_r31);
lbl_1_bss_24->y += 0.05f * (temp_f0_4.y * temp_r31);
lbl_1_bss_24->z += 0.05f * (temp_f0_4.z * temp_r31);
pos.x = lbl_1_bss_24[0].x + (lbl_1_bss_1C[0] * (sin((M_PI * lbl_1_bss_3C[0].y) / 180.0) * cos((M_PI * lbl_1_bss_3C[0].x) / 180.0)));
pos.y = (lbl_1_bss_24[0].y + (lbl_1_bss_1C[0] * -sin((M_PI * lbl_1_bss_3C[0].x) / 180.0)));
pos.z = (lbl_1_bss_24[0].z + (lbl_1_bss_1C[0] * (cos((M_PI * lbl_1_bss_3C[0].y) / 180.0) * cos((M_PI * lbl_1_bss_3C[0].x) / 180.0))));
offset.x = lbl_1_bss_24[0].x - pos.x;
offset.y = lbl_1_bss_24[0].y - pos.y;
offset.z = lbl_1_bss_24[0].z - pos.z;
dir.x = (sin((M_PI * lbl_1_bss_3C[0].y) / 180.0) * sin((M_PI * lbl_1_bss_3C[0].x) / 180.0));
dir.y = cos((M_PI * lbl_1_bss_3C[0].x) / 180.0);
dir.z = (cos((M_PI * lbl_1_bss_3C[0].y) / 180.0) * sin((M_PI * lbl_1_bss_3C[0].x) / 180.0));
z_rot = lbl_1_bss_3C[0].z;
y_offset.x = dir.x * (offset.x * offset.x + (1.0f - offset.x * offset.x) * cos((M_PI * z_rot) / 180.0))
+ dir.y * (offset.x * offset.y * (1.0f - cos((M_PI * z_rot) / 180.0)) - offset.z * sin((M_PI * z_rot) / 180.0))
+ dir.z * (offset.x * offset.z * (1.0f - cos((M_PI * z_rot) / 180.0)) + offset.y * sin((M_PI * z_rot) / 180.0));
y_offset.y = dir.y * (offset.y * offset.y + (1.0f - offset.y * offset.y) * cos((M_PI * z_rot) / 180.0))
+ dir.x * (offset.x * offset.y * (1.0f - cos((M_PI * z_rot) / 180.0)) + offset.z * sin((M_PI * z_rot) / 180.0))
+ dir.z * (offset.y * offset.z * (1.0f - cos((M_PI * z_rot) / 180.0)) - offset.x * sin((M_PI * z_rot) / 180.0));
y_offset.z = dir.z * (offset.z * offset.z + (1.0f - offset.z * offset.z) * cos((M_PI * z_rot) / 180.0))
+ (dir.x * (offset.x * offset.z * (1.0 - cos((M_PI * z_rot) / 180.0)) - offset.y * sin((M_PI * z_rot) / 180.0))
+ dir.y * (offset.y * offset.z * (1.0 - cos((M_PI * z_rot) / 180.0)) + offset.x * sin((M_PI * z_rot) / 180.0)));
PSVECCrossProduct(&dir, &offset, &offset);
PSVECNormalize(&offset, &offset);
stick_pos = (HuPadSubStkX[0] & 0xF8);
if (stick_pos != 0) {
lbl_1_bss_24[0].x += 0.05f * (offset.x * stick_pos);
lbl_1_bss_24[0].y += 0.05f * (offset.y * stick_pos);
lbl_1_bss_24[0].z += 0.05f * (offset.z * stick_pos);
}
PSVECNormalize(&sp8, &temp_f0_4);
temp_r31 = -(HuPadSubStkY[0] & 0xF8);
if (temp_r31 != 0) {
lbl_1_bss_24->x += 0.05f * (temp_f0_4.x * temp_r31);
lbl_1_bss_24->y += 0.05f * (temp_f0_4.y * temp_r31);
lbl_1_bss_24->z += 0.05f * (temp_f0_4.z * temp_r31);
PSVECNormalize(&y_offset, &offset);
stick_pos = -(HuPadSubStkY[0] & 0xF8);
if (stick_pos != 0) {
lbl_1_bss_24[0].x += 0.05f * (offset.x * stick_pos);
lbl_1_bss_24[0].y += 0.05f * (offset.y * stick_pos);
lbl_1_bss_24[0].z += 0.05f * (offset.z * stick_pos);
}
}
}
@ -488,13 +491,13 @@ static BOOL TitleProc(void)
{
float scale;
float scale_time;
s32 sp8[32];
s32 y_offset[32];
s16 i;
Hu3DModelAttrReset(titleModel[0], 1);
Hu3DModelAttrReset(titleModel[1], 1);
HuSprAttrReset(titleGroup, 0, SPRITE_ATTR_HIDDEN);
HuSprAttrReset(titleGroup, 1, SPRITE_ATTR_HIDDEN);
OSReport(">>>>>>>>MSM_SE_SEL_01 %d\n", msmSeGetEntryID(2092, sp8));
OSReport(">>>>>>>>MSM_SE_SEL_01 %d\n", msmSeGetEntryID(2092, y_offset));
OSReport(">>>>>>>>SE Num %d\n", msmSeGetNumPlay(0));
HuAudSStreamPlay(20);
WipeCreate(WIPE_MODE_IN, WIPE_TYPE_NORMAL, 30);
@ -541,6 +544,7 @@ static BOOL TitleProc(void)
HuSprAttrSet(titleGroup, 1, SPRITE_ATTR_HIDDEN);
HuSprAttrSet(titleGroup, 2, SPRITE_ATTR_HIDDEN);
HuSprAttrSet(titleGroup, 3, SPRITE_ATTR_HIDDEN);
fn_1_152C();
return 0;
}
}
char data_pad[] = "\0\0\0\0\0\0\0";

View file

@ -5,7 +5,7 @@
#include "game/pad.h"
#include "game/wipe.h"
#include "math.h"
#include "rel_sqrt_consts.h"
static void SubchrMain(void);

View file

@ -17,7 +17,7 @@ s32 BoardModelMotionStart(s16, s32, s32);
void fn_8005B150(void*, void*);
void fn_1_740(void);
void fn_1_E0(void);
void fn_1_2930(void);
s32 fn_1_2930(s32 arg0);
void fn_1_884(void);
void fn_1_8F0(void);
s32 fn_1_910(void);

View file

@ -7,7 +7,7 @@
#include "game/board/space.h"
#include "game/object.h"
#include "game/board/player.h"
// #include "math.h"
#include "math.h"
#include "board_unsplit.h"
#include "game/hsfman.h"
#include "dolphin/os/OSFastCast.h"
@ -44,7 +44,7 @@ typedef struct someBits2 {
s8 unk1;
s8 unk2;
u8 unk3[3];
s16 unk_06[3];
s16 unk_06[4];
} someBits2;
typedef struct w03UnkMG {
@ -338,7 +338,7 @@ void fn_1_A44C(s32 arg0) {
s32 temp_r28;
BoardMusStart(1, 0x17, 0x7F, 0);
temp_r30 = MGSeqCreate(3, 0U);
temp_r30 = MGSeqCreate(3, 0);
while (MGSeqGetStat(temp_r30) != 0) {
HuPrcVSleep();
}
@ -789,8 +789,7 @@ void fn_1_B748(omObjData* arg0, someBits2* arg1) {
}
if (arg1->unk1 < 90) {
f32 temp;
temp_f0 = __OSu8tof32((u8*)&arg1->unk1);
OSu8tof32((u8*)&arg1->unk1, &temp_f0);
BoardModelPosGet(temp_r29, &sp8);
sp8.y += arg0->trans.y;
BoardModelPosSetV(temp_r29, &sp8);

View file

@ -607,7 +607,7 @@ void fn_1_2B44(void) {
f32 temp_f27 = 0.0f;
f32 temp_f29 = 480.0f;
sp18.a = __OSf32tou8(lbl_1_bss_30);
OSf32tou8(&lbl_1_bss_30, &sp18.a);
GXInvalidateTexAll();
GXLoadTexObj(&lbl_1_bss_48, GX_TEXMAP0);
C_MTXOrtho(sp50, temp_f27, temp_f29, temp_f28, temp_f30, 0.0f, 10.0f);

View file

@ -25,7 +25,7 @@ extern void BoardModelScaleSetV(s16, Vec*);
extern void BoardModelScaleSet(s16, f32, f32, f32);
extern void BoardModelScaleGet(s16, s32*);
extern void BoardModelVoiceEnableSet(s16, s32, s32);
extern void BoardModelMotionCreate(s16, s32);
extern s32 BoardModelMotionCreate(s16, s32);
extern void BoardModelMotionKill(s16, s32);
extern s32 BoardModelMotionEndCheck(s16);
extern s32 BoardModelMotionStart(s16, s32, s32);
@ -550,16 +550,16 @@ void BoardPlayerVoiceEnableSet(s32 arg0, s32 arg1, s32 arg2) {
BoardModelVoiceEnableSet(BoardPlayerModelGet(arg0), arg1, arg2);
}
void BoardPlayerMotionCreate(s32 arg0, s32 arg1) {
BoardModelMotionCreate(BoardPlayerModelGet(arg0), arg1);
s32 BoardPlayerMotionCreate(s32 arg0, s32 arg1) {
return BoardModelMotionCreate(BoardPlayerModelGet(arg0), arg1);
}
void BoardPlayerMotionKill(s32 arg0, s32 arg1) {
BoardModelMotionKill(BoardPlayerModelGet(arg0), arg1);
}
void BoardPlayerMotionEndCheck(s32 arg0) {
BoardModelMotionEndCheck(BoardPlayerModelGet(arg0));
s32 BoardPlayerMotionEndCheck(s32 arg0) {
return BoardModelMotionEndCheck(BoardPlayerModelGet(arg0));
}
void BoardPlayerMotionEndWait(s32 arg0) {