Review changes

This commit is contained in:
who-knows-who
2021-03-06 16:19:38 +00:00
parent 6f6bf00b66
commit 6b7b7395fb
3 changed files with 11 additions and 13 deletions

View File

@@ -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;
}

View File

@@ -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)

View File

@@ -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