map_header → map_def; map_header_2 → map_data

This commit is contained in:
Remy Oukaour
2018-01-16 22:57:19 -05:00
parent 3d0e1819e9
commit bf074f3598
421 changed files with 2698 additions and 2699 deletions

View File

@@ -396,7 +396,7 @@ CheckTileEvent: ; 96874
ld a, [hli]
ld h, [hl]
ld l, a
call GetMapScriptHeaderBank
call GetMapScriptsBank
call CallScript
ret
; 968c7
@@ -450,7 +450,7 @@ RunSceneScript: ; 968ec
ld e, a
ld d, 0
ld hl, wCurrMapSceneScriptHeaderPointer
ld hl, wCurrMapSceneScriptsPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -458,9 +458,9 @@ rept 4
add hl, de
endr
call GetMapScriptHeaderBank
call GetMapScriptsBank
call GetFarHalfword
call GetMapScriptHeaderBank
call GetMapScriptsBank
call CallScript
ld hl, ScriptFlags
@@ -635,7 +635,7 @@ TryObjectEvent: ; 969b5
ld a, [hli]
ld h, [hl]
ld l, a
call GetMapScriptHeaderBank
call GetMapScriptsBank
call CallScript
ret
; 96a12
@@ -646,7 +646,7 @@ TryObjectEvent: ; 969b5
ld a, [hli]
ld h, [hl]
ld l, a
call GetMapScriptHeaderBank
call GetMapScriptsBank
ld de, EngineBuffer1
ld bc, 2
call FarCopyBytes
@@ -731,7 +731,7 @@ TryBGEvent: ; 96a38
ld a, [hli]
ld h, [hl]
ld l, a
call GetMapScriptHeaderBank
call GetMapScriptsBank
call CallScript
scf
ret
@@ -740,7 +740,7 @@ TryBGEvent: ; 96a38
call CheckBGEventFlag
jp nz, .dontread
call PlayTalkObject
call GetMapScriptHeaderBank
call GetMapScriptsBank
ld de, EngineBuffer1
ld bc, 3
call FarCopyBytes
@@ -753,7 +753,7 @@ TryBGEvent: ; 96a38
.copy
call CheckBGEventFlag
jr nz, .dontread
call GetMapScriptHeaderBank
call GetMapScriptsBank
ld de, EngineBuffer1
ld bc, 3
call FarCopyBytes
@@ -774,9 +774,9 @@ TryBGEvent: ; 96a38
pop hl
inc hl
inc hl
call GetMapScriptHeaderBank
call GetMapScriptsBank
call GetFarHalfword
call GetMapScriptHeaderBank
call GetMapScriptsBank
call CallScript
scf
ret
@@ -792,7 +792,7 @@ CheckBGEventFlag: ; 96ad8
ld h, [hl]
ld l, a
push hl
call GetMapScriptHeaderBank
call GetMapScriptsBank
call GetFarHalfword
ld e, l
ld d, h

View File

@@ -1,6 +1,6 @@
CheckForHiddenItems: ; b8172
; Checks to see if there are hidden items on the screen that have not yet been found. If it finds one, returns carry.
call GetMapScriptHeaderBank
call GetMapScriptsBank
ld [Buffer1], a
; Get the coordinate of the bottom right corner of the screen, and load it in Buffer3/Buffer4.
ld a, [XCoord]
@@ -9,8 +9,8 @@ CheckForHiddenItems: ; b8172
ld a, [YCoord]
add SCREEN_HEIGHT / 4
ld [Buffer3], a
; Get the pointer for the first BG event header in the map...
ld hl, wCurrMapBGEventHeaderPointer
; Get the pointer for the first bg_event in the map...
ld hl, wCurrMapBGEventsPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -20,7 +20,7 @@ CheckForHiddenItems: ; b8172
jr z, .nobgeventitems
; For i = 1:wCurrMapBGEventCount...
.loop
; Store the counter in Buffer2, and store the BG event header pointer in the stack.
; Store the counter in Buffer2, and store the bg_event pointer in the stack.
ld [Buffer2], a
push hl
; Get the Y coordinate of the BG event.
@@ -58,7 +58,7 @@ CheckForHiddenItems: ; b8172
jr z, .itemnearby
.next
; Restore the BG event header pointer and increment it by the length of a BG event header.
; Restore the bg_event pointer and increment it by the length of a bg_event.
pop hl
ld bc, 5
add hl, bc

View File

@@ -9,7 +9,7 @@ MomTriesToBuySomething:: ; fcfec
ld a, [wMapReentryScriptQueueFlag]
and a
ret nz
call GetMapHeaderPhoneServiceNybble
call GetMapPhoneService
and a
ret nz
xor a

View File

@@ -3,7 +3,7 @@ Special_HoOhChamber: ; 0x8addb
ld a, [hl]
cp HO_OH ; is Ho-oh the first Pokémon in the party?
jr nz, .done ; if not, we're done
call GetSecondaryMapHeaderPointer
call GetMapDataPointer ; pointless?
ld de, EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
ld b, SET_FLAG
call EventFlagAction
@@ -12,7 +12,7 @@ Special_HoOhChamber: ; 0x8addb
; 0x8adef
Special_OmanyteChamber: ; 8adef
call GetSecondaryMapHeaderPointer
call GetMapDataPointer ; pointless?
ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
ld b, CHECK_FLAG
call EventFlagAction
@@ -44,7 +44,7 @@ Special_OmanyteChamber: ; 8adef
jr nz, .loop
.open
call GetSecondaryMapHeaderPointer
call GetMapDataPointer ; pointless?
ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
ld b, SET_FLAG
call EventFlagAction
@@ -57,12 +57,12 @@ SpecialAerodactylChamber: ; 8ae30
push de
push bc
call GetSecondaryMapHeaderPointer
call GetMapDataPointer
ld a, h
cp HIGH(RuinsOfAlphAerodactylChamber_SecondMapHeader)
cp HIGH(RuinsOfAlphAerodactylChamber_MapData)
jr nz, .nope
ld a, l
cp LOW(RuinsOfAlphAerodactylChamber_SecondMapHeader)
cp LOW(RuinsOfAlphAerodactylChamber_MapData)
jr nz, .nope
ld de, EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
@@ -85,12 +85,12 @@ SpecialKabutoChamber: ; 8ae4e
push hl
push de
call GetSecondaryMapHeaderPointer
call GetMapDataPointer
ld a, h
cp HIGH(RuinsOfAlphKabutoChamber_SecondMapHeader)
cp HIGH(RuinsOfAlphKabutoChamber_MapData)
jr nz, .done
ld a, l
cp LOW(RuinsOfAlphKabutoChamber_SecondMapHeader)
cp LOW(RuinsOfAlphKabutoChamber_MapData)
jr nz, .done
ld de, EVENT_WALL_OPENED_IN_KABUTO_CHAMBER

View File

@@ -274,7 +274,7 @@ DoBikeStep:: ; 97db3
; If we're not in an area of phone service, we don't
; have to be here.
call GetMapHeaderPhoneServiceNybble
call GetMapPhoneService
and a
jr nz, .NoCall

View File

@@ -542,10 +542,10 @@ Continue_LoadMenuHeader: ; 5ebf
ld hl, .MenuDataHeader_Dex
ld a, [wStatusFlags]
bit 0, a ; pokedex
jr nz, .pokedex_header
jr nz, .show_menu
ld hl, .MenuDataHeader_NoDex
.pokedex_header
.show_menu
call _OffsetMenuDataHeader
call MenuBox
call PlaceVerticalMenuItems

View File

@@ -131,7 +131,7 @@ CheckPhoneCall:: ; 90074 (24:4074)
cp b
jr nz, .no_call
call GetMapHeaderPhoneServiceNybble
call GetMapPhoneService
and a
jr nz, .no_call
@@ -328,7 +328,7 @@ Function90199: ; 90199 (24:4199)
and a
jr nz, .OutOfArea
; If you're in an area without phone service, don't do the call
call GetMapHeaderPhoneServiceNybble
call GetMapPhoneService
and a
jr nz, .OutOfArea
; If the person can't take a call at that time, don't do the call

View File

@@ -56,11 +56,11 @@ MovePlayerPic: ; 88266
jr .loop
ShowPlayerNamingChoices: ; 88297
ld hl, ChrisNameMenuHeader
ld hl, ChrisNameMenuDataHeader
ld a, [wPlayerGender]
bit 0, a
jr z, .GotGender
ld hl, KrisNameMenuHeader
ld hl, KrisNameMenuDataHeader
.GotGender:
call LoadMenuDataHeader
call VerticalMenu

View File

@@ -393,7 +393,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
hlcoord 17, 2
inc a
ld [hli], a
call GetMapHeaderPhoneServiceNybble
call GetMapPhoneService
and a
ret nz
hlcoord 18, 2
@@ -926,7 +926,7 @@ PokegearPhone_Joypad: ; 91171 (24:5171)
ret
PokegearPhone_MakePhoneCall: ; 911eb (24:51eb)
call GetMapHeaderPhoneServiceNybble
call GetMapPhoneService
and a
jr nz, .no_service
ld hl, Options

View File

@@ -525,9 +525,9 @@ SavePlayerData: ; 14dd7
ld de, sPlayerData
ld bc, wPlayerDataEnd - wPlayerData
call CopyBytes
ld hl, wMapData
ld de, sMapData
ld bc, wMapDataEnd - wMapData
ld hl, wCurrMapData
ld de, sCurrMapData
ld bc, wCurrMapDataEnd - wCurrMapData
call CopyBytes
jp CloseSRAM
; 14df7
@@ -592,9 +592,9 @@ SaveBackupPlayerData: ; 14e55
ld de, sBackupPlayerData
ld bc, wPlayerDataEnd - wPlayerData
call CopyBytes
ld hl, wMapData
ld de, sBackupMapData
ld bc, wMapDataEnd - wMapData
ld hl, wCurrMapData
ld de, sBackupCurrMapData
ld bc, wCurrMapDataEnd - wCurrMapData
call CopyBytes
call CloseSRAM
ret
@@ -777,9 +777,9 @@ LoadPlayerData: ; 14fd7 (5:4fd7)
ld de, wPlayerData
ld bc, wPlayerDataEnd - wPlayerData
call CopyBytes
ld hl, sMapData
ld de, wMapData
ld bc, wMapDataEnd - wMapData
ld hl, sCurrMapData
ld de, wCurrMapData
ld bc, wCurrMapDataEnd - wCurrMapData
call CopyBytes
call CloseSRAM
ld a, BANK(sBattleTowerChallengeState)
@@ -833,9 +833,9 @@ LoadBackupPlayerData: ; 15046 (5:5046)
ld de, wPlayerData
ld bc, wPlayerDataEnd - wPlayerData
call CopyBytes
ld hl, sBackupMapData
ld de, wMapData
ld bc, wMapDataEnd - wMapData
ld hl, sBackupCurrMapData
ld de, wCurrMapData
ld bc, wCurrMapDataEnd - wCurrMapData
call CopyBytes
call CloseSRAM
ret

View File

@@ -2580,11 +2580,11 @@ Script_changemap:
; parameters: map_data_pointer
call GetScriptByte
ld [MapBlockDataBank], a
ld [MapBlocksBank], a
call GetScriptByte
ld [MapBlockDataPointer], a
ld [MapBlocksPointer], a
call GetScriptByte
ld [MapBlockDataPointer + 1], a
ld [MapBlocksPointer + 1], a
call ChangeMap
call BufferScreen
ret

View File

@@ -763,7 +763,7 @@ endr
; e16c7
UnownPuzzle_AddPuzzlePieceBorders: ; e16c7
ld hl, GFXHeaders
ld hl, PuzzlePieceBorderData
ld a, 8
.loop
push af
@@ -819,7 +819,7 @@ endr
ret
; e1703
GFXHeaders: ; e1703
PuzzlePieceBorderData: ; e1703
dw .TileBordersGFX + 0 tiles, vTiles0 tile $00
dw .TileBordersGFX + 1 tiles, vTiles0 tile $01
dw .TileBordersGFX + 2 tiles, vTiles0 tile $02

View File

@@ -11,7 +11,7 @@ InitCommandQueue: ; 1045c4
farcall ClearCmdQueue
ld a, MAPCALLBACK_CMDQUEUE
call RunMapCallback
call GetMapHeaderTimeOfDayNybble
call GetMapTimeOfDay
ld [wMapTimeOfDay], a
ret