Documented ch Tumblar

This commit is contained in:
Owlenuff
2024-10-01 10:27:28 +02:00
parent ecac4dde39
commit 4bf7028254
21 changed files with 210 additions and 174 deletions

View File

@@ -149,7 +149,7 @@ void func_8024E6E0(s32 controller_index, s32 *dst[4]){
dst[3] = D_80281138[controller_index].unk24[3];
}
void func_8024E71C(s32 controller_index, f32 dst[2]){
void controller_getJoystick(s32 controller_index, f32 dst[2]){
if(func_802E4A08()){
dst[0] = D_80281250[controller_index].joystick[0];
dst[1] = D_80281250[controller_index].joystick[1];

View File

@@ -345,14 +345,12 @@ void ml_vec3f_roll_rotate_copy(f32 dst[3], f32 src[3], f32 roll)
dst[0] = val;
}
void ml_vec3f_set_length(f32 arg0[3], f32 arg1)
{
f32 length = LENGTH_VEC3F(arg0);
void ml_vec3f_set_length(f32 vec[3], f32 length) {
f32 vec_length = LENGTH_VEC3F(vec);
if (length != 0)
{
f32 inv_length = arg1 / length;
TUPLE_SCALE_COPY(arg0, arg0, inv_length)
if (vec_length != 0) {
f32 inv_length = length / vec_length;
TUPLE_SCALE_COPY(vec, vec, inv_length)
}
}
@@ -942,14 +940,13 @@ int func_802585E0(s32 vec[3], s32 minX, s32 minY, s32 minZ, s32 maxX, s32 maxY,
&& vec[2] > minZ && vec[2] < maxZ;
}
//ml_vec3f_horizontal_distance_zero_likely
f32 func_80258640(f32 vec1[3], f32 vec2[3])
{
f32 ml_vec3f_horizontal_distance_zero_likely(f32 vec1[3], f32 vec2[3]) {
f32 dX = vec1[0] - vec2[0];
f32 dZ = vec1[2] - vec2[2];
if (dX != 0 || dZ != 0)
if (dX != 0 || dZ != 0) {
return gu_sqrtf(_SQ2(dX, dZ));
}
return 0;
}

View File

@@ -14,7 +14,7 @@ void func_802409C0(f32 arg0[3], f32 arg1){
f32 dt;
dt = time_getDelta()*arg1;
func_8024E71C(0, sp28);
controller_getJoystick(0, sp28);
sp30[0] = sp28[0] * dt;
sp30[1] = 0.0f;
@@ -46,7 +46,7 @@ void func_80240AC8(f32 arg0[3], f32 arg1){
f32 dt;
dt = time_getDelta()*arg1;
func_8024E71C(0, sp28);
controller_getJoystick(0, sp28);
if(0.0f != sp28[0] || 0.0f != sp28[1]){
D_80275860++;