summaryrefslogtreecommitdiff
path: root/arm9/src
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/src')
-rw-r--r--arm9/src/unk_0201CBEC.c6
-rw-r--r--arm9/src/unk_0202C0E0.c16
2 files changed, 10 insertions, 12 deletions
diff --git a/arm9/src/unk_0201CBEC.c b/arm9/src/unk_0201CBEC.c
index 40e68efe..ea11f2aa 100644
--- a/arm9/src/unk_0201CBEC.c
+++ b/arm9/src/unk_0201CBEC.c
@@ -2,11 +2,11 @@
#include "fx.h"
#include "unk_0201CBEC.h"
-THUMB_FUNC int FUN_0201CBEC(int x1, int y1, int x2, int y2)
+THUMB_FUNC s32 FUN_0201CBEC(s32 x1, s32 y1, s32 x2, s32 y2)
{
// Calculate distance between two points with pythagoras
- int x_delta = x1 - x2;
- int y_delta = y1 - y2;
+ s32 x_delta = x1 - x2;
+ s32 y_delta = y1 - y2;
return FX_Sqrt((x_delta * x_delta + y_delta * y_delta) << 0xc) >> 0xc;
}
diff --git a/arm9/src/unk_0202C0E0.c b/arm9/src/unk_0202C0E0.c
index bf24908a..0b57926b 100644
--- a/arm9/src/unk_0202C0E0.c
+++ b/arm9/src/unk_0202C0E0.c
@@ -9,17 +9,15 @@ THUMB_FUNC u32 FUN_0202C0E0()
THUMB_FUNC void FUN_0202C0E4(struct UnkSaveStruct0202C0E4 *unkStruct)
{
+ s32 j, i;
- int j, i = 0;
-
- do {
- j = 0;
- do {
+ for (i = 0; i < 5; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
unkStruct->data[i][j] = 0;
- j++;
- } while (j < 4);
- i++;
- } while (i < 5);
+ }
+ }
}
THUMB_FUNC void FUN_0202C108(struct SaveBlock2 *sav2, u32 a1, u32 a2)