Skip to content

Commit

Permalink
Color Plus update
Browse files Browse the repository at this point in the history
Miscellaneous updates and small fixes.
Move OakIntro_ResetPlayerSpriteData in oak_intro.asm.
Center the chairs in Mansion tileset.
  • Loading branch information
Engezerstorung committed Oct 26, 2024
1 parent 540f7c7 commit 90f57b0
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 20 deletions.
18 changes: 6 additions & 12 deletions color/color.asm
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
; Extending bank 1C, same bank as engine/palettes.asm (for "SetPal" functions)
SECTION "bank1C_extension", ROMX

; Load red sprite palette at the end of Oack Speech, before the player map sprite appear
OakIntro_ResetPlayerSpriteData:
lb de, SPRITE_PAL_RED, 0
call LoadSpritePalette
jp ResetPlayerSpriteData

; Load Palettes for boulder dust or pokecenter healing machine when needed
; Load Palettes for cut animation and pokecenter healing machine when needed
InitCutAnimOAM:
ld hl, wCurrentMapScriptFlags
set 0, [hl] ; prevent SetPal_Overworld before cut is done
Expand All @@ -24,17 +18,17 @@ InitCutAnimOAM:
jr z, .paletteSelected
ld d, SPRITE_PAL_INDOORTREE
.paletteSelected
ld e, 7
call LoadSpritePalette
call LoadAndUpdateAnimationPalette
jpfar _InitCutAnimOAM

AnimateHealingMachine:
lb de, SPRITE_PAL_HEALINGMACHINE, 7
call LoadSpritePalette
ld d, SPRITE_PAL_HEALINGMACHINE
call LoadAndUpdateAnimationPalette
farcall _AnimateHealingMachine
jp SetPal_Overworld

LoadSpritePalette:
LoadAndUpdateAnimationPalette:
ld e, 7
farcall LoadMapPalette_Sprite
; Update palettes
ld a, 2
Expand Down
2 changes: 1 addition & 1 deletion color/data/map_palette_sets.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MapPaletteSets:
.forestPalSet:
.plateauPalSet:
db OUTDOOR_GRAY
db OUTDOOR_RED
db OUTDOOR_FLOWER
db OUTDOOR_GREEN
db OUTDOOR_BLUE
db OUTDOOR_YELLOW
Expand Down
1 change: 1 addition & 0 deletions color/data/spritepalettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ DEF const_value = 0
const SPRITE_PAL_PURPLEMON
const SPRITE_PAL_YELLOWMON
const SPRITE_PAL_GREYMON

const SPRITE_PAL_RED
const SPRITE_PAL_PINK
const SPRITE_PAL_PURPLE
Expand Down
7 changes: 3 additions & 4 deletions color/loadpalettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ BgPalSwap:
ld a, [hli]
ld e, a
push hl
farcall LoadMapPalette
call LoadMapPalette
pop hl
pop af
cp [hl]
Expand All @@ -269,7 +269,7 @@ SprPalSwap:
ld a, [hli]
ld e, a
push hl
farcall LoadMapPalette_Sprite
call LoadMapPalette_Sprite
pop hl
pop af
cp [hl]
Expand All @@ -281,15 +281,14 @@ SprPalSwap:
TilesetBgPalSwapList:
db CEMETERY, CEMETERY_STAIRS, 4
db CEMETERY, INDOOR_PURPLE, 6
db FOREST, OUTDOOR_FLOWER, 1
db GATE, GATE_STAIRS, 4
db GYM, INDOOR_GREEN_BG, 2
db GYM, INDOOR_FLOWER, 4
db INTERIOR, OUTDOOR_GREEN, 2
db MART, PC_POKEBALL_PAL, 7
db MUSEUM, GATE_STAIRS, 4
db OVERWORLD, OUTDOOR_FLOWER, 1
db POKECENTER, PC_POKEBALL_PAL, 7
db PLATEAU, OUTDOOR_RED, 1
db UNDERGROUND, UNDERGROUND_STAIRS, 1
db -1

Expand Down
11 changes: 11 additions & 0 deletions color/oak_intro.asm
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ GotPalID:
ldh [rSVBK], a
ret

; Load red sprite palette at the end of Oack Speech, before the player map sprite appear
OakIntro_ResetPlayerSpriteData:
lb de, SPRITE_PAL_RED, 0
farcall LoadMapPalette_Sprite
; Update palettes
ld a, 2
ldh [rSVBK], a
ld a, 1
ld [W2_ForceOBPUpdate], a
ldh [rSVBK], a
jp ResetPlayerSpriteData
2 changes: 1 addition & 1 deletion color/sprites.asm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoadSpecialOverworldSpritePalettes:
jr nz, .notOutside
.isOutside
lb de, SPRITE_PAL_OUTDOORDUST, 7
farcall LoadMapPalette_Sprite
call LoadMapPalette_Sprite
.notOutside

; Check map to load sprite specific palettes (list in color/loadpalettes.asm)
Expand Down
2 changes: 1 addition & 1 deletion engine/movie/oak_speech/oak_speech.asm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ ENDC
ld de, ShrinkPic2
lb bc, BANK(ShrinkPic2), $00
call IntroDisplayPicCenteredOrUpperRight
farcall OakIntro_ResetPlayerSpriteData ; originally "call ResetPlayerSpriteData"
call OakIntro_ResetPlayerSpriteData ; originally "call ResetPlayerSpriteData"
ldh a, [hLoadedROMBank]
push af
ld a, BANK(Music_PalletTown)
Expand Down
Binary file modified gfx/tilesets/mansion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion includes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ELIF WHITE_POINT == 2 ; Lighter BGB white point
DEF wGreen = 27
DEF wBlue = 24

ELIF WHITE_POINT == 3 ; Lighter BGB white point
ELIF WHITE_POINT == 3 ; Darker BGB white point
DEF wRed = 16
DEF wGreen = 17
DEF wBlue = 15
Expand Down

0 comments on commit 90f57b0

Please sign in to comment.