mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-08 13:26:14 -04:00
Arms_Hook OK (#33)
* All but 2 functions matched * More work on hookshot * hookshot work * 2 functions left (and one is almost done) * sp issues with draw, but matching otherwise * hookshot matching * Changed rodata inclusion for armshook * Hookshot OK * Resolve script conflicts * Rename unk variables to match MM standard * Made requested changes
This commit is contained in:
+18
-11
@@ -3,6 +3,13 @@
|
||||
|
||||
#include <z64.h>
|
||||
|
||||
float fabsf(float f);
|
||||
#pragma intrinsic(fabsf)
|
||||
float sqrtf(float f);
|
||||
#pragma intrinsic(sqrtf)
|
||||
double sqrt(double d);
|
||||
#pragma intrinsic(sqrt)
|
||||
|
||||
void bootproc(void); // func_80080060
|
||||
void Idle_ClearMemory(void* begin, void* end); // func_80080150
|
||||
void Idle_InitFramebuffer(u32* ptr, u32 numBytes, u32 value); // func_80080180
|
||||
@@ -816,14 +823,14 @@ void func_800B8E1C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_
|
||||
void func_800B8E58(void); // func_800B8E58
|
||||
void func_800B8EC8(Actor* iParm1, u32 uParm2); // func_800B8EC8
|
||||
void func_800B8EF4(void); // func_800B8EF4
|
||||
void func_800B8F98(void); // func_800B8F98
|
||||
void func_800B8F98(Actor* actor, u16 sfxId); // func_800B8F98
|
||||
void func_800B8FC0(void); // func_800B8FC0
|
||||
void func_800B8FE8(void); // func_800B8FE8
|
||||
void func_800B9010(Actor* actor, UNK_TYPE2 uParm2); // func_800B9010
|
||||
void func_800B9038(void); // func_800B9038
|
||||
void func_800B9084(void); // func_800B9084
|
||||
void func_800B9098(Actor* actor); // func_800B9098
|
||||
void func_800B90AC(void); // func_800B90AC
|
||||
s32 func_800B90AC(GlobalContext* globalCtx, Actor* actor, UNK_TYPE arg2, UNK_TYPE arg3, UNK_TYPE arg4); // func_800B90AC
|
||||
void func_800B90F4(void); // func_800B90F4
|
||||
void func_800B9120(ActorContext* actCtxt); // func_800B9120
|
||||
void Actor_Init(GlobalContext* ctxt, ActorContext* actCtxt, UNK_TYPE4 uParm3); // func_800B9170
|
||||
@@ -992,10 +999,10 @@ void func_800C4FD4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_
|
||||
void func_800C5464(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); // func_800C5464
|
||||
void func_800C54AC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10); // func_800C54AC
|
||||
void func_800C5538(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10); // func_800C5538
|
||||
void func_800C55C4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10); // func_800C55C4
|
||||
s32 func_800C55C4(CollisionContext*, Vec3f*, Vec3f*, Vec3f*, BgPolygon**, u32, u32, u32, u32, u32*); // func_800C55C4
|
||||
void func_800C5650(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11); // func_800C5650
|
||||
void func_800C56E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11, UNK_TYPE4 param_12); // func_800C56E0
|
||||
s32 func_800C576C(CollisionContext* bgCtxt, Vec3f* param_2, Vec3f* param_3, Vec3f* param_4, UNK_PTR param_5, s32 param_6, s32 param_7, s32 param_8, s32 param_9, UNK_PTR param_10); // func_800C576C
|
||||
s32 func_800C576C(CollisionContext*, Vec3f*, Vec3f*, Vec3f*, BgPolygon**, u32, u32, u32, u32, u32*); // func_800C576C
|
||||
void func_800C57F8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // func_800C57F8
|
||||
void func_800C583C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9); // func_800C583C
|
||||
void func_800C58C8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10); // func_800C58C8
|
||||
@@ -1084,7 +1091,7 @@ u32 func_800C9C24(CollisionContext* bgCtxt, BgPolygon* polygon, s32 index, UNK_T
|
||||
u32 func_800C9C74(CollisionContext* bgCtxt, BgPolygon* polygon, s32 index); // func_800C9C74
|
||||
u32 func_800C9C9C(CollisionContext* bgCtxt, BgPolygon* polygon, s32 index); // func_800C9C9C
|
||||
u32 func_800C9CC4(CollisionContext* bgCtxt, BgPolygon* polygon, s32 index); // func_800C9CC4
|
||||
void func_800C9CEC(void); // func_800C9CEC
|
||||
u32 func_800C9CEC(CollisionContext* bgCtxt, BgPolygon* polygon, s32 index); // func_800C9CEC
|
||||
void func_800C9D14(void); // func_800C9D14
|
||||
void func_800C9D50(void); // func_800C9D50
|
||||
unsigned int func_800C9D8C(CollisionContext* param_1, BgPolygon* param_2, s32 param_3); // func_800C9D8C
|
||||
@@ -1516,7 +1523,7 @@ void func_800E823C(void); // func_800E823C
|
||||
void func_800E8318(void); // func_800E8318
|
||||
void func_800E8478(void); // func_800E8478
|
||||
void func_800E85D4(UNK_TYPE4 param_1, Vec3f* param_2); // func_800E85D4
|
||||
void func_800E8668(void); // func_800E8668
|
||||
void func_800E8668(GlobalContext* globalCtx, Vec3f* arg2); // func_800E8668
|
||||
void func_800E8690(void); // func_800E8690
|
||||
void func_800E86C0(void); // func_800E86C0
|
||||
void func_800E86E0(UNK_TYPE4 param_1, Vec3f* param_2, UNK_TYPE4 param_3); // func_800E86E0
|
||||
@@ -2187,8 +2194,8 @@ UNK_TYPE4 func_80122670(int* param_1, Input* input); // func_80122670
|
||||
void func_801226E0(void); // func_801226E0
|
||||
void func_80122744(void); // func_80122744
|
||||
void func_80122760(void); // func_80122760
|
||||
void func_80122868(void); // func_80122868
|
||||
void func_801229A0(void); // func_801229A0
|
||||
void func_80122868(GlobalContext* globalCtx, ActorPlayer* player); // func_80122868
|
||||
void func_801229A0(GlobalContext* globalCtx, ActorPlayer* player); // func_801229A0
|
||||
void func_801229EC(void); // func_801229EC
|
||||
void func_801229FC(void); // func_801229FC
|
||||
void func_80122BA4(void); // func_80122BA4
|
||||
@@ -2229,7 +2236,7 @@ u32 func_8012403C(GlobalContext* ctxt); // func_8012403C
|
||||
void func_8012404C(GlobalContext* ctxt); // func_8012404C
|
||||
void func_8012405C(void); // func_8012405C
|
||||
void func_80124088(void); // func_80124088
|
||||
void func_801240C8(void); // func_801240C8
|
||||
s32 func_801240C8(ActorPlayer* player); // func_801240C8
|
||||
void func_801240DC(void); // func_801240DC
|
||||
void func_80124110(void); // func_80124110
|
||||
void func_80124148(void); // func_80124148
|
||||
@@ -2261,7 +2268,7 @@ void func_80125CE0(void); // func_80125CE0
|
||||
void func_80125D4C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // func_80125D4C
|
||||
void func_801262C8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // func_801262C8
|
||||
void func_801263FC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // func_801263FC
|
||||
void func_80126440(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); // func_80126440
|
||||
void func_80126440(GlobalContext* globalCtx, ColCommon* param_2, s32* param_3, Vec3f* param_4, Vec3f* param_5); // func_80126440
|
||||
void func_801265C8(void); // func_801265C8
|
||||
void func_8012669C(void); // func_8012669C
|
||||
void func_80126808(void); // func_80126808
|
||||
@@ -3391,7 +3398,7 @@ s16 atans_first_8th(f32 opposite, f32 adjacent); // func_8017FEB0
|
||||
s16 atans(f32 opposite, f32 adjacent); // func_8017FEE4
|
||||
f32 atan(f32 opposite, f32 adjacent); // func_801800CC
|
||||
s16 atans_flip(f32 adjacent, f32 opposite); // func_80180100
|
||||
void atan_flip(f32 adjacent, f32 opposite); // func_8018012C
|
||||
s16 atan_flip(f32 adjacent, f32 opposite); // func_8018012C
|
||||
void SysMatrix_StateAlloc(GameState* ctxt); // func_80180160
|
||||
void SysMatrix_StatePush(void); // func_8018019C
|
||||
void SysMatrix_StatePop(void); // func_801801CC
|
||||
|
||||
@@ -2023,16 +2023,16 @@ void EnBbfall_Update(void); // func_808C03EC
|
||||
void func_808C07D4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5, UNK_TYPE4 param_6); // func_808C07D4
|
||||
void func_808C080C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); // func_808C080C
|
||||
void EnBbfall_Draw(void); // func_808C0A04
|
||||
void func_808C1030(void); // func_808C1030
|
||||
void ArmsHook_SetupAction(void); // ArmsHook_SetupAction
|
||||
void ArmsHook_Init(void); // func_808C103C
|
||||
void ArmsHook_Destroy(void); // func_808C10B0
|
||||
void func_808C10F8(void); // func_808C10F8
|
||||
void ArmsHook_Wait(void); // ArmsHook_Wait
|
||||
void func_808C1154(void); // func_808C1154
|
||||
void func_808C1168(void); // func_808C1168
|
||||
void func_808C1198(void); // func_808C1198
|
||||
void func_808C11C0(void); // func_808C11C0
|
||||
void func_808C125C(void); // func_808C125C
|
||||
void func_808C12A4(void); // func_808C12A4
|
||||
void ArmsHook_AttachToPlayer(void); // ArmsHook_AttachToPlayer
|
||||
void ArmsHook_DetachHookFromActor(void); // ArmsHook_DetachHookFromActor
|
||||
void ArmsHook_CheckForCancel(void); // ArmsHook_CheckForCancel
|
||||
void ArmsHook_AttachHookToActor(void); // ArmsHook_AttachHookToActor
|
||||
void ArmsHook_Shoot(void); // ArmsHook_Shoot
|
||||
void ArmsHook_Update(void); // func_808C18D8
|
||||
void ArmsHook_Draw(void); // func_808C1918
|
||||
void EnBb_Init(void); // func_808C1D40
|
||||
|
||||
@@ -3,6 +3,36 @@
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#define CONT_A 0x8000
|
||||
#define CONT_B 0x4000
|
||||
#define CONT_G 0x2000
|
||||
#define CONT_START 0x1000
|
||||
#define CONT_UP 0x0800
|
||||
#define CONT_DOWN 0x0400
|
||||
#define CONT_LEFT 0x0200
|
||||
#define CONT_RIGHT 0x0100
|
||||
#define CONT_L 0x0020
|
||||
#define CONT_R 0x0010
|
||||
#define CONT_E 0x0008
|
||||
#define CONT_D 0x0004
|
||||
#define CONT_C 0x0002
|
||||
#define CONT_F 0x0001
|
||||
|
||||
#define A_BUTTON CONT_A
|
||||
#define B_BUTTON CONT_B
|
||||
#define L_TRIG CONT_L
|
||||
#define R_TRIG CONT_R
|
||||
#define Z_TRIG CONT_G
|
||||
#define START_BUTTON CONT_START
|
||||
#define U_JPAD CONT_UP
|
||||
#define L_JPAD CONT_LEFT
|
||||
#define R_JPAD CONT_RIGHT
|
||||
#define D_JPAD CONT_DOWN
|
||||
#define U_CBUTTONS CONT_E
|
||||
#define L_CBUTTONS CONT_C
|
||||
#define R_CBUTTONS CONT_F
|
||||
#define D_CBUTTONS CONT_D
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 ramarray[15];
|
||||
/* 0x3C */ u32 pifstatus;
|
||||
|
||||
@@ -20,6 +20,11 @@
|
||||
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
|
||||
(curState)->nextGameStateInit = (GameStateFunc)newInit; \
|
||||
(curState)->nextGameStateSize = sizeof(newStruct);
|
||||
|
||||
#define PLAYER ((ActorPlayer*)globalCtx->actorCtx.actorList[ACTORTYPE_PLAYER].first)
|
||||
|
||||
#define SQ(x) ((x)*(x))
|
||||
#define DECR(x) ((x) == 0 ? 0 : ((x) -= 1))
|
||||
|
||||
extern GraphicsContext* oGfxCtx;
|
||||
|
||||
|
||||
@@ -1787,4 +1787,9 @@ typedef struct {
|
||||
/* 0x14 */ Gfx* monoDl;
|
||||
} VisMono; // size = 0x18
|
||||
|
||||
typedef enum {
|
||||
MTXMODE_NEW, // generates a new matrix
|
||||
MTXMODE_APPLY // applies transformation to the current matrix
|
||||
} MatrixMode;
|
||||
|
||||
#endif
|
||||
|
||||
+12
-7
@@ -138,7 +138,7 @@ typedef struct Actor {
|
||||
/* 0x0A0 */ ActorA0 unkA0;
|
||||
/* 0x0BC */ ActorShape shape;
|
||||
/* 0x0D4 */ UNK_TYPE1 padD4[0x18];
|
||||
/* 0x0EC */ Vec3f unkEC;
|
||||
/* 0x0EC */ Vec3f projectedPos;
|
||||
/* 0x0F8 */ f32 unkF8;
|
||||
/* 0x0FC */ f32 unkFC;
|
||||
/* 0x100 */ f32 unk100;
|
||||
@@ -179,14 +179,19 @@ typedef struct {
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x144 */ UNK_TYPE1 pad144[0x3];
|
||||
/* 0x147 */ s8 unk147;
|
||||
/* 0x148 */ UNK_TYPE1 pad148[0x3];
|
||||
/* 0x147 */ s8 itemActionParam;
|
||||
/* 0x148 */ UNK_TYPE1 pad148[0x2];
|
||||
/* 0x14A */ s8 heldItemActionParam;
|
||||
/* 0x14B */ u8 unk14B;
|
||||
/* 0x14C */ UNK_TYPE1 pad14C[0x7];
|
||||
/* 0x14C */ UNK_TYPE1 pad14C[0x5];
|
||||
/* 0x151 */ u8 unk151;
|
||||
/* 0x152 */ UNK_TYPE1 unk152;
|
||||
/* 0x153 */ u8 unk153;
|
||||
/* 0x154 */ UNK_TYPE1 pad154[0x1F8];
|
||||
/* 0x34C */ Actor* unk34C;
|
||||
/* 0x350 */ UNK_TYPE1 pad350[0x44];
|
||||
/* 0x34C */ Actor* heldActor;
|
||||
/* 0x350 */ UNK_TYPE1 pad350[0x18];
|
||||
/* 0x368 */ Vec3f unk368;
|
||||
/* 0x374 */ UNK_TYPE1 pad374[0x20];
|
||||
/* 0x394 */ u8 unk394;
|
||||
/* 0x395 */ UNK_TYPE1 pad395[0x37];
|
||||
/* 0x3CC */ s16 unk3CC;
|
||||
@@ -194,7 +199,7 @@ typedef struct {
|
||||
/* 0x3CF */ UNK_TYPE1 pad3CF[0x361];
|
||||
/* 0x730 */ Actor* unk730;
|
||||
/* 0x734 */ UNK_TYPE1 pad734[0x338];
|
||||
/* 0xA6C */ u32 unkA6C;
|
||||
/* 0xA6C */ u32 stateFlags1;
|
||||
/* 0xA70 */ u32 unkA70;
|
||||
/* 0xA74 */ u32 unkA74;
|
||||
/* 0xA78 */ UNK_TYPE1 padA78[0x8];
|
||||
|
||||
@@ -67,6 +67,13 @@ typedef struct {
|
||||
/* 0x3C */ f32 unk3C;
|
||||
} ColQuadParams; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pointA;
|
||||
/* 0x0C */ Vec3f pointB;
|
||||
/* 0x18 */ Vec3f pointC;
|
||||
/* 0x24 */ Vec3f pointD;
|
||||
} ColQuadParamsInit; // size = 0x30
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ Vec3s loc;
|
||||
/* 0x6 */ s16 radius;
|
||||
@@ -110,8 +117,8 @@ typedef struct {
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommonInit base;
|
||||
/* 0x08 */ ColBodyInfoInit body;
|
||||
/* 0x20 */ ColQuadParams params;
|
||||
} ColQuadInit; // size = 0x60
|
||||
/* 0x20 */ ColQuadParamsInit params;
|
||||
} ColQuadInit; // size = 0x50
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColBodyInfoInit body;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
#define SHT_MAX 32767.0f
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 x;
|
||||
/* 0x4 */ f32 y;
|
||||
|
||||
Reference in New Issue
Block a user