Battle Tent Port

This is...most of the stuff necessary for the Battle Tent to work. I've faithfully restored most things so far, including doing a few grammar tweaks.

Main issue is that we get a really strange softlock when the Pokemon selection menu comes up. Not sure why, but point is, it can't progress to the next bit for debugging like this. Committing now to ask for assistance.
This commit is contained in:
Llinos Evans 2023-05-13 02:50:31 +01:00
parent cdb00af812
commit ec61a039b8
23 changed files with 1340 additions and 18 deletions

View file

@ -62,7 +62,9 @@ RedrawPartyMenu_::
cp TMHM_PARTY_MENU
jr z, .teachMoveMenu
cp EVO_STONE_PARTY_MENU
jr z, .evolutionStoneMenu
jp z, .evolutionStoneMenu ; battle tent stuff
cp a, $06
jr z, .battleTentMenu
push hl
ld bc, 14 ; 14 columns to the right
add hl, bc
@ -97,6 +99,11 @@ RedrawPartyMenu_::
add hl, bc
call PlaceString
pop hl
.placeMoveLearnabilityString2
push hl
add hl,bc
call PlaceString
pop hl
.printLevel
ld bc, 10 ; move 10 columns to the right
add hl, bc
@ -113,6 +120,37 @@ RedrawPartyMenu_::
db "ABLE@"
.notAbleToLearnMoveText
db "NOT ABLE@"
.battleTentMenu
ld a, [wWhichPokemon]
inc a
ld b, a
ld a, [wBTOrder]
and $7
cp b
ld de,.BTFirstText
jr z,.placeMoveLearnabilityString
ld a, [wBTOrder]
swap a
and $7
cp b
ld de,.BTSecondText
jr z,.placeMoveLearnabilityString
ld a, [wBTOrder+1]
cp b
ld de,.BTThirdText
jr z,.placeMoveLearnabilityString
ld de,.BTNotEnteredText
ld bc,20 + 6
jr .placeMoveLearnabilityString2
.BTNotEnteredText
db "NOT ENTERED@"
.BTFirstText
db "FIRST@"
.BTSecondText
db "SECOND@"
.BTThirdText
db "THIRD@"
;bt end
.evolutionStoneMenu
push hl
ld hl, EvosMovesPointerTable
@ -165,7 +203,7 @@ RedrawPartyMenu_::
add hl, bc
call PlaceString
pop hl
jr .printLevel
jp .printLevel
.ableToEvolveText
db "ABLE@"
.notAbleToEvolveText
@ -235,6 +273,7 @@ PartyMenuMessagePointers:
dw PartyMenuUseTMText
dw PartyMenuSwapMonText
dw PartyMenuItemUseText
dw PartyMenuBattleTentText
PartyMenuNormalText:
text_far _PartyMenuNormalText
@ -256,6 +295,10 @@ PartyMenuSwapMonText:
text_far _PartyMenuSwapMonText
text_end
PartyMenuBattleTentText: ; 12e93 (4:6e93)
text_far _PartyMenuBattleTentText
db "@"
PotionText:
text_far _PotionText
text_end