mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 23:55:24 +13:00
Boy/Girl option
This adds the boy/girl selection from later generations, using the pret tutorial and a spriteset from Pokemon Anniversary Red. I made some alterations, namely inserting the option later into the speech to be less clunky, and having the Nidorino become a Nidorina if you pick the feminine option. I decided to make the third name option Seren, a common Welsh name for girls. It means "star", which is really cute! But...most people will probably say it's a Panel de Pon reference, which is cool too.
This commit is contained in:
parent
3b16404a50
commit
36baa9e623
28 changed files with 225 additions and 35 deletions
|
|
@ -6365,12 +6365,21 @@ SwapPlayerAndEnemyLevels:
|
|||
LoadPlayerBackPic:
|
||||
ld a, [wBattleType]
|
||||
dec a ; is it the old man tutorial?
|
||||
ld de, RedPicBack
|
||||
jr nz, .next
|
||||
ld de, OldManPicBack
|
||||
.next
|
||||
ld de, OldManPicBack ; Load the old man back sprite preemptively
|
||||
ld a, BANK(RedPicBack) ; Default Red back sprite will be used as a means to load in the Old Man back sprite
|
||||
jr z, .next
|
||||
ld a, [wPlayerSex] ; do you think a republican will get off to this commit
|
||||
and a
|
||||
jr z, .RedBack
|
||||
ld de, GreenPicBack
|
||||
ld a, BANK(GreenPicBack) ; Load female back sprite
|
||||
jr .next
|
||||
.RedBack
|
||||
ld de, RedPicBack ; Load default Red back sprite
|
||||
ld a, BANK(RedPicBack)
|
||||
ASSERT BANK(RedPicBack) == BANK(OldManPicBack)
|
||||
.next
|
||||
ASSERT BANK(GreenPicBack) == BANK(OldManPicBack) ; These two ASSERTs make sure to cover
|
||||
ASSERT BANK(RedPicBack) == BANK(OldManPicBack) ; both sprite cases
|
||||
call UncompressSpriteFromDE
|
||||
predef ScaleSpriteByTwo
|
||||
ld hl, wShadowOAM
|
||||
|
|
|
|||
|
|
@ -35,12 +35,16 @@ DebugStart:
|
|||
IF DEF(_DEBUG)
|
||||
xor a ; PLAYER_PARTY_DATA
|
||||
ld [wMonDataLocation], a
|
||||
|
||||
|
||||
; Fly anywhere.
|
||||
dec a ; $ff
|
||||
ld [wTownVisitedFlag], a
|
||||
ld [wTownVisitedFlag + 1], a
|
||||
|
||||
|
||||
; This hack was coded by transfems.
|
||||
ld a, 1
|
||||
ld [wPlayerSex], a
|
||||
|
||||
; Get all badges except Earth Badge.
|
||||
ld a, ~(1 << BIT_EARTHBADGE)
|
||||
ld [wObtainedBadges], a
|
||||
|
|
|
|||
|
|
@ -486,6 +486,12 @@ StartMenu_TrainerInfo::
|
|||
DrawTrainerInfo:
|
||||
ld de, RedPicFront
|
||||
lb bc, BANK(RedPicFront), $01
|
||||
ld a, [wPlayerSex] ; guess what it's genital inspection time
|
||||
and a
|
||||
jr z, .AreBoy
|
||||
ld de, GreenPicFront
|
||||
lb bc, BANK(GreenPicFront), $01
|
||||
.AreBoy
|
||||
predef DisplayPicCenteredOrUpperRight
|
||||
call DisableLCD
|
||||
hlcoord 0, 2
|
||||
|
|
|
|||
|
|
@ -183,8 +183,16 @@ HoFMonInfoText:
|
|||
next "TYPE2/@"
|
||||
|
||||
HoFLoadPlayerPics:
|
||||
ld a, [wPlayerSex] ; sex check
|
||||
and a ; sex check
|
||||
jr nz, .GirlStuff1
|
||||
ld de, RedPicFront
|
||||
ld a, BANK(RedPicFront)
|
||||
jr .Routine ; skip the girl stuff and go to main routine
|
||||
.GirlStuff1
|
||||
ld de, GreenPicFront
|
||||
ld a, BANK(GreenPicFront)
|
||||
.Routine ; resume original routine
|
||||
call UncompressSpriteFromDE
|
||||
ld hl, sSpriteBuffer1
|
||||
ld de, sSpriteBuffer0
|
||||
|
|
@ -192,8 +200,16 @@ HoFLoadPlayerPics:
|
|||
call CopyData
|
||||
ld de, vFrontPic
|
||||
call InterlaceMergeSpriteBuffers
|
||||
ld a, [wPlayerSex] ; sex check
|
||||
and a ; maybe the tories are like this too
|
||||
jr nz, .GirlStuff2
|
||||
ld de, RedPicBack
|
||||
ld a, BANK(RedPicBack)
|
||||
jr .routine2 ; skip the girl stuff and continue original routine if guy
|
||||
.GirlStuff2
|
||||
ld de, GreenPicBack
|
||||
ld a, BANK(GreenPicBack)
|
||||
.routine2 ; original routine
|
||||
call UncompressSpriteFromDE
|
||||
predef ScaleSpriteByTwo
|
||||
ld de, vBackPic
|
||||
|
|
|
|||
|
|
@ -58,14 +58,36 @@ OakSpeech:
|
|||
ld a, [wd732]
|
||||
bit 1, a ; possibly a debug mode bit
|
||||
jp nz, .skipChoosingNames
|
||||
call ClearScreen ; clear the screen before resuming normal intro
|
||||
ld de, ProfOakPic
|
||||
lb bc, BANK(ProfOakPic), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call FadeInIntroPic
|
||||
ld hl, OakSpeechText1
|
||||
call PrintText
|
||||
ld hl, BoyGirlText ; added to the same file as the other oak text
|
||||
call PrintText ; show this text
|
||||
call BoyGirlChoice ; added routine at the end of this file
|
||||
ld a, [wCurrentMenuItem]
|
||||
ld [wPlayerSex], a ; store player's gender. 00 for boy, 01 for girl
|
||||
call GBFadeOutToWhite
|
||||
call ClearScreen
|
||||
|
||||
ld a, [wPlayerSex] ; Let's change the Nidorins based on the choice. It's really cute and makes use of an unused command sound.
|
||||
and a
|
||||
jr z, .Nidorino
|
||||
jr nz, .Nidorina
|
||||
.Nidorina
|
||||
ld a, NIDORINA
|
||||
ld [wd0b5], a
|
||||
ld [wcf91], a
|
||||
call GetMonHeader
|
||||
hlcoord 6, 4
|
||||
call LoadFlippedFrontSpriteByMonIndex
|
||||
call MovePicLeft
|
||||
ld hl, OakSpeechText2Green
|
||||
jr .cont
|
||||
.Nidorino
|
||||
ld a, NIDORINO
|
||||
ld [wd0b5], a
|
||||
ld [wcf91], a
|
||||
|
|
@ -73,12 +95,21 @@ OakSpeech:
|
|||
hlcoord 6, 4
|
||||
call LoadFlippedFrontSpriteByMonIndex
|
||||
call MovePicLeft
|
||||
ld hl, OakSpeechText2
|
||||
ld hl, OakSpeechText2Red
|
||||
jr .cont
|
||||
|
||||
.cont
|
||||
call PrintText
|
||||
call GBFadeOutToWhite
|
||||
call ClearScreen
|
||||
ld de, RedPicFront
|
||||
lb bc, BANK(RedPicFront), $00
|
||||
ld a, [wPlayerSex] ; check sex
|
||||
and a ; check sex
|
||||
jr z, .NotGreen1
|
||||
ld de, GreenPicFront
|
||||
lb bc, BANK(GreenPicFront), $00
|
||||
.NotGreen1:
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call MovePicLeft
|
||||
ld hl, IntroducePlayerText
|
||||
|
|
@ -98,6 +129,12 @@ OakSpeech:
|
|||
call ClearScreen
|
||||
ld de, RedPicFront
|
||||
lb bc, BANK(RedPicFront), $00
|
||||
ld a, [wPlayerSex] ; check sex
|
||||
and a ; check sex
|
||||
jr z, .NotGreen2
|
||||
ld de, GreenPicFront
|
||||
lb bc, Bank(GreenPicFront), $00
|
||||
.NotGreen2:
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call GBFadeInFromWhite
|
||||
ld a, [wd72d]
|
||||
|
|
@ -118,10 +155,17 @@ OakSpeech:
|
|||
ld de, RedSprite
|
||||
ld hl, vSprites
|
||||
lb bc, BANK(RedSprite), $0C
|
||||
call CopyVideoData
|
||||
ld de, ShrinkPic1
|
||||
lb bc, BANK(ShrinkPic1), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
ld a, [wPlayerSex] ; check sex
|
||||
and a ; check sex
|
||||
jr z, .NotGreen3
|
||||
ld de,GreenSprite
|
||||
lb bc, BANK(GreenSprite), $0C
|
||||
.NotGreen3:
|
||||
ld hl, vSprites
|
||||
call CopyVideoData
|
||||
ld de, ShrinkPic1
|
||||
lb bc, BANK(ShrinkPic1), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
ld c, 4
|
||||
call DelayFrames
|
||||
ld de, ShrinkPic2
|
||||
|
|
@ -158,11 +202,16 @@ OakSpeech:
|
|||
OakSpeechText1:
|
||||
text_far _OakSpeechText1
|
||||
text_end
|
||||
OakSpeechText2:
|
||||
OakSpeechText2Red: ; this is such a clunky way to do it but the text_asm way caused crashes
|
||||
text_far _OakSpeechText2A
|
||||
sound_cry_nidorino
|
||||
text_far _OakSpeechText2B
|
||||
text_end
|
||||
OakSpeechText2Green:
|
||||
text_far _OakSpeechText2A
|
||||
sound_cry_nidorina
|
||||
text_far _OakSpeechText2B
|
||||
text_end
|
||||
IntroducePlayerText:
|
||||
text_far _IntroducePlayerText
|
||||
text_end
|
||||
|
|
@ -234,3 +283,26 @@ IntroDisplayPicCenteredOrUpperRight:
|
|||
xor a
|
||||
ldh [hStartTileID], a
|
||||
predef_jump CopyUncompressedPicToTilemap
|
||||
|
||||
; displays boy/girl choice
|
||||
BoyGirlChoice::
|
||||
call SaveScreenTilesToBuffer1
|
||||
call InitBoyGirlTextBoxParameters
|
||||
jr DisplayBoyGirlChoice
|
||||
|
||||
InitBoyGirlTextBoxParameters::
|
||||
ld a, $1 ; loads the value for the unused North/West choice, that was changed to say Boy/Girl
|
||||
ld [wTwoOptionMenuID], a
|
||||
coord hl, 13, 7
|
||||
ld bc, $80e
|
||||
ret
|
||||
|
||||
DisplayBoyGirlChoice::
|
||||
ld a, $14
|
||||
ld [wTextBoxID], a
|
||||
call DisplayTextBoxID
|
||||
jp LoadScreenTilesFromBuffer1
|
||||
|
||||
BoyGirlText: ; This is new so we had to add a reference to get it to compile
|
||||
text_far _BoyGirlText
|
||||
text_end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
ChoosePlayerName:
|
||||
call OakSpeechSlidePicRight
|
||||
ld de, DefaultNamesPlayer
|
||||
call DisplayIntroNameTextBox
|
||||
ld a, [wPlayerSex] ; load sex
|
||||
and a
|
||||
jr nz, .AreGirl ; Skip to girl names if you are a girl instead
|
||||
ld de, DefaultNamesPlayer
|
||||
call DisplayIntroNameTextBox
|
||||
ld a, [wCurrentMenuItem]
|
||||
and a
|
||||
jr z, .customName
|
||||
|
|
@ -10,6 +13,17 @@ ChoosePlayerName:
|
|||
ld de, wPlayerName
|
||||
call OakSpeechSlidePicLeft
|
||||
jr .done
|
||||
.AreGirl ; Copy of the boy naming routine, just with girl's names
|
||||
ld de, DefaultNamesGirl
|
||||
call DisplayIntroNameTextBox
|
||||
ld a, [wCurrentMenuItem]
|
||||
and a
|
||||
jr z, .customName
|
||||
ld hl, DefaultNamesGirlList
|
||||
call GetDefaultName
|
||||
ld de, wPlayerName
|
||||
call OakSpeechSlidePicLeft
|
||||
jr .done ; End of new Girl Names routine
|
||||
.customName
|
||||
ld hl, wPlayerName
|
||||
xor a ; NAME_PLAYER_SCREEN
|
||||
|
|
@ -22,6 +36,12 @@ ChoosePlayerName:
|
|||
call Delay3
|
||||
ld de, RedPicFront
|
||||
ld b, BANK(RedPicFront)
|
||||
ld a, [wPlayerSex] ; sex check
|
||||
and a ; yknow it feels like republicans wanting to do penis checking
|
||||
jr z, .AreBoy3
|
||||
ld de, GreenPicFront
|
||||
ld b, BANK(GreenPicFront)
|
||||
.AreBoy3
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
.done
|
||||
ld hl, YourNameIsText
|
||||
|
|
|
|||
|
|
@ -385,12 +385,29 @@ FishingAnim:
|
|||
call DelayFrames
|
||||
ld hl, wd736
|
||||
set 6, [hl] ; reserve the last 4 OAM entries
|
||||
ld a, [wPlayerSex] ; sex check
|
||||
and a ; sex check
|
||||
jr z, .BoySpriteLoad
|
||||
ld de, GreenSprite
|
||||
ld hl, vNPCSprites
|
||||
ld bc, (BANK(GreenSprite) << 8) + $0c
|
||||
jr .KeepLoadingSpriteStuff
|
||||
.BoySpriteLoad
|
||||
ld de, RedSprite
|
||||
ld hl, vNPCSprites tile $00
|
||||
lb bc, BANK(RedSprite), 12
|
||||
ld hl, vNPCSprites
|
||||
lb bc, BANK(RedSprite), $c
|
||||
.KeepLoadingSpriteStuff
|
||||
call CopyVideoData
|
||||
ld a, [wPlayerSex] ; ; sex check
|
||||
and a ; ; sex check seriously i feel like a republican here
|
||||
jr z, .BoyTiles ; skip loading Green's stuff if you're Red
|
||||
ld a, $4
|
||||
ld hl, GreenFishingTiles
|
||||
jr .ContinueRoutine ; go back to main routine after loading Green's stuff
|
||||
.BoyTiles ; alternately, load Red's stuff
|
||||
ld a, $4
|
||||
ld hl, RedFishingTiles
|
||||
.ContinueRoutine
|
||||
call LoadAnimSpriteGfx
|
||||
ld a, [wSpritePlayerStateData1ImageIndex]
|
||||
ld c, a
|
||||
|
|
@ -493,6 +510,12 @@ RedFishingTiles:
|
|||
fishing_gfx RedFishingTilesSide, 2, $0a
|
||||
fishing_gfx RedFishingRodTiles, 3, $fd
|
||||
|
||||
GreenFishingTiles:
|
||||
fishing_gfx GreenFishingTilesFront, 2, $02
|
||||
fishing_gfx GreenFishingTilesBack, 2, $06
|
||||
fishing_gfx GreenFishingTilesSide, 2, $0a
|
||||
fishing_gfx RedFishingRodTiles, 3, $fd
|
||||
|
||||
_HandleMidJump::
|
||||
ld a, [wPlayerJumpingYScreenCoordsIndex]
|
||||
ld c, a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue