Finish e3setup/main.c

Also add ext_math.h file for better math
This commit is contained in:
gamemasterplc 2024-04-23 17:05:53 -05:00
parent da91a21183
commit 1e83c979fb
4 changed files with 1251 additions and 75 deletions

View file

@ -29,13 +29,13 @@ InitPlayerCnt = .text:0x00002A38; // type:function size:0x59C scope:local
UpdateCharSelCursor = .text:0x00002FD4; // type:function size:0x208 scope:local UpdateCharSelCursor = .text:0x00002FD4; // type:function size:0x208 scope:local
UpdateCharSelPlayerCursor = .text:0x000031DC; // type:function size:0x37C scope:local UpdateCharSelPlayerCursor = .text:0x000031DC; // type:function size:0x37C scope:local
UpdateCharSelComCursor = .text:0x00003558; // type:function size:0x3B4 scope:local UpdateCharSelComCursor = .text:0x00003558; // type:function size:0x3B4 scope:local
IsCharSelDone = .text:0x0000390C; // type:function size:0xAC scope:local CheckCharSel = .text:0x0000390C; // type:function size:0xAC scope:local
UpdateCharSel = .text:0x000039B8; // type:function size:0x2B8 scope:local UpdateCharSel = .text:0x000039B8; // type:function size:0x2B8 scope:local
InitCharSel = .text:0x00003C70; // type:function size:0x534 scope:local InitCharSel = .text:0x00003C70; // type:function size:0x534 scope:local
UpdateVibrateCfg = .text:0x000041A4; // type:function size:0x2DC scope:local UpdateRumbleCfg = .text:0x000041A4; // type:function size:0x2DC scope:local
InitVibrateCfg = .text:0x00004480; // type:function size:0x520 scope:local InitRumbleCfg = .text:0x00004480; // type:function size:0x520 scope:local
UpdateGameModeSel = .text:0x000049A0; // type:function size:0x59C scope:local UpdateModeSel = .text:0x000049A0; // type:function size:0x59C scope:local
InitGameModeSel = .text:0x00004F3C; // type:function size:0x4E8 scope:local InitModeSel = .text:0x00004F3C; // type:function size:0x4E8 scope:local
E3BGUpdate = .text:0x00005424; // type:function size:0x100 scope:local E3BGUpdate = .text:0x00005424; // type:function size:0x100 scope:local
E3BGCreate = .text:0x00005524; // type:function size:0x184 E3BGCreate = .text:0x00005524; // type:function size:0x184
InitCamera = .text:0x000056A8; // type:function size:0x7C scope:local InitCamera = .text:0x000056A8; // type:function size:0x7C scope:local
@ -71,47 +71,47 @@ lbl_2_rodata_74 = .rodata:0x00000074; // type:object size:0x4 data:float
lbl_2_rodata_78 = .rodata:0x00000078; // type:object size:0x4 data:float lbl_2_rodata_78 = .rodata:0x00000078; // type:object size:0x4 data:float
lbl_2_rodata_7C = .rodata:0x0000007C; // type:object size:0x4 data:float lbl_2_rodata_7C = .rodata:0x0000007C; // type:object size:0x4 data:float
lbl_2_rodata_80 = .rodata:0x00000080; // type:object size:0x8 data:float lbl_2_rodata_80 = .rodata:0x00000080; // type:object size:0x8 data:float
lbl_2_rodata_88 = .rodata:0x00000088; // type:object size:0x4 data:float lbl_2_rodata_88 = .rodata:0x00000088; // type:object size:0x4 scope:local data:float
lbl_2_rodata_8C = .rodata:0x0000008C; // type:object size:0x4 data:float lbl_2_rodata_8C = .rodata:0x0000008C; // type:object size:0x4 scope:local data:float
lbl_2_rodata_90 = .rodata:0x00000090; // type:object size:0x4 data:float lbl_2_rodata_90 = .rodata:0x00000090; // type:object size:0x4 scope:local data:float
lbl_2_rodata_94 = .rodata:0x00000094; // type:object size:0x4 data:float lbl_2_rodata_94 = .rodata:0x00000094; // type:object size:0x4 scope:local data:float
lbl_2_rodata_98 = .rodata:0x00000098; // type:object size:0x4 data:float lbl_2_rodata_98 = .rodata:0x00000098; // type:object size:0x4 scope:local data:float
lbl_2_rodata_9C = .rodata:0x0000009C; // type:object size:0x4 data:float lbl_2_rodata_9C = .rodata:0x0000009C; // type:object size:0x4 scope:local data:float
lbl_2_rodata_A0 = .rodata:0x000000A0; // type:object size:0x4 data:float lbl_2_rodata_A0 = .rodata:0x000000A0; // type:object size:0x4 scope:local data:float
lbl_2_rodata_A4 = .rodata:0x000000A4; // type:object size:0x4 data:float lbl_2_rodata_A4 = .rodata:0x000000A4; // type:object size:0x4 scope:local data:float
lbl_2_rodata_A8 = .rodata:0x000000A8; // type:object size:0x4 data:float lbl_2_rodata_A8 = .rodata:0x000000A8; // type:object size:0x4 scope:local data:float
lbl_2_rodata_AC = .rodata:0x000000AC; // type:object size:0x4 data:float lbl_2_rodata_AC = .rodata:0x000000AC; // type:object size:0x4 scope:local data:float
lbl_2_rodata_B0 = .rodata:0x000000B0; // type:object size:0x4 data:float lbl_2_rodata_B0 = .rodata:0x000000B0; // type:object size:0x4 scope:local data:float
lbl_2_rodata_B4 = .rodata:0x000000B4; // type:object size:0x4 data:float lbl_2_rodata_B4 = .rodata:0x000000B4; // type:object size:0x4 scope:local data:float
lbl_2_rodata_B8 = .rodata:0x000000B8; // type:object size:0x4 data:float lbl_2_rodata_B8 = .rodata:0x000000B8; // type:object size:0x4 scope:local data:float
lbl_2_rodata_BC = .rodata:0x000000BC; // type:object size:0x4 data:float lbl_2_rodata_BC = .rodata:0x000000BC; // type:object size:0x4 scope:local data:float
lbl_2_rodata_C0 = .rodata:0x000000C0; // type:object size:0x8 data:double lbl_2_rodata_C0 = .rodata:0x000000C0; // type:object size:0x8 scope:local data:double
lbl_2_rodata_C8 = .rodata:0x000000C8; // type:object size:0x4 data:float lbl_2_rodata_C8 = .rodata:0x000000C8; // type:object size:0x4 scope:local data:float
lbl_2_rodata_CC = .rodata:0x000000CC; // type:object size:0x4 data:float lbl_2_rodata_CC = .rodata:0x000000CC; // type:object size:0x4 scope:local data:float
lbl_2_rodata_D0 = .rodata:0x000000D0; // type:object size:0x4 data:float lbl_2_rodata_D0 = .rodata:0x000000D0; // type:object size:0x4 scope:local data:float
lbl_2_rodata_D4 = .rodata:0x000000D4; // type:object size:0x4 data:float lbl_2_rodata_D4 = .rodata:0x000000D4; // type:object size:0x4 scope:local data:float
lbl_2_rodata_D8 = .rodata:0x000000D8; // type:object size:0x4 data:float lbl_2_rodata_D8 = .rodata:0x000000D8; // type:object size:0x4 scope:local data:float
lbl_2_rodata_DC = .rodata:0x000000DC; // type:object size:0x4 data:float lbl_2_rodata_DC = .rodata:0x000000DC; // type:object size:0x4 scope:local data:float
lbl_2_rodata_E0 = .rodata:0x000000E0; // type:object size:0x4 data:float lbl_2_rodata_E0 = .rodata:0x000000E0; // type:object size:0x4 scope:local data:float
lbl_2_rodata_E4 = .rodata:0x000000E4; // type:object size:0x4 data:float lbl_2_rodata_E4 = .rodata:0x000000E4; // type:object size:0x4 scope:local data:float
lbl_2_rodata_E8 = .rodata:0x000000E8; // type:object size:0x4 data:float lbl_2_rodata_E8 = .rodata:0x000000E8; // type:object size:0x4 scope:local data:float
lbl_2_rodata_EC = .rodata:0x000000EC; // type:object size:0x4 data:float lbl_2_rodata_EC = .rodata:0x000000EC; // type:object size:0x4 scope:local data:float
lbl_2_rodata_F0 = .rodata:0x000000F0; // type:object size:0x4 data:float lbl_2_rodata_F0 = .rodata:0x000000F0; // type:object size:0x4 scope:local data:float
lbl_2_rodata_F4 = .rodata:0x000000F4; // type:object size:0x4 data:float lbl_2_rodata_F4 = .rodata:0x000000F4; // type:object size:0x4 scope:local data:float
lbl_2_rodata_F8 = .rodata:0x000000F8; // type:object size:0x4 data:float lbl_2_rodata_F8 = .rodata:0x000000F8; // type:object size:0x4 scope:local data:float
lbl_2_rodata_FC = .rodata:0x000000FC; // type:object size:0x4 data:float lbl_2_rodata_FC = .rodata:0x000000FC; // type:object size:0x4 scope:local data:float
lbl_2_rodata_100 = .rodata:0x00000100; // type:object size:0x4 data:float lbl_2_rodata_100 = .rodata:0x00000100; // type:object size:0x4 scope:local data:float
lbl_2_rodata_104 = .rodata:0x00000104; // type:object size:0x4 data:float lbl_2_rodata_104 = .rodata:0x00000104; // type:object size:0x4 scope:local data:float
lbl_2_rodata_108 = .rodata:0x00000108; // type:object size:0x4 data:float lbl_2_rodata_108 = .rodata:0x00000108; // type:object size:0x4 scope:local data:float
lbl_2_rodata_10C = .rodata:0x0000010C; // type:object size:0x4 data:float lbl_2_rodata_10C = .rodata:0x0000010C; // type:object size:0x4 scope:local data:float
lbl_2_rodata_110 = .rodata:0x00000110; // type:object size:0x4 data:float lbl_2_rodata_110 = .rodata:0x00000110; // type:object size:0x4 scope:local data:float
lbl_2_rodata_114 = .rodata:0x00000114; // type:object size:0x4 data:float lbl_2_rodata_114 = .rodata:0x00000114; // type:object size:0x4 scope:local data:float
lbl_2_rodata_118 = .rodata:0x00000118; // type:object size:0x4 data:float lbl_2_rodata_118 = .rodata:0x00000118; // type:object size:0x4 scope:local data:float
lbl_2_rodata_11C = .rodata:0x0000011C; // type:object size:0x4 data:float lbl_2_rodata_11C = .rodata:0x0000011C; // type:object size:0x4 scope:local data:float
lbl_2_rodata_120 = .rodata:0x00000120; // type:object size:0x4 data:float lbl_2_rodata_120 = .rodata:0x00000120; // type:object size:0x4 scope:local data:float
lbl_2_rodata_124 = .rodata:0x00000124; // type:object size:0x4 data:float lbl_2_rodata_124 = .rodata:0x00000124; // type:object size:0x4 scope:local data:float
lbl_2_rodata_128 = .rodata:0x00000128; // type:object size:0x4 data:float lbl_2_rodata_128 = .rodata:0x00000128; // type:object size:0x4 scope:local data:float
lbl_2_rodata_12C = .rodata:0x0000012C; // type:object size:0x4 data:float lbl_2_rodata_12C = .rodata:0x0000012C; // type:object size:0x4 scope:local data:float
lbl_2_data_0 = .data:0x00000000; // type:object size:0x24 lbl_2_data_0 = .data:0x00000000; // type:object size:0x24
lbl_2_data_24 = .data:0x00000024; // type:object size:0x11 data:string lbl_2_data_24 = .data:0x00000024; // type:object size:0x11 data:string
lbl_2_data_36 = .data:0x00000036; // type:object size:0x8 lbl_2_data_36 = .data:0x00000036; // type:object size:0x8
@ -142,21 +142,21 @@ lbl_2_data_274 = .data:0x00000274; // type:object size:0x60 data:float
playerCntTbl = .data:0x000002D4; // type:object size:0x8 scope:local playerCntTbl = .data:0x000002D4; // type:object size:0x8 scope:local
charTbl = .data:0x000002DC; // type:object size:0x10 scope:local charTbl = .data:0x000002DC; // type:object size:0x10 scope:local
charSfxTbl = .data:0x000002EC; // type:object size:0x20 scope:local charSfxTbl = .data:0x000002EC; // type:object size:0x20 scope:local
lbl_2_data_30C = .data:0x0000030C; // type:object size:0x12 lbl_2_data_30C = .data:0x0000030C; // type:object size:0x12 scope:local
lbl_2_data_31E = .data:0x0000031E; // type:object size:0x8 lbl_2_data_31E = .data:0x0000031E; // type:object size:0x8
playerCntMessTbl = .data:0x00000328; // type:object size:0x10 scope:local playerCntMessTbl = .data:0x00000328; // type:object size:0x10 scope:local
charPosTbl = .data:0x00000338; // type:object size:0x40 scope:local charPosTbl = .data:0x00000338; // type:object size:0x40 scope:local data:float
charComSfxTbl = .data:0x00000378; // type:object size:0x20 charComSfxTbl = .data:0x00000378; // type:object size:0x20 scope:local
lbl_2_data_398 = .data:0x00000398; // type:object size:0xE data:string lbl_2_data_398 = .data:0x00000398; // type:object size:0xE scope:local data:string
charSpriteTbl = .data:0x000003A8; // type:object size:0x20 scope:local charSpriteTbl = .data:0x000003A8; // type:object size:0x20 scope:local
cursorSpriteTbl = .data:0x000003C8; // type:object size:0x14 scope:local cursorSpriteTbl = .data:0x000003C8; // type:object size:0x14 scope:local
highlightSpriteTbl = .data:0x000003DC; // type:object size:0x14 scope:local hiliteSprTbl = .data:0x000003DC; // type:object size:0x14 scope:local
vibrateSettingMess = .data:0x000003F0; // type:object size:0x8 scope:local rumbleMess = .data:0x000003F0; // type:object size:0x8 scope:local
modeSelCursorPosTbl = .data:0x000003F8; // type:object size:0x10 scope:local modeSelCursorPosTbl = .data:0x000003F8; // type:object size:0x10 scope:local
boardSelCursorPosTbl = .data:0x00000408; // type:object size:0x10 scope:local boardSelCursorPosTbl = .data:0x00000408; // type:object size:0x10 scope:local
camRotTbl = .data:0x00000418; // type:object size:0x60 scope:local camViewTbl = .data:0x00000418; // type:object size:0x60 scope:local data:float
lbl_2_data_478 = .data:0x00000478; // type:object size:0x24 lbl_2_data_478 = .data:0x00000478; // type:object size:0x24 data:float
lbl_2_data_49C = .data:0x0000049C; // type:object size:0x24 lbl_2_data_49C = .data:0x0000049C; // type:object size:0x24 data:float
lbl_2_data_4C0 = .data:0x000004C0; // type:object size:0x10 lbl_2_data_4C0 = .data:0x000004C0; // type:object size:0x10
lbl_2_bss_A = .bss:0x0000000A; // type:object size:0x2 data:2byte lbl_2_bss_A = .bss:0x0000000A; // type:object size:0x2 data:2byte
lbl_2_bss_C = .bss:0x0000000C; // type:object size:0x2 data:2byte lbl_2_bss_C = .bss:0x0000000C; // type:object size:0x2 data:2byte

View file

@ -783,7 +783,7 @@ config.libs = [
objects = { objects = {
Object(NonMatching, "REL/E3setupDLL/mgselect.c"), Object(NonMatching, "REL/E3setupDLL/mgselect.c"),
Object(Matching, "REL/executor.c"), Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/E3setupDLL/main.c"), Object(Matching, "REL/E3setupDLL/main.c"),
} }
), ),
Rel('instDll', Rel('instDll',

21
include/ext_math.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef _EXT_MATH_H
#define _EXT_MATH_H
#include "math.h"
#include "dolphin/mtx.h"
typedef struct vector2 {
float x;
float y;
} Vector2;
#define ABS(x) (((x) < 0) ? -(x) : (x))
#define VECDistanceXZ(a, b) sqrtf((((a)->x-(b)->x)*((a)->x-(b)->x))+(((a)->z-(b)->z)*((a)->z-(b)->z)))
#define VECMagXZ(a) sqrtf(((a)->x*(a)->x)+((a)->z*(a)->z))
#define sind(x) sin(M_PI*(x)/180.0)
#define cosd(x) cos(M_PI*(x)/180.0)
#define atan2d(y, x) (180.0*(atan2((y), (x)) / M_PI))
#endif

File diff suppressed because it is too large Load diff