mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-18 22:26:43 -04:00
match few of m_lib funcs
This commit is contained in:
@@ -20,4 +20,6 @@ m_room_type/mRmTp_FtrItemNo2FtrIdx.c:
|
||||
# zurumode/zurumode.c:
|
||||
# .text: [0x8040eb38, 0x8040f008]
|
||||
# .bss: [0x812f9670, 0x812f9680]
|
||||
# .data: [0x8065F9F0, 0x8065FA20]
|
||||
# .data: [0x8065F9F0, 0x8065FA20]
|
||||
sys_vimgr.c:
|
||||
.text: [0x803703F8, 0x80370418]
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef VI_H
|
||||
#define VI_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
void VISetBlack(BOOL);
|
||||
|
||||
#endif
|
||||
+2
-2
@@ -61,6 +61,6 @@ void _Game_play_isPause(u32 //IDK);
|
||||
//Unsure
|
||||
//?? check_percent_abs();
|
||||
//?? get_percent_forAccelBrake();
|
||||
//?? Game_play_Projection_Trans();
|
||||
//?? get_percent();
|
||||
void Game_play_Projection_Trans(game_play*, Vec3f*, Vec3f);
|
||||
f32 get_percent(s32, s32, s32);
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef SYS_VIMGR_H
|
||||
#define SYS_VIMGR_H
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/vi.h"
|
||||
|
||||
void viBlack(BOOL);
|
||||
|
||||
#endif
|
||||
+38
@@ -1,5 +1,7 @@
|
||||
#include "m_lib.h"
|
||||
|
||||
|
||||
|
||||
void mem_copy(u8* arg0, u8* arg1, u32 arg2) {
|
||||
while (arg2 != 0) {
|
||||
*arg0 = *arg1;
|
||||
@@ -331,3 +333,39 @@ u32 none_proc1(void){
|
||||
void none_proc2(void){
|
||||
//stub
|
||||
}
|
||||
|
||||
// f32 check_percent_abs(s32 arg0, f32 arg8, f32 arg9, f32 argA, f32 argB)
|
||||
// f32 get_percent_forAccelBrake(f32 arg8, f32 arg9, f32 argA, f32 argB, f32 argC)
|
||||
|
||||
|
||||
void Game_play_Projection_Trans(game_play* play, Vec3f* src, Vec3f* dest) {
|
||||
f32 w;
|
||||
|
||||
Matrix_mult(&play->unk_200C, 0);
|
||||
Matrix_Position(src, dest);
|
||||
w = play->unk_200C.ww + (
|
||||
(play->unk_200C.wx * src->x)
|
||||
+ (play->unk_200C.wy * src->y)
|
||||
+ (play->unk_200C.wz * src->z));
|
||||
dest->x = 160.0f + ((dest->x / w) * 160.0f);
|
||||
dest->y = 120.0f - ((dest->y / w) * 120.0f);
|
||||
}
|
||||
|
||||
f32 get_percent(s32 arg0, s32 arg1, s32 arg2) {
|
||||
f32 temp_f0;
|
||||
f32 var_f2;
|
||||
|
||||
var_f2 = 1.0f;
|
||||
if (arg2 < arg1) {
|
||||
var_f2 = 0.0f;
|
||||
} else if (arg2 < arg0) {
|
||||
temp_f0 = (f32) (arg0 - arg1);
|
||||
if (temp_f0 != 0.0f) {
|
||||
var_f2 = (f32) (arg2 - arg1) / temp_f0;
|
||||
if (var_f2 > 1.0f) {
|
||||
var_f2 = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
return var_f2;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#include "sys_vimgr.h"
|
||||
|
||||
void viBlack(BOOL black){
|
||||
VISetBlack(black);
|
||||
}
|
||||
Reference in New Issue
Block a user