diff options
-rw-r--r-- | arm9/src/unk_0201CBEC.c | 6 | ||||
-rw-r--r-- | arm9/src/unk_0202C0E0.c | 16 | ||||
-rw-r--r-- | include/unk_0201CBEC.h | 2 |
3 files changed, 11 insertions, 13 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) diff --git a/include/unk_0201CBEC.h b/include/unk_0201CBEC.h index a8c617d9..f3df6872 100644 --- a/include/unk_0201CBEC.h +++ b/include/unk_0201CBEC.h @@ -1,6 +1,6 @@ #ifndef POKEDIAMOND_UNK_0201CBEC_H #define POKEDIAMOND_UNK_0201CBEC_H -int FUN_0201CBEC(int a0, int a1, int a2, int a3); +s32 FUN_0201CBEC(s32 a0, s32 a1, s32 a2, s32 a3); #endif //POKEDIAMOND_UNK_0201CBEC_H |