mirror of https://github.com/zeldaret/mm.git
Player docs: Control Stick Input and Movement (#1385)
* player input docs * player prefix * rm comments * TRUNCF_BINANG
This commit is contained in:
parent
cfe656be2f
commit
b88aa2c0fc
|
@ -617,7 +617,7 @@ void func_800FEAF4(EnvironmentContext* envCtx);
|
|||
|
||||
void* Lib_MemCpy(void* dest, void* src, size_t size);
|
||||
void* Lib_MemSet(void* buffer, s32 value, size_t size);
|
||||
void func_800FF3A0(f32* distOut, s16* angleOut, Input* input);
|
||||
void Lib_GetControlStickData(f32* outMagnitude, s16* outAngle, Input* input);
|
||||
void Actor_ProcessInitChain(Actor* actor, InitChainEntry* ichain);
|
||||
void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src);
|
||||
void Lib_PlaySfx(u16 sfxId);
|
||||
|
|
|
@ -1291,8 +1291,8 @@ typedef struct Player {
|
|||
/* 0xD5D */ u8 floorTypeTimer; // Unused remnant of OoT
|
||||
/* 0xD5E */ u8 floorProperty; // FloorProperty enum
|
||||
/* 0xD5F */ u8 prevFloorType; // Unused remnant of OoT
|
||||
/* 0xD60 */ f32 unk_D60;
|
||||
/* 0xD64 */ s16 unk_D64;
|
||||
/* 0xD60 */ f32 prevControlStickMagnitude;
|
||||
/* 0xD64 */ s16 prevControlStickAngle;
|
||||
/* 0xD66 */ u16 prevFloorSfxOffset;
|
||||
/* 0xD68 */ s16 unk_D68;
|
||||
/* 0xD6A */ s8 unk_D6A;
|
||||
|
|
|
@ -240,20 +240,20 @@ s32 Math_AsymStepToF(f32* pValue, f32 target, f32 incrStep, f32 decrStep) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void func_800FF3A0(f32* distOut, s16* angleOut, Input* input) {
|
||||
void Lib_GetControlStickData(f32* outMagnitude, s16* outAngle, Input* input) {
|
||||
f32 x = input->rel.stick_x;
|
||||
f32 y = input->rel.stick_y;
|
||||
f32 dist;
|
||||
f32 magnitude;
|
||||
|
||||
dist = sqrtf(SQ(x) + SQ(y));
|
||||
*distOut = (60.0f < dist) ? 60.0f : dist;
|
||||
magnitude = sqrtf(SQ(x) + SQ(y));
|
||||
*outMagnitude = (60.0f < magnitude) ? 60.0f : magnitude;
|
||||
|
||||
if (dist > 0.0f) {
|
||||
if (magnitude > 0.0f) {
|
||||
x = input->cur.stick_x;
|
||||
y = input->cur.stick_y;
|
||||
*angleOut = Math_Atan2S_XY(y, -x);
|
||||
*outAngle = Math_Atan2S_XY(y, -x);
|
||||
} else {
|
||||
*angleOut = 0;
|
||||
*outAngle = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1803,7 +1803,7 @@
|
|||
0x800FF1FC:("Math_AsymStepToS",),
|
||||
0x800FF2A8:("Math_StepUntilF",),
|
||||
0x800FF2F8:("Math_AsymStepToF",),
|
||||
0x800FF3A0:("func_800FF3A0",),
|
||||
0x800FF3A0:("Lib_GetControlStickData",),
|
||||
0x800FF450:("Rand_S16Offset",),
|
||||
0x800FF4A4:("Rand_S16OffsetStride",),
|
||||
0x800FF50C:("Math_Vec3f_Copy",),
|
||||
|
@ -4296,7 +4296,7 @@
|
|||
0x8082EAC8:("func_8082EAC8",),
|
||||
0x8082EAF0:("func_8082EAF0",),
|
||||
0x8082EB18:("func_8082EB18",),
|
||||
0x8082EB38:("func_8082EB38",),
|
||||
0x8082EB38:("Player_ProcessControlStick",),
|
||||
0x8082EC9C:("func_8082EC9C",),
|
||||
0x8082ECCC:("func_8082ECCC",),
|
||||
0x8082ECE0:("func_8082ECE0",),
|
||||
|
@ -4380,9 +4380,9 @@
|
|||
0x80832660:("func_80832660",),
|
||||
0x80832754:("func_80832754",),
|
||||
0x80832888:("func_80832888",),
|
||||
0x80832CAC:("func_80832CAC",),
|
||||
0x80832CAC:("Player_CalcSpeedAndYawFromControlStick",),
|
||||
0x80832F24:("func_80832F24",),
|
||||
0x80832F78:("func_80832F78",),
|
||||
0x80832F78:("Player_GetMovementSpeedAndYaw",),
|
||||
0x80833058:("func_80833058",),
|
||||
0x808331FC:("func_808331FC",),
|
||||
0x808332A0:("func_808332A0",),
|
||||
|
|
|
@ -5359,8 +5359,8 @@
|
|||
0x8085E6F0:("D_8085E6F0","f32","",0x4),
|
||||
0x8085E6F4:("D_8085E6F4","f32","",0x4),
|
||||
0x80862AF0:("sDogSpawnPos","Vec3f","",0xC),
|
||||
0x80862AFC:("D_80862AFC","f32","",0x4),
|
||||
0x80862B00:("D_80862B00","UNK_TYPE1","",0x1),
|
||||
0x80862AFC:("sPlayerControlStickMagnitude","f32","",0x4),
|
||||
0x80862B00:("sPlayerControlStickAngle","UNK_TYPE1","",0x1),
|
||||
0x80862B02:("D_80862B02","UNK_TYPE1","",0x1),
|
||||
0x80862B04:("D_80862B04","UNK_TYPE1","",0x1),
|
||||
0x80862B08:("sPlayerFloorType","UNK_TYPE1","",0x1),
|
||||
|
|
|
@ -1317,7 +1317,7 @@ asm/non_matchings/code/z_lib/Math_StepToAngleS.s,Math_StepToAngleS,0x800FF138,0x
|
|||
asm/non_matchings/code/z_lib/Math_AsymStepToS.s,Math_AsymStepToS,0x800FF1FC,0x2B
|
||||
asm/non_matchings/code/z_lib/Math_StepUntilF.s,Math_StepUntilF,0x800FF2A8,0x14
|
||||
asm/non_matchings/code/z_lib/Math_AsymStepToF.s,Math_AsymStepToF,0x800FF2F8,0x2A
|
||||
asm/non_matchings/code/z_lib/func_800FF3A0.s,func_800FF3A0,0x800FF3A0,0x2C
|
||||
asm/non_matchings/code/z_lib/Lib_GetControlStickData.s,Lib_GetControlStickData,0x800FF3A0,0x2C
|
||||
asm/non_matchings/code/z_lib/Rand_S16Offset.s,Rand_S16Offset,0x800FF450,0x15
|
||||
asm/non_matchings/code/z_lib/Rand_S16OffsetStride.s,Rand_S16OffsetStride,0x800FF4A4,0x1A
|
||||
asm/non_matchings/code/z_lib/Math_Vec3f_Copy.s,Math_Vec3f_Copy,0x800FF50C,0x8
|
||||
|
|
|
Loading…
Reference in New Issue