diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/bank3d/bank3d_battle.asm | 10 | ||||
-rw-r--r-- | engine/bank3d/link_menu.asm | 18 | ||||
-rw-r--r-- | engine/bank3d/main.asm | 20 | ||||
-rw-r--r-- | engine/battle/battle_transitions.asm | 95 | ||||
-rwxr-xr-x | engine/gamefreak.asm | 4 | ||||
-rwxr-xr-x | engine/hall_of_fame.asm | 6 | ||||
-rwxr-xr-x | engine/menu/start_menu.asm | 9 | ||||
-rwxr-xr-x | engine/overworld/healing_machine.asm | 2 | ||||
-rwxr-xr-x | engine/overworld/player_animations.asm | 1 | ||||
-rwxr-xr-x | engine/palettes.asm | 5 | ||||
-rwxr-xr-x | engine/predefs.asm | 2 | ||||
-rwxr-xr-x | engine/town_map.asm | 3 |
12 files changed, 38 insertions, 137 deletions
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 |