ref: d338a092c5a54d73e3e0a186569cc3b84e61c4ae
parent: 12f9dca7a59afa64388ae3aebc6e04c383992da9
author: PikalaxALT <PikalaxALT@gmail.com>
date: Tue Oct 13 13:40:18 EDT 2015
Revert sPlayerID
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -225,7 +225,7 @@
Function14bcb: ; 14bcb
ld a, BANK(sPlayerData)
call GetSRAMBank
- ld hl, sPlayerID
+ ld hl, sPlayerData + (PlayerID - wPlayerData)
ld a, [hli]
ld c, [hl]
ld b, a
--- a/sram.asm
+++ b/sram.asm
@@ -58,7 +58,6 @@
s1_a008:: ds 1
sGameData::
-sPlayerID::
sPlayerData:: ds wPlayerDataEnd - wPlayerData
sMapData:: ds wMapDataEnd - wMapData
sPokemonData:: ds wPokemonDataEnd - wPokemonData
--- a/tilesets/animations.asm
+++ b/tilesets/animations.asm
@@ -99,7 +99,7 @@
TilesetAnimfc0d7: ; 0xfc0d7
dwtile $03, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileRightLeft
+ dw wcf41, ScrollTileRightLeft
dwtile $03, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
@@ -113,7 +113,7 @@
TilesetAnimfc103: ; 0xfc103
dwtile $14, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileRightLeft
+ dw wcf41, ScrollTileRightLeft
dwtile $14, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
@@ -153,15 +153,15 @@
TilesetAnimfc17f: ; 0xfc17f
dwtile $53, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileDown
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
+ dw wcf41, ScrollTileDown
dwtile $53, VTiles2, WriteTileFromBuffer
dwtile $03, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileRightLeft
+ dw wcf41, ScrollTileRightLeft
dwtile $03, VTiles2, WriteTileFromBuffer
dwtile $53, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileDown
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
+ dw wcf41, ScrollTileDown
dwtile $53, VTiles2, WriteTileFromBuffer
dw NULL, DoneTileAnimation
; 0xfc1af
@@ -168,17 +168,17 @@
TilesetAnimfc1af: ; 0xfc1af
dwtile $54, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileDown
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
+ dw wcf41, ScrollTileDown
dwtile $54, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation
dwtile $03, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileRightLeft
+ dw wcf41, ScrollTileRightLeft
dwtile $03, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation
dwtile $54, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileDown
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
+ dw wcf41, ScrollTileDown
dwtile $54, VTiles2, WriteTileFromBuffer
dw NULL, DoneTileAnimation
; 0xfc1e7
@@ -187,7 +187,7 @@
Tileset30Anim: ; 0xfc1e7
dwtile $14, VTiles2, WriteTileToBuffer
dw NULL, FlickeringCaveEntrancePalette
- dw AttrMapEnd, ScrollTileRightLeft
+ dw wcf41, ScrollTileRightLeft
dw NULL, FlickeringCaveEntrancePalette
dwtile $14, VTiles2, WriteTileFromBuffer
dw NULL, FlickeringCaveEntrancePalette
@@ -195,11 +195,11 @@
dw NULL, FlickeringCaveEntrancePalette
dwtile $40, VTiles2, WriteTileToBuffer
dw NULL, FlickeringCaveEntrancePalette
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
dw NULL, FlickeringCaveEntrancePalette
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
dw NULL, FlickeringCaveEntrancePalette
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
dw NULL, FlickeringCaveEntrancePalette
dwtile $40, VTiles2, WriteTileFromBuffer
dw NULL, FlickeringCaveEntrancePalette
@@ -209,7 +209,7 @@
Tileset29Anim: ; 0xfc233
dwtile $35, VTiles2, WriteTileToBuffer
dw NULL, FlickeringCaveEntrancePalette
- dw AttrMapEnd, ScrollTileRightLeft
+ dw wcf41, ScrollTileRightLeft
dw NULL, FlickeringCaveEntrancePalette
dwtile $35, VTiles2, WriteTileFromBuffer
dw NULL, FlickeringCaveEntrancePalette
@@ -217,11 +217,11 @@
dw NULL, FlickeringCaveEntrancePalette
dwtile $31, VTiles2, WriteTileToBuffer
dw NULL, FlickeringCaveEntrancePalette
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
dw NULL, FlickeringCaveEntrancePalette
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
dw NULL, FlickeringCaveEntrancePalette
- dw AttrMapEnd, ScrollTileDown
+ dw wcf41, ScrollTileDown
dw NULL, FlickeringCaveEntrancePalette
dwtile $31, VTiles2, WriteTileFromBuffer
dw NULL, FlickeringCaveEntrancePalette
@@ -249,7 +249,7 @@
TilesetAnimfc2bf: ; 0xfc2bf
dwtile $4f, VTiles2, WriteTileToBuffer
- dw AttrMapEnd, ScrollTileRightLeft
+ dw wcf41, ScrollTileRightLeft
dwtile $4f, VTiles2, WriteTileFromBuffer
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
@@ -860,14 +860,14 @@
WriteTileFromBuffer: ; fc696
-; Write tiledata at AttrMapEnd to de.
-; AttrMapEnd is loaded to sp for WriteTile.
+; Write tiledata at wcf41 to de.
+; wcf41 is loaded to sp for WriteTile.
ld hl, [sp+0]
ld b, h
ld c, l
- ld hl, AttrMapEnd
+ ld hl, wcf41
ld sp, hl
ld h, d
@@ -877,7 +877,7 @@
WriteTileToBuffer: ; fc6a2
-; Write tiledata de to AttrMapEnd.
+; Write tiledata de to wcf41.
; de is loaded to sp for WriteTile.
ld hl, [sp+0]
@@ -888,7 +888,7 @@
ld l, e
ld sp, hl
- ld hl, AttrMapEnd
+ ld hl, wcf41
; fallthrough