mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
HDMA transfer functions
This commit is contained in:
parent
3713b71d9e
commit
a613ed915c
@ -9429,7 +9429,7 @@ InitBattleDisplay: ; 3fb6c
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld hl, wDecompressScratch
|
ld hl, wDecompressScratch
|
||||||
ld bc, wBackupAttrMap - wDecompressScratch
|
ld bc, wScratchAttrMap - wDecompressScratch
|
||||||
ld a, " "
|
ld a, " "
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ Predef_StartBattle: ; 8c20f
|
|||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp LINK_MOBILE
|
cp LINK_MOBILE
|
||||||
jr z, .mobile
|
jr z, .mobile
|
||||||
callba Function6454
|
callba ReanchorBGMap_NoOAMUpdate
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call .NonMobile_LoadPokeballTiles
|
call .NonMobile_LoadPokeballTiles
|
||||||
|
@ -45,7 +45,7 @@ ReturnFromMapSetupScript:: ; b8000
|
|||||||
ld [wLandmarkSignTimer], a
|
ld [wLandmarkSignTimer], a
|
||||||
call LoadMapNameSignGFX
|
call LoadMapNameSignGFX
|
||||||
call InitMapNameFrame
|
call InitMapNameFrame
|
||||||
callba Function104303
|
callba HDMATransfer_OnlyTopFourRows
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.dont_do_map_sign
|
.dont_do_map_sign
|
||||||
@ -113,7 +113,7 @@ PlaceMapNameSign:: ; b8098 (2e:4098)
|
|||||||
jr nz, .skip2
|
jr nz, .skip2
|
||||||
call InitMapNameFrame
|
call InitMapNameFrame
|
||||||
call PlaceMapNameCenterAlign
|
call PlaceMapNameCenterAlign
|
||||||
callba Function104303
|
callba HDMATransfer_OnlyTopFourRows
|
||||||
.skip2
|
.skip2
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld a, $70
|
ld a, $70
|
||||||
|
@ -2209,7 +2209,7 @@ Function55e0:: ; 55e0
|
|||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ld [hMapObjectIndexBuffer], a
|
ld [hMapObjectIndexBuffer], a
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
call Function565c
|
call Function565c
|
||||||
.ok
|
.ok
|
||||||
@ -2260,7 +2260,7 @@ Function5629: ; 5629
|
|||||||
cp NUM_OBJECT_STRUCTS
|
cp NUM_OBJECT_STRUCTS
|
||||||
ret nc
|
ret nc
|
||||||
call GetObjectStruct
|
call GetObjectStruct
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
ret z
|
ret z
|
||||||
call Function5673
|
call Function5673
|
||||||
ret
|
ret
|
||||||
@ -2363,7 +2363,7 @@ Function56a3: ; 56a3
|
|||||||
; 56cd
|
; 56cd
|
||||||
|
|
||||||
Function56cd: ; 56cd
|
Function56cd: ; 56cd
|
||||||
ld a, [wFollowNotExactPersonX]
|
ld a, [wPlayerBGMapOffsetX]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld hl, OBJECT_SPRITE_X_OFFSET
|
ld hl, OBJECT_SPRITE_X_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -2392,7 +2392,7 @@ Function56cd: ; 56cd
|
|||||||
sub $20
|
sub $20
|
||||||
.ok3
|
.ok3
|
||||||
ld [hUsedSpriteIndex], a
|
ld [hUsedSpriteIndex], a
|
||||||
ld a, [wFollowNotExactPersonY]
|
ld a, [wPlayerBGMapOffsetY]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld hl, OBJECT_SPRITE_Y_OFFSET
|
ld hl, OBJECT_SPRITE_Y_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -2489,7 +2489,7 @@ HandleNPCStep:: ; 576a
|
|||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ld [hMapObjectIndexBuffer], a
|
ld [hMapObjectIndexBuffer], a
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .next
|
jr z, .next
|
||||||
call Function437b
|
call Function437b
|
||||||
.next
|
.next
|
||||||
@ -2662,7 +2662,7 @@ Function587a: ; 587a
|
|||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
push af
|
push af
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .next
|
jr z, .next
|
||||||
ld hl, OBJECT_FLAGS2
|
ld hl, OBJECT_FLAGS2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -2707,7 +2707,7 @@ Function58b9:: ; 58b9
|
|||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
push af
|
push af
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .next
|
jr z, .next
|
||||||
ld hl, OBJECT_FLAGS2
|
ld hl, OBJECT_FLAGS2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -2817,19 +2817,19 @@ _UpdateSprites:: ; 5920
|
|||||||
ret
|
ret
|
||||||
; 5958
|
; 5958
|
||||||
|
|
||||||
Function5958: ; 5958
|
ApplyBGMapAnchorToObjects: ; 5958
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld a, [wFollowNotExactPersonX]
|
ld a, [wPlayerBGMapOffsetX]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wFollowNotExactPersonY]
|
ld a, [wPlayerBGMapOffsetY]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld bc, ObjectStructs
|
ld bc, ObjectStructs
|
||||||
ld a, NUM_OBJECT_STRUCTS
|
ld a, NUM_OBJECT_STRUCTS
|
||||||
.loop
|
.loop
|
||||||
push af
|
push af
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .skip
|
jr z, .skip
|
||||||
ld hl, OBJECT_SPRITE_X
|
ld hl, OBJECT_SPRITE_X
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -2850,8 +2850,8 @@ Function5958: ; 5958
|
|||||||
dec a
|
dec a
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
xor a
|
xor a
|
||||||
ld [wFollowNotExactPersonX], a
|
ld [wPlayerBGMapOffsetX], a
|
||||||
ld [wFollowNotExactPersonY], a
|
ld [wPlayerBGMapOffsetY], a
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@ -2881,7 +2881,7 @@ PRIORITY_HIGH EQU $30
|
|||||||
ld hl, wMovementPointer
|
ld hl, wMovementPointer
|
||||||
.loop
|
.loop
|
||||||
push hl
|
push hl
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .skip
|
jr z, .skip
|
||||||
ld hl, OBJECT_FACING_STEP
|
ld hl, OBJECT_FACING_STEP
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -2986,7 +2986,7 @@ PRIORITY_HIGH EQU $30
|
|||||||
add [hl]
|
add [hl]
|
||||||
add 8
|
add 8
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wFollowNotExactPersonX]
|
ld a, [wPlayerBGMapOffsetX]
|
||||||
add e
|
add e
|
||||||
ld [hFFBF], a
|
ld [hFFBF], a
|
||||||
ld hl, OBJECT_SPRITE_Y
|
ld hl, OBJECT_SPRITE_Y
|
||||||
@ -2997,7 +2997,7 @@ PRIORITY_HIGH EQU $30
|
|||||||
add [hl]
|
add [hl]
|
||||||
add 12
|
add 12
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wFollowNotExactPersonY]
|
ld a, [wPlayerBGMapOffsetY]
|
||||||
add e
|
add e
|
||||||
ld [hFFC0], a
|
ld [hFFC0], a
|
||||||
ld hl, OBJECT_FACING_STEP
|
ld hl, OBJECT_FACING_STEP
|
||||||
|
@ -296,7 +296,7 @@ Function241d5: ; 241d5
|
|||||||
call Place2DMenuCursor
|
call Place2DMenuCursor
|
||||||
.loop
|
.loop
|
||||||
call Move2DMenuCursor
|
call Move2DMenuCursor
|
||||||
call Function10402d ; BUG: This function is in another bank.
|
call HDMATransferTileMapToWRAMBank3 ; BUG: This function is in another bank.
|
||||||
; Pointer in current bank (9) is bogus.
|
; Pointer in current bank (9) is bogus.
|
||||||
call .loop2
|
call .loop2
|
||||||
jr nc, .done
|
jr nc, .done
|
||||||
|
@ -320,7 +320,7 @@ IsNPCAtCoord: ; 7041
|
|||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ld [hObjectStructIndexBuffer], a
|
ld [hObjectStructIndexBuffer], a
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .next
|
jr z, .next
|
||||||
|
|
||||||
ld hl, OBJECT_FLAGS1
|
ld hl, OBJECT_FLAGS1
|
||||||
@ -490,7 +490,7 @@ Function7113: ; unreferenced
|
|||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ld [hObjectStructIndexBuffer], a
|
ld [hObjectStructIndexBuffer], a
|
||||||
call GetObjectSprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .next
|
jr z, .next
|
||||||
ld hl, OBJECT_MOVEMENTTYPE
|
ld hl, OBJECT_MOVEMENTTYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
@ -474,7 +474,7 @@ CopyTempObjectToObjectStruct: ; 8286
|
|||||||
sub [hl]
|
sub [hl]
|
||||||
and $f
|
and $f
|
||||||
swap a
|
swap a
|
||||||
ld hl, wFollowNotExactPersonY
|
ld hl, wPlayerBGMapOffsetY
|
||||||
sub [hl]
|
sub [hl]
|
||||||
ld hl, OBJECT_SPRITE_Y
|
ld hl, OBJECT_SPRITE_Y
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -492,7 +492,7 @@ CopyTempObjectToObjectStruct: ; 8286
|
|||||||
sub [hl]
|
sub [hl]
|
||||||
and $f
|
and $f
|
||||||
swap a
|
swap a
|
||||||
ld hl, wFollowNotExactPersonX
|
ld hl, wPlayerBGMapOffsetX
|
||||||
sub [hl]
|
sub [hl]
|
||||||
ld hl, OBJECT_SPRITE_X
|
ld hl, OBJECT_SPRITE_X
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -660,7 +660,7 @@ FollowNotExact:: ; 839e
|
|||||||
sub [hl]
|
sub [hl]
|
||||||
and $f
|
and $f
|
||||||
swap a
|
swap a
|
||||||
ld hl, wFollowNotExactPersonX
|
ld hl, wPlayerBGMapOffsetX
|
||||||
sub [hl]
|
sub [hl]
|
||||||
ld hl, OBJECT_SPRITE_X
|
ld hl, OBJECT_SPRITE_X
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -673,7 +673,7 @@ FollowNotExact:: ; 839e
|
|||||||
sub [hl]
|
sub [hl]
|
||||||
and $f
|
and $f
|
||||||
swap a
|
swap a
|
||||||
ld hl, wFollowNotExactPersonY
|
ld hl, wPlayerBGMapOffsetY
|
||||||
sub [hl]
|
sub [hl]
|
||||||
ld hl, OBJECT_SPRITE_Y
|
ld hl, OBJECT_SPRITE_Y
|
||||||
add hl, de
|
add hl, de
|
||||||
|
@ -26,12 +26,12 @@ _HandlePlayerStep:: ; d497 (3:5497)
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wPlayerStepVectorY]
|
ld a, [wPlayerStepVectorY]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wFollowNotExactPersonX]
|
ld a, [wPlayerBGMapOffsetX]
|
||||||
sub d
|
sub d
|
||||||
ld [wFollowNotExactPersonX], a
|
ld [wPlayerBGMapOffsetX], a
|
||||||
ld a, [wFollowNotExactPersonY]
|
ld a, [wPlayerBGMapOffsetY]
|
||||||
sub e
|
sub e
|
||||||
ld [wFollowNotExactPersonY], a
|
ld [wPlayerBGMapOffsetY], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ScrollScreen:: ; d4d2 (3:54d2)
|
ScrollScreen:: ; d4d2 (3:54d2)
|
||||||
|
@ -3054,7 +3054,7 @@ Script_loadbytec2cf: ; 97b27
|
|||||||
Script_closetext: ; 97b2f
|
Script_closetext: ; 97b2f
|
||||||
; script command 0x49
|
; script command 0x49
|
||||||
|
|
||||||
call Function2e20
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
call CloseText
|
call CloseText
|
||||||
ret
|
ret
|
||||||
; 97b36
|
; 97b36
|
||||||
|
@ -5,7 +5,7 @@ StartMenu:: ; 125cd
|
|||||||
ld de, SFX_MENU
|
ld de, SFX_MENU
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
|
|
||||||
callba Function6454
|
callba ReanchorBGMap_NoOAMUpdate
|
||||||
|
|
||||||
ld hl, StatusFlags2
|
ld hl, StatusFlags2
|
||||||
bit 2, [hl] ; bug catching contest
|
bit 2, [hl] ; bug catching contest
|
||||||
@ -22,8 +22,8 @@ StartMenu:: ; 125cd
|
|||||||
call MenuFunc_1e7f
|
call MenuFunc_1e7f
|
||||||
call .DrawBugContestStatusBox
|
call .DrawBugContestStatusBox
|
||||||
call Function2e31
|
call Function2e31
|
||||||
call Function2e20
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
callba Function64bf
|
callba LoadFonts_NoOAMUpdate
|
||||||
call .DrawBugContestStatus
|
call .DrawBugContestStatus
|
||||||
call UpdateTimePals
|
call UpdateTimePals
|
||||||
jr .Select
|
jr .Select
|
||||||
|
@ -129,7 +129,7 @@ StatsScreen_WaitAnim: ; 4dd3a (13:5d3a)
|
|||||||
.finish
|
.finish
|
||||||
ld hl, wcf64
|
ld hl, wcf64
|
||||||
res 5, [hl]
|
res 5, [hl]
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
|
|
||||||
StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62)
|
StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62)
|
||||||
@ -149,7 +149,7 @@ MonStatsInit: ; 4dd72 (13:5d72)
|
|||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
call StatsScreen_CopyToTempMon
|
call StatsScreen_CopyToTempMon
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp EGG
|
cp EGG
|
||||||
@ -1014,7 +1014,7 @@ EggStatsScreen: ; 4e33a
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
call PrepMonFrontpic
|
call PrepMonFrontpic
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
call StatsScreen_AnimateEgg
|
call StatsScreen_AnimateEgg
|
||||||
|
|
||||||
ld a, [TempMonHappiness]
|
ld a, [TempMonHappiness]
|
||||||
|
@ -250,7 +250,7 @@ Function104770: ; 104770 (41:4770)
|
|||||||
ld [wBGMapAnchor], a
|
ld [wBGMapAnchor], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
callba Function5958
|
callba ApplyBGMapAnchorToObjects
|
||||||
ld a, [rVBK]
|
ld a, [rVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
|
@ -99,7 +99,7 @@ AnimateFrontpic: ; d008e
|
|||||||
.loop
|
.loop
|
||||||
call SetUpPokeAnim
|
call SetUpPokeAnim
|
||||||
push af
|
push af
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
pop af
|
pop af
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
ret
|
ret
|
||||||
@ -288,9 +288,9 @@ Functiond01a9: ; d01a9
|
|||||||
ld a, $2
|
ld a, $2
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
call Functiond04bd
|
call Functiond04bd
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
call Functiond0536
|
call Functiond0536
|
||||||
callba Function104047
|
callba HDMATransferAttrMapToWRAMBank3
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
@ -880,7 +880,7 @@ Functiond0504: ; d0504
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call Functiond051b
|
call Functiond051b
|
||||||
callba Function104047
|
callba HDMATransferAttrMapToWRAMBank3
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
2
home.asm
2
home.asm
@ -570,7 +570,7 @@ LoadEDTile:: ; 323d
|
|||||||
; 323f
|
; 323f
|
||||||
|
|
||||||
; XXX
|
; XXX
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 3246
|
; 3246
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ GetObjectStruct:: ; 1ae5
|
|||||||
ret
|
ret
|
||||||
; 1af1
|
; 1af1
|
||||||
|
|
||||||
GetObjectSprite:: ; 1af1
|
DoesObjectHaveASprite:: ; 1af1
|
||||||
ld hl, OBJECT_SPRITE
|
ld hl, OBJECT_SPRITE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
|
@ -3,12 +3,12 @@ RefreshScreen:: ; 2dba
|
|||||||
call ClearWindowData
|
call ClearWindowData
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(Function6454) ; and BANK(Function64bf)
|
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate)
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call Function6454
|
call ReanchorBGMap_NoOAMUpdate
|
||||||
call Function2e20
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
call Function64bf
|
call LoadFonts_NoOAMUpdate
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
@ -36,7 +36,7 @@ CloseText:: ; 2dcf
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call OverworldTextModeSwitch
|
call OverworldTextModeSwitch
|
||||||
call Function2e20
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call Function2e31
|
call Function2e31
|
||||||
@ -52,26 +52,26 @@ OpenText:: ; 2e08
|
|||||||
call ClearWindowData
|
call ClearWindowData
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(Function6454) ; and BANK(Function64bf)
|
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate)
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call Function6454 ; clear bgmap
|
call ReanchorBGMap_NoOAMUpdate ; clear bgmap
|
||||||
call SpeechTextBox
|
call SpeechTextBox
|
||||||
call Function2e20 ; anchor bgmap
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap ; anchor bgmap
|
||||||
call Function64bf ; load font
|
call LoadFonts_NoOAMUpdate ; load font
|
||||||
pop af
|
pop af
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
ret
|
ret
|
||||||
; 2e20
|
; 2e20
|
||||||
|
|
||||||
Function2e20:: ; 2e20
|
_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 2e20
|
||||||
ld a, [hOAMUpdate]
|
ld a, [hOAMUpdate]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
|
|
||||||
callba Function104110
|
callba OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
|
31
main.asm
31
main.asm
@ -53,7 +53,7 @@ INCLUDE "engine/map_objects.asm"
|
|||||||
|
|
||||||
INCLUDE "engine/intro_menu.asm"
|
INCLUDE "engine/intro_menu.asm"
|
||||||
|
|
||||||
Function6454:: ; 6454
|
ReanchorBGMap_NoOAMUpdate:: ; 6454
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld a, [hOAMUpdate]
|
ld a, [hOAMUpdate]
|
||||||
push af
|
push af
|
||||||
@ -64,7 +64,8 @@ Function6454:: ; 6454
|
|||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call .Function6473
|
|
||||||
|
call .ReanchorBGMap
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -74,7 +75,7 @@ Function6454:: ; 6454
|
|||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Function6473:
|
.ReanchorBGMap:
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hFFC6], a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -82,8 +83,8 @@ Function6454:: ; 6454
|
|||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
call OverworldTextModeSwitch
|
call OverworldTextModeSwitch
|
||||||
ld a, VBGMap1 / $100
|
ld a, VBGMap1 / $100
|
||||||
call .Function64b9
|
call .LoadBGMapAddrIntoHRAM
|
||||||
call Function2e20
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
callba LoadOW_BGPal7
|
callba LoadOW_BGPal7
|
||||||
callba ApplyPals
|
callba ApplyPals
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -91,9 +92,9 @@ Function6454:: ; 6454
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba Function64db ; no need to farcall
|
callba HDMATransfer_FillBGMap0WithTile60 ; no need to farcall
|
||||||
ld a, VBGMap0 / $100
|
ld a, VBGMap0 / $100
|
||||||
call .Function64b9
|
call .LoadBGMapAddrIntoHRAM
|
||||||
xor a
|
xor a
|
||||||
ld [wBGMapAnchor], a
|
ld [wBGMapAnchor], a
|
||||||
ld a, VBGMap0 / $100
|
ld a, VBGMap0 / $100
|
||||||
@ -101,28 +102,28 @@ Function6454:: ; 6454
|
|||||||
xor a
|
xor a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
call Function5958
|
call ApplyBGMapAnchorToObjects
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Function64b9: ; 64b9
|
.LoadBGMapAddrIntoHRAM: ; 64b9
|
||||||
ld [hBGMapAddress + 1], a
|
ld [hBGMapAddress + 1], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function64bf:: ; 64bf
|
LoadFonts_NoOAMUpdate:: ; 64bf
|
||||||
ld a, [hOAMUpdate]
|
ld a, [hOAMUpdate]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
|
|
||||||
call .Function64cd
|
call .LoadGFX
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Function64cd:
|
.LoadGFX:
|
||||||
call LoadFontsExtra
|
call LoadFontsExtra
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
@ -130,7 +131,7 @@ Function64bf:: ; 64bf
|
|||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function64db: ; 64db
|
HDMATransfer_FillBGMap0WithTile60: ; 64db
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $6
|
ld a, $6
|
||||||
@ -138,7 +139,7 @@ Function64db: ; 64db
|
|||||||
|
|
||||||
ld a, $60
|
ld a, $60
|
||||||
ld hl, wDecompressScratch
|
ld hl, wDecompressScratch
|
||||||
ld bc, wBackupAttrMap - wDecompressScratch
|
ld bc, wScratchAttrMap - wDecompressScratch
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, wDecompressScratch / $100
|
ld a, wDecompressScratch / $100
|
||||||
ld [rHDMA1], a
|
ld [rHDMA1], a
|
||||||
@ -3354,7 +3355,7 @@ Function4e906: ; 4e906
|
|||||||
ld a, $6
|
ld a, $6
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld hl, wDecompressScratch
|
ld hl, wDecompressScratch
|
||||||
ld bc, wBackupAttrMap - wDecompressScratch
|
ld bc, wScratchAttrMap - wDecompressScratch
|
||||||
ld a, " "
|
ld a, " "
|
||||||
call ByteFill
|
call ByteFill
|
||||||
hlbgcoord 0, 0
|
hlbgcoord 0, 0
|
||||||
|
@ -47,7 +47,7 @@ Function17a6a8: ; 17a6a8 (5e:66a8)
|
|||||||
call Function17aba0
|
call Function17aba0
|
||||||
callba Function106464
|
callba Function106464
|
||||||
call Function17ac0c
|
call Function17ac0c
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
call Function17abcf
|
call Function17abcf
|
||||||
callba LoadOW_BGPal7
|
callba LoadOW_BGPal7
|
||||||
callba Function49420
|
callba Function49420
|
||||||
@ -169,7 +169,7 @@ Function17a78f: ; 17a78f (5e:678f)
|
|||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
jr nz, .asm_17a79f
|
jr nz, .asm_17a79f
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a79f
|
.asm_17a79f
|
||||||
|
212
misc/gfx_41.asm
212
misc/gfx_41.asm
@ -1,52 +1,52 @@
|
|||||||
Function104000:: ; 104000
|
HDMATransferAttrMapAndTileMapToWRAMBank3:: ; 104000
|
||||||
ld hl, .Function
|
ld hl, .Function
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
|
|
||||||
.Function:
|
.Function:
|
||||||
decoord 0, 0, AttrMap
|
decoord 0, 0, AttrMap
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call Function10419d
|
call HDMATransferToWRAMBank3
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call Function10419d
|
call HDMATransferToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 10402d
|
; 10402d
|
||||||
|
|
||||||
Function10402d:: ; 10402d
|
HDMATransferTileMapToWRAMBank3:: ; 10402d
|
||||||
ld hl, .Function
|
ld hl, .Function
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
|
|
||||||
.Function:
|
.Function:
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call Function10419d
|
call HDMATransferToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 104047
|
; 104047
|
||||||
|
|
||||||
Function104047: ; 104047
|
HDMATransferAttrMapToWRAMBank3: ; 104047
|
||||||
ld hl, .Function
|
ld hl, .Function
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
|
|
||||||
.Function:
|
.Function:
|
||||||
decoord 0, 0, AttrMap
|
decoord 0, 0, AttrMap
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call Function10419d
|
call HDMATransferToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 104061
|
; 104061
|
||||||
|
|
||||||
@ -56,63 +56,67 @@ ReloadMapPart:: ; 104061
|
|||||||
|
|
||||||
.Function:
|
.Function:
|
||||||
decoord 0, 0, AttrMap
|
decoord 0, 0, AttrMap
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
||||||
di
|
di
|
||||||
ld a, [rVBK]
|
ld a, [rVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call Function1041ad
|
call HDMATransfer_Wait127Scanlines_toBGMap
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call Function1041ad
|
call HDMATransfer_Wait127Scanlines_toBGMap
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ei
|
ei
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function104099: ; 104099
|
Mobile_ReloadMapPart: ; 104099
|
||||||
ld hl, ReloadMapPart ; useless
|
ld hl, ReloadMapPart ; useless
|
||||||
ld hl, .Function
|
ld hl, .Function
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
|
|
||||||
.Function:
|
.Function:
|
||||||
decoord 0, 0, AttrMap
|
decoord 0, 0, AttrMap
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
||||||
di
|
di
|
||||||
ld a, [rVBK]
|
ld a, [rVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call Function1041c1
|
call HDMATransfer_NoDI
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call Function1041c1
|
call HDMATransfer_NoDI
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ei
|
ei
|
||||||
|
|
||||||
ret
|
ret
|
||||||
; 1040d4
|
; 1040d4
|
||||||
|
|
||||||
Function1040d4: ; 1040d4
|
; XXX
|
||||||
ld hl, .Function
|
ld hl, .unreferenced_1040da
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
|
|
||||||
.Function:
|
.unreferenced_1040da
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
@ -132,31 +136,34 @@ Function1040d4: ; 1040d4
|
|||||||
ret
|
ret
|
||||||
; 1040fb
|
; 1040fb
|
||||||
|
|
||||||
Function1040fb: ; 1040fb
|
; XXX
|
||||||
ld hl, .Function
|
ld hl, .unreferenced_104101
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
|
|
||||||
.Function:
|
.unreferenced_104101
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld hl, w3_d800
|
ld hl, w3_d800
|
||||||
call Function10419d
|
call HDMATransferToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 104110
|
; 104110
|
||||||
|
|
||||||
Function104110:: ; 104110
|
OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 104110
|
||||||
; OpenText
|
; OpenText
|
||||||
ld hl, .Function
|
ld hl, .Function
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
|
|
||||||
.Function:
|
.Function:
|
||||||
|
; Transfer AttrMap and Tilemap to BGMap
|
||||||
|
; Fill vBGAttrs with $00
|
||||||
|
; Fill vBGTiles with " "
|
||||||
decoord 0, 0, AttrMap
|
decoord 0, 0, AttrMap
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
||||||
@ -165,38 +172,42 @@ Function104110:: ; 104110
|
|||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call Function1041b7
|
call HDMATransfer_Wait123Scanlines_toBGMap
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call Function1041b7
|
call HDMATransfer_Wait123Scanlines_toBGMap
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ei
|
ei
|
||||||
ret
|
ret
|
||||||
; 104148
|
; 104148
|
||||||
|
|
||||||
Function104148: ; 104148 (41:4148)
|
Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ; 104148 (41:4148)
|
||||||
ld hl, .Function
|
ld hl, .Function
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
|
|
||||||
.Function:
|
.Function:
|
||||||
|
; Transfer AttrMap and Tilemap to BGMap
|
||||||
|
; Fill vBGAttrs with $00
|
||||||
|
; Fill vBGTiles with $ff
|
||||||
decoord 0, 0, AttrMap
|
decoord 0, 0, AttrMap
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
ld c, $ff
|
ld c, $ff
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call CutAndPasteMap
|
call CutAndPasteMap
|
||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupAttrMap
|
ld hl, wScratchAttrMap
|
||||||
call Function1041ad
|
call HDMATransfer_Wait127Scanlines_toBGMap
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call Function1041ad
|
call HDMATransfer_Wait127Scanlines_toBGMap
|
||||||
ret
|
ret
|
||||||
; 104177
|
; 104177
|
||||||
|
|
||||||
@ -233,8 +244,8 @@ CallInSafeGFXMode: ; 104177
|
|||||||
; 10419d
|
; 10419d
|
||||||
|
|
||||||
|
|
||||||
Function10419d: ; 10419d (41:419d)
|
HDMATransferToWRAMBank3: ; 10419d (41:419d)
|
||||||
call Function10424e
|
call _LoadHDMAParameters
|
||||||
ld a, $23
|
ld a, $23
|
||||||
ld [hDMATransfer], a
|
ld [hDMATransfer], a
|
||||||
|
|
||||||
@ -246,60 +257,76 @@ WaitDMATransfer: ; 104a14
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1041ad: ; 1041ad (41:41ad)
|
HDMATransfer_Wait127Scanlines_toBGMap: ; 1041ad (41:41ad)
|
||||||
|
; HDMA transfer from hl to [hBGMapAddress]
|
||||||
|
; hBGMapAddress -> de
|
||||||
|
; 2 * SCREEN_HEIGHT -> c
|
||||||
ld a, [hBGMapAddress + 1]
|
ld a, [hBGMapAddress + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [hBGMapAddress]
|
ld a, [hBGMapAddress]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld c, $24
|
ld c, 2 * SCREEN_HEIGHT
|
||||||
jr Function104209
|
jr HDMATransfer_Wait127Scanlines
|
||||||
|
|
||||||
Function1041b7: ; 1041b7 (41:41b7)
|
HDMATransfer_Wait123Scanlines_toBGMap: ; 1041b7 (41:41b7)
|
||||||
|
; HDMA transfer from hl to [hBGMapAddress]
|
||||||
; hBGMapAddress -> de
|
; hBGMapAddress -> de
|
||||||
; $24 -> c
|
; 2 * SCREEN_HEIGHT -> c
|
||||||
; $7b --> b
|
; $7b --> b
|
||||||
ld a, [hBGMapAddress + 1]
|
ld a, [hBGMapAddress + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [hBGMapAddress]
|
ld a, [hBGMapAddress]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld c, $24
|
ld c, 2 * SCREEN_HEIGHT
|
||||||
jr asm_104205
|
jr HDMATransfer_Wait123Scanlines
|
||||||
; 1041c1 (41:41c1)
|
; 1041c1 (41:41c1)
|
||||||
|
|
||||||
Function1041c1: ; 1041c1
|
HDMATransfer_NoDI: ; 1041c1
|
||||||
|
; HDMA transfer from hl to [hBGMapAddress]
|
||||||
|
; [hBGMapAddress] --> de
|
||||||
|
; 2 * SCREEN_HEIGHT --> c
|
||||||
ld a, [hBGMapAddress + 1]
|
ld a, [hBGMapAddress + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [hBGMapAddress]
|
ld a, [hBGMapAddress]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld c, $24
|
ld c, 2 * SCREEN_HEIGHT
|
||||||
|
|
||||||
|
; [rHDMA1, rHDMA2] = hl & $fff0
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [rHDMA1], a
|
ld [rHDMA1], a
|
||||||
ld a, l
|
ld a, l
|
||||||
and $f0
|
and $f0
|
||||||
ld [rHDMA2], a
|
ld [rHDMA2], a
|
||||||
|
; [rHDMA3, rHDMA4] = de & $1ff0
|
||||||
ld a, d
|
ld a, d
|
||||||
and $1f
|
and $1f
|
||||||
ld [rHDMA3], a
|
ld [rHDMA3], a
|
||||||
ld a, e
|
ld a, e
|
||||||
and $f0
|
and $f0
|
||||||
ld [rHDMA4], a
|
ld [rHDMA4], a
|
||||||
|
; b = c | %10000000
|
||||||
ld a, c
|
ld a, c
|
||||||
dec c
|
dec c
|
||||||
or $80
|
or $80
|
||||||
ld b, a
|
ld b, a
|
||||||
|
; d = $7f - c + 1
|
||||||
ld a, $7f
|
ld a, $7f
|
||||||
sub c
|
sub c
|
||||||
ld d, a
|
ld d, a
|
||||||
|
; while [rLY] >= d: pass
|
||||||
.loop1
|
.loop1
|
||||||
ld a, [rLY]
|
ld a, [rLY]
|
||||||
cp d
|
cp d
|
||||||
jr nc, .loop1
|
jr nc, .loop1
|
||||||
|
; while not [rSTAT] & 3: pass
|
||||||
.loop2
|
.loop2
|
||||||
ld a, [rSTAT]
|
ld a, [rSTAT]
|
||||||
and $3
|
and $3
|
||||||
jr z, .loop2
|
jr z, .loop2
|
||||||
|
; load the 5th byte of HDMA
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [rHDMA5], a
|
ld [rHDMA5], a
|
||||||
|
; wait until rLY advances (c + 1) times
|
||||||
ld a, [rLY]
|
ld a, [rLY]
|
||||||
inc c
|
inc c
|
||||||
ld hl, rLY
|
ld hl, rLY
|
||||||
@ -314,49 +341,58 @@ Function1041c1: ; 1041c1
|
|||||||
ret
|
ret
|
||||||
; 104205
|
; 104205
|
||||||
|
|
||||||
asm_104205:
|
HDMATransfer_Wait123Scanlines:
|
||||||
ld b, $7b
|
ld b, $7b
|
||||||
jr asm_10420b
|
jr _continue_HDMATransfer
|
||||||
|
|
||||||
|
|
||||||
Function104209:
|
HDMATransfer_Wait127Scanlines:
|
||||||
; LY magic
|
|
||||||
ld b, $7f
|
ld b, $7f
|
||||||
asm_10420b:
|
_continue_HDMATransfer:
|
||||||
|
; a lot of waiting around for hardware registers
|
||||||
|
; [rHDMA1, rHDMA2] = hl & $fff0
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [rHDMA1], a
|
ld [rHDMA1], a
|
||||||
ld a, l
|
ld a, l
|
||||||
and $f0 ; high nybble
|
and $f0 ; high nybble
|
||||||
ld [rHDMA2], a
|
ld [rHDMA2], a
|
||||||
|
; [rHDMA3, rHDMA4] = de & $1ff0
|
||||||
ld a, d
|
ld a, d
|
||||||
and $1f ; lower 5 bits
|
and $1f ; lower 5 bits
|
||||||
ld [rHDMA3], a
|
ld [rHDMA3], a
|
||||||
ld a, e
|
ld a, e
|
||||||
and $f0 ; high nybble
|
and $f0 ; high nybble
|
||||||
ld [rHDMA4], a
|
ld [rHDMA4], a
|
||||||
|
; e = c | %10000000
|
||||||
ld a, c
|
ld a, c
|
||||||
dec c
|
dec c
|
||||||
or $80 ; set 7, a
|
or $80
|
||||||
ld e, a
|
ld e, a
|
||||||
|
; d = b - c + 1
|
||||||
ld a, b
|
ld a, b
|
||||||
sub c
|
sub c
|
||||||
ld d, a
|
ld d, a
|
||||||
|
; while [rLY] >= d: pass
|
||||||
.ly_loop
|
.ly_loop
|
||||||
ld a, [rLY]
|
ld a, [rLY]
|
||||||
cp d
|
cp d
|
||||||
jr nc, .ly_loop
|
jr nc, .ly_loop
|
||||||
|
|
||||||
di
|
di
|
||||||
|
; while [rSTAT] & 3: pass
|
||||||
.rstat_loop_1
|
.rstat_loop_1
|
||||||
ld a, [rSTAT]
|
ld a, [rSTAT]
|
||||||
and $3
|
and $3
|
||||||
jr nz, .rstat_loop_1
|
jr nz, .rstat_loop_1
|
||||||
|
; while not [rSTAT] & 3: pass
|
||||||
.rstat_loop_2
|
.rstat_loop_2
|
||||||
ld a, [rSTAT]
|
ld a, [rSTAT]
|
||||||
and $3
|
and $3
|
||||||
jr z, .rstat_loop_2
|
jr z, .rstat_loop_2
|
||||||
|
; load the 5th byte of HDMA
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [rHDMA5], a
|
ld [rHDMA5], a
|
||||||
|
; wait until rLY advances (c + 1) times
|
||||||
ld a, [rLY]
|
ld a, [rLY]
|
||||||
inc c
|
inc c
|
||||||
ld hl, rLY
|
ld hl, rLY
|
||||||
@ -374,7 +410,7 @@ asm_10420b:
|
|||||||
; 10424e
|
; 10424e
|
||||||
|
|
||||||
|
|
||||||
Function10424e: ; 10424e (41:424e)
|
_LoadHDMAParameters: ; 10424e (41:424e)
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [rHDMA1], a
|
ld [rHDMA1], a
|
||||||
ld a, l
|
ld a, l
|
||||||
@ -415,7 +451,7 @@ CutAndPasteMap: ; 104265 (41:4265)
|
|||||||
|
|
||||||
; load the original value of c into hl 12 times
|
; load the original value of c into hl 12 times
|
||||||
ld a, [hMapObjectIndexBuffer]
|
ld a, [hMapObjectIndexBuffer]
|
||||||
ld b, 12
|
ld b, BG_MAP_WIDTH - SCREEN_WIDTH
|
||||||
.loop3
|
.loop3
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec b
|
dec b
|
||||||
@ -441,7 +477,7 @@ _Get2bpp:: ; 104284
|
|||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
|
|
||||||
; Copy c tiles of the 2bpp from b:de to wDecompressScratch
|
; Copy c tiles of the 2bpp from b:de to wScratchTileMap
|
||||||
ld a, b ; bank
|
ld a, b ; bank
|
||||||
ld l, c ; number of tiles
|
ld l, c ; number of tiles
|
||||||
ld h, $0
|
ld h, $0
|
||||||
@ -452,7 +488,7 @@ endr
|
|||||||
ld c, l
|
ld c, l
|
||||||
ld h, d ; address
|
ld h, d ; address
|
||||||
ld l, e
|
ld l, e
|
||||||
ld de, wDecompressScratch
|
ld de, wScratchTileMap
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
@ -464,8 +500,8 @@ endr
|
|||||||
|
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call Function104209
|
call HDMATransfer_Wait127Scanlines
|
||||||
|
|
||||||
; restore the previous bank
|
; restore the previous bank
|
||||||
pop af
|
pop af
|
||||||
@ -519,7 +555,7 @@ endr
|
|||||||
ld b, h
|
ld b, h
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
ld de, wDecompressScratch
|
ld de, wScratchTileMap
|
||||||
call FarCopyBytesDouble_DoubleBankSwitch
|
call FarCopyBytesDouble_DoubleBankSwitch
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
@ -531,41 +567,41 @@ endr
|
|||||||
|
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
call Function104209
|
call HDMATransfer_Wait127Scanlines
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
; 104303
|
; 104303
|
||||||
|
|
||||||
Function104303: ; 104303
|
HDMATransfer_OnlyTopFourRows: ; 104303
|
||||||
ld hl, Function104309
|
ld hl, .Function
|
||||||
jp CallInSafeGFXMode
|
jp CallInSafeGFXMode
|
||||||
; 104309
|
; 104309
|
||||||
|
|
||||||
Function104309:
|
.Function:
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
call Function10433a
|
call .Copy
|
||||||
ld hl, wDecompressScratch + $80
|
ld hl, wScratchTileMap + $80
|
||||||
decoord 0, 0, AttrMap
|
decoord 0, 0, AttrMap
|
||||||
call Function10433a
|
call .Copy
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld c, $8
|
ld c, $8
|
||||||
ld hl, wDecompressScratch + $80
|
ld hl, wScratchTileMap + $80
|
||||||
debgcoord 0, 0, VBGMap1
|
debgcoord 0, 0, VBGMap1
|
||||||
call Function104209
|
call HDMATransfer_Wait127Scanlines
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld c, $8
|
ld c, $8
|
||||||
ld hl, wDecompressScratch
|
ld hl, wScratchTileMap
|
||||||
debgcoord 0, 0, VBGMap1
|
debgcoord 0, 0, VBGMap1
|
||||||
call Function104209
|
call HDMATransfer_Wait127Scanlines
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10433a: ; 10433a (41:433a)
|
.Copy: ; 10433a (41:433a)
|
||||||
ld b, 4
|
ld b, 4
|
||||||
.outer_loop
|
.outer_loop
|
||||||
ld c, SCREEN_WIDTH
|
ld c, SCREEN_WIDTH
|
||||||
@ -576,7 +612,7 @@ Function10433a: ; 10433a (41:433a)
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .inner_loop
|
jr nz, .inner_loop
|
||||||
ld a, l
|
ld a, l
|
||||||
add $20 - SCREEN_WIDTH
|
add BG_MAP_WIDTH - SCREEN_WIDTH
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, h
|
ld a, h
|
||||||
adc $0
|
adc $0
|
||||||
|
@ -359,7 +359,7 @@ Function48304: ; 48304 (12:4304)
|
|||||||
ld a, $29
|
ld a, $29
|
||||||
.asm_4833f
|
.asm_4833f
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
callba Function104148
|
callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
.asm_48348
|
.asm_48348
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
ld de, $629
|
ld de, $629
|
||||||
@ -385,7 +385,7 @@ Function48304: ; 48304 (12:4304)
|
|||||||
ld [wd003], a
|
ld [wd003], a
|
||||||
.asm_48377
|
.asm_48377
|
||||||
call Function48187
|
call Function48187
|
||||||
callba Function104148
|
callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
jp Function4840c
|
jp Function4840c
|
||||||
|
|
||||||
Function48383: ; 48383 (12:4383)
|
Function48383: ; 48383 (12:4383)
|
||||||
|
@ -2201,7 +2201,7 @@ Function89d75: ; 89d75 (22:5d75)
|
|||||||
push hl
|
push hl
|
||||||
call Function8923c
|
call Function8923c
|
||||||
call _hl_
|
call _hl_
|
||||||
callba Function104148
|
callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
pop hl
|
pop hl
|
||||||
jr asm_89d90
|
jr asm_89d90
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ Function100144: ; 100144
|
|||||||
ret z
|
ret z
|
||||||
res 2, [hl]
|
res 2, [hl]
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 100163
|
; 100163
|
||||||
|
|
||||||
@ -445,12 +445,12 @@ Function100301: ; 100301
|
|||||||
; 100320
|
; 100320
|
||||||
|
|
||||||
Function100320: ; 100320
|
Function100320: ; 100320
|
||||||
callba Function104099
|
callba Mobile_ReloadMapPart
|
||||||
ret
|
ret
|
||||||
; 100327
|
; 100327
|
||||||
|
|
||||||
Function100327: ; 100327
|
Function100327: ; 100327
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 100327
|
; 100327
|
||||||
|
|
||||||
@ -1821,7 +1821,7 @@ Function100b45: ; 100b45
|
|||||||
call Mobile_SetOverworldDelay
|
call Mobile_SetOverworldDelay
|
||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
push bc
|
push bc
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
call Function100e2d
|
call Function100e2d
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .asm_100b6b
|
jr c, .asm_100b6b
|
||||||
@ -1882,7 +1882,7 @@ MobileMoveSelectionScreen: ; 100b9f
|
|||||||
call Mobile_SetOverworldDelay
|
call Mobile_SetOverworldDelay
|
||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
push bc
|
push bc
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
call Function100e2d
|
call Function100e2d
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .b_button
|
jr c, .b_button
|
||||||
@ -2016,7 +2016,7 @@ Mobile_PartyMenuSelect: ; 100cb5
|
|||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
push bc
|
push bc
|
||||||
callba PlaySpriteAnimations
|
callba PlaySpriteAnimations
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
call Function100dfd
|
call Function100dfd
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .done
|
jr c, .done
|
||||||
@ -2070,7 +2070,7 @@ MobileBattleMonMenu: ; 100d22
|
|||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
push bc
|
push bc
|
||||||
callba PlaySpriteAnimations
|
callba PlaySpriteAnimations
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
call Function100dfd
|
call Function100dfd
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .asm_100d54
|
jr c, .asm_100d54
|
||||||
@ -3074,7 +3074,7 @@ Function1013c0: ; 1013c0
|
|||||||
; 1013d6
|
; 1013d6
|
||||||
|
|
||||||
Function1013d6: ; 1013d6
|
Function1013d6: ; 1013d6
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 1013dd
|
; 1013dd
|
||||||
|
|
||||||
@ -5182,7 +5182,7 @@ Function10224b: ; 10224b
|
|||||||
.asm_10225e
|
.asm_10225e
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
res 2, [hl]
|
res 2, [hl]
|
||||||
callba Function104099
|
callba Mobile_ReloadMapPart
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 10226a
|
; 10226a
|
||||||
@ -6809,7 +6809,7 @@ Function102d9a: ; 102d9a
|
|||||||
hlcoord 0, 0, AttrMap
|
hlcoord 0, 0, AttrMap
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
call ByteFill
|
call ByteFill
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
; 102db7
|
; 102db7
|
||||||
|
|
||||||
@ -7390,7 +7390,7 @@ Function103309: ; 103309
|
|||||||
ld [wd1ee], a
|
ld [wd1ee], a
|
||||||
call Function1034be
|
call Function1034be
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
ld a, $01
|
ld a, $01
|
||||||
ld [wd1f0], a
|
ld [wd1f0], a
|
||||||
call Function10339a
|
call Function10339a
|
||||||
@ -7404,7 +7404,7 @@ Function103362: ; 103362
|
|||||||
call Function1033af
|
call Function1033af
|
||||||
call Function10339a
|
call Function10339a
|
||||||
call Function10342c
|
call Function10342c
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
ld a, [Buffer2]
|
ld a, [Buffer2]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .asm_103362
|
jr z, .asm_103362
|
||||||
|
@ -445,7 +445,7 @@ Function1082db: ; 1082db
|
|||||||
.loop
|
.loop
|
||||||
callba PlaySpriteAnimations
|
callba PlaySpriteAnimations
|
||||||
callba SetUpPokeAnim
|
callba SetUpPokeAnim
|
||||||
callba Function10402d
|
callba HDMATransferTileMapToWRAMBank3
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
ret
|
ret
|
||||||
; 1082f0
|
; 1082f0
|
||||||
|
@ -7380,7 +7380,7 @@ Function117a94: ; 0x117a94
|
|||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
callba Function172e78
|
callba Function172e78
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 0x117ab4
|
; 0x117ab4
|
||||||
@ -7401,7 +7401,7 @@ Function117acd: ; 0x117acd
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_117ae2
|
jr nz, .asm_117ae2
|
||||||
call Function117ae9
|
call Function117ae9
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
jr Function117acd
|
jr Function117acd
|
||||||
|
|
||||||
.asm_117ae2
|
.asm_117ae2
|
||||||
|
@ -4647,7 +4647,7 @@ Function17f555: ; 17f555
|
|||||||
ld a, [wc303]
|
ld a, [wc303]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .quit
|
jr nz, .quit
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.quit
|
.quit
|
||||||
@ -4716,7 +4716,7 @@ Function17f5c3: ; 17f5c3
|
|||||||
|
|
||||||
Function17f5d2: ; 17f5d2
|
Function17f5d2: ; 17f5d2
|
||||||
call Function17f5e4
|
call Function17f5e4
|
||||||
callba Function104000
|
callba HDMATransferAttrMapAndTileMapToWRAMBank3
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc303], a
|
ld [wc303], a
|
||||||
|
@ -280,7 +280,7 @@ Function4a149: ; 4a149 (12:6149)
|
|||||||
call ClearBox
|
call ClearBox
|
||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba Function104148
|
callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
call StaticMenuJoypad
|
call StaticMenuJoypad
|
||||||
ld hl, wMenuCursorY
|
ld hl, wMenuCursorY
|
||||||
@ -403,7 +403,7 @@ Function4a28a: ; 4a28a (12:628a)
|
|||||||
hlcoord 14, 1
|
hlcoord 14, 1
|
||||||
ld de, String_4a34b
|
ld de, String_4a34b
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba Function104148
|
callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
call Function4a118
|
call Function4a118
|
||||||
call ScrollingMenuJoypad
|
call ScrollingMenuJoypad
|
||||||
push af
|
push af
|
||||||
@ -432,7 +432,7 @@ Function4a28a: ; 4a28a (12:628a)
|
|||||||
ld b, 3
|
ld b, 3
|
||||||
ld c, 4
|
ld c, 4
|
||||||
call TextBox
|
call TextBox
|
||||||
callba Function104148
|
callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
ld hl, DeletePassword_YesNo_MenuDataHeader
|
ld hl, DeletePassword_YesNo_MenuDataHeader
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call VerticalMenu
|
call VerticalMenu
|
||||||
@ -455,7 +455,7 @@ Function4a28a: ; 4a28a (12:628a)
|
|||||||
call ExitMenu
|
call ExitMenu
|
||||||
.quit
|
.quit
|
||||||
call Call_ExitMenu
|
call Call_ExitMenu
|
||||||
callba Function104148
|
callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
; 4a346 (12:6346)
|
; 4a346 (12:6346)
|
||||||
|
18
wram.asm
18
wram.asm
@ -1504,9 +1504,9 @@ wSeerCaughtData:: ds 1
|
|||||||
wSeerCaughtGender:: ds 1
|
wSeerCaughtGender:: ds 1
|
||||||
ds wSeerAction - @
|
ds wSeerAction - @
|
||||||
|
|
||||||
wBufferMonNick:: ds PKMN_NAME_LENGTH
|
wBufferMonNick:: ds PKMN_NAME_LENGTH ; d002
|
||||||
wBufferMonOT:: ds NAME_LENGTH
|
wBufferMonOT:: ds NAME_LENGTH ; d00d
|
||||||
wBufferMon:: party_struct wBufferMon
|
wBufferMon:: party_struct wBufferMon ; d018
|
||||||
ds 8
|
ds 8
|
||||||
wMonOrItemNameBuffer::
|
wMonOrItemNameBuffer::
|
||||||
ds wBufferMonNick - @
|
ds wBufferMonNick - @
|
||||||
@ -1820,8 +1820,8 @@ wPrevMapGroup:: ds 1
|
|||||||
wPrevMapNumber:: ds 1
|
wPrevMapNumber:: ds 1
|
||||||
; d14c
|
; d14c
|
||||||
|
|
||||||
wFollowNotExactPersonX:: ds 1 ; used in FollowNotExact
|
wPlayerBGMapOffsetX:: ds 1 ; used in FollowNotExact; unit is pixels
|
||||||
wFollowNotExactPersonY:: ds 1 ; used in FollowNotExact
|
wPlayerBGMapOffsetY:: ds 1 ; used in FollowNotExact; unit is pixels
|
||||||
|
|
||||||
; Player movement
|
; Player movement
|
||||||
wPlayerStepVectorX:: ds 1 ; d14e
|
wPlayerStepVectorX:: ds 1 ; d14e
|
||||||
@ -2923,7 +2923,7 @@ w3_d742:: battle_tower_struct w3_d742
|
|||||||
ds -$22
|
ds -$22
|
||||||
|
|
||||||
wBTChoiceOfLvlGroup::
|
wBTChoiceOfLvlGroup::
|
||||||
w3_d800:: ; ds BG_MAP_WIDTH * SCREEN_HEIGHT ($240)
|
w3_d800:: ; ds BG_MAP__WIDTH * SCREEN_HEIGHT ($240)
|
||||||
ds $69
|
ds $69
|
||||||
w3_d869:: ds $17
|
w3_d869:: ds $17
|
||||||
w3_d880:: ds 1
|
w3_d880:: ds 1
|
||||||
@ -3049,8 +3049,10 @@ w5_dc3e:: ds $c
|
|||||||
|
|
||||||
SECTION "WRAM 6", WRAMX, BANK [6]
|
SECTION "WRAM 6", WRAMX, BANK [6]
|
||||||
|
|
||||||
wDecompressScratch:: ds $400
|
wDecompressScratch::
|
||||||
wBackupAttrMap:: ds $200
|
wScratchTileMap::
|
||||||
|
ds BG_MAP_WIDTH * BG_MAP_HEIGHT
|
||||||
|
wScratchAttrMap:: ds $200
|
||||||
w6_d600:: ds $200
|
w6_d600:: ds $200
|
||||||
w6_d800::
|
w6_d800::
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user