summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2015-08-30 18:56:44 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2015-08-30 18:56:44 -0400
commit2b7961759b3786725b95ee8f4a0b6e556091db7a (patch)
tree6287d4bb7bad7d012f804dc18856341a09fc015b
parentd2ed7674f499b1fd6c4059da40b8b42c6bf96995 (diff)
Fixes.
-rw-r--r--constants/predef_constants.asm6
-rw-r--r--engine/bank3d/bank3d_battle.asm10
-rw-r--r--engine/bank3d/link_menu.asm18
-rw-r--r--engine/bank3d/main.asm20
-rw-r--r--engine/battle/battle_transitions.asm95
-rwxr-xr-xengine/gamefreak.asm4
-rwxr-xr-xengine/hall_of_fame.asm6
-rwxr-xr-xengine/menu/start_menu.asm9
-rwxr-xr-xengine/overworld/healing_machine.asm2
-rwxr-xr-xengine/overworld/player_animations.asm1
-rwxr-xr-xengine/palettes.asm5
-rwxr-xr-xengine/predefs.asm2
-rwxr-xr-xengine/town_map.asm3
-rw-r--r--home.asm29
-rw-r--r--home/audio.asm4
-rw-r--r--home/copy.asm4
-rw-r--r--home/init.asm2
-rw-r--r--home/overworld.asm5
-rw-r--r--home/pic.asm5
-rw-r--r--home/vblank.asm1
-rwxr-xr-xwram.asm4
-rwxr-xr-xyellow/main.asm5
22 files changed, 59 insertions, 181 deletions
diff --git a/constants/predef_constants.asm b/constants/predef_constants.asm
index 07972154..a17525dc 100644
--- a/constants/predef_constants.asm
+++ b/constants/predef_constants.asm
@@ -28,7 +28,7 @@ const_value = 0
predef_const LoadTilesetHeader
predef_const LearnMoveFromLevelUp
predef_const LearnMove
- predef_const IsItemInBag_
+ predef_const GetQuantityOfItemInBag
predef_const CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; for these two, the bank number is actually 0
predef_const GiveItem
predef_const ChangeBGPalColor0_4Frames
@@ -69,7 +69,7 @@ const_value = 0
predef_const SetPartyMonTypes
predef_const CanLearnTM
predef_const TMToMove
- predef_const Func_71ddf
+ predef_const _RunPaletteCommand
predef_const StarterDex ; 46
predef_const _AddPartyMon
predef_const UpdateHPBar2
@@ -92,7 +92,7 @@ const_value = 0
predef_const GetTileTwoStepsInFrontOfPlayer
predef_const CheckForCollisionWhenPushingBoulder
predef_const PrintStrengthTxt
- predef_const PickupItem
+ predef_const PickUpItem
predef_const PrintMoveType
predef_const LoadMovePPs
predef_const DrawHP ; 5F
diff --git a/engine/bank3d/bank3d_battle.asm b/engine/bank3d/bank3d_battle.asm
index ac4cd849..9a9b60f1 100644
--- a/engine/bank3d/bank3d_battle.asm
+++ b/engine/bank3d/bank3d_battle.asm
@@ -42,7 +42,7 @@ asm_f601d: ; f601d (f:601d)
ld [$ffe1], a
dec a
ld [wAICount], a
- hlCoord 12, 0
+ coord hl, 12, 0
predef Func_3f0c6
ld a, $ff
ld [wEnemyMonPartyPos], a
@@ -103,7 +103,7 @@ InitWildBattle: ; f607c (3d:607c)
xor a
ld [W_TRAINERCLASS], a
ld [$ffe1], a
- hlCoord 12, 0
+ coord hl, 12, 0
predef Func_3f0c6
; common code that executes after init battle code specific to trainer or wild battles
@@ -125,10 +125,10 @@ InitBattle_Common: ; f60eb (3d:60eb)
ld a, $9c
ld [$ffbd], a
call LoadScreenTilesFromBuffer1
- hlCoord 9, 7
+ coord hl, 9, 7
ld bc, $50a
call ClearScreenArea
- hlCoord 1, 0
+ coord hl, 1, 0
ld bc, $40a
call ClearScreenArea
call ClearSprites
@@ -173,7 +173,7 @@ LoadMonBackPic: ; f6178 (3d:6178)
; been loaded with GetMonHeader.
ld a, [wBattleMonSpecies2]
ld [wcf91], a
- hlCoord 1, 5
+ coord hl, 1, 5
ld bc,$708
call ClearScreenArea
ld hl, W_MONHBACKSPRITE - W_MONHEADER
diff --git a/engine/bank3d/link_menu.asm b/engine/bank3d/link_menu.asm
index a460eb00..69d0458e 100644
--- a/engine/bank3d/link_menu.asm
+++ b/engine/bank3d/link_menu.asm
@@ -5,19 +5,19 @@ Func_f531b:: ; f531b (3d:531b)
ld [wBuffer],a
xor a
ld [wUnknownSerialFlag_d499],a
- hlCoord 0,0
+ coord hl, 0,0
ld bc,$405
call TextBoxBorder
ld de,Text_f5791
- hlCoord 1,2
+ coord hl, 1,2
call PlaceString
- hlCoord 8,0
+ coord hl, 8,0
ld bc,$80a
call TextBoxBorder
- hlCoord 10,2
+ coord hl, 10,2
ld de,Text_f579c
call PlaceString
- hlCoord 0,10
+ coord hl, 0,10
ld bc,$612
call TextBoxBorder
call UpdateSprites
@@ -513,7 +513,7 @@ asm_f56ad:: ; f56ad (3d:56ad)
Func_f56bd:: ; f56bd (3d:56bd)
xor a
ld [H_AUTOBGTRANSFERENABLED],a
- hlCoord 1,11
+ coord hl, 1,11
ld bc,$612
call ClearScreenArea
ld a,[wCurrentMenuItem]
@@ -530,7 +530,7 @@ Func_f56bd:: ; f56bd (3d:56bd)
ld l,a
ld d,h
ld e,l
- hlCoord 1,12
+ coord hl, 1,12
call PlaceString
.asm_f56e6
call Delay3
@@ -642,11 +642,11 @@ LinkMenu: ; f580c (3d:580c)
call SaveScreenTilesToBuffer1
ld hl, ColosseumWhereToText
call PrintText
- hlCoord 5, 3
+ coord hl, 5, 3
ld bc, $80d
call TextBoxBorder
call UpdateSprites
- hlCoord 7, 5
+ coord hl, 7, 5
ld de, TradeCenterText
call PlaceString
xor a
diff --git a/engine/bank3d/main.asm b/engine/bank3d/main.asm
index 7b3326c9..cdacf431 100644
--- a/engine/bank3d/main.asm
+++ b/engine/bank3d/main.asm
@@ -4,7 +4,7 @@ INCLUDE "engine/battle/unused_stats_functions.asm"
INCLUDE "engine/battle/scroll_draw_trainer_pic.asm"
Func_f429f:: ; f429f (3d:429f)
- hlCoord 0,5
+ coord hl, 0,5
ld c,$0
.asm_f42a4
inc c
@@ -169,35 +169,35 @@ Func_f453f:: ; f453f (3d:453f)
ret
Func_f4578:: ; f4578 (3d:4578)
- hlCoord 2,1
+ coord hl, 2,1
ld de,Pointer_f45f9
ld bc,7 << 8 | 16 ; 16x7 (xy)
call CopyScreenArea
ret
Func_f4585:: ; f4585 (3d:4585)
- hlCoord 6,4
+ coord hl, 6,4
ld de,Pointer_f4673
ld bc,4 << 8 | 7 ; 7x4 (xy)
call CopyScreenArea
- hlCoord 9,8
+ coord hl, 9,8
ld [hl],$64
inc hl
ld [hl],$65
ret
Func_f459a:: ; f459a (3d:459a)
- hlCoord 4,8
+ coord hl, 4,8
ld de,Pointer_f468f
ld bc,9 << 8 | 12 ; 12x9 (xy)
call CopyScreenArea
- hlCoord 16,10
+ coord hl, 16,10
ld [hl],$96
- hlCoord 16,11
+ coord hl, 16,11
ld [hl],$9d
- hlCoord 16,12
+ coord hl, 16,12
ld [hl],$a7
- hlCoord 16,13
+ coord hl, 16,13
ld [hl],$b1
ld hl,Pointer_f45c7
ld de,wOAMBuffer
@@ -349,7 +349,7 @@ Func_f5ab0:: ; f5ab0 (3d:5ab0)
ld a,[wTopMenuItemY]
and a
jr z,.asm_f5ac0
- hlCoord 0,0
+ coord hl, 0,0
ld bc,$14
.loop
add hl,bc
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index 642d457b..f5af6826 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -205,13 +205,8 @@ BattleTransition_BlackScreen: ; 70ad3 (1c:4ad3)
; called regardless of mon levels, but does an
; outward spiral if enemy is at least 3 levels
; higher than player and does an inward spiral otherwise
-<<<<<<< HEAD
BattleTransition_Spiral: ; 70ae5 (1c:4ae5)
- ld a, [wcd47]
-=======
-BattleTransition_Spiral: ; 70a72 (1c:4a72)
ld a, [wBattleTransitionSpiralDirection]
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
and a
jr z, .outwardSpiral
call BattleTransition_InwardSpiral
@@ -243,21 +238,12 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72)
ld [wOutwardSpiralTileMapPointer], a
ret
-<<<<<<< HEAD
BattleTransition_InwardSpiral: ; 70b1d (1c:4b1d)
- ld a, $7
- ld [wWhichTrade], a
- ld hl, wTileMap
- ld c, $11
- ld de, $14
-=======
-BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
ld a, 7
ld [wInwardSpiralUpdateScreenCounter], a
coord hl, 0, 0
ld c, SCREEN_HEIGHT - 1
ld de, SCREEN_WIDTH
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_InwardSpiral_
inc c
jr .skip
@@ -270,11 +256,7 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
call BattleTransition_InwardSpiral_
dec c
dec c
-<<<<<<< HEAD
- ld de, -$14
-=======
ld de, -SCREEN_WIDTH
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_InwardSpiral_
inc c
ld de, -1
@@ -305,17 +287,10 @@ BattleTransition_InwardSpiral_: ; 70b53 (1c:4b53)
pop bc
ret
-<<<<<<< HEAD
BattleTransition_OutwardSpiral_: ; 70b6c (1c:4b6c)
- ld bc, -$14
- ld de, $14
- ld a, [wd09b]
-=======
-BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
ld bc, -SCREEN_WIDTH
ld de, SCREEN_WIDTH
ld a, [wOutwardSpiralTileMapPointer + 1]
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
ld l, a
ld a, [wOutwardSpiralTileMapPointer]
ld h, a
@@ -387,12 +362,8 @@ BattleTransition_FlashScreen_: ; 70be8 (1c:4be8s)
cp $1
jr z, .done
ld [rBGP], a
-<<<<<<< HEAD
call Func_3021
ld c, $2
-=======
- ld c, 2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call DelayFrames
jr .loop
.done
@@ -405,40 +376,22 @@ BattleTransition_FlashScreenPalettes: ; 70be8 (1c:4be8)
db $01 ; terminator
; used for low level trainer dungeon battles
-<<<<<<< HEAD
BattleTransition_Shrink: ; 70bf4 (1c:4bf4)
- ld c, $9
-=======
-BattleTransition_Shrink: ; 70b7f (1c:4b7f)
- ld c, SCREEN_HEIGHT / 2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
.loop
push bc
xor a
ld [H_AUTOBGTRANSFERENABLED], a
-<<<<<<< HEAD
- hlCoord 0, 7
- deCoord 0, 8
- ld bc, -$28
-=======
coord hl, 0, 7
coord de, 0, 8
ld bc, -SCREEN_WIDTH * 2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_CopyTiles1
coord hl, 0, 10
coord de, 0, 9
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
-<<<<<<< HEAD
- hlCoord 8, 0
- deCoord 9, 0
- ld bc, -$2
-=======
coord hl, 8, 0
coord de, 9, 0
ld bc, -2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_CopyTiles2
coord hl, 11, 0
coord de, 10, 0
@@ -456,40 +409,22 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f)
jp DelayFrames
; used for high level trainer dungeon battles
-<<<<<<< HEAD
BattleTransition_Split: ; 70c40 (1c:4c40)
- ld c, $9
-=======
-BattleTransition_Split: ; 70bca (1c:4bca)
- ld c, SCREEN_HEIGHT / 2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
push bc
-<<<<<<< HEAD
- hlCoord 0, 16
- deCoord 0, 17
- ld bc, -$28
-=======
coord hl, 0, 16
coord de, 0, 17
ld bc, -SCREEN_WIDTH * 2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_CopyTiles1
coord hl, 0, 1
coord de, 0, 0
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
-<<<<<<< HEAD
- hlCoord 18, 0
- deCoord 19, 0
- ld bc, -$2
-=======
coord hl, 18, 0
coord de, 19, 0
ld bc, -2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_CopyTiles2
coord hl, 1, 0
coord de, 0, 0
@@ -586,17 +521,10 @@ BattleTransition_CopyTiles2: ; 70cb5 (1c:4c3f)
ret
; used for high level wild dungeon battles
-<<<<<<< HEAD
BattleTransition_VerticalStripes: ; 70cf4 (1c:4cf4)
- ld c, $12
- ld hl, wTileMap
- deCoord 1, 17
-=======
-BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
ld c, SCREEN_HEIGHT
coord hl, 0, 0
coord de, 1, 17
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
@@ -621,13 +549,8 @@ BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
jr nz, .loop
jp BattleTransition_BlackScreen
-<<<<<<< HEAD
BattleTransition_VerticalStripes_: ; 70d20 (1c:4d20)
- ld c, $a
-=======
-BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
ld c, SCREEN_WIDTH / 2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
.loop
ld [hl], $ff
inc hl
@@ -637,17 +560,10 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
ret
; used for low level wild dungeon battles
-<<<<<<< HEAD
BattleTransition_HorizontalStripes: ; 70d2a (1c:4d2a)
- ld c, $14
- ld hl, wTileMap
- deCoord 19, 1
-=======
-BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
ld c, SCREEN_WIDTH
coord hl, 0, 0
coord de, 19, 1
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
@@ -668,15 +584,9 @@ BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
jr nz, .loop
jp BattleTransition_BlackScreen
-<<<<<<< HEAD
BattleTransition_HorizontalStripes_: ; 70d4e (1c:4d4e)
- ld c, $9
- ld de, $28
-=======
-BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
ld c, SCREEN_HEIGHT / 2
ld de, SCREEN_WIDTH * 2
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
.loop
ld [hl], $ff
add hl, de
@@ -719,13 +629,8 @@ BattleTransition_Circle_Sub1: ; 70d7c (1c:4d7c)
jr nz, BattleTransition_Circle_Sub1
ret
-<<<<<<< HEAD
BattleTransition_TransferDelay3: ; 70d8f (1c:4d8f)
ld a, $1
-=======
-BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
- ld a, 1
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
xor a
diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm
index c2011535..acbd5fc9 100755
--- a/engine/gamefreak.asm
+++ b/engine/gamefreak.asm
@@ -39,7 +39,7 @@ AnimateShootingStar: ; 7004a (1c:404a)
push bc
.bigStarInnerLoop
ld a, [hl] ; Y
- add 4y
+ add 4 ; y
ld [hli], a
ld a, [hl] ; X
add -4
@@ -221,7 +221,7 @@ MoveDownSmallStars: ; 70142 (1c:4142)
; Toggle the palette so that the lower star in the small stars tile blinks in
; and out.
ld a, [rOBP1] ; $ff49
- xor $10100000
+ xor %10100000
ld [rOBP1], a ; $ff49
call Func_3061
ld c, 3
diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm
index 37b56e2d..71b34dc3 100755
--- a/engine/hall_of_fame.asm
+++ b/engine/hall_of_fame.asm
@@ -173,7 +173,7 @@ Func_7033f: ; 7033f (1c:433f)
jp PlayCry
HoFDisplayMonInfo: ; 70348 (1c:4348)
- hlCoord 0, 2
+ coord hl, 0, 2
lb bc, 9, 10
call TextBoxBorder
coord hl, 2, 6
@@ -226,10 +226,10 @@ HoFDisplayPlayerStats: ; 703d1 (1c:43d1)
ld hl, wd747
set 3, [hl]
predef DisplayDexRating
- hlCoord 0, 4
+ coord hl, 0, 4
lb bc, 6, 10
call TextBoxBorder
- hlCoord 5, 0
+ coord hl, 5, 0
lb bc, 2, 9
call TextBoxBorder
coord hl, 7, 2
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm
index 60010d9c..adedc263 100755
--- a/engine/menu/start_menu.asm
+++ b/engine/menu/start_menu.asm
@@ -22,7 +22,8 @@ RedisplayStartMenu:: ; 29e1 (0:29e1)
and a
jr nz,.loop
; if the player pressed tried to go past the top item, wrap around to the bottom
- CheckEvent EVENT_GOT_POKEDEX
+ ld a,[wd74b]
+ bit 5,a ; does the player have the pokedex?
ld a,6 ; there are 7 menu items with the pokedex, so the max index is 6
jr nz,.wrapMenuItemId
dec a ; there are only 6 menu items without the pokedex
@@ -34,7 +35,8 @@ RedisplayStartMenu:: ; 29e1 (0:29e1)
bit 7,a
jr z,.buttonPressed
; if the player pressed tried to go past the bottom item, wrap around to the top
- CheckEvent EVENT_GOT_POKEDEX
+ ld a,[wd74b]
+ bit 5,a ; does the player have the pokedex?
ld a,[wCurrentMenuItem]
ld c,7 ; there are 7 menu items with the pokedex
jr nz,.checkIfPastBottom
@@ -55,7 +57,8 @@ RedisplayStartMenu:: ; 29e1 (0:29e1)
and a,%00001010 ; was the Start button or B button pressed?
jp nz,CloseStartMenu
call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2
- CheckEvent EVENT_GOT_POKEDEX
+ ld a,[wd74b]
+ bit 5,a ; does the player have the pokedex?
ld a,[wCurrentMenuItem]
jr nz,.displayMenuItem
inc a ; adjust position to account for missing pokedex menu item
diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm
index e9310925..8269aefd 100755
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -11,7 +11,6 @@ AnimateHealingMachine: ; 7048b (1c:448b)
ld a, [rOBP1]
push af
ld a, $e0
-<<<<<<< HEAD
ld [rOBP1], a ; $ff49
call Func_3061
ld hl, wOAMBuffer + $84
@@ -33,7 +32,6 @@ AnimateHealingMachine: ; 7048b (1c:448b)
ld c, 30
call DelayFrames
dec b
-<<<<<<< HEAD
jr nz, .partyLoop
ld a, [wAudioROMBank]
cp $1f
diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm
index 05be3d1d..6488eaac 100755
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -414,7 +414,6 @@ FishingAnim: ; 70816 (1c:4816)
ld a, [wRodResponse]
and a
ld hl, NoNibbleText
-<<<<<<< HEAD
jr z, .done
cp $2
ld hl, NothingHereText
diff --git a/engine/palettes.asm b/engine/palettes.asm
index 080998ff..810f8e77 100755
--- a/engine/palettes.asm
+++ b/engine/palettes.asm
@@ -255,7 +255,6 @@ SetPal_TrainerCard: ; 72025 (1c:6025)
ld de, wTrainerCardBlkPacket
ret
-<<<<<<< HEAD
SendUnknownPalPacket_7205d:: ; 7205d (1c:605d)
ld hl,UnknownPalPacket_72811
ld de,BlkPacket_WholeScreen
@@ -314,7 +313,6 @@ DeterminePaletteIDOutOfBattle: ; 72094 (1c:6094)
ld a, [hl]
ret
-<<<<<<< HEAD
Func_720ad:: ; 720ad (1c:60ad)
ld a,e
and a
@@ -914,7 +912,6 @@ Func_72470:: ; 72470 (1c:6470)
push de
add a
add a
-<<<<<<< HEAD
add a
or $80
ld [rBGPI],a
@@ -1157,7 +1154,7 @@ CopySGBBorderTiles: ; 725fb (1c:65fb)
; This function converts 2BPP planar data into this format by mapping
; 2BPP colors 0-3 to 4BPP colors 0-3. 4BPP colors 4-15 are not used.
ld b, 128
-.loop
+.tileLoop
; Copy bit planes 1 and 2 of the tile data.
ld c, 16
.copyLoop
diff --git a/engine/predefs.asm b/engine/predefs.asm
index a59f70d8..ed588d9a 100755
--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -52,7 +52,7 @@ GetPredefPointer: ; f67ed (3d:67ed)
PredefPointers:: ; f681d (3d:681d)
; these are pointers to ASM routines.
; they appear to be used in overworld map scripts.
- dr $f681d,$f8000
+ dr $f681d,$f7000
;add_predef DrawPlayerHUDAndHPBar
;add_predef Func_3f0c6
;add_predef Func_3f073
diff --git a/engine/town_map.asm b/engine/town_map.asm
index ee282b49..31eefcfd 100755
--- a/engine/town_map.asm
+++ b/engine/town_map.asm
@@ -377,7 +377,6 @@ DrawPlayerOrBirdSprite: ; 7124e (1c:524e)
ld bc, $a0
jp CopyData
-<<<<<<< HEAD
DisplayWildLocations: ; 71279 (1c:5279)
callba FindWildLocationsOfMon
call ZeroOutDuplicatesInList
@@ -409,7 +408,7 @@ DisplayWildLocations: ; 71279 (1c:5279)
jr nz, .drawPlayerSprite
; if no OAM entries were written, print area unknown text
coord hl, 1, 7
- lb bc, $20f
+ lb bc, 2, 15
call TextBoxBorder
coord hl, 2, 9
ld de, AreaUnknownText
diff --git a/home.asm b/home.asm
index b15dc73f..0d4cbf4f 100644
--- a/home.asm
+++ b/home.asm
@@ -1510,9 +1510,6 @@ AddAmountSoldToMoney:: ; 2aa0 (0:2aa0)
ld a, $b2 ; SFX_PURCHASE
call PlaySoundWaitForCurrent ; play sound
jp WaitForSoundToFinish ; wait until sound is done playing
- ld a, SFX_PURCHASE
- call PlaySoundWaitForCurrent
- jp WaitForSoundToFinish
; function to remove an item (in varying quantities) from the player's bag or PC box
; INPUT:
@@ -1739,8 +1736,6 @@ DisplayChooseQuantityMenu:: ; 2c51 (0:2c51)
; text box dimensions/coordinates for quantity and price
coord hl, 7, 9
lb bc, 1, 11 ; height and width
- ld b,1 ; height
- ld c,11 ; width
.drawTextBox
call TextBoxBorder
coord hl, 16, 10
@@ -2404,7 +2399,7 @@ Func_3061:: ; 3061 (0:3061)
Func_3082:: ; 3082 (0:3082)
ld a,[H_LOADEDROMBANK]
push af
- call Func_27c2
+ call FadeOutAudio
callbs Music_DoLowHealthAlarm
callbs Music2_UpdateMusic
pop af
@@ -2452,7 +2447,7 @@ RunNPCMovementScript:: ; 30ae (0:30ae)
ret
.NPCMovementScriptPointerTables
- dw PalletMovementScriptPointerTable
+ dw ProfOakMovementScriptPointerTable
dw PewterMuseumGuyMovementScriptPointerTable
dw PewterGymGuyMovementScriptPointerTable
.playerStepOutFromDoor
@@ -3300,24 +3295,6 @@ BankswitchBack:: ; 35e8 (0:35e8)
call BankswitchCommon
ret
-Bankswitch:: ; 35d6 (0:35d6)
-; self-contained bankswitch, use this when not in the home bank
-; switches to the bank in b
- ld a,[H_LOADEDROMBANK]
- push af
- ld a,b
- ld [H_LOADEDROMBANK],a
- ld [MBC1RomBank],a
- ld bc,.Return
- push bc
- jp [hl]
-.Return
- pop bc
- ld a,b
- ld [H_LOADEDROMBANK],a
- ld [MBC1RomBank],a
- ret
-
; displays yes/no choice
; yes -> set carry
YesNoChoice:: ; 35ef (0:35ef)
@@ -5004,7 +4981,7 @@ SetMapTextPointer:: ; 3f54 (0:3f54)
ret
TextPredefs:: ; 3f67 (0:3f67)
- dr $3f67,$4000
+ ;dr $3f67,$4000
; add_tx_pre CardKeySuccessText ; 01
; add_tx_pre CardKeyFailText ; 02
; add_tx_pre RedBedroomPC ; 03
diff --git a/home/audio.asm b/home/audio.asm
index 52f29b9b..21f8bb2c 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -24,7 +24,7 @@ PlayDefaultMusicCommon:: ; 2118 (0:2118)
cp $2
jr z, .surfing
call Func_21c8
- jr c, .asm_21ac
+ jr c, .walking
ld a, $d2 ; MUSIC_BIKE_RIDING
jr .next
@@ -206,7 +206,7 @@ PlaySound:: ; 2238 (0:2238)
ld [wMusicHeaderPointer], a
.noFadeOut
xor a
- ld [wc0ee], a
+ ld [wNewSoundID], a
call Func_22ec
jr .done
.fadeOut
diff --git a/home/copy.asm b/home/copy.asm
index e14d859c..8dc2acea 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -1,9 +1,9 @@
FarCopyData:: ; 009d (0:009d)
; Copy bc bytes from a:hl to de.
- ld [wd122+1], a
+ ld [wFarCopyDataSavedROMBank], a
ld a, [H_LOADEDROMBANK]
push af
- ld a, [wd122+1]
+ ld a, [wFarCopyDataSavedROMBank]
call BankswitchCommon
call CopyData
pop af
diff --git a/home/init.asm b/home/init.asm
index 8d0aeab3..67d52dd2 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -128,7 +128,7 @@ ClearVram: ; 1dc6 (0:1dc6)
StopAllSounds::
- ld a, BANK(Audio1_UpdateMusic)
+ ld a, $2
ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a
xor a
diff --git a/home/overworld.asm b/home/overworld.asm
index 7b9fadfa..314aa1b3 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -765,6 +765,9 @@ HandleFlyWarpOrDungeonWarp:: ; 0794 (0:0794)
callbs SpecialWarpIn
jp SpecialEnterMap
+LeaveMapAnim:: ; 07bc (0:07bc)
+ jpba _LeaveMapAnim
+
Func_07c4:: ; 07c4 (0:07c4)
ld a, [wWalkBikeSurfState]
and a
@@ -1457,7 +1460,7 @@ AdvancePlayerSprite:: ; 0b7f (0:0b7f)
; the portion of the map that was newly exposed due to the player's movement
ScheduleNorthRowRedraw:: ; 0b95 (0:0b95)
- hlCoord 0, 0
+ coord hl, 0, 0
call CopyToRedrawRowOrColumnSrcTiles
ld a,[wMapViewVRAMPointer]
ld [H_SCREENEDGEREDRAWADDR],a
diff --git a/home/pic.asm b/home/pic.asm
index 28ffcbc7..96cd6cd1 100644
--- a/home/pic.asm
+++ b/home/pic.asm
@@ -535,13 +535,8 @@ ReverseNybble:: ; 272d (0:272d)
ret
; resets sprite buffer pointers to buffer 1 and 2, depending on W_SPRITELOADFLAGS
-<<<<<<< HEAD
ResetSpriteBufferPointers:: ; 2737 (0:2737)
ld a, [W_SPRITELOADFLAGS] ; wd0a8
-=======
-ResetSpriteBufferPointers:: ; 2841 (0:2841)
- ld a, [W_SPRITELOADFLAGS]
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
bit 0, a
jr nz, .buffer2Selected
ld de, S_SPRITEBUFFER1
diff --git a/home/vblank.asm b/home/vblank.asm
index 8eff5bab..1df155db 100644
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -55,6 +55,7 @@ VBlank:: ; 1de5 (0:1de5)
jr z, .skipDec
dec a
ld [H_FRAMECOUNTER], a
+.skipDec
call FadeOutAudio
diff --git a/wram.asm b/wram.asm
index fcb5c3dd..909c7f1c 100755
--- a/wram.asm
+++ b/wram.asm
@@ -847,8 +847,6 @@ wCoordIndex:: ; cd3d
wOptionsTextSpeedCursorX:: ; cd3d
-wBoxNumString:: ; cd3d
-
wTrainerInfoTextBoxWidthPlus1:: ; cd3d
wSwappedMenuItem:: ; cd3d
@@ -1367,7 +1365,6 @@ wExpAmountGained:: ; cf4b
wcf4b:: ds 2 ; storage buffer for various strings
wGainBoostedExp:: ; cf4d
->>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
ds 1
ds 17
@@ -2103,6 +2100,7 @@ wEvolutionOccurred:: ; d121
wVBlankSavedROMBank:: ; d122
ds 1
+wFarCopyDataSavedROMBank:: ; d123
ds 1
wIsKeyItem:: ; d124
diff --git a/yellow/main.asm b/yellow/main.asm
index 94ba27bd..bc3c79ef 100755
--- a/yellow/main.asm
+++ b/yellow/main.asm
@@ -67,7 +67,7 @@ PlayerPC:: ; 778e (1:778e)
dr $778e,$7a0f
_RemovePokemon:: ; 7a0f (1:7a0f)
dr $7a0f,$7abf
-Func_7abf:: ; 7c18 (1:7abf)
+_DisplayPokedex:: ; 7c18 (1:7abf)
dr $7abf,$8000
SECTION "bank02",ROMX,BANK[$02]
@@ -385,8 +385,10 @@ SECTION "Graphics", ROMX, BANK[GFX]
PokemonLogoJapanGraphics: INCBIN "gfx/pokemon_logo_japan.2bpp"
FontGraphics: INCBIN "gfx/font.1bpp"
+FontGraphicsEnd:
ABTiles: INCBIN "gfx/AB.2bpp"
HpBarAndStatusGraphics: INCBIN "gfx/hp_bar_and_status.2bpp"
+HpBarAndStatusGraphicsEnd:
BattleHudTiles1: INCBIN "gfx/battle_hud1.1bpp"
BattleHudTiles2: INCBIN "gfx/battle_hud2.1bpp"
BattleHudTiles3: INCBIN "gfx/battle_hud3.1bpp"
@@ -394,6 +396,7 @@ NintendoCopyrightLogoGraphics: INCBIN "gfx/copyright.2bpp"
GamefreakLogoGraphics: INCBIN "gfx/gamefreak.2bpp"
NineTile: INCBIN "gfx/9_tile.2bpp"
TextBoxGraphics: INCBIN "gfx/text_box.2bpp"
+TextBoxGraphicsEnd:
PokedexTileGraphics: INCBIN "gfx/pokedex.2bpp"
WorldMapTileGraphics: INCBIN "gfx/town_map.2bpp"
PlayerCharacterTitleGraphics: INCBIN "gfx/player_title.2bpp"