Merge pull request #285 from CecilArmitais/decomp-UFixedPoint64CmpLt
Some checks failed
build / build (push) Has been cancelled

Decomp UFixedPoint64CmpLt
This commit is contained in:
AnonymousRandomPerson
2026-08-05 21:10:34 -04:00
committed by GitHub
6 changed files with 13 additions and 23 deletions

View File

@@ -1,2 +0,0 @@
#pragma once

View File

@@ -1,18 +0,0 @@
.include "asm/macros.inc"
.include "main_02001A30.inc"
.text
; https://decomp.me/scratch/bOtSO
arm_func_start UFixedPoint64CmpLt
UFixedPoint64CmpLt: ; 0x02001A30
cmp r0, r2
movlo r0, #1
bxlo lr
movhi r0, #0
bxhi lr
cmp r1, r3
movlo r0, #1
movhs r0, #0
bx lr
arm_func_end UFixedPoint64CmpLt

View File

@@ -3,5 +3,6 @@
s32 SinAbs4096(s32 x);
s32 CosAbs4096(s32 x);
BOOL UFixedPoint64CmpLt(u32 a_hi, u32 a_lo, u32 b_hi, u32 b_lo);
#endif //PMDSKY_MAIN_020018D0_H

View File

@@ -17,7 +17,6 @@ Static main
Object src/main_02001894.o
Object asm/main_020018A4.o
Object src/main_020018D0.o
Object asm/main_02001A30.o
Object src/main_02001A54.o
Object asm/main_02001B0C.o
Object src/main_02001BB4.o

View File

@@ -36,3 +36,14 @@ s32 CosAbs4096(s32 x)
return 0;
}
}
BOOL UFixedPoint64CmpLt(u32 a_hi, u32 a_lo, u32 b_hi, u32 b_lo)
{
if (a_hi < b_hi) {
return TRUE;
}
if (a_hi > b_hi) {
return FALSE;
}
return a_lo < b_lo;
}

View File

@@ -1,7 +1,6 @@
#include "main_020018D0.h"
#include "main_02001BB4.h"
extern s32 UFixedPoint64CmpLt(s32, u32, s32, u32);
u32 sub_02001BB4(s32 x, s32 y)
{
u32 var_r4;