Final descriptive label in tilesets/animations.asm

This commit is contained in:
PikalaxALT 2015-10-13 14:29:34 -04:00
parent 88bc86b0bb
commit 12f9dca7a5
6 changed files with 88 additions and 97 deletions

View File

@ -225,7 +225,7 @@ SaveTheGame_yesorno: ; 14baf
Function14bcb: ; 14bcb Function14bcb: ; 14bcb
ld a, BANK(sPlayerData) ld a, BANK(sPlayerData)
call GetSRAMBank call GetSRAMBank
ld hl, sPlayerData + (PlayerID - wPlayerData) ld hl, sPlayerID
ld a, [hli] ld a, [hli]
ld c, [hl] ld c, [hl]
ld b, a ld b, a

View File

@ -175,4 +175,3 @@ ENDM
ldtile: MACRO ldtile: MACRO
ld \1, (\2 << 4) + \3 ld \1, (\2 << 4) + \3
ENDM ENDM

View File

@ -173,12 +173,12 @@ _ResetWRAM: ; 5bae
call ByteFill call ByteFill
ld hl, wd000 ld hl, wd000
ld bc, PlayerID - wd000 ld bc, wGameData - wd000
xor a xor a
call ByteFill call ByteFill
ld hl, PlayerID ld hl, wGameData
ld bc, wPokemonDataEnd - PlayerID ld bc, wGameDataEnd - wGameData
xor a xor a
call ByteFill call ByteFill
@ -61427,11 +61427,15 @@ endr
ret ret
; 8c0e5 ; 8c0e5
brightlevel: MACRO
db (\1 << 6) | (\2 << 4) | (\3 << 2) | \4
ENDM
Function8c0e5: ; 8c0e5 Function8c0e5: ; 8c0e5
ld hl, Unknown_8c10f ld hl, .BrightnessLevels
ld a, [wc2d0] ld a, [wc2d0]
cp $4 cp $4 ; Dark cave, needs Flash
jr z, .asm_8c0fc jr z, .DarkCave
and $7 and $7
add l add l
ld l, a ld l, a
@ -61441,28 +61445,28 @@ Function8c0e5: ; 8c0e5
ld a, [hl] ld a, [hl]
ld [wd847], a ld [wd847], a
ret ret
.asm_8c0fc .DarkCave
ld a, [StatusFlags] ld a, [StatusFlags]
bit 2, a bit 2, a
jr nz, .asm_8c109 jr nz, .UsedFlash
ld a, $ff ld a, $ff ; 3, 3, 3, 3
ld [wd847], a ld [wd847], a
ret ret
.asm_8c109 .UsedFlash
ld a, $aa ld a, $aa ; 2, 2, 2, 2
ld [wd847], a ld [wd847], a
ret ret
; 8c10f (23:410f) ; 8c10f (23:410f)
Unknown_8c10f: ; 8c10f .BrightnessLevels: ; 8c10f
db $e4 ; 3210 brightlevel 3, 2, 1, 0
db $55 ; 1111 brightlevel 1, 1, 1, 1
db $aa ; 2222 brightlevel 2, 2, 2, 2
db $00 ; 0000 brightlevel 0, 0, 0, 0
db $ff ; 3333 brightlevel 3, 3, 3, 3
db $e4 ; 3210 brightlevel 3, 2, 1, 0
db $e4 ; 3210 brightlevel 3, 2, 1, 0
db $e4 ; 3210 brightlevel 3, 2, 1, 0
; 8c117 ; 8c117
GetTimePalette: ; 8c117 GetTimePalette: ; 8c117

View File

@ -58,6 +58,7 @@ sOptions:: ds OptionsEnd - Options
s1_a008:: ds 1 s1_a008:: ds 1
sGameData:: sGameData::
sPlayerID::
sPlayerData:: ds wPlayerDataEnd - wPlayerData sPlayerData:: ds wPlayerDataEnd - wPlayerData
sMapData:: ds wMapDataEnd - wMapData sMapData:: ds wMapDataEnd - wMapData
sPokemonData:: ds wPokemonDataEnd - wPokemonData sPokemonData:: ds wPokemonDataEnd - wPokemonData

View File

@ -36,11 +36,9 @@ endr
jp [hl] jp [hl]
; fc01b ; fc01b
Tileset00Anim: ; 0xfc01b Tileset00Anim: ; 0xfc01b
Tileset02Anim: ; 0xfc01b Tileset02Anim: ; 0xfc01b
Tileset03Anim: ; 0xfc01b Tileset03Anim: ; 0xfc01b
; param, function
dwtile $14, VTiles2, AnimateWaterTile dwtile $14, VTiles2, AnimateWaterTile
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -55,7 +53,6 @@ Tileset03Anim: ; 0xfc01b
; 0xfc047 ; 0xfc047
Tileset25Anim: ; 0xfc047 Tileset25Anim: ; 0xfc047
; param, function
dwtile $14, VTiles2, AnimateWaterTile dwtile $14, VTiles2, AnimateWaterTile
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dwtile $5f, VTiles2, AnimateFountain dwtile $5f, VTiles2, AnimateFountain
@ -70,7 +67,6 @@ Tileset25Anim: ; 0xfc047
; 0xfc073 ; 0xfc073
Tileset31Anim: ; 0xfc073 Tileset31Anim: ; 0xfc073
; param, function
dw NULL, ForestTreeLeftAnimation dw NULL, ForestTreeLeftAnimation
dw NULL, ForestTreeRightAnimation dw NULL, ForestTreeRightAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -86,7 +82,6 @@ Tileset31Anim: ; 0xfc073
; 0xfc0a3 ; 0xfc0a3
Tileset01Anim: ; 0xfc0a3 Tileset01Anim: ; 0xfc0a3
; param, function
dwtile $14, VTiles2, AnimateWaterTile dwtile $14, VTiles2, AnimateWaterTile
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -103,9 +98,8 @@ Tileset01Anim: ; 0xfc0a3
; 0xfc0d7 ; 0xfc0d7
TilesetAnimfc0d7: ; 0xfc0d7 TilesetAnimfc0d7: ; 0xfc0d7
; param, function
dwtile $03, VTiles2, WriteTileToBuffer dwtile $03, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileRightLeft dw AttrMapEnd, ScrollTileRightLeft
dwtile $03, VTiles2, WriteTileFromBuffer dwtile $03, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -118,9 +112,8 @@ TilesetAnimfc0d7: ; 0xfc0d7
; 0xfc103 ; 0xfc103
TilesetAnimfc103: ; 0xfc103 TilesetAnimfc103: ; 0xfc103
; param, function
dwtile $14, VTiles2, WriteTileToBuffer dwtile $14, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileRightLeft dw AttrMapEnd, ScrollTileRightLeft
dwtile $14, VTiles2, WriteTileFromBuffer dwtile $14, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -133,7 +126,6 @@ TilesetAnimfc103: ; 0xfc103
; 0xfc12f ; 0xfc12f
Tileset09Anim: ; 0xfc12f Tileset09Anim: ; 0xfc12f
; param, function
dwtile $14, VTiles2, AnimateWaterTile dwtile $14, VTiles2, AnimateWaterTile
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -149,7 +141,6 @@ Tileset09Anim: ; 0xfc12f
; 0xfc15f ; 0xfc15f
Tileset15Anim: ; 0xfc15f Tileset15Anim: ; 0xfc15f
; param, function
dw NULL, SafariFountainAnim2 dw NULL, SafariFountainAnim2
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -161,88 +152,83 @@ Tileset15Anim: ; 0xfc15f
; 0xfc17f ; 0xfc17f
TilesetAnimfc17f: ; 0xfc17f TilesetAnimfc17f: ; 0xfc17f
; param, function
dwtile $53, VTiles2, WriteTileToBuffer dwtile $53, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dwtile $53, VTiles2, WriteTileFromBuffer dwtile $53, VTiles2, WriteTileFromBuffer
dwtile $03, VTiles2, WriteTileToBuffer dwtile $03, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileRightLeft dw AttrMapEnd, ScrollTileRightLeft
dwtile $03, VTiles2, WriteTileFromBuffer dwtile $03, VTiles2, WriteTileFromBuffer
dwtile $53, VTiles2, WriteTileToBuffer dwtile $53, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dwtile $53, VTiles2, WriteTileFromBuffer dwtile $53, VTiles2, WriteTileFromBuffer
dw NULL, DoneTileAnimation dw NULL, DoneTileAnimation
; 0xfc1af ; 0xfc1af
TilesetAnimfc1af: ; 0xfc1af TilesetAnimfc1af: ; 0xfc1af
; param, function
dwtile $54, VTiles2, WriteTileToBuffer dwtile $54, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dwtile $54, VTiles2, WriteTileFromBuffer dwtile $54, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dwtile $03, VTiles2, WriteTileToBuffer dwtile $03, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileRightLeft dw AttrMapEnd, ScrollTileRightLeft
dwtile $03, VTiles2, WriteTileFromBuffer dwtile $03, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dwtile $54, VTiles2, WriteTileToBuffer dwtile $54, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dwtile $54, VTiles2, WriteTileFromBuffer dwtile $54, VTiles2, WriteTileFromBuffer
dw NULL, DoneTileAnimation dw NULL, DoneTileAnimation
; 0xfc1e7 ; 0xfc1e7
Tileset24Anim: ; 0xfc1e7 Tileset24Anim: ; 0xfc1e7
Tileset30Anim: ; 0xfc1e7 Tileset30Anim: ; 0xfc1e7
; param, function
dwtile $14, VTiles2, WriteTileToBuffer dwtile $14, VTiles2, WriteTileToBuffer
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw wcf41, ScrollTileRightLeft dw AttrMapEnd, ScrollTileRightLeft
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dwtile $14, VTiles2, WriteTileFromBuffer dwtile $14, VTiles2, WriteTileFromBuffer
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw NULL, TileAnimationPalette dw NULL, TileAnimationPalette
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dwtile $40, VTiles2, WriteTileToBuffer dwtile $40, VTiles2, WriteTileToBuffer
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dwtile $40, VTiles2, WriteTileFromBuffer dwtile $40, VTiles2, WriteTileFromBuffer
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw NULL, DoneTileAnimation dw NULL, DoneTileAnimation
; 0xfc233 ; 0xfc233
Tileset29Anim: ; 0xfc233 Tileset29Anim: ; 0xfc233
; param, function
dwtile $35, VTiles2, WriteTileToBuffer dwtile $35, VTiles2, WriteTileToBuffer
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw wcf41, ScrollTileRightLeft dw AttrMapEnd, ScrollTileRightLeft
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dwtile $35, VTiles2, WriteTileFromBuffer dwtile $35, VTiles2, WriteTileFromBuffer
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw NULL, TileAnimationPalette dw NULL, TileAnimationPalette
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dwtile $31, VTiles2, WriteTileToBuffer dwtile $31, VTiles2, WriteTileToBuffer
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw wcf41, ScrollTileDown dw AttrMapEnd, ScrollTileDown
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dwtile $31, VTiles2, WriteTileFromBuffer dwtile $31, VTiles2, WriteTileFromBuffer
dw NULL, Functionfc71e dw NULL, FlickeringCaveEntrancePalette
dw NULL, DoneTileAnimation dw NULL, DoneTileAnimation
; 0xfc27f ; 0xfc27f
Tileset23Anim: ; 0xfc27f Tileset23Anim: ; 0xfc27f
; param, function
dw SproutPillarTilePointer9, AnimateSproutPillarTile dw SproutPillarTilePointer9, AnimateSproutPillarTile
dw SproutPillarTilePointer10, AnimateSproutPillarTile dw SproutPillarTilePointer10, AnimateSproutPillarTile
dw SproutPillarTilePointer7, AnimateSproutPillarTile dw SproutPillarTilePointer7, AnimateSproutPillarTile
@ -263,7 +249,7 @@ Tileset23Anim: ; 0xfc27f
TilesetAnimfc2bf: ; 0xfc2bf TilesetAnimfc2bf: ; 0xfc2bf
dwtile $4f, VTiles2, WriteTileToBuffer dwtile $4f, VTiles2, WriteTileToBuffer
dw wcf41, ScrollTileRightLeft dw AttrMapEnd, ScrollTileRightLeft
dwtile $4f, VTiles2, WriteTileFromBuffer dwtile $4f, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -299,7 +285,6 @@ Tileset33Anim: ; 0xfc2e7
Tileset34Anim: ; 0xfc2e7 Tileset34Anim: ; 0xfc2e7
Tileset35Anim: ; 0xfc2e7 Tileset35Anim: ; 0xfc2e7
Tileset36Anim: ; 0xfc2e7 Tileset36Anim: ; 0xfc2e7
; param, function
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation dw NULL, WaitTileAnimation
@ -875,14 +860,14 @@ AnimateWhirlpoolTile: ; fc678
WriteTileFromBuffer: ; fc696 WriteTileFromBuffer: ; fc696
; Write tiledata at wcf41 to de. ; Write tiledata at AttrMapEnd to de.
; wcf41 is loaded to sp for WriteTile. ; AttrMapEnd is loaded to sp for WriteTile.
ld hl, [sp+0] ld hl, [sp+0]
ld b, h ld b, h
ld c, l ld c, l
ld hl, wcf41 ld hl, AttrMapEnd
ld sp, hl ld sp, hl
ld h, d ld h, d
@ -892,7 +877,7 @@ WriteTileFromBuffer: ; fc696
WriteTileToBuffer: ; fc6a2 WriteTileToBuffer: ; fc6a2
; Write tiledata de to wcf41. ; Write tiledata de to AttrMapEnd.
; de is loaded to sp for WriteTile. ; de is loaded to sp for WriteTile.
ld hl, [sp+0] ld hl, [sp+0]
@ -903,7 +888,7 @@ WriteTileToBuffer: ; fc6a2
ld l, e ld l, e
ld sp, hl ld sp, hl
ld hl, wcf41 ld hl, AttrMapEnd
; fallthrough ; fallthrough
@ -1002,36 +987,37 @@ TileAnimationPalette: ; fc6d7
; fc71e ; fc71e
Functionfc71e: ; fc71e FlickeringCaveEntrancePalette: ; fc71e
; No palette changes on DMG.
ld a, [hCGB] ld a, [hCGB]
and a and a
ret z ret z
; We don't want to mess with non-standard palettes.
ld a, [rBGP] ld a, [rBGP]
cp $e4 cp %11100100
ret nz ret nz
; We only want to be here if we're in a dark cave.
ld a, [wd847] ld a, [wd847]
cp $ff cp $ff ; 3,3,3,3
ret nz ret nz
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, 5 ; wra5: gfx
ld a, 5
ld [rSVBK], a ld [rSVBK], a
ld a, $a0 ; Ready for BGPD input...
ld a, %10100000 ; auto-increment, index $20 (pal 4 color 0)
ld [rBGPI], a ld [rBGPI], a
ld a, [$ff9b] ld a, [$ff9b]
and 2 and %00000010
jr nz, .asm_fc743 jr nz, .bit1set
ld hl, Unkn1Pals + $20 ld hl, Unkn1Pals + $20 ; pal 4 color 0
jr .asm_fc746 jr .okay
.asm_fc743 .bit1set
ld hl, Unkn1Pals + $22 ld hl, Unkn1Pals + $22 ; pal 4 color 2
.asm_fc746 .okay
ld a, [hli] ld a, [hli]
ld [rBGPD], a ld [rBGPD], a
ld a, [hli] ld a, [hli]

View File

@ -1956,8 +1956,8 @@ wCrystalDataEnd::
wd479:: ds 2 wd479:: ds 2
wGameData::
wPlayerData:: wPlayerData::
PlayerID:: ; d47b PlayerID:: ; d47b
ds 2 ds 2
@ -2587,6 +2587,7 @@ wMagikarpRecordHoldersName:: ds NAME_LENGTH
wdff5:: wdff5::
wPokemonDataEnd:: wPokemonDataEnd::
wGameDataEnd::
SECTION "Pic Animations", WRAMX, BANK [2] SECTION "Pic Animations", WRAMX, BANK [2]