mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-10-07 02:24:01 +00:00
func_8018A950 OK + macros.h + ABS (#2)
This commit is contained in:
parent
722079c61d
commit
095ebbe09c
@ -2,6 +2,7 @@
|
||||
#define COMMON_H
|
||||
|
||||
#include "include_asm.h"
|
||||
#include "macros.h"
|
||||
#include "types.h"
|
||||
|
||||
#endif
|
||||
|
2
include/macros.h
Normal file
2
include/macros.h
Normal file
@ -0,0 +1,2 @@
|
||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
@ -493,7 +493,21 @@ void func_8018A8D4(u16 objectId, Entity *source, Entity *entity) {
|
||||
}
|
||||
#endif
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A950);
|
||||
s32 func_8018A950(Unkstruct5 *arg0) {
|
||||
s16 var_v0_2;
|
||||
|
||||
var_v0_2 = (u16)D_800733DA - arg0->unk2;
|
||||
var_v0_2 = ABS_ALT(var_v0_2);
|
||||
|
||||
if (var_v0_2 >= 0x11) {
|
||||
var_v0_2 = 0;
|
||||
} else {
|
||||
var_v0_2 = (u16)D_800733DE - arg0->unk6;
|
||||
var_v0_2 = ABS_ALT(var_v0_2);
|
||||
var_v0_2 = var_v0_2 < 0x21;
|
||||
}
|
||||
return var_v0_2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/st/wrp/nonmatchings/6FD0", func_8018A9C8);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user