Commit Graph

22 Commits

Author SHA1 Message Date
Michael Panzlaff 7500534676 fix unaligned memory access in BlendPalette
This problem is only going to occur in versions where the palette
buffer isn't aligned to 4 bytes (which it is in a matching pokeemerald).

Since agbcc returns sizeof(PlttData) = 4, it will read words
instead of half words. This causes unnecessary emulator warnings
in the function "BlendPalette".
Aligning the buffers to 4 bytes fixes this.
2019-06-29 11:08:46 -05:00
Phlosioneer 37bea25b01 Name the possible return values of palette fading functions
Also replace implicit conversion from gPalette.active into a status with
if statements, to make the return value clear.

I've also added comments when the check is redundant.
2019-02-09 21:50:12 -05:00
DizzyEggg c0db311637 some more fakematch fix 2019-02-01 12:26:40 +01:00
Diegoisawesome bd7c251859 Fix compressed palette alignment 2018-12-18 20:15:59 -06:00
DizzyEggg 7a008a944a Move 'blend_palette'.c to util.c 2018-10-14 14:43:19 +02:00
Diegoisawesome 4c6f6c4738 Use fixed width types in TintPalette funcs 2018-02-06 12:47:09 -06:00
DizzyEggg 1902ff0238 match palette functions 2018-02-06 15:31:04 +01:00
DizzyEggg 78728ae454 add rgb constants 2018-01-29 14:36:13 +01:00
Diegoisawesome 6bd6cfcac7 Merge remote-tracking branch 'pret/master' 2017-12-22 01:22:16 -06:00
Diegoisawesome 0e8d6645f8 Attempts to fix nonmatchings in palette.c 2017-12-22 01:03:16 -06:00
DizzyEggg 314b96af46 static names given s prefix 2017-12-17 23:45:27 +01:00
Diegoisawesome f1b6358047 Port/decomp scrcmd 2017-10-12 02:06:19 -05:00
PikalaxALT 3ec4d98de9 Split palette and tileset_anims 2017-10-01 22:10:53 -04:00
PikalaxALT 993d5e2a6a clean up declarations in src/palette.c 2017-10-01 21:50:58 -04:00
PikalaxALT a1ccd78218 Disassemble pointer tables in data/tileset.s 2017-09-30 22:16:51 -04:00
PikalaxALT 20ed9ad0ac Decompile asm/tileset.s into src/palette.c 2017-09-30 21:19:29 -04:00
DizzyEggg 75a94ce58e split and label 2017-09-04 12:22:04 +02:00
Diegoisawesome c47e109fbf Use constant NUM_TASKS in palette.c 2017-03-07 07:47:23 -06:00
ProjectRevoTPP 5e42b2a558 formatting 2017-03-06 19:57:52 +00:00
ProjectRevoTPP 1bbdaee1e1 clean up a few functions in palette.c 2017-03-06 08:37:33 +00:00
ProjectRevoTPP 4df1842682 resolve implicit declarations and enforce warnings as errors 2017-03-05 07:35:03 +00:00
Diegoisawesome 56f5e8bdab Disassemble palette.s
All but two functions match.
2017-03-04 22:43:34 -06:00