summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2020-04-05 13:07:40 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2020-04-05 13:07:40 -0400
commitf15a7050216e9e2d01b747439826ff806ce48c0b (patch)
treebd06cb2a79c66a84598f167c7bcd419a213ded45 /src
parent585a1170c95bc3891eca825c125bf30f600b60cf (diff)
Resolve compile warnings in modern
Diffstat (limited to 'src')
-rw-r--r--src/battle_anim_mon_movement.c1
-rw-r--r--src/intro.c2
-rw-r--r--src/task.c2
-rw-r--r--src/util.c4
4 files changed, 5 insertions, 4 deletions
diff --git a/src/battle_anim_mon_movement.c b/src/battle_anim_mon_movement.c
index ffd66871c..8ed996993 100644
--- a/src/battle_anim_mon_movement.c
+++ b/src/battle_anim_mon_movement.c
@@ -4,6 +4,7 @@
#include "task.h"
#include "trig.h"
+#undef abs
#define abs(x) ((x) < 0 ? -(x) : (x))
static void AnimTask_ShakeMonStep(u8 taskId);
diff --git a/src/intro.c b/src/intro.c
index 7e1030090..b04bdf9b1 100644
--- a/src/intro.c
+++ b/src/intro.c
@@ -2045,7 +2045,7 @@ static void Task_FightScene3_Bg0Scroll(u8 taskId)
static void SpriteCB_LargeStar(struct Sprite * sprite)
{
- u32 v;
+ unsigned v;
sprite->data[0] -= sprite->data[2];
sprite->data[1] += sprite->data[3];
sprite->data[4] += 48;
diff --git a/src/task.c b/src/task.c
index fafa7c70d..83800a440 100644
--- a/src/task.c
+++ b/src/task.c
@@ -201,7 +201,7 @@ u8 GetTaskCount(void)
return count;
}
-void SetWordTaskArg(u8 taskId, u8 dataElem, u32 value)
+void SetWordTaskArg(u8 taskId, u8 dataElem, unsigned long value)
{
if (dataElem <= 14)
{
diff --git a/src/util.c b/src/util.c
index b32799584..5423e0a2d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -120,13 +120,13 @@ u8 CreateInvisibleSpriteWithCallback(void (*callback)(struct Sprite *))
return sprite;
}
-void StoreWordInTwoHalfwords(u16 *h, u32 w)
+void StoreWordInTwoHalfwords(u16 *h, unsigned w)
{
h[0] = (u16)(w);
h[1] = (u16)(w >> 16);
}
-void LoadWordFromTwoHalfwords(u16 *h, u32 *w)
+void LoadWordFromTwoHalfwords(u16 *h, unsigned *w)
{
*w = h[0] | (s16)h[1] << 16;
}