summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2015-08-30 22:15:32 -0500
committerdannye <corrnondacqb@yahoo.com>2015-08-30 22:15:32 -0500
commit8026d4758565c1ae427a9995c840d8b8dbc8352b (patch)
tree2eebf24f5761e10549f5df93993f2fac3971feb6
parent5facf8377aeda68cb3fca389cb1784cf9c2d406b (diff)
No more S_
-rwxr-xr-xengine/battle/core.asm2
-rw-r--r--engine/battle/scale_sprites.asm8
-rwxr-xr-xengine/hall_of_fame.asm4
-rwxr-xr-xengine/oak_speech.asm4
-rw-r--r--home.asm22
-rw-r--r--home/pic.asm22
-rw-r--r--sram.asm6
7 files changed, 34 insertions, 34 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 56ea5a20..2dc34e52 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6457,7 +6457,7 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92)
xor a
ld [$4000], a
ld hl, vSprites
- ld de, S_SPRITEBUFFER1
+ ld de, sSpriteBuffer1
ld a, [H_LOADEDROMBANK]
ld b, a
ld c, 7 * 7
diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm
index ed227984..6a8d43a9 100644
--- a/engine/battle/scale_sprites.asm
+++ b/engine/battle/scale_sprites.asm
@@ -2,12 +2,12 @@
; assumes that input sprite chunks are 4x4 tiles, and the rightmost and bottommost 4 pixels will be ignored
; resulting in a 7*7 tile output sprite chunk
ScaleSpriteByTwo: ; 2fe40 (b:7e40)
- ld de, S_SPRITEBUFFER1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
- ld hl, S_SPRITEBUFFER0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
+ ld de, sSpriteBuffer1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
+ ld hl, sSpriteBuffer0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
call ScaleLastSpriteColumnByTwo ; last tile column is special case
call ScaleFirstThreeSpriteColumnsByTwo ; scale first 3 tile columns
- ld de, S_SPRITEBUFFER2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
- ld hl, S_SPRITEBUFFER1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
+ ld de, sSpriteBuffer2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
+ ld hl, sSpriteBuffer1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
call ScaleLastSpriteColumnByTwo ; last tile column is special case
ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55)
diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm
index 75cbeb2c..73c4918b 100755
--- a/engine/hall_of_fame.asm
+++ b/engine/hall_of_fame.asm
@@ -186,8 +186,8 @@ HoFLoadPlayerPics: ; 7033e (1c:433e)
ld de, RedPicFront
ld a, BANK(RedPicFront)
call UncompressSpriteFromDE
- ld hl, S_SPRITEBUFFER1
- ld de, S_SPRITEBUFFER0
+ ld hl, sSpriteBuffer1
+ ld de, sSpriteBuffer0
ld bc, $310
call CopyData
ld de, vFrontPic
diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm
index d5f13a7a..c4d35639 100755
--- a/engine/oak_speech.asm
+++ b/engine/oak_speech.asm
@@ -215,8 +215,8 @@ IntroDisplayPicCenteredOrUpperRight: ; 62a4 (1:62a4)
push bc
ld a,b
call UncompressSpriteFromDE
- ld hl,S_SPRITEBUFFER1
- ld de,S_SPRITEBUFFER0
+ ld hl,sSpriteBuffer1
+ ld de,sSpriteBuffer0
ld bc,$310
call CopyData
ld de,vFrontPic
diff --git a/home.asm b/home.asm
index 0a8bb9a5..81a5fc8a 100644
--- a/home.asm
+++ b/home.asm
@@ -810,15 +810,15 @@ LoadUncompressedSpriteData:: ; 1672 (0:1672)
ld [H_SPRITEOFFSET], a
xor a
ld [$4000], a
- ld hl, S_SPRITEBUFFER0
+ ld hl, sSpriteBuffer0
call ZeroSpriteBuffer ; zero buffer 0
- ld de, S_SPRITEBUFFER1
- ld hl, S_SPRITEBUFFER0
+ ld de, sSpriteBuffer1
+ ld hl, sSpriteBuffer0
call AlignSpriteDataCentered ; copy and align buffer 1 to 0 (containing the MSB of the 2bpp sprite)
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
call ZeroSpriteBuffer ; zero buffer 1
- ld de, S_SPRITEBUFFER2
- ld hl, S_SPRITEBUFFER1
+ ld de, sSpriteBuffer2
+ ld hl, sSpriteBuffer1
call AlignSpriteDataCentered ; copy and align buffer 2 to 1 (containing the LSB of the 2bpp sprite)
pop de
jp InterlaceMergeSpriteBuffers
@@ -869,9 +869,9 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea)
xor a
ld [$4000], a
push de
- ld hl, S_SPRITEBUFFER2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2
- ld de, S_SPRITEBUFFER1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1
- ld bc, S_SPRITEBUFFER0 + (SPRITEBUFFERSIZE - 1) ; source 1: end of buffer 0
+ ld hl, sSpriteBuffer2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2
+ ld de, sSpriteBuffer1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1
+ ld bc, sSpriteBuffer0 + (SPRITEBUFFERSIZE - 1) ; source 1: end of buffer 0
ld a, SPRITEBUFFERSIZE/2 ; $c4
ld [H_SPRITEINTERLACECOUNTER], a
.interlaceLoop
@@ -895,7 +895,7 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea)
and a
jr z, .notFlipped
ld bc, 2*SPRITEBUFFERSIZE
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
.swapLoop
swap [hl] ; if flipped swap nybbles in all bytes
inc hl
@@ -905,7 +905,7 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea)
jr nz, .swapLoop
.notFlipped
pop hl
- ld de, S_SPRITEBUFFER1
+ ld de, sSpriteBuffer1
ld c, (2*SPRITEBUFFERSIZE)/16 ; $31, number of 16 byte chunks to be copied
ld a, [H_LOADEDROMBANK]
ld b, a
diff --git a/home/pic.asm b/home/pic.asm
index 81629055..4af12117 100644
--- a/home/pic.asm
+++ b/home/pic.asm
@@ -19,7 +19,7 @@ UncompressSpriteData:: ; 24fd (0:24fd)
; initializes necessary data to load a sprite and runs UncompressSpriteDataLoop
_UncompressSpriteData:: ; 251a (0:251a)
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
ld c, (2*SPRITEBUFFERSIZE) % $100
ld b, (2*SPRITEBUFFERSIZE) / $100
xor a
@@ -48,19 +48,19 @@ _UncompressSpriteData:: ; 251a (0:251a)
ld [wSpriteWidth], a
call ReadNextInputBit
ld [wSpriteLoadFlags], a ; initialite bit1 to 0 and bit0 to the first input bit
- ; this will load two chunks of data to S_SPRITEBUFFER1 and S_SPRITEBUFFER2
+ ; this will load two chunks of data to sSpriteBuffer1 and sSpriteBuffer2
; bit 0 decides in which one the first chunk is placed
; fall through
-; uncompresses a chunk from the sprite input data stream (pointed to at wd0da) into S_SPRITEBUFFER1 or S_SPRITEBUFFER2
+; uncompresses a chunk from the sprite input data stream (pointed to at wd0da) into sSpriteBuffer1 or sSpriteBuffer2
; each chunk is a 1bpp sprite. A 2bpp sprite consist of two chunks which are merged afterwards
; note that this is an endless loop which is terminated during a call to MoveToNextBufferPosition by manipulating the stack
UncompressSpriteDataLoop:: ; 2556 (0:2556)
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
ld a, [wSpriteLoadFlags]
bit 0, a
jr z, .useSpriteBuffer1 ; check which buffer to use
- ld hl, S_SPRITEBUFFER2
+ ld hl, sSpriteBuffer2
.useSpriteBuffer1
call StoreSpriteOutputPointer
ld a, [wSpriteLoadFlags]
@@ -290,9 +290,9 @@ UnpackSprite:: ; 26bf (0:26bf)
jp z, UnpackSpriteMode2
and a
jp nz, XorSpriteChunks
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
call SpriteDifferentialDecode
- ld hl, S_SPRITEBUFFER2
+ ld hl, sSpriteBuffer2
; fall through
; decodes differential encoded sprite data
@@ -542,12 +542,12 @@ ResetSpriteBufferPointers:: ; 2841 (0:2841)
ld a, [wSpriteLoadFlags]
bit 0, a
jr nz, .buffer2Selected
- ld de, S_SPRITEBUFFER1
- ld hl, S_SPRITEBUFFER2
+ ld de, sSpriteBuffer1
+ ld hl, sSpriteBuffer2
jr .storeBufferPointers
.buffer2Selected
- ld de, S_SPRITEBUFFER2
- ld hl, S_SPRITEBUFFER1
+ ld de, sSpriteBuffer2
+ ld hl, sSpriteBuffer1
.storeBufferPointers
ld a, l
ld [wSpriteOutputPtr], a
diff --git a/sram.asm b/sram.asm
index 9f49d9ca..3e7b3e16 100644
--- a/sram.asm
+++ b/sram.asm
@@ -1,8 +1,8 @@
SECTION "Sprite Buffers", SRAM, BANK[0]
-S_SPRITEBUFFER0:: ds SPRITEBUFFERSIZE ; a000
-S_SPRITEBUFFER1:: ds SPRITEBUFFERSIZE ; a188
-S_SPRITEBUFFER2:: ds SPRITEBUFFERSIZE ; a310
+sSpriteBuffer0:: ds SPRITEBUFFERSIZE ; a000
+sSpriteBuffer1:: ds SPRITEBUFFERSIZE ; a188
+sSpriteBuffer2:: ds SPRITEBUFFERSIZE ; a310
ds $100