diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 4c3b23fc9..ca468f477 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -20,5 +20,4 @@ HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels EXP_BAR_LENGTH EQU 8 ; tiles EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels - PALPACKET_LENGTH EQU $10 diff --git a/tilesets/palettes/battle_tower.pal b/data/palettes/tilesets/battle_tower.pal similarity index 100% rename from tilesets/palettes/battle_tower.pal rename to data/palettes/tilesets/battle_tower.pal diff --git a/tilesets/palettes/house_1.pal b/data/palettes/tilesets/house_1.pal similarity index 100% rename from tilesets/palettes/house_1.pal rename to data/palettes/tilesets/house_1.pal diff --git a/tilesets/palettes/ice_path.pal b/data/palettes/tilesets/ice_path.pal similarity index 100% rename from tilesets/palettes/ice_path.pal rename to data/palettes/tilesets/ice_path.pal diff --git a/tilesets/palettes/pokecom_center.pal b/data/palettes/tilesets/pokecom_center.pal similarity index 100% rename from tilesets/palettes/pokecom_center.pal rename to data/palettes/tilesets/pokecom_center.pal diff --git a/tilesets/palettes/radio_tower.pal b/data/palettes/tilesets/radio_tower.pal similarity index 100% rename from tilesets/palettes/radio_tower.pal rename to data/palettes/tilesets/radio_tower.pal diff --git a/data/type_matchups.asm b/data/type_matchups.asm index b1e06c6f7..61fd19078 100644 --- a/data/type_matchups.asm +++ b/data/type_matchups.asm @@ -5,7 +5,7 @@ NOT_VERY_EFFECTIVE EQU 05 NO_EFFECT EQU 00 TypeMatchups: ; 34bb1 - ; attacker defender*= + ; attacker, defender, *= db NORMAL, ROCK, NOT_VERY_EFFECTIVE db NORMAL, STEEL, NOT_VERY_EFFECTIVE db FIRE, FIRE, NOT_VERY_EFFECTIVE diff --git a/engine/mail.asm b/engine/mail.asm index 392405b20..90fcc5548 100755 --- a/engine/mail.asm +++ b/engine/mail.asm @@ -383,7 +383,7 @@ MailboxPC_PrintMailAuthor: ; 0x447fb MailboxPC: ; 0x44806 xor a - ld [OBPals + 8 * 6], a + ld [OBPals palette 6], a ld a, 1 ld [wCurMessageIndex], a .loop @@ -397,11 +397,11 @@ MailboxPC: ; 0x44806 ld a, [wCurMessageIndex] ld [wMenuCursorBuffer], a - ld a, [OBPals + 8 * 6] + ld a, [OBPals palette 6] ld [wMenuScrollPosition], a call ScrollingMenu ld a, [wMenuScrollPosition] - ld [OBPals + 8 * 6], a + ld [OBPals palette 6], a ld a, [wMenuCursorY] ld [wCurMessageIndex], a diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm index a4a07bc4d..7fc364f70 100644 --- a/engine/timeofdaypals.asm +++ b/engine/timeofdaypals.asm @@ -41,19 +41,18 @@ _TimeOfDayPals:: ; 8c011 ; update palette id ld [TimeOfDayPal], a - -; save bg palette 8 - ld hl, UnknBGPals + 8 * 7 ; UnknBGPals + 7 pals +; save bg palette 7 + ld hl, UnknBGPals palette PAL_BG_TEXT ; save wram bank ld a, [rSVBK] ld b, a ; wram bank 5 - ld a, 5 + ld a, $5 ld [rSVBK], a ; push palette - ld c, 4 ; NUM_PAL_COLORS + ld c, NUM_PAL_COLORS .push ld d, [hl] inc hl @@ -73,7 +72,7 @@ _TimeOfDayPals:: ; 8c011 call GetSGBLayout -; restore bg palette 8 +; restore bg palette 7 ld hl, UnknOBPals - 1 ; last byte in UnknBGPals ; save wram bank @@ -84,7 +83,7 @@ _TimeOfDayPals:: ; 8c011 ld [rSVBK], a ; pop palette - ld e, 4 ; NUM_PAL_COLORS + ld e, NUM_PAL_COLORS .pop pop bc ld [hl], c diff --git a/event/heal_machine_anim.asm b/event/heal_machine_anim.asm index 4f543c0b3..c7789a28d 100755 --- a/event/heal_machine_anim.asm +++ b/event/heal_machine_anim.asm @@ -126,14 +126,14 @@ HealMachineAnim: ; 12324 ; 123dc .PC_ElmsLab_OAM: ; 123dc - dsprite 4, 0, 4, 2, $7c, $16 - dsprite 4, 0, 4, 6, $7c, $16 - dsprite 4, 6, 4, 0, $7d, $16 - dsprite 4, 6, 5, 0, $7d, $36 ; xflip - dsprite 5, 3, 4, 0, $7d, $16 - dsprite 5, 3, 5, 0, $7d, $36 ; xflip - dsprite 6, 0, 4, 0, $7d, $16 - dsprite 6, 0, 5, 0, $7d, $36 ; xflip + dsprite 4, 0, 4, 2, $7c, PAL_OW_TREE | OBP_NUM + dsprite 4, 0, 4, 6, $7c, PAL_OW_TREE | OBP_NUM + dsprite 4, 6, 4, 0, $7d, PAL_OW_TREE | OBP_NUM + dsprite 4, 6, 5, 0, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP + dsprite 5, 3, 4, 0, $7d, PAL_OW_TREE | OBP_NUM + dsprite 5, 3, 5, 0, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP + dsprite 6, 0, 4, 0, $7d, PAL_OW_TREE | OBP_NUM + dsprite 6, 0, 5, 0, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP ; 123fc .HealMachineGFX: ; 123fc @@ -141,12 +141,12 @@ INCBIN "gfx/overworld/heal_machine.2bpp" ; 1241c .HOF_OAM: ; 1241c - dsprite 7, 4, 10, 1, $7d, $16 - dsprite 7, 4, 10, 6, $7d, $16 - dsprite 7, 3, 9, 5, $7d, $16 - dsprite 7, 3, 11, 2, $7d, $16 - dsprite 7, 1, 9, 1, $7d, $16 - dsprite 7, 1, 11, 5, $7d, $16 + dsprite 7, 4, 10, 1, $7d, PAL_OW_TREE | OBP_NUM + dsprite 7, 4, 10, 6, $7d, PAL_OW_TREE | OBP_NUM + dsprite 7, 3, 9, 5, $7d, PAL_OW_TREE | OBP_NUM + dsprite 7, 3, 11, 2, $7d, PAL_OW_TREE | OBP_NUM + dsprite 7, 1, 9, 1, $7d, PAL_OW_TREE | OBP_NUM + dsprite 7, 1, 11, 5, $7d, PAL_OW_TREE | OBP_NUM ; 12434 .LoadPalettes: ; 12434 @@ -158,8 +158,8 @@ INCBIN "gfx/overworld/heal_machine.2bpp" .cgb ld hl, .palettes - ld de, OBPals + 8 * 6 - ld bc, 8 + ld de, OBPals palette PAL_OW_TREE + ld bc, 1 palettes ld a, $5 call FarCopyWRAM ld a, $1 @@ -201,7 +201,7 @@ INCBIN "gfx/overworld/heal_machine.2bpp" ld a, $5 ld [rSVBK], a - ld hl, OBPals + 8 * 6 + ld hl, OBPals palette PAL_OW_TREE ld a, [hli] ld e, a ld a, [hli] diff --git a/home/palettes.asm b/home/palettes.asm index 80e4e25ec..10f537dde 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -246,7 +246,7 @@ CopyPals:: ; d50 ; copy c palettes in order b from de to hl push bc - ld c, 4 ; NUM_PAL_COLORS + ld c, NUM_PAL_COLORS .loop push de push hl @@ -280,7 +280,7 @@ CopyPals:: ; d50 jr nz, .loop ; de += 8 (next pal) - ld a, 1 palettes ; NUM_PAL_COLORS * 2 ; bytes per pal + ld a, NUM_PAL_COLORS * 2 add e jr nc, .ok inc d diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index fa58b7a05..6fbda0146 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -631,8 +631,8 @@ Function8949c: ; 8949c ld a, 5 ld [rSVBK], a ld hl, Palette_894b3 - ld de, UnknBGPals + 8 * 7 - ld bc, 8 + ld de, UnknBGPals palette 7 + ld bc, 1 palettes call CopyBytes pop af ld [rSVBK], a diff --git a/tilesets/special_palettes.asm b/tilesets/special_palettes.asm index 7ec2537e0..de7d09963 100644 --- a/tilesets/special_palettes.asm +++ b/tilesets/special_palettes.asm @@ -63,7 +63,7 @@ LoadPokeComPalette: ; 494f2 ; 49501 PokeComPalette: ; 49501 -INCLUDE "tilesets/palettes/pokecom_center.pal" +INCLUDE "data/palettes/tilesets/pokecom_center.pal" ; 49541 LoadBattleTowerPalette: ; 49541 @@ -76,7 +76,7 @@ LoadBattleTowerPalette: ; 49541 ; 49550 BattleTowerPalette: ; 49550 -INCLUDE "tilesets/palettes/battle_tower.pal" +INCLUDE "data/palettes/tilesets/battle_tower.pal" ; 49590 LoadIcePathPalette: ; 49590 @@ -89,7 +89,7 @@ LoadIcePathPalette: ; 49590 ; 4959f IcePathPalette: ; 4959f -INCLUDE "tilesets/palettes/ice_path.pal" +INCLUDE "data/palettes/tilesets/ice_path.pal" ; 495df LoadHousePalette: ; 495df @@ -102,7 +102,7 @@ LoadHousePalette: ; 495df ; 495ee HousePalette: ; 495ee -INCLUDE "tilesets/palettes/house_1.pal" +INCLUDE "data/palettes/tilesets/house_1.pal" ; 4962e LoadRadioTowerPalette: ; 4962e @@ -115,7 +115,7 @@ LoadRadioTowerPalette: ; 4962e ; 4963d RadioTowerPalette: ; 4963d -INCLUDE "tilesets/palettes/radio_tower.pal" +INCLUDE "data/palettes/tilesets/radio_tower.pal" ; 4967d MansionPalette1: ; 4967d