summaryrefslogtreecommitdiff
path: root/src/ghost.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-06-26 08:13:38 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-06-26 12:12:10 -0400
commitfb06e4a3c94ae17b73df6d3aecf2d18213aa183e (patch)
tree550586e95b1d117f9552213d94861c2ff8c318d4 /src/ghost.c
parent3f43523352b279fc4498ee4bfde2213504e3ece8 (diff)
Modernize code
Can compile with arm-none-eabi-gcc 8.3.0 gbafix correctly handles ELF input
Diffstat (limited to 'src/ghost.c')
-rw-r--r--src/ghost.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ghost.c b/src/ghost.c
index 97b86aa76..dd29fb7ca 100644
--- a/src/ghost.c
+++ b/src/ghost.c
@@ -1148,7 +1148,8 @@ static void sub_8112B78(struct Sprite *sprite)
if (++coeffB > 16)
coeffB = 16;
- if (--(s16)coeffA < 0)
+ --coeffA;
+ if ((s16)coeffA < 0)
coeffA = 0;
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(coeffA, coeffB));