You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Merge pull request #503 from Rangi42/master
Factor wMisc into meaningful parts; move most code out of home.asm
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
_LoadMapPart:: ; 4d15b
|
||||
ld hl, wMisc
|
||||
ld hl, wSurroundingTiles
|
||||
ld a, [wMetatileStandingY]
|
||||
and a
|
||||
jr z, .top_row
|
||||
ld bc, WMISC_WIDTH * 2
|
||||
ld bc, SURROUNDING_WIDTH * 2
|
||||
add hl, bc
|
||||
|
||||
.top_row
|
||||
@@ -25,7 +25,7 @@ _LoadMapPart:: ; 4d15b
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
ld a, l
|
||||
add 4
|
||||
add METATILE_WIDTH
|
||||
ld l, a
|
||||
jr nc, .carry
|
||||
inc h
|
||||
|
||||
@@ -1359,7 +1359,7 @@ Script_startbattle:
|
||||
call BufferScreen
|
||||
predef StartBattle
|
||||
ld a, [wBattleResult]
|
||||
and $3f
|
||||
and $ff ^ BATTLERESULT_BITMASK
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
@@ -1378,10 +1378,10 @@ Script_reloadmapafterbattle:
|
||||
|
||||
ld hl, wBattleScriptFlags
|
||||
ld d, [hl]
|
||||
ld [hl], $0
|
||||
ld [hl], 0
|
||||
ld a, [wBattleResult]
|
||||
and $3f
|
||||
cp $1
|
||||
and $ff ^ BATTLERESULT_BITMASK
|
||||
cp LOSE
|
||||
jr nz, .notblackedout
|
||||
ld b, BANK(Script_BattleWhiteout)
|
||||
ld hl, Script_BattleWhiteout
|
||||
@@ -1395,7 +1395,7 @@ Script_reloadmapafterbattle:
|
||||
|
||||
.was_wild
|
||||
ld a, [wBattleResult]
|
||||
bit 7, a
|
||||
bit BATTLERESULT_BOX_FULL, a
|
||||
jr z, .done
|
||||
ld b, BANK(Script_SpecialBillCall)
|
||||
ld de, Script_SpecialBillCall
|
||||
|
||||
@@ -146,6 +146,6 @@ _GetVarAction:: ; 80648 (20:4648)
|
||||
|
||||
.BattleResult: ; 80728
|
||||
ld a, [wBattleResult]
|
||||
and $3f
|
||||
and $ff ^ BATTLERESULT_BITMASK
|
||||
jp .loadstringbuffer2
|
||||
; 80730
|
||||
|
||||
@@ -392,7 +392,7 @@ CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)
|
||||
|
||||
|
||||
GetCoordOfUpperLeftCorner:: ; 10486d
|
||||
ld hl, wOverworldMap
|
||||
ld hl, wOverworldMapBlocks
|
||||
ld a, [wXCoord]
|
||||
bit 0, a
|
||||
jr nz, .increment_then_halve1
|
||||
|
||||
Reference in New Issue
Block a user