mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Remove remaining raw $xxxx values, and replace "+ -1" with "- 1" (supported by rgbds 0.4.0)
This commit is contained in:
parent
7e92d5ba8c
commit
e4e0af4d67
29 changed files with 172 additions and 158 deletions
|
|
@ -41,8 +41,8 @@ rLCDC_DEFAULT EQU %11100011
|
|||
|
||||
ld sp, wStack
|
||||
|
||||
ld hl, $c000 ; start of WRAM
|
||||
ld bc, $2000 ; size of WRAM
|
||||
ld hl, WRAM0_Begin
|
||||
ld bc, WRAM1_End - WRAM0_Begin
|
||||
.loop
|
||||
ld [hl], 0
|
||||
inc hl
|
||||
|
|
@ -53,8 +53,8 @@ rLCDC_DEFAULT EQU %11100011
|
|||
|
||||
call ClearVram
|
||||
|
||||
ld hl, $ff80 ; start of HRAM
|
||||
ld bc, $ffff - $ff80 ; size of HRAM
|
||||
ld hl, HRAM_Begin
|
||||
ld bc, HRAM_End - HRAM_Begin
|
||||
call FillMemory
|
||||
|
||||
call ClearSprites
|
||||
|
|
@ -119,8 +119,8 @@ rLCDC_DEFAULT EQU %11100011
|
|||
jp SetDefaultNamesBeforeTitlescreen
|
||||
|
||||
ClearVram::
|
||||
ld hl, $8000
|
||||
ld bc, $2000
|
||||
ld hl, VRAM_Begin
|
||||
ld bc, VRAM_End - VRAM_Begin
|
||||
xor a
|
||||
jp FillMemory
|
||||
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ PrintListMenuEntries::
|
|||
ld [wLoadedMonLevel], a
|
||||
.skipCopyingLevel
|
||||
pop hl
|
||||
ld bc, $001c
|
||||
ld bc, $1c
|
||||
add hl, bc
|
||||
call PrintLevel
|
||||
pop af
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ GetName::
|
|||
ld h, d
|
||||
ld l, e
|
||||
ld de, wcd6d
|
||||
ld bc, $0014
|
||||
ld bc, $14
|
||||
call CopyData
|
||||
.gotPtr
|
||||
ld a, e
|
||||
|
|
|
|||
|
|
@ -1424,18 +1424,18 @@ LoadCurrentMapView::
|
|||
dec b
|
||||
jr nz, .rowLoop
|
||||
ld hl, wTileMapBackup
|
||||
ld bc, $0000
|
||||
ld bc, $0
|
||||
.adjustForYCoordWithinTileBlock
|
||||
ld a, [wYBlockCoord]
|
||||
and a
|
||||
jr z, .adjustForXCoordWithinTileBlock
|
||||
ld bc, $0030
|
||||
ld bc, $30
|
||||
add hl, bc
|
||||
.adjustForXCoordWithinTileBlock
|
||||
ld a, [wXBlockCoord]
|
||||
and a
|
||||
jr z, .copyToVisibleAreaBuffer
|
||||
ld bc, $0002
|
||||
ld bc, $2
|
||||
add hl, bc
|
||||
.copyToVisibleAreaBuffer
|
||||
coord de, 0, 0 ; base address for the tiles that are directly transferred to VRAM during V-blank
|
||||
|
|
@ -1739,7 +1739,7 @@ ScheduleSouthRowRedraw::
|
|||
ld l, a
|
||||
ld a, [wMapViewVRAMPointer + 1]
|
||||
ld h, a
|
||||
ld bc, $0200
|
||||
ld bc, $200
|
||||
add hl, bc
|
||||
ld a, h
|
||||
and $03
|
||||
|
|
@ -1835,7 +1835,7 @@ DrawTileBlock::
|
|||
ld a, [de]
|
||||
ld [hl], a
|
||||
inc de
|
||||
ld bc, $0015
|
||||
ld bc, $15
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec c
|
||||
|
|
@ -2180,7 +2180,7 @@ LoadMapHeader::
|
|||
jr nz, .zeroSpriteDataLoop
|
||||
; initialize all C100-C1FF sprite entries to disabled (other than player's)
|
||||
ld hl, wSpriteStateData1 + $12
|
||||
ld de, $0010
|
||||
ld de, $10
|
||||
ld c, $0f
|
||||
.disableSpriteEntriesLoop
|
||||
ld [hl], $ff
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ LoadUncompressedSpriteData::
|
|||
add a ; 8*(7*((8-w)/2) + 7-h) ; combined overall offset (in bytes)
|
||||
ld [hSpriteOffset], a
|
||||
xor a
|
||||
ld [$4000], a
|
||||
ld [MBC1SRamBank], a
|
||||
ld hl, sSpriteBuffer0
|
||||
call ZeroSpriteBuffer ; zero buffer 0
|
||||
ld de, sSpriteBuffer1
|
||||
|
|
@ -151,7 +151,7 @@ ZeroSpriteBuffer::
|
|||
; de: output address
|
||||
InterlaceMergeSpriteBuffers::
|
||||
xor a
|
||||
ld [$4000], a
|
||||
ld [MBC1SRamBank], a
|
||||
push de
|
||||
ld hl, sSpriteBuffer2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2
|
||||
ld de, sSpriteBuffer1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ CloseTextDisplay::
|
|||
; loop to make sprites face the directions they originally faced before the dialogue
|
||||
ld hl, wSpriteStateData2 + $19
|
||||
ld c, $0f
|
||||
ld de, $0010
|
||||
ld de, $10
|
||||
.restoreSpriteFacingDirectionLoop
|
||||
ld a, [hl]
|
||||
dec h
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue