Further WRAM organization

This commit is contained in:
Remy Oukaour 2017-12-09 15:14:51 -05:00
parent 5a5df2ab87
commit e3c686f6df
13 changed files with 211 additions and 323 deletions

View File

@ -2581,8 +2581,8 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
ld a, h
push bc
push af
ld hl, BGPals ; BGPals
ld de, UnknBGPals ; wd000
ld hl, BGPals
ld de, UnknBGPals
ld b, a
ld c, $1
call CopyPals

View File

@ -111,8 +111,8 @@ _ResetWRAM: ; 5bae
xor a
call ByteFill
ld hl, wd000
ld bc, wGameData - wd000
ld hl, wRAM1Start
ld bc, wGameData - wRAM1Start
xor a
call ByteFill

View File

@ -331,7 +331,7 @@ ReceiveKeyItem: ; d35a
ret
TossKeyItem: ; d374
ld a, [wd107]
ld a, [CurItemQuantity]
ld e, a
ld d, 0
ld hl, NumKeyItems

View File

@ -2668,7 +2668,7 @@ Script_warp:
call GetScriptByte
ld [YCoord], a
ld a, -1
ld [wd001], a
ld [DefaultSpawnpoint], a
ld a, MAPSETUP_WARP
ld [hMapEntryMethod], a
ld a, 1
@ -2681,7 +2681,7 @@ Script_warp:
call GetScriptByte
call GetScriptByte
ld a, -1
ld [wd001], a
ld [DefaultSpawnpoint], a
ld a, MAPSETUP_BADWARP
ld [hMapEntryMethod], a
ld a, 1

View File

@ -94,7 +94,7 @@ CheckRegisteredItem: ; 13345
dec a
cp [hl]
jr nc, .NotEnoughItems
ld [wd107], a
ld [CurItemQuantity], a
and a
ret

View File

@ -42,10 +42,10 @@ ENDM
LoadSpawnPoint: ; 1531f
; loads the spawn point in wd001
; loads the spawn point in DefaultSpawnpoint
push hl
push de
ld a, [wd001]
ld a, [DefaultSpawnpoint]
cp SPAWN_N_A
jr z, .spawn_n_a
ld l, a

View File

@ -614,7 +614,7 @@ TossItemFromPC: ; 129f4
pop af
jr c, .quit
pop hl
ld a, [wd107]
ld a, [CurItemQuantity]
call TossItem
call PartyMonItemName
ld hl, .TossedThisMany

View File

@ -632,7 +632,7 @@ FlyFunction: ; ca3b
cp NUM_SPAWNS
jr nc, .illegal
ld [wd001], a
ld [DefaultSpawnpoint], a
call CloseWindow
ld a, $1
ret
@ -962,7 +962,7 @@ TeleportFunction: ; cc61
callba IsSpawnPoint
jr nc, .nope
ld a, c
ld [wd001], a
ld [DefaultSpawnpoint], a
ld a, $1
ret

View File

@ -77,6 +77,6 @@ GetWhiteoutSpawn: ; 12527
xor a ; SPAWN_HOME
.yes
ld [wd001], a
ld [DefaultSpawnpoint], a
ret
; 1253d

View File

@ -69,8 +69,8 @@ Init:: ; 17d
ld [rLCDC], a
; Clear WRAM bank 0
ld hl, wc000
ld bc, wd000 - wc000
ld hl, wRAM0Start
ld bc, wRAM1Start - wRAM0Start
.ByteFill:
ld [hl], 0
inc hl

View File

@ -3332,7 +3332,7 @@ InitDisplayForRedCredits: ; 4e8c2
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a
call ByteFill
ld hl, wd000 ; UnknBGPals
ld hl, UnknBGPals
ld c, 4 tiles
.load_white_palettes
ld a, (palred 31 + palgreen 31 + palblue 31) % $100

View File

@ -5410,7 +5410,7 @@ Function1023c6: ; 1023c6
dec a
ld [CurPartyMon], a
xor a
ld [wd10b], a
ld [wPokemonWithdrawDepositParameter], a
callba RemoveMonFromPartyOrBox
ld hl, PartyCount
inc [hl]

498
wram.asm

File diff suppressed because it is too large Load Diff