Skip to content

Commit

Permalink
Sprite tweaks, players on Town Map match Overworld
Browse files Browse the repository at this point in the history
  • Loading branch information
JustRegularLuna committed Nov 7, 2018
1 parent 2977a26 commit c95e2e2
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 31 deletions.
32 changes: 5 additions & 27 deletions color/sprites.asm
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
24 changes: 24 additions & 0 deletions constants/sprite_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions data/mapObjects/CeruleanCity.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data/mapObjects/VermilionHouse3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data/sprite_sets.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 34 additions & 0 deletions engine/town_map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c95e2e2

Please sign in to comment.