From c95e2e2bc460f149c6c5ce507b46619ceebd0b9a Mon Sep 17 00:00:00 2001 From: TheFakeMateo Date: Tue, 6 Nov 2018 21:38:01 -0600 Subject: [PATCH] Sprite tweaks, players on Town Map match Overworld --- color/sprites.asm | 32 +++++---------------------- constants/sprite_constants.asm | 24 ++++++++++++++++++++ data/mapObjects/CeruleanCity.asm | 4 ++-- data/mapObjects/VermilionHouse3.asm | 2 +- data/sprite_sets.asm | 2 +- engine/town_map.asm | 34 +++++++++++++++++++++++++++++ 6 files changed, 67 insertions(+), 31 deletions(-) diff --git a/color/sprites.asm b/color/sprites.asm index 0f0bdec45..3a6f65dbf 100755 --- a/color/sprites.asm +++ b/color/sprites.asm @@ -1,27 +1,5 @@ ; Handles sprite attributes -ATK_PAL_GREY EQU 0 -ATK_PAL_BLUE EQU 1 -ATK_PAL_RED EQU 2 -ATK_PAL_BROWN EQU 3 -ATK_PAL_YELLOW EQU 4 -ATK_PAL_GREEN EQU 5 -ATK_PAL_ICE EQU 6 -ATK_PAL_PURPLE EQU 7 -; 8: color based on attack type -; 9: don't change color palette (assume it's already set properly from elsewhere) - - -PAL_OW_RED EQU 0 -PAL_OW_BLUE EQU 1 -PAL_OW_GREEN EQU 2 -PAL_OW_BROWN EQU 3 -PAL_OW_PURPLE EQU 4 -PAL_OW_EMOJI EQU 5 -PAL_OW_TREE EQU 6 -PAL_OW_ROCK EQU 7 -PAL_OW_RANDOM EQU 8 ; pseudorandom - LoadOverworldSpritePalettes: ld a,[rSVBK] ld b,a @@ -344,7 +322,7 @@ SpritePaletteAssignments: ; Characters on the overworld db PAL_OW_RANDOM ; 0x09: SPRITE_BIRD - db PAL_OW_RED + db PAL_OW_BROWN ; 0x0a: SPRITE_FAT_BALD_GUY db PAL_OW_RANDOM @@ -563,7 +541,7 @@ SpritePaletteAssignments: ; Characters on the overworld db PAL_OW_RED ; 0x51: SPRITE_OMANYTE - db PAL_OW_ROCK + db PAL_OW_BROWN ; 0x52: SPRITE_BOULDER db PAL_OW_ROCK @@ -572,7 +550,7 @@ SpritePaletteAssignments: ; Characters on the overworld db PAL_OW_BROWN ; 0x54: SPRITE_BOOK_MAP_DEX - db PAL_OW_RED + db PAL_OW_BROWN ; 0x55: SPRITE_CLIPBOARD db PAL_OW_BROWN @@ -581,10 +559,10 @@ SpritePaletteAssignments: ; Characters on the overworld db PAL_OW_BLUE ; 0x57: SPRITE_OLD_AMBER_COPY - db PAL_OW_BROWN + db PAL_OW_RED ; 0x58: SPRITE_OLD_AMBER - db PAL_OW_BROWN + db PAL_OW_RED ; 0x59: SPRITE_POKEDEX db PAL_OW_RED diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index 8f56250b6..3cdc326b2 100755 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -138,3 +138,27 @@ SPRITE_FACING_DOWN EQU $00 SPRITE_FACING_UP EQU $04 SPRITE_FACING_LEFT EQU $08 SPRITE_FACING_RIGHT EQU $0C + + +; Moved these here instead of making them local +ATK_PAL_GREY EQU 0 +ATK_PAL_BLUE EQU 1 +ATK_PAL_RED EQU 2 +ATK_PAL_BROWN EQU 3 +ATK_PAL_YELLOW EQU 4 +ATK_PAL_GREEN EQU 5 +ATK_PAL_ICE EQU 6 +ATK_PAL_PURPLE EQU 7 +; 8: color based on attack type +; 9: don't change color palette (assume it's already set properly from elsewhere) + +; Moved these here instead of making them local +PAL_OW_RED EQU 0 +PAL_OW_BLUE EQU 1 +PAL_OW_GREEN EQU 2 +PAL_OW_BROWN EQU 3 +PAL_OW_PURPLE EQU 4 +PAL_OW_EMOJI EQU 5 +PAL_OW_TREE EQU 6 +PAL_OW_ROCK EQU 7 +PAL_OW_RANDOM EQU 8 ; pseudorandom diff --git a/data/mapObjects/CeruleanCity.asm b/data/mapObjects/CeruleanCity.asm index b6317e2c7..3bdd35cfb 100755 --- a/data/mapObjects/CeruleanCity.asm +++ b/data/mapObjects/CeruleanCity.asm @@ -27,12 +27,12 @@ CeruleanCityObject: object SPRITE_BLACK_HAIR_BOY_1, $1f, $14, STAY, DOWN, $3 ; person object SPRITE_BLACK_HAIR_BOY_2, $f, $12, WALK, $1, $4 ; person object SPRITE_BLACK_HAIR_BOY_2, $9, $15, WALK, $2, $5 ; person - object SPRITE_GUARD, $1c, $c, STAY, DOWN, $6 ; person + object SPRITE_OFFICER_JENNY, $1c, $c, STAY, DOWN, $6 ; person object SPRITE_LASS, $1d, $1a, STAY, LEFT, $7 ; person object SPRITE_SLOWBRO, $1c, $1a, STAY, DOWN, $8 ; person object SPRITE_LASS, $9, $1b, WALK, $2, $9 ; person object SPRITE_BLACK_HAIR_BOY_2, $4, $c, STAY, DOWN, $a ; person - object SPRITE_GUARD, $1b, $c, STAY, DOWN, $b ; person + object SPRITE_OFFICER_JENNY, $1b, $c, STAY, DOWN, $b ; person ; warp-to EVENT_DISP CERULEAN_CITY_WIDTH, $b, $1b ; TRASHED_HOUSE diff --git a/data/mapObjects/VermilionHouse3.asm b/data/mapObjects/VermilionHouse3.asm index 2b8e007b3..9f81188e3 100755 --- a/data/mapObjects/VermilionHouse3.asm +++ b/data/mapObjects/VermilionHouse3.asm @@ -8,7 +8,7 @@ VermilionHouse3Object: db $0 ; signs db $1 ; objects - object SPRITE_LITTLE_GIRL, $3, $5, STAY, UP, $1 ; person + object SPRITE_OFFICER_JENNY, $3, $5, STAY, UP, $1 ; person ; warp-to EVENT_DISP VERMILION_HOUSE_3_WIDTH, $7, $2 diff --git a/data/sprite_sets.asm b/data/sprite_sets.asm index cab04074f..b63579121 100755 --- a/data/sprite_sets.asm +++ b/data/sprite_sets.asm @@ -79,7 +79,7 @@ SpriteSets: db SPRITE_HIKER db SPRITE_SLOWBRO db SPRITE_BLUE - db SPRITE_GUARD + db SPRITE_OFFICER_JENNY db SPRITE_LASS db SPRITE_BLACK_HAIR_BOY_1 db SPRITE_BALL diff --git a/engine/town_map.asm b/engine/town_map.asm index a1f2b256a..3c31d351c 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -450,6 +450,40 @@ WriteTownMapSpriteOAM: ld b, h ld c, l pop hl + lb de, 2, 2 +.loop + push de + push bc +.innerLoop + ld a, b + ld [hli], a + ld a, c + ld [hli], a + ld a, [wOAMBaseTile] + ld [hli], a + inc a + ld [wOAMBaseTile], a + ld a, [wPlayerGender] + and a ; Are you a boy? Or a girl? + ld a, PAL_OW_GREEN + jr nz, .gotPal + xor a ; ld a, PAL_OW_RED +.gotPal + ld [hli], a + inc d + ld a, 8 + add c + ld c, a + dec e + jr nz, .innerLoop + pop bc + pop de + ld a, 8 + add b + ld b, a + dec d + jr nz, .loop + ret WriteAsymmetricMonPartySpriteOAM: ; Writes 4 OAM blocks for a helix mon party sprite, since it does not have