From 7cc320e835497fbf7f7a66d47cc6351b571c32e7 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 17:50:08 -0400 Subject: Coins in main.asm --- main.asm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index 9b39ebcc7..cb3a047bd 100644 --- a/main.asm +++ b/main.asm @@ -13314,8 +13314,8 @@ Function5bae: ; 5bae ld [JohtoBadges], a ld [KantoBadges], a - ld [$d855], a - ld [$d856], a + ld [Coins], a + ld [Coins + 1], a ld [Money], a ld a, 3000 >> 8 @@ -29656,7 +29656,7 @@ Function16053: ; 16053 Function1606f: ; 1606f ld a, $2 - ld de, $d855 + ld de, Coins call $6055 ld a, $2 ld bc, $608d @@ -29681,7 +29681,7 @@ INCBIN "baserom.gbc", $1608d, $1608f - $1608d Function1608f: ; 1608f ld a, $2 - ld de, $d855 + ld de, Coins call $6037 jr nc, .asm_1609f xor a @@ -29698,7 +29698,7 @@ Function1608f: ; 1608f Function160a1: ; 160a1 ld a, $2 - ld de, $d855 + ld de, Coins jp $600d ; 160a9 @@ -32087,7 +32087,7 @@ Function24b25: ; 24b25 ld hl, $c4c5 ld de, String24b8e call PlaceString - ld de, $d855 + ld de, Coins ld bc, $0204 ld hl, $c4c1 call PrintNum @@ -32110,7 +32110,7 @@ Function24b4e: ; 24b4e ld de, CoinString call PlaceString ld hl, $c4eb - ld de, $d855 + ld de, Coins ld bc, $0204 call PrintNum ret -- cgit v1.2.3 From 4983c46a26ff2c165c67a78cebc0c686a23f9cda Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 18:57:31 -0400 Subject: use callab/callba macros for known FarCalls --- main.asm | 100 +++++++++++++++++++++------------------------------------------ 1 file changed, 33 insertions(+), 67 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index cb3a047bd..ab5dc4f19 100644 --- a/main.asm +++ b/main.asm @@ -1574,9 +1574,7 @@ Function1c07: ; 0x1c07 ret Function1c10: ; 0x1c10 - ld hl, $446d - ld a, $9 - rst $8 + callab Function2446d ret Function1c17: ; 0x1c17 @@ -4630,9 +4628,7 @@ Function2b74: ; 0x2b74 call Function3200 ld b, $9 call GetSGBLayout - ld a, $12 - ld hl, $5409 - rst $8 + callba Function49409 call Function485 call DelayFrame ld a, $1 @@ -19499,7 +19495,7 @@ Functioncbd8: ; cbd8 ld a, [Buffer2] cp $2 jr nz, .asm_cbf7 - ld hl, $4c35 + ld hl, UnknownScript_0xcc35 call Function31cd ld a, $81 ret @@ -23576,9 +23572,7 @@ StartMenu: ; 125cd call .DrawBugContestStatusBox call Function2e31 call Function2e20 - ld a, $1 - ld hl, $64bf - rst $8 + callba Function64bf call .DrawBugContestStatus call Function485 jr .Select @@ -28453,9 +28447,7 @@ Function157e9: ; 0x157e9 .askquantity ld hl, .HowManyText call Function1d4f - ld a, $9 - ld hl, $4fbf - rst $8 + callba Function24fbf call Function1c07 call Function1c07 jr c, .done @@ -28550,20 +28542,14 @@ KrisDepositItemMenu: ; 0x1588b jr c, .asm_158b6 call Function2ed3 call Function1d6e - ld a, $4 - ld hl, $46a5 - rst $8 + callba Function106a5 .asm_1589c - ld a, $4 - ld hl, $46be - rst $8 + callba Function106be ld a, [$cf66] and a jr z, .asm_158b3 call Function158cc - ld a, $4 - ld hl, CheckRegisteredItem - rst $8 + callba CheckRegisteredItem jr .asm_1589c .asm_158b3 @@ -28595,9 +28581,7 @@ Function158cc: ; 0x158cc push af ld a, $0 ld [$c2ce], a - ld a, $3 - ld hl, $5453 - rst $8 + callba CheckItemMenu ld a, [$d142] ld hl, JumpTable158e7 rst JumpTable @@ -28631,9 +28615,7 @@ JumpTable158e7: ; 0x158e7 ; 0x1590a Function1590a: ; 0x1590a - ld a, $3 - ld hl, $5427 - rst $8 + callba _CheckTossableItem ld a, [$d142] and a jr z, .asm_1591d @@ -28644,9 +28626,7 @@ Function1590a: ; 0x1590a .asm_1591d ld hl, .HowManyText call Function1d4f - ld a, $9 - ld hl, $4fbf - rst $8 + callba Function24fbf push af call Function1c07 call Function1c07 @@ -28698,9 +28678,7 @@ Function1590a: ; 0x1590a KrisMailBoxMenu: ; 0x1597d - ld a, $11 - ld hl, $47a0 - rst $8 + callba _KrisMailBoxMenu xor a ret ; 0x15985 @@ -47638,27 +47616,15 @@ Function4484a: ; 0x4484a ld [PartyMenuActionText], a call WhiteBGMap .asm_448dc - ld a, $14 - ld hl, $404f - rst $8 - ld a, $14 - ld hl, $4405 - rst $8 - ld a, $14 - ld hl, $43e0 - rst $8 - ld a, $14 - ld hl, PickedFruitTree - rst $8 - ld a, $14 - ld hl, $449a - rst $8 + callba Function5004f + callba Function50405 + callba Function503e0 + callba WritePartyMenuTilemap + callba PrintPartyMenuText call WaitBGMap call Function32f9 call DelayFrame - ld a, $14 - ld hl, $4457 - rst $8 + callba PartyMenuSelect jr c, .asm_44939 ld a, [CurPartySpecies] cp $fd @@ -56192,7 +56158,7 @@ GetTimePalFade: ; 8c17c Function8c20f: ; 8c20f - call $426d + call Function8c26d ld a, [rBGP] ld [$cfc7], a ld a, [rOBP0] @@ -56208,7 +56174,7 @@ Function8c20f: ; 8c20f ld a, [$cf63] bit 7, a jr nz, .asm_8c23a - call $4314 + call Function8c314 call DelayFrame jr .asm_8c22b @@ -56247,12 +56213,12 @@ Function8c26d: ; 8c26d callba Function6454 call Function1ad2 call DelayFrame - call $42a0 - call $4f4f + call Function8c2a0 + call Function8cf4f jr .asm_8c28b .asm_8c288 - call $42aa + call Function8c2aa .asm_8c28b ld a, $90 @@ -56265,14 +56231,14 @@ Function8c26d: ; 8c26d ld [hli], a ld [hli], a ld [hl], a - call $46d8 + call Function8c6d8 ret ; 8c2a0 Function8c2a0: ; 8c2a0 - call $42aa + call Function8c2aa ld hl, VBGMap0 - call $42cf + call Function8c2cf ret ; 8c2aa @@ -56344,9 +56310,9 @@ Function8c6d8: ; 8c6d8 ld a, $5 ld [rSVBK], a ld hl, $d100 - call $46ef + call Function8c6ef ld hl, $d200 - call $46ef + call Function8c6ef pop af ld [rSVBK], a ret @@ -56378,7 +56344,7 @@ Function8c940: ; 8c940 ld a, e and $1 ld [$cf63], a - call $496d + call Function8c96d call WaitSFX ld de, $001e call StartSFX @@ -56388,10 +56354,10 @@ Function8c940: ; 8c940 jr nz, .asm_8c96c ld a, $90 ld [$c3b5], a - ld hl, $4f7a + ld hl, Function8cf7a ld a, $23 rst FarCall - call $4a0c + call Function8ca0c call DelayFrame jr .asm_8c952 @@ -56400,7 +56366,7 @@ Function8c940: ; 8c940 ; 8c96d Function8c96d: ; 8c96d - ld hl, $4f53 + ld hl, Function8cf53 ld a, $23 rst FarCall ld de, $49cc @@ -64197,7 +64163,7 @@ Options_Sound: ; e43dd Options_Print: ; e4424 - call $4491 + call Functione4491 ld a, [hJoyPressed] bit 5, a jr nz, .asm_e443c -- cgit v1.2.3 From f4572ecd4dc8effb26c2a14de30f0ba58c317078 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 19:14:04 -0400 Subject: use more egg constants in main --- main.asm | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index ab5dc4f19..fc1aaee33 100644 --- a/main.asm +++ b/main.asm @@ -7377,7 +7377,7 @@ Function3718: ; 3718 Function3741: ; 3741 and a jr z, .asm_374c - cp $fd + cp EGG jr z, .asm_374e cp $fc jr c, .asm_374e @@ -24912,7 +24912,7 @@ INCBIN "baserom.gbc", $12f5b, $12fba - $12f5b Function12fba: ; 12fba ld a, [CurPartySpecies] - cp $fd + cp EGG jr z, .asm_12fd2 ld hl, Options ld a, [hl] @@ -25025,13 +25025,13 @@ Function1308f: ; 1308f inc a ld [CurPartyMon], a ld c, a - ld b, $0 + ld b, 0 ld hl, PartySpecies add hl, bc ld a, [hl] cp $ff jr z, .asm_130a7 - cp $fd + cp EGG ret nz jr .asm_1308f @@ -25044,11 +25044,11 @@ Function1308f: ; 1308f dec a ld [CurPartyMon], a ld c, a - ld b, $0 + ld b, 0 ld hl, PartySpecies add hl, bc ld a, [hl] - cp $fd + cp EGG ret nz ld a, [CurPartyMon] and a @@ -25302,14 +25302,14 @@ Function132da: ; 132da ret z ld c, a ld e, a - ld d, $0 + ld d, 0 ld hl, PartyCount add hl, de .asm_132e7 ld a, [hl] and a jr z, .asm_132f3 - cp $fd + cp EGG jr z, .asm_132f3 cp $fc jr c, .asm_132f8 @@ -25334,7 +25334,7 @@ Function132fe: ; 132fe cp c ret z ld e, c - ld d, $0 + ld d, 0 ld hl, PartySpecies add hl, de .asm_1330f @@ -25343,7 +25343,7 @@ Function132fe: ; 132fe ret z and a jr z, .asm_1331e - cp $fd + cp EGG jr z, .asm_1331e cp $fc jr c, .asm_13321 @@ -25353,8 +25353,8 @@ Function132fe: ; 132fe jr .asm_1330f .asm_13321 - ld hl, $c4b2 - ld [hl], $ed + hlcoord 18, 0 + ld [hl], "▶" ret ; 13327 @@ -34860,7 +34860,7 @@ Function2c7fb: ; 2c7fb callba PartyMenuSelect push af ld a, [CurPartySpecies] - cp $fd + cp EGG pop bc jr z, .asm_2c854 push bc @@ -39983,10 +39983,10 @@ Function3d887: ; 3d887 ld hl, PartySpecies ld a, [CurPartyMon] ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hl] - cp $fd + cp EGG ld hl, BattleText_0x80b26 jr z, .asm_3d8ae ld hl, BattleText_0x80b0b @@ -47627,9 +47627,9 @@ Function4484a: ; 0x4484a callba PartyMenuSelect jr c, .asm_44939 ld a, [CurPartySpecies] - cp $fd + cp EGG jr z, .asm_44923 - ld a, $1 + ld a, PartyMon1Item - PartyMon1 call GetPartyParamLocation ld a, [hl] and a @@ -51404,14 +51404,14 @@ INCBIN "baserom.gbc", $5036b, $50389 - $5036b Function50389: ; 50389 - ld a, $d8 + ld a, PartySpecies & $ff add b ld e, a - ld a, $dc - adc $0 + ld a, PartySpecies >> 8 + adc 0 ld d, a ld a, [de] - cp $fd + cp EGG ret ; 50396 @@ -51422,7 +51422,7 @@ Function50396: ; 50396 ld a, [PartyMenuActionText] and $f ld e, a - ld d, $0 + ld d, 0 ld hl, $43b2 add hl, de add hl, de @@ -54798,12 +54798,12 @@ Function8653f: ; 8653f ld [de], a inc de ld hl, PartySpecies - ld c, $0 + ld c, 0 .asm_86556 ld a, [hli] cp $ff jr z, .asm_865b1 - cp $fd + cp EGG jr nz, .asm_86562 inc c jr .asm_86556 @@ -55021,7 +55021,7 @@ Function86748: ; 86748 ld hl, $c50a call Function378b ld a, [CurPartySpecies] - cp $fd + cp EGG jr z, .asm_867f8 ld hl, $c5a5 ld a, $74 -- cgit v1.2.3 From 17f25691db80b7bd577d401a53eecb913a0b8860 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 19:17:32 -0400 Subject: Function378b is IsAPokemon --- main.asm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index fc1aaee33..d506d9854 100644 --- a/main.asm +++ b/main.asm @@ -7374,19 +7374,20 @@ Function3718: ; 3718 -Function3741: ; 3741 +IsAPokemon: ; 3741 +; Return carry if species a is not a Pokemon. and a - jr z, .asm_374c + jr z, .NotAPokemon cp EGG - jr z, .asm_374e + jr z, .Pokemon cp $fc - jr c, .asm_374e + jr c, .Pokemon -.asm_374c +.NotAPokemon scf ret -.asm_374e +.Pokemon and a ret ; 3750 @@ -7460,7 +7461,7 @@ Function3786: ; 3786 Function378b: ; 378b ld a, [CurPartySpecies] - call Function3741 + call IsAPokemon jr c, .asm_37ad push hl ld de, VTiles2 -- cgit v1.2.3 From 21248effe489af1624d3b43cc2abbe3c7849865a Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 22:25:50 -0400 Subject: NUM_POKEMON in main.asm --- main.asm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index d506d9854..ed9fe4464 100644 --- a/main.asm +++ b/main.asm @@ -7380,7 +7380,7 @@ IsAPokemon: ; 3741 jr z, .NotAPokemon cp EGG jr z, .Pokemon - cp $fc + cp NUM_POKEMON + 1 jr c, .Pokemon .NotAPokemon @@ -25312,7 +25312,7 @@ Function132da: ; 132da jr z, .asm_132f3 cp EGG jr z, .asm_132f3 - cp $fc + cp NUM_POKEMON + 1 jr c, .asm_132f8 .asm_132f3 @@ -25346,7 +25346,7 @@ Function132fe: ; 132fe jr z, .asm_1331e cp EGG jr z, .asm_1331e - cp $fc + cp NUM_POKEMON + 1 jr c, .asm_13321 .asm_1331e @@ -46769,7 +46769,7 @@ GetPreEvolution: ; 42581 .asm_425a2 inc c ld a, c - cp CELEBI + cp NUM_POKEMON jr c, .asm_42583 and a ret @@ -56572,9 +56572,9 @@ INCBIN "baserom.gbc", $8d03d, $8d04c - $8d03d Function8d04c: ; 8d04c call Function8d0ec call Function8d132 - cp $fd + cp EGG jr z, .asm_8d0b9 - cp $fc + cp NUM_POKEMON + 1 jr z, .asm_8d0b6 call Function8d1a2 ld a, [$c3ba] @@ -63320,9 +63320,9 @@ INCBIN "baserom.gbc", $cc9c4, $cca09 - $cc9c4 Functioncca09: ; cca09 call Functionccaaa call Functionce7d1 - cp $fd + cp EGG jp z, $4aa5 - cp $fc + cp NUM_POKEMON + 1 jp z, $4aa2 push af ld hl, $d419 -- cgit v1.2.3 From 523abc2d0e72891a216cb61d7de5edaabff34b00 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 22:46:28 -0400 Subject: formatting in oak speech --- main.asm | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index ed9fe4464..2b8a67311 100644 --- a/main.asm +++ b/main.asm @@ -13993,42 +13993,54 @@ Function60fa: ; 60fa ; 610f Function610f: ; 610f + ld a, [hROMBank] push af - ld a, $20 + + ld a, 0 << 7 | 32 ; fade out ld [MusicFade], a ld de, MUSIC_NONE ld a, e ld [MusicFadeIDLo], a ld a, d ld [MusicFadeIDHi], a + ld de, SFX_ESCAPE_ROPE call StartSFX pop af rst Bankswitch - ld c, $8 + ld c, 8 call DelayFrames + ld hl, $5249 ld b, $13 call Function61b4 - ld c, $8 + + ld c, 8 call DelayFrames + ld hl, $52d9 ld b, $13 call Function61b4 - ld c, $8 + + ld c, 8 call DelayFrames + ld hl, $c50a - ld b, $7 - ld c, $7 + ld b, 7 + ld c, 7 call ClearBox - ld c, $3 + + ld c, 3 call DelayFrames + call Function61cd call Functione5f - ld c, $32 + + ld c, 50 call DelayFrames + call Function4b6 call ClearTileMap ret @@ -14036,11 +14048,11 @@ Function610f: ; 610f Function616a: ; 616a ld hl, IntroFadePalettes - ld b, $6 + ld b, IntroFadePalettesEnd - IntroFadePalettes .asm_616f ld a, [hli] call DmgToCgbBGPals - ld c, $a + ld c, 10 call DelayFrames dec b jr nz, .asm_616f @@ -14054,6 +14066,7 @@ IntroFadePalettes: ; 0x617c db %11111000 db %11110100 db %11100100 +IntroFadePalettesEnd ; 6182 Function6182: ; 6182 @@ -14099,14 +14112,17 @@ Function61b4: ; 61b4 ; 61cd Function61cd: ; 61cd + callba GetPlayerIcon ld c, $c ld hl, VTiles0 call Request2bpp + ld hl, Sprites ld de, .data_61fe ld a, [de] inc de + ld c, a .asm_61e4 ld a, [de] @@ -14118,14 +14134,15 @@ Function61cd: ; 61cd ld a, [de] inc de ld [hli], a - ld b, $0 + + ld b, 0 ld a, [PlayerGender] bit 0, a jr z, .asm_61f8 - ld b, $1 - + ld b, 1 .asm_61f8 ld a, b + ld [hli], a dec c jr nz, .asm_61e4 @@ -14183,7 +14200,6 @@ Function620b: ; 620b cp $5 jr c, .asm_625e xor a - .asm_625e ld e, a ld d, 0 -- cgit v1.2.3 From 70ecde3f78dc9885a04eb002f68681d03cc2d212 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 22:47:20 -0400 Subject: StartTitleScreen -> TitleScreen also undo "far" naming scheme --- main.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index 2b8a67311..18d94ab21 100644 --- a/main.asm +++ b/main.asm @@ -14172,7 +14172,7 @@ Function620b: ; 620b push af ld a, $5 ld [rSVBK], a - call FarStartTitleScreen + call TitleScreen call DelayFrame .asm_6226 call Function627b @@ -14221,8 +14221,8 @@ Function620b: ; 620b ; 6274 -FarStartTitleScreen: ; 6274 - callba StartTitleScreen +TitleScreen: ; 6274 + callba _TitleScreen ret ; 627b @@ -69682,7 +69682,7 @@ SECTION "bank43",ROMX,BANK[$43] INCBIN "baserom.gbc", $10c000, $10ed67 - $10c000 -StartTitleScreen: ; 10ed67 +_TitleScreen: ; 10ed67 call WhiteBGMap call ClearSprites -- cgit v1.2.3 From c9d3881a2ffa4e3bdb5e5c12d98c20c0bba1e400 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 22:59:40 -0400 Subject: rename RNG to Random also fix 'Far' naming scheme for BattleRandom this was a long time coming --- main.asm | 177 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 89 insertions(+), 88 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index 18d94ab21..dfa5ed172 100644 --- a/main.asm +++ b/main.asm @@ -5570,49 +5570,50 @@ Function2f79: ; 2f79 ; 2f8c -RNG: ; 2f8c +Random: ; 2f8c +; A simple hardware-based random number generator (RNG). + ; Two random numbers are generated by adding and subtracting ; the divider to the respective values every time it's called. -; The divider is a value that increments at a rate of 16384Hz. +; The divider is a register that increments at a rate of 16384Hz. ; For comparison, the Game Boy operates at a clock speed of 4.2MHz. -; Additionally, an equivalent function is called every frame. +; Additionally, an equivalent function is executed in VBlank. -; output: -; a: rand2 -; ffe1: rand1 -; ffe2: rand2 +; This leaves a with the value in hRandomSub. push bc -; Added value + ld a, [rDIV] ld b, a ld a, [hRandomAdd] adc b ld [hRandomAdd], a -; Subtracted value + ld a, [rDIV] ld b, a ld a, [hRandomSub] sbc b ld [hRandomSub], a + pop bc ret ; 2f9f -FarBattleRNG: ; 2f9f -; BattleRNG lives in another bank. -; It handles all RNG calls in the battle engine, -; allowing link battles to remain in sync using a shared PRNG. +BattleRandom: ; 2f9f +; _BattleRandom lives in another bank. + +; It handles all RNG calls in the battle engine, allowing +; link battles to remain in sync using a shared PRNG. ; Save bank ld a, [hROMBank] ; bank push af ; Bankswitch - ld a, BANK(BattleRNG) + ld a, BANK(_BattleRandom) rst Bankswitch - call BattleRNG + call _BattleRandom ; Restore bank ld [$cfb6], a pop af @@ -5634,7 +5635,7 @@ Function2fb1: ; 2fb1 ld b, a push bc .asm_2fbb - call RNG + call Random ld a, [hRandomAdd] ld c, a add b @@ -10416,14 +10417,14 @@ Function4821: ; 4821 ; 4822 Function4822: ; 4822 - call RNG + call Random ld a, [hRandomAdd] and 1 jp Function4af0 ; 482c Function482c: ; 482c - call RNG + call Random ld a, [hRandomAdd] and 1 or 2 @@ -10431,14 +10432,14 @@ Function482c: ; 482c ; 4838 Function4838: ; 4838 - call RNG + call Random ld a, [hRandomAdd] and 3 jp Function4af0 ; 4842 Function4842: ; 4842 - call RNG + call Random ld a, [hRandomAdd] and $c ld hl, $0008 @@ -10453,7 +10454,7 @@ Function4851: ; 4851 ld a, [hl] and $c ld d, a - call RNG + call Random ld a, [hRandomAdd] and $c cp d @@ -10956,14 +10957,14 @@ Function4b17: ; 4b17 ; 4b1d Function4b1d: ; 4b1d - call RNG + call Random ld a, [hRandomAdd] and $7f jr Function4b2d ; 4b26 Function4b26: ; 4b26 - call RNG + call Random ld a, [hRandomAdd] and $1f ; fallthrough @@ -13248,10 +13249,10 @@ Function5bae: ; 5bae ld a, [hRandomAdd] ld [PlayerID + 1], a - call RNG + call Random ld [$d84a], a call DelayFrame - call RNG + call Random ld [$d84b], a ld hl, PartyCount @@ -13460,9 +13461,9 @@ Function5d33: ; 5d33 jr z, .asm_5d55 ld a, b ld [$ac68], a - call RNG + call Random ld c, a - call RNG + call Random .asm_5d55 ld [$dc9f], a @@ -15963,7 +15964,7 @@ DaycareStep: ; 7282 dec [hl] ret nz - call RNG + call Random ld [hl], a ld hl, $6e1d ld a, $5 @@ -15983,7 +15984,7 @@ DaycareStep: ; 7282 ld b, $a .asm_72f8 - call RNG + call Random cp b ret nc ld hl, DaycareMan @@ -16180,7 +16181,7 @@ Function7420: ; 7420 call GetCurNick call Function746e pop hl - call RNG + call Random .next sub [hl] jr c, .asm_7444 @@ -20995,9 +20996,9 @@ Functiond88c: ; d88c ld a, [IsInBattle] and a jr nz, .asm_d9f3 - call RNG + call Random ld b, a - call RNG + call Random ld c, a .asm_d9b5 @@ -22024,9 +22025,9 @@ Functione277: ; e277 call GetFarByte ld b, a ld hl, $ad2c - call RNG + call Random ld [hli], a - call RNG + call Random ld [hl], a call CloseSRAM ld a, $13 @@ -33725,7 +33726,7 @@ Function2a103: ; 2a103 call Function2a111 call Function2a124 call Function2a138 - call RNG + call Random cp b ret ; 2a111 @@ -33804,7 +33805,7 @@ Function2a14f: ; 2a14f .asm_2a174 push hl .asm_2a175 - call RNG + call Random cp 100 jr nc, .asm_2a175 inc a @@ -33828,7 +33829,7 @@ Function2a14f: ; 2a14f call Function1852 jr nz, .asm_2a1aa - call RNG + call Random cp 89 jr c, .asm_2a1aa inc b @@ -34073,7 +34074,7 @@ Function2a2ce: ; 2a2ce call Function1852 jr z, .asm_2a30a call Function2a27f - call RNG + call Random cp 100 jr nc, .asm_2a30a and 3 @@ -34182,7 +34183,7 @@ Function2a355: ; 2a355 .asm_2a36e ld h, d ld l, e - call RNG + call Random and $1f jr z, .asm_2a3cd and $3 @@ -34243,7 +34244,7 @@ Function2a355: ; 2a355 .asm_2a3cd ld hl, $640f .asm_2a3d0 - call RNG + call Random and $f cp $10 jr nc, .asm_2a3d0 @@ -34944,7 +34945,7 @@ Function2ed44: ; 2ed44 ld hl, StatusFlags2 bit 6, [hl] ret z - call RNG + call Random ld a, [hRandomAdd] and a ret nz @@ -34954,7 +34955,7 @@ Function2ed44: ; 2ed44 ld a, [PartyCount] ld b, a .asm_2ed70 - call RNG + call Random and $7 cp b jr nc, .asm_2ed70 @@ -34964,7 +34965,7 @@ Function2ed44: ; 2ed44 and $f0 ret nz .asm_2ed82 - call RNG + call Random and a jr z, .asm_2ed82 ld b, a @@ -34984,7 +34985,7 @@ Function2ed44: ; 2ed44 ret .asm_2ed9a - call RNG + call Random cp $55 ret nc ld a, [PartyCount] @@ -34994,7 +34995,7 @@ Function2ed44: ; 2ed44 ld a, b cp $2 jr c, .asm_2edc3 - call RNG + call Random cp $80 jr c, .asm_2edc3 .asm_2edb3 @@ -35047,7 +35048,7 @@ Function2ede6: ; 2ede6 ld hl, StatusFlags2 bit 6, [hl] ret z - call RNG + call Random cp $10 ret nc ld hl, PartyMons @@ -35505,7 +35506,7 @@ Function38045: ; 38045 jp z, Function38041 cp $10 jr nz, .asm_38061 - call RNG + call Random cp $80 jr c, .asm_38077 jp Function38041 @@ -35513,13 +35514,13 @@ Function38045: ; 38045 .asm_38061 cp $20 jr nz, .asm_3806f - call RNG + call Random cp $c8 jr c, .asm_38077 jp Function38041 .asm_3806f - call RNG + call Random cp $a jp c, Function38041 @@ -35538,7 +35539,7 @@ Function38083: ; 38083 jp z, Function38041 cp $10 jr nz, .asm_3809f - call RNG + call Random cp $14 jr c, .asm_380b5 jp Function38041 @@ -35546,13 +35547,13 @@ Function38083: ; 38083 .asm_3809f cp $20 jr nz, .asm_380ad - call RNG + call Random cp $1e jr c, .asm_380b5 jp Function38041 .asm_380ad - call RNG + call Random cp $c8 jp c, Function38041 @@ -35571,7 +35572,7 @@ Function380c1: ; 380c1 jp z, Function38041 cp $10 jr nz, .asm_380dd - call RNG + call Random cp $32 jr c, .asm_380f3 jp Function38041 @@ -35579,13 +35580,13 @@ Function380c1: ; 380c1 .asm_380dd cp $20 jr nz, .asm_380eb - call RNG + call Random cp $80 jr c, .asm_380f3 jp Function38041 .asm_380eb - call RNG + call Random cp $32 jp c, Function38041 @@ -36673,13 +36674,13 @@ Function3c314: ; 3c314 ld a, [$ffcb] cp $2 jr z, .asm_3c341 - call FarBattleRNG + call BattleRandom cp $80 jp c, $43f1 jp Function3c3f3 .asm_3c341 - call FarBattleRNG + call BattleRandom cp $80 jp c, Function3c3f3 jp $43f1 @@ -36711,7 +36712,7 @@ Function3c314: ; 3c314 ld a, b cp $4a jr z, .asm_3c39f - call FarBattleRNG + call BattleRandom cp e jr nc, .asm_3c3c5 jp $43f1 @@ -36720,7 +36721,7 @@ Function3c314: ; 3c314 ld a, b cp $4a jr nz, .asm_3c3c5 - call FarBattleRNG + call BattleRandom cp c jr nc, .asm_3c3c5 jp Function3c3f3 @@ -36729,19 +36730,19 @@ Function3c314: ; 3c314 ld a, [$ffcb] cp $2 jr z, .asm_3c3b5 - call FarBattleRNG + call BattleRandom cp c jp c, Function3c3f3 - call FarBattleRNG + call BattleRandom cp e jp c, $43f1 jr .asm_3c3c5 .asm_3c3b5 - call FarBattleRNG + call BattleRandom cp e jp c, $43f1 - call FarBattleRNG + call BattleRandom cp c jp c, Function3c3f3 jr .asm_3c3c5 @@ -36759,13 +36760,13 @@ Function3c314: ; 3c314 ld a, [$ffcb] cp $2 jr z, .asm_3c3e9 - call FarBattleRNG + call BattleRandom cp $80 jp c, $43f1 jp Function3c3f3 .asm_3c3e9 - call FarBattleRNG + call BattleRandom cp $80 jp c, Function3c3f3 scf @@ -36996,7 +36997,7 @@ Function3c543: ; 3c543 call IsInArray jr c, .Flee - call FarBattleRNG + call BattleRandom ld b, a cp $80 jr nc, .Stay @@ -37772,7 +37773,7 @@ Function3ca8f: ; 3ca8f ld a, [$c73f] and a ret nz - call FarBattleRNG + call BattleRandom cp $19 ret nc xor a @@ -37793,7 +37794,7 @@ Function3ca8f: ; 3ca8f ld a, [$c740] and a ret nz - call FarBattleRNG + call BattleRandom cp $19 ret nc xor a @@ -39731,7 +39732,7 @@ Function3d672: ; 3d672 .asm_3d6a7 ld a, [OTPartyCount] ld b, a - call FarBattleRNG + call BattleRandom and $7 cp b jr nc, .asm_3d6a7 @@ -40122,7 +40123,7 @@ Function3d8b3: ; 3d8b3 jr .asm_3d96c .asm_3d97a - call FarBattleRNG + call BattleRandom ld b, a ld a, [$ffb6] cp b @@ -42258,7 +42259,7 @@ Function3e7c1: ; 3e7c1 jr nz, .asm_3e882 .asm_3e855 ld hl, EnemyMonMove1 - call FarBattleRNG + call BattleRandom and $3 ld c, a ld b, $0 @@ -42360,7 +42361,7 @@ LoadEnemyMon: ; 3e8eb ; To do this we pull the species from TempEnemyMonSpecies ; Notes: -; FarBattleRNG is used to ensure sync between Game Boys +; BattleRandom is used to ensure sync between Game Boys ; Clear the whole EnemyMon struct xor a @@ -42419,13 +42420,13 @@ LoadEnemyMon: ; 3e8eb ; 2% Item2 ; 25% chance of getting an item - call FarBattleRNG + call BattleRandom cp a, $c0 ld a, NO_ITEM jr c, .UpdateItem ; From there, an 8% chance for Item2 - call FarBattleRNG + call BattleRandom cp a, $14 ; 8% of 25% = 2% Item2 ld a, [BaseItems] jr nc, .UpdateItem @@ -42505,10 +42506,10 @@ LoadEnemyMon: ; 3e8eb ; (HP is initialized at the end of the battle) call GetRoamMonDVs inc hl - call FarBattleRNG + call BattleRandom ld [hld], a ld c, a - call FarBattleRNG + call BattleRandom ld [hl], a ld b, a ; We're done with DVs @@ -42529,9 +42530,9 @@ LoadEnemyMon: ; 3e8eb .GenerateDVs ; Generate new random DVs - call FarBattleRNG + call BattleRandom ld b, a - call FarBattleRNG + call BattleRandom ld c, a .UpdateDVs @@ -42584,7 +42585,7 @@ LoadEnemyMon: ; 3e8eb jr nz, .CheckMagikarpArea ; 5% chance of skipping size checks - call RNG + call Random cp a, $0c ; / $100 jr c, .CheckMagikarpArea ; Try again if > 1614 @@ -42593,7 +42594,7 @@ LoadEnemyMon: ; 3e8eb jr nc, .GenerateDVs ; 20% chance of skipping this check - call RNG + call Random cp a, $32 ; / $100 jr c, .CheckMagikarpArea ; Try again if > 1598 @@ -42618,7 +42619,7 @@ LoadEnemyMon: ; 3e8eb cp a, MAP_LAKE_OF_RAGE jr z, .Happiness ; 40% chance of not flooring - call RNG + call Random cp a, $64 ; / $100 jr c, .Happiness ; Floor at length 1024 @@ -43389,14 +43390,14 @@ EmptyBattleTextBox: ; 3edd1 ; 3edd8 -BattleRNG: ; 3edd8 +_BattleRandom: ; 3edd8 ; If the normal RNG is used in a link battle it'll desync. ; To circumvent this a shared PRNG is used instead. ; But if we're in a non-link battle we're safe to use it ld a, [InLinkBattle] and a - jp z, RNG + jp z, Random ; The PRNG operates in streams of 10 values. @@ -45208,7 +45209,7 @@ Function3f998: ; 3f998 ret .asm_3f9c4 - call FarBattleRNG + call BattleRandom and $f ret nz @@ -47147,7 +47148,7 @@ AIChooseMove: ; 440ce .asm_44197 ld hl, Buffer1 - call RNG + call Random and 3 ld c, a ld b, 0 @@ -59827,7 +59828,7 @@ Function97d23: ; 97d23 Function97d31: ; 97d31 .asm_97d31 - call RNG + call Random cp 100 << 1 jr nc, .asm_97d31 srl a @@ -59854,7 +59855,7 @@ Function97d31: ; 97d31 .asm_97d54 ld c, a inc c - call RNG + call Random ld a, [hRandomAdd] call SimpleDivide add d @@ -59879,7 +59880,7 @@ Function97d64: ; 97d64 ld a, $a ld hl, $6138 rst FarCall - call RNG + call Random ld a, [hRandomAdd] cp b ret c -- cgit v1.2.3 From c402a16def99bad3df047d570120d1f1da1abbc3 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 23:03:15 -0400 Subject: undo overcommenting in BattleRandom these comments made sense before hram and rst constants were established --- main.asm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index dfa5ed172..64ec02a0c 100644 --- a/main.asm +++ b/main.asm @@ -5607,14 +5607,13 @@ BattleRandom: ; 2f9f ; It handles all RNG calls in the battle engine, allowing ; link battles to remain in sync using a shared PRNG. -; Save bank - ld a, [hROMBank] ; bank + ld a, [hROMBank] push af -; Bankswitch ld a, BANK(_BattleRandom) rst Bankswitch + call _BattleRandom -; Restore bank + ld [$cfb6], a pop af rst Bankswitch -- cgit v1.2.3 From b333b18dbde658cd7e4299f8206d1d52c532b87a Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 Aug 2013 23:07:08 -0400 Subject: Function2f79 is PickUpItem --- main.asm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index 64ec02a0c..0b848c4e0 100644 --- a/main.asm +++ b/main.asm @@ -5549,20 +5549,20 @@ Function2f66: ; 2f66 ret ; 2f79 -Function2f79: ; 2f79 +PickUpItem: ; 2f79 push hl push de push bc ld a, [hROMBank] push af - ld a, BANK(Functiond244) + ld a, BANK(_PickUpItem) rst Bankswitch - call Functiond244 + call _PickUpItem + pop bc ld a, b rst Bankswitch - pop bc pop de pop hl @@ -20275,7 +20275,7 @@ Functiond20d: ; d20d jp Functiond2ff ; d244 -Functiond244: ; d244 +_PickUpItem: ; d244 call Functiond27b jr nz, .asm_d278 push hl @@ -32235,7 +32235,7 @@ Function24c64: ; 24c64 push hl ld [CurItem], a ld hl, NumItems - call Function2f79 + call PickUpItem pop hl jr nc, .asm_24c89 ld a, [hl] @@ -55485,7 +55485,7 @@ Function8adef: ; 8adef ld a, WATER_STONE ld [CurItem], a ld hl, NumItems - call Function2f79 + call PickUpItem jr c, .asm_8ae24 ld a, [PartyCount] -- cgit v1.2.3 From 2acccc3ea5d5ebdd54cddc6cb7a3c888428be286 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 31 Aug 2013 03:54:02 -0400 Subject: rename FarBattleTextBox to StdBattleTextBox that's it for bad Far usage --- main.asm | 118 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 60 insertions(+), 58 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index 0b848c4e0..077205a37 100644 --- a/main.asm +++ b/main.asm @@ -8178,24 +8178,25 @@ MobileTextBorder: ; 3ab2 BattleTextBox: ; 3ac3 +; Open a textbox and print text at hl. push hl call SpeechTextBox call MobileTextBorder - call Function1ad2 ; UpdateSprites - call Function321c ; refresh? + call Function1ad2 + call Function321c pop hl call PrintTextBoxText ret ; 3ad5 -FarBattleTextBox: ; 3ad5 -; Open a textbox and print text at 20:hl. +StdBattleTextBox: ; 3ad5 +; Open a textbox and print battle text at 20:hl. ld a, [hROMBank] push af - ld a, $20 + ld a, BANK(BattleText) rst Bankswitch call BattleTextBox @@ -36361,7 +36362,7 @@ Function3c0e5: ; 3c0e5 ld hl, $5863 .asm_3c115 - call FarBattleTextBox + call StdBattleTextBox .asm_3c118 call Function3ceec @@ -36624,7 +36625,7 @@ Function3c27c: ; 3c27c ld [hl], a call GetItemName ld hl, $4bde - call FarBattleTextBox + call StdBattleTextBox callab BattleCommand8c pop af bit 7, a @@ -36635,7 +36636,7 @@ Function3c27c: ; 3c27c call Function3ee0f call Function3c8e4 ld hl, $4d97 - jp FarBattleTextBox + jp StdBattleTextBox ; 3c300 Function3c300: ; 3c300 @@ -36945,7 +36946,7 @@ Function3c4df: ; 3c4df res 4, [hl] call SetEnemyTurn ld hl, $4c8a - jp FarBattleTextBox + jp StdBattleTextBox .asm_3c518 ld hl, EnemySubStatus5 @@ -36969,7 +36970,7 @@ Function3c4df: ; 3c4df res 4, [hl] call SetPlayerTurn ld hl, $4c8a - jp FarBattleTextBox + jp StdBattleTextBox ; 3c543 @@ -37278,7 +37279,7 @@ Function3c716: ; 3c716 .asm_3c733 push de - call FarBattleTextBox + call StdBattleTextBox pop de xor a ld [$cfca], a @@ -37332,7 +37333,7 @@ Function3c716: ; 3c716 ld [hBGMapMode], a call Function3ccef ld hl, $480e - call FarBattleTextBox + call StdBattleTextBox .asm_3c7a1 call Function3c706 @@ -37348,7 +37349,7 @@ Function3c716: ; 3c716 call GetQuarterMaxHP call Function3cc3f ld hl, $4822 - call FarBattleTextBox + call StdBattleTextBox .asm_3c7c5 call Function3c706 @@ -37364,7 +37365,7 @@ Function3c716: ; 3c716 call GetQuarterMaxHP call Function3cc3f ld hl, $4836 - call FarBattleTextBox + call StdBattleTextBox .asm_3c7e9 ld hl, BattleMonHP @@ -37415,7 +37416,7 @@ Function3c801: ; 3c801 ld [$d265], a push af ld hl, $4864 - call FarBattleTextBox + call StdBattleTextBox pop af ret nz ld a, $0 @@ -37510,7 +37511,7 @@ Function3c874: ; 3c874 ld hl, $4df5 .asm_3c8e1 - jp FarBattleTextBox + jp StdBattleTextBox ; 3c8e4 Function3c8e4: ; 3c8e4 @@ -37563,7 +37564,7 @@ Function3c8eb: ; 3c8eb call Function3c8e4 call Function3ccef ld hl, $4880 - jp FarBattleTextBox + jp StdBattleTextBox ; 3c93c Function3c93c: ; 3c93c @@ -37702,7 +37703,7 @@ Function3c93c: ; 3c93c call Function3ddc8 call Function3c8e4 ld hl, $4899 - jp FarBattleTextBox + jp StdBattleTextBox ; 3ca26 Function3ca26: ; 3ca26 @@ -37733,7 +37734,7 @@ Function3ca26: ; 3ca26 cp $1 ret nz ld hl, $48b6 - call FarBattleTextBox + call StdBattleTextBox ld a, $10 call GetBattleVarPair push af @@ -37784,7 +37785,7 @@ Function3ca8f: ; 3ca8f call UpdateBattleHuds call SetEnemyTurn ld hl, $524b - jp FarBattleTextBox + jp StdBattleTextBox .asm_3cac9 ld a, [EnemyMonStatus] @@ -37810,7 +37811,7 @@ Function3ca8f: ; 3ca8f call UpdateBattleHuds call SetPlayerTurn ld hl, $524b - jp FarBattleTextBox + jp StdBattleTextBox ; 3cafb Function3cafb: ; 3cafb @@ -37847,7 +37848,7 @@ Function3cafb: ; 3cafb .asm_3cb2e ld [hBattleTurn], a ld hl, $48d2 - jp FarBattleTextBox + jp StdBattleTextBox ; 3cb36 @@ -37904,7 +37905,7 @@ FadeLightScreen: ; 3cb80 push hl push de ld hl, BattleText_0x808e7 - call FarBattleTextBox + call StdBattleTextBox pop de pop hl ret @@ -37918,7 +37919,7 @@ FadeReflect: ; 3cb91 ret nz res SCREENS_REFLECT, [hl] ld hl, BattleText_0x80905 - jp FarBattleTextBox + jp StdBattleTextBox ; 3cb9e HandleWeather: ; 3cb9e @@ -37991,7 +37992,7 @@ HandleWeather: ; 3cb9e call Function3cc3f ld hl, BattleText_0x8084d - jp FarBattleTextBox + jp StdBattleTextBox .asm_3cc13 ld hl, .WeatherEndedMessages @@ -38010,7 +38011,7 @@ HandleWeather: ; 3cb9e ld a, [hli] ld h, [hl] ld l, a - jp FarBattleTextBox + jp StdBattleTextBox ; 3cc2d .WeatherMessages @@ -38521,7 +38522,7 @@ Function3cef1: ; 3cef1 ld bc, $050b call ClearBox ld hl, BattleText_0x80a75 - jp FarBattleTextBox + jp StdBattleTextBox ; 3cf14 Function3cf14: ; 3cf14 @@ -38535,7 +38536,7 @@ Function3cf14: ; 3cf14 ld bc, $040a call ClearBox ld hl, BattleText_0x809a8 - jp FarBattleTextBox + jp StdBattleTextBox ; 3cf35 Function3cf35: ; 3cf35 @@ -38620,7 +38621,7 @@ Function3cfa4: ; 3cfa4 call z, Function3d0ea callab Function39939 ld hl, BattleText_0x809da - call FarBattleTextBox + call StdBattleTextBox call Function3d2f1 jr z, .asm_3cff5 ld a, [InLinkBattle] @@ -38729,11 +38730,11 @@ Function3d02b: ; 3d02b ld a, [hli] ld h, [hl] ld l, a - jp FarBattleTextBox + jp StdBattleTextBox .asm_3d07b ld hl, BattleText_0x809be - jp FarBattleTextBox + jp StdBattleTextBox ; 3d081 Function3d081: ; 3d081 @@ -39013,7 +39014,7 @@ Function3d1f8: ; 3d1f8 dec a ret nz ld hl, BattleText_0x80a83 - call FarBattleTextBox + call StdBattleTextBox .asm_3d20a ld bc, $0107 call Function1dd2 @@ -39188,7 +39189,7 @@ Function3d34f: ; 3d34f cp [hl] jr nz, .asm_3d360 ld hl, BattleText_0x80c0d - call FarBattleTextBox + call StdBattleTextBox scf ret @@ -39309,7 +39310,7 @@ LostBattle: ; 3d38e jr z, .asm_3d417 .asm_3d412 - call FarBattleTextBox + call StdBattleTextBox .end scf @@ -39827,7 +39828,7 @@ Function3d74b: ; 3d74b push af callab Function39939 ld hl, BattleText_0x80aca - call FarBattleTextBox + call StdBattleTextBox ld bc, $0107 call Function1dd2 ld a, [$cfa9] @@ -39878,7 +39879,7 @@ Function3d7a0: ; 3d7a0 Function3d7b8: ; 3d7b8 callab Function39939 ld hl, BattleText_0x80af8 - call FarBattleTextBox + call StdBattleTextBox jp WaitBGMap ; 3d7c7 @@ -40009,7 +40010,7 @@ Function3d887: ; 3d887 ld hl, BattleText_0x80b0b .asm_3d8ae - call FarBattleTextBox + call StdBattleTextBox .asm_3d8b1 xor a @@ -40063,7 +40064,7 @@ Function3d8b3: ; 3d8b3 call SetPlayerTurn call GetItemName ld hl, BattleText_0x80b89 - call FarBattleTextBox + call StdBattleTextBox jp .asm_3d9a2 .asm_3d916 @@ -40140,7 +40141,7 @@ Function3d8b3: ; 3d8b3 ld hl, BattleText_0x80b49 .asm_3d995 - call FarBattleTextBox + call StdBattleTextBox ld a, $1 ld [$d266], a call Function309d @@ -40183,7 +40184,7 @@ Function3d8b3: ; 3d8b3 pop de call WaitSFX ld hl, BattleText_0x80b77 - call FarBattleTextBox + call StdBattleTextBox call WaitSFX call Function309d scf @@ -40195,7 +40196,7 @@ Function3d8b3: ; 3d8b3 bit 4, [hl] jr nz, .asm_3da05 ld hl, BattleText_0x81863 - call FarBattleTextBox + call StdBattleTextBox .asm_3da05 call WaitSFX @@ -40488,7 +40489,7 @@ Function3dc23: ; 3dc23 ret z push bc ld hl, BattleText_0x80bae - call FarBattleTextBox + call StdBattleTextBox call GetEighthMaxHP call Function3cc39 pop hl @@ -40565,7 +40566,7 @@ Function3dc5b: ; 3dc5b ld hl, BattleText_0x809a8 .asm_3dcdf - call FarBattleTextBox + call StdBattleTextBox scf ret @@ -40701,7 +40702,7 @@ Function3dd2f: ; 3dd2f ld a, $9 rst FarCall ld hl, RecoveredUsingText - jp FarBattleTextBox + jp StdBattleTextBox ; 3ddc8 @@ -40812,7 +40813,7 @@ Function3de51: ; 3de51 call GetItemName call Function3ddc8 ld hl, BattleText_0x80dab - call FarBattleTextBox + call StdBattleTextBox ld a, [hBattleTurn] and a jr nz, .asm_3de90 @@ -40892,7 +40893,7 @@ Function3deb1: ; 3deb1 ld [de], a call GetItemName ld hl, BattleText_0x80bde - call FarBattleTextBox + call StdBattleTextBox callab BattleCommand8c ret @@ -41328,7 +41329,7 @@ Function3e19b: ; 3e19b bit 4, [hl] jr nz, .asm_3e1c5 ld hl, $5863 - call FarBattleTextBox + call StdBattleTextBox ld c, $3c call DelayFrames @@ -41391,7 +41392,7 @@ Function3e1c7: ; 3e1c7 Function3e22b: ; 3e22b ld hl, BattleText_0x80bf3 - call FarBattleTextBox + call StdBattleTextBox jp Function3e139 ; 3e234 @@ -41546,7 +41547,7 @@ Function3e358: ; 3e358 cp d jr nz, .asm_3e36b ld hl, BattleText_0x80c0d - call FarBattleTextBox + call StdBattleTextBox jp $6299 .asm_3e36b @@ -41559,7 +41560,7 @@ Function3e358: ; 3e358 .asm_3e378 ld hl, BattleText_0x80c22 - call FarBattleTextBox + call StdBattleTextBox jp $6299 .asm_3e381 @@ -41919,7 +41920,7 @@ Function3e4bc: ; 3e4bc ld hl, Function3cc39 .asm_3e613 - call FarBattleTextBox + call StdBattleTextBox call Function30b4 jp Function3e4bc ; 3e61c @@ -42168,7 +42169,7 @@ Function3e786: ; 3e786 .asm_3e7b4 ld hl, BattleText_0x80c72 - call FarBattleTextBox + call StdBattleTextBox ld c, $3c call DelayFrames xor a @@ -43811,7 +43812,7 @@ Function3ee3b: ; 3ee3b call StartSFX call WaitSFX ld hl, BattleText_0x80c9c - call FarBattleTextBox + call StdBattleTextBox call Function309d .asm_3f057 @@ -44064,7 +44065,7 @@ Function3f136: ; 3f136 rst FarCall call WaitSFX ld hl, BattleText_0x80c9c - call FarBattleTextBox + call StdBattleTextBox pop de inc e ld b, $0 @@ -44353,7 +44354,7 @@ Function3f360: ; 3f360 push hl call Function30b4 pop hl - jp FarBattleTextBox + jp StdBattleTextBox ; 3f390 @@ -44912,7 +44913,7 @@ Function3f71d: ; 3f71d ld de, $d850 call Function3d0be ld hl, BattleText_0x80730 - call FarBattleTextBox + call StdBattleTextBox ld a, [$cfc0] bit 0, a ret z @@ -45752,7 +45753,7 @@ BattleStartMessage: ; 3fc8b ld hl, $4000 rst FarCall pop hl - call FarBattleTextBox + call StdBattleTextBox call Function3f830 ret nz @@ -54111,6 +54112,7 @@ INCLUDE "engine/engine_flags.asm" INCBIN "baserom.gbc", $80648, $80730-$80648 +BattleText: INCLUDE "text/battle.asm" INCBIN "baserom.gbc", $818ac, $81fe3-$818ac @@ -68010,7 +68012,7 @@ Function100bc2: ; 100bc2 ld hl, $4c39 .asm_100c6b - call FarBattleTextBox + call StdBattleTextBox call Function30b4 jp Function100bc2 ; 100c74 -- cgit v1.2.3