diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-06-26 08:13:38 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2019-06-26 12:12:10 -0400 |
commit | fb06e4a3c94ae17b73df6d3aecf2d18213aa183e (patch) | |
tree | 550586e95b1d117f9552213d94861c2ff8c318d4 /src/ghost.c | |
parent | 3f43523352b279fc4498ee4bfde2213504e3ece8 (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.c | 3 |
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)); |