diff options
author | stag019 <stag019@gmail.com> | 2012-09-20 18:45:32 -0400 |
---|---|---|
committer | stag019 <stag019@gmail.com> | 2012-09-20 18:45:32 -0400 |
commit | 63fc23b74ece8c4052d1fc75d330d8bbc22f0a2a (patch) | |
tree | 9ab26c91c365a69f64512ce9445166592247cccd /main.asm | |
parent | 507170d0ee1ceb54e7f51069635e2d786a13be3d (diff) |
Code dealing with palettes. Really, does anyone know if bit 3 of battle status 3 is used?
Diffstat (limited to 'main.asm')
-rw-r--r-- | main.asm | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -70075,7 +70075,40 @@ UnnamedText_71dda: ; 0x71dda db $50 ; 0x71dda + 5 bytes -INCBIN "baserom.gbc",$71ddf,$7e9 +INCBIN "baserom.gbc",$71DDF,$71E12-$71DDF + + ld a, [W_PLAYERBATTSTATUS3] + ld hl, $D014 ; player Pokemon ID + call DeterminePaletteID + ld b, a + ld a, [W_ENEMYBATTSTATUS3] + ld hl, $CFD8 ; enemy Pokemon ID + call DeterminePaletteID + +INCBIN "baserom.gbc",$71E25,$71F97-$71E25 + +DeterminePaletteID: + bit 3, a ; bit 3 of battle status 3 (unused?) + ld a, PAL_GREYMON + ret nz + ld a, [hl] + ld [$D11E], a + and a + jr z, .idZero + push bc + ld a, $3A + call Predef ; turn Pokemon ID number into Pokedex number + pop bc + ld a, [$D11E] +.idZero + ld e, a + ld d, $00 + ld hl, MonsterPalettes ; not just for Pokemon, Trainers use it too + add hl, de + ld a, [hl] + ret + +INCBIN "baserom.gbc",$71FB6,$725C8-$71FB6 MonsterPalettes: ; 65C8 db PAL_MEWMON ; MISSINGNO |