mirror of
				https://github.com/thornAvery/kep-hack.git
				synced 2025-11-04 20:51:02 +13:00 
			
		
		
		
	Title screen + Diploma improvements
- An interesting thing I decided to implement here; every time the title screen gets loaded, it loads a random choice between Red and Green, as well as Scream Tail and Sandy Shocks. This effectively gives 4 different starting title screens. - Made the EXPN. PAK text on the title screen more centered. - Green now appears on the diploma instead of Red if you're playing as her.
This commit is contained in:
		
							parent
							
								
									2c02483f01
								
							
						
					
					
						commit
						2c6fc43011
					
				| 
						 | 
				
			
			@ -1,5 +1,7 @@
 | 
			
		|||
TitleMons:
 | 
			
		||||
; mons on the title screen are randomly chosen from here
 | 
			
		||||
	db SCREAM_TAIL  ; Mascots
 | 
			
		||||
	db SANDY_SHOCKS
 | 
			
		||||
	db TOTARTLE     ; New Starters
 | 
			
		||||
	db GOROCHU
 | 
			
		||||
	db SYLVEON
 | 
			
		||||
| 
						 | 
				
			
			@ -9,10 +11,8 @@ TitleMons:
 | 
			
		|||
	db BELLIGNAN	; GS Betas
 | 
			
		||||
	db LUXWAN
 | 
			
		||||
	db PORYGON2     ; Post-Gen 1 Evos
 | 
			
		||||
	db MAGNEZONE
 | 
			
		||||
	db TANGROWTH
 | 
			
		||||
	db ANNIHILAPE	
 | 
			
		||||
	db SCREAM_TAIL  ; LGPE and SV
 | 
			
		||||
	db WUGTRIO
 | 
			
		||||
	db MELTAN
 | 
			
		||||
	db EXEGGUTOR_A  ; Regional Variants
 | 
			
		||||
	db EXEGGUTOR_A  ; Regional Variants & Convergents
 | 
			
		||||
	db TAUROS_PB
 | 
			
		||||
	db WUGTRIO
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -39,9 +39,18 @@ DisplayDiploma::
 | 
			
		|||
	hlcoord 10, 4
 | 
			
		||||
	ld de, wPlayerName
 | 
			
		||||
	call PlaceString
 | 
			
		||||
	ld a, [wPlayerSex]
 | 
			
		||||
	and a		; are you playing as Red
 | 
			
		||||
	jr z, .red	; if yes, Red appears on the diploma
 | 
			
		||||
	jr nz, .green	; if no, Green replaces him
 | 
			
		||||
.green
 | 
			
		||||
	farcall DrawFPlayerCharacter
 | 
			
		||||
	jr .skip
 | 
			
		||||
.red
 | 
			
		||||
	farcall DrawPlayerCharacter
 | 
			
		||||
.skip
 | 
			
		||||
 | 
			
		||||
; Move the player 33 pixels right and set the priority bit so he appears
 | 
			
		||||
; Move the player 33 pixels right and set the priority bit so they appear
 | 
			
		||||
; behind the background layer.
 | 
			
		||||
	ld hl, wShadowOAMSprite00XCoord
 | 
			
		||||
	lb bc, $80, $28
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,8 +91,15 @@ DisplayTitleScreen:
 | 
			
		|||
	inc a
 | 
			
		||||
	dec b
 | 
			
		||||
	jr nz, .pokemonLogoLastTileRowLoop
 | 
			
		||||
 | 
			
		||||
	call Random
 | 
			
		||||
	ldh a, [hRandomAdd]
 | 
			
		||||
	cp 129
 | 
			
		||||
	jr c, .male
 | 
			
		||||
	call DrawFPlayerCharacter
 | 
			
		||||
	jr .playerskip
 | 
			
		||||
.male
 | 
			
		||||
	call DrawPlayerCharacter
 | 
			
		||||
.playerskip
 | 
			
		||||
 | 
			
		||||
; put a pokeball in the player's hand
 | 
			
		||||
	ld hl, wShadowOAMSprite10
 | 
			
		||||
| 
						 | 
				
			
			@ -119,11 +126,19 @@ DisplayTitleScreen:
 | 
			
		|||
	call SaveScreenTilesToBuffer2
 | 
			
		||||
	call LoadScreenTilesFromBuffer2
 | 
			
		||||
	call EnableLCD
 | 
			
		||||
 | 
			
		||||
	call Random
 | 
			
		||||
	ldh a, [hRandomSub]
 | 
			
		||||
	cp 129
 | 
			
		||||
	jr c, .notshocks
 | 
			
		||||
	ld a, SANDY_SHOCKS
 | 
			
		||||
	ld [wTitleMonSpecies], a
 | 
			
		||||
	call LoadTitleMonSprite
 | 
			
		||||
	jr .skip
 | 
			
		||||
.notshocks
 | 
			
		||||
	ld a, SCREAM_TAIL
 | 
			
		||||
	ld [wTitleMonSpecies], a
 | 
			
		||||
	call LoadTitleMonSprite
 | 
			
		||||
 | 
			
		||||
.skip
 | 
			
		||||
	ld a, HIGH(vBGMap0 + $300)
 | 
			
		||||
	call TitleScreenCopyTileMapToVRAM
 | 
			
		||||
	call SaveScreenTilesToBuffer1
 | 
			
		||||
| 
						 | 
				
			
			@ -347,6 +362,43 @@ DrawPlayerCharacter:
 | 
			
		|||
	jr nz, .loop
 | 
			
		||||
	ret
 | 
			
		||||
 | 
			
		||||
DrawFPlayerCharacter:
 | 
			
		||||
	ld hl, FPlayerCharacterTitleGraphics
 | 
			
		||||
	ld de, vSprites
 | 
			
		||||
	ld bc, FPlayerCharacterTitleGraphicsEnd - FPlayerCharacterTitleGraphics
 | 
			
		||||
	ld a, BANK(FPlayerCharacterTitleGraphics)
 | 
			
		||||
	call FarCopyData2
 | 
			
		||||
	call ClearSprites
 | 
			
		||||
	xor a
 | 
			
		||||
	ld [wFPlayerCharacterOAMTile], a
 | 
			
		||||
	ld hl, wShadowOAM
 | 
			
		||||
	lb de, $60, $5a
 | 
			
		||||
	ld b, 7
 | 
			
		||||
.loop2
 | 
			
		||||
	push de
 | 
			
		||||
	ld c, 5
 | 
			
		||||
.innerLoop2
 | 
			
		||||
	ld a, d
 | 
			
		||||
	ld [hli], a ; Y
 | 
			
		||||
	ld a, e
 | 
			
		||||
	ld [hli], a ; X
 | 
			
		||||
	add 8
 | 
			
		||||
	ld e, a
 | 
			
		||||
	ld a, [wFPlayerCharacterOAMTile]
 | 
			
		||||
	ld [hli], a ; tile
 | 
			
		||||
	inc a
 | 
			
		||||
	ld [wFPlayerCharacterOAMTile], a
 | 
			
		||||
	inc hl
 | 
			
		||||
	dec c
 | 
			
		||||
	jr nz, .innerLoop2
 | 
			
		||||
	pop de
 | 
			
		||||
	ld a, 8
 | 
			
		||||
	add d
 | 
			
		||||
	ld d, a
 | 
			
		||||
	dec b
 | 
			
		||||
	jr nz, .loop2
 | 
			
		||||
	ret
 | 
			
		||||
 | 
			
		||||
ClearBothBGMaps:
 | 
			
		||||
	ld hl, vBGMap0
 | 
			
		||||
	ld bc, $400 * 2
 | 
			
		||||
| 
						 | 
				
			
			@ -387,15 +439,15 @@ CopyrightTextString:
 | 
			
		|||
 | 
			
		||||
INCLUDE "data/pokemon/title_mons.asm"
 | 
			
		||||
 | 
			
		||||
; prints version text (red, blue)
 | 
			
		||||
; prints version text
 | 
			
		||||
PrintGameVersionOnTitleScreen:
 | 
			
		||||
	hlcoord 7, 8
 | 
			
		||||
	hlcoord 6, 8
 | 
			
		||||
	ld de, VersionOnTitleScreenText
 | 
			
		||||
	jp PlaceString
 | 
			
		||||
 | 
			
		||||
; these point to special tiles specifically loaded for that purpose and are not usual text
 | 
			
		||||
VersionOnTitleScreenText:
 | 
			
		||||
	db $61,$62,$63,$64,$65,$66,$67,$68,"@" ; "Blue Version"
 | 
			
		||||
	db $61,$62,$63,$64,$65,$66,$67,$68,"@"
 | 
			
		||||
 | 
			
		||||
DebugNewGamePlayerName:
 | 
			
		||||
	db "NINTEN@"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										
											BIN
										
									
								
								gfx/title/fplayer.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								gfx/title/fplayer.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 803 B  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 489 B  | 
| 
						 | 
				
			
			@ -6,3 +6,6 @@ TrainerInfoTextBoxTileGraphicsEnd:
 | 
			
		|||
CircleTile: INCBIN "gfx/trainer_card/circle_tile.2bpp"
 | 
			
		||||
 | 
			
		||||
BadgeNumbersTileGraphics: INCBIN "gfx/trainer_card/badge_numbers.2bpp"
 | 
			
		||||
 | 
			
		||||
FPlayerCharacterTitleGraphics: INCBIN "gfx/title/fplayer.2bpp"
 | 
			
		||||
FPlayerCharacterTitleGraphicsEnd:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -861,6 +861,7 @@ wNumShakes::
 | 
			
		|||
wWhichBadge::
 | 
			
		||||
wTitleMonSpecies::
 | 
			
		||||
wPlayerCharacterOAMTile::
 | 
			
		||||
wFPlayerCharacterOAMTile::
 | 
			
		||||
; the number of small stars OAM entries to move down
 | 
			
		||||
wMoveDownSmallStarsOAMCount::
 | 
			
		||||
wChargeMoveNum::
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue