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:
 | 
					TitleMons:
 | 
				
			||||||
; mons on the title screen are randomly chosen from here
 | 
					; mons on the title screen are randomly chosen from here
 | 
				
			||||||
 | 
						db SCREAM_TAIL  ; Mascots
 | 
				
			||||||
 | 
						db SANDY_SHOCKS
 | 
				
			||||||
	db TOTARTLE     ; New Starters
 | 
						db TOTARTLE     ; New Starters
 | 
				
			||||||
	db GOROCHU
 | 
						db GOROCHU
 | 
				
			||||||
	db SYLVEON
 | 
						db SYLVEON
 | 
				
			||||||
| 
						 | 
					@ -9,10 +11,8 @@ TitleMons:
 | 
				
			||||||
	db BELLIGNAN	; GS Betas
 | 
						db BELLIGNAN	; GS Betas
 | 
				
			||||||
	db LUXWAN
 | 
						db LUXWAN
 | 
				
			||||||
	db PORYGON2     ; Post-Gen 1 Evos
 | 
						db PORYGON2     ; Post-Gen 1 Evos
 | 
				
			||||||
	db MAGNEZONE
 | 
						db TANGROWTH
 | 
				
			||||||
	db ANNIHILAPE
 | 
						db ANNIHILAPE	
 | 
				
			||||||
	db SCREAM_TAIL  ; LGPE and SV
 | 
						db EXEGGUTOR_A  ; Regional Variants & Convergents
 | 
				
			||||||
	db WUGTRIO
 | 
					 | 
				
			||||||
	db MELTAN
 | 
					 | 
				
			||||||
	db EXEGGUTOR_A  ; Regional Variants
 | 
					 | 
				
			||||||
	db TAUROS_PB
 | 
						db TAUROS_PB
 | 
				
			||||||
 | 
						db WUGTRIO
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,9 +39,18 @@ DisplayDiploma::
 | 
				
			||||||
	hlcoord 10, 4
 | 
						hlcoord 10, 4
 | 
				
			||||||
	ld de, wPlayerName
 | 
						ld de, wPlayerName
 | 
				
			||||||
	call PlaceString
 | 
						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
 | 
						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.
 | 
					; behind the background layer.
 | 
				
			||||||
	ld hl, wShadowOAMSprite00XCoord
 | 
						ld hl, wShadowOAMSprite00XCoord
 | 
				
			||||||
	lb bc, $80, $28
 | 
						lb bc, $80, $28
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -91,8 +91,15 @@ DisplayTitleScreen:
 | 
				
			||||||
	inc a
 | 
						inc a
 | 
				
			||||||
	dec b
 | 
						dec b
 | 
				
			||||||
	jr nz, .pokemonLogoLastTileRowLoop
 | 
						jr nz, .pokemonLogoLastTileRowLoop
 | 
				
			||||||
 | 
						call Random
 | 
				
			||||||
 | 
						ldh a, [hRandomAdd]
 | 
				
			||||||
 | 
						cp 129
 | 
				
			||||||
 | 
						jr c, .male
 | 
				
			||||||
 | 
						call DrawFPlayerCharacter
 | 
				
			||||||
 | 
						jr .playerskip
 | 
				
			||||||
 | 
					.male
 | 
				
			||||||
	call DrawPlayerCharacter
 | 
						call DrawPlayerCharacter
 | 
				
			||||||
 | 
					.playerskip
 | 
				
			||||||
 | 
					
 | 
				
			||||||
; put a pokeball in the player's hand
 | 
					; put a pokeball in the player's hand
 | 
				
			||||||
	ld hl, wShadowOAMSprite10
 | 
						ld hl, wShadowOAMSprite10
 | 
				
			||||||
| 
						 | 
					@ -119,11 +126,19 @@ DisplayTitleScreen:
 | 
				
			||||||
	call SaveScreenTilesToBuffer2
 | 
						call SaveScreenTilesToBuffer2
 | 
				
			||||||
	call LoadScreenTilesFromBuffer2
 | 
						call LoadScreenTilesFromBuffer2
 | 
				
			||||||
	call EnableLCD
 | 
						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 a, SCREAM_TAIL
 | 
				
			||||||
	ld [wTitleMonSpecies], a
 | 
						ld [wTitleMonSpecies], a
 | 
				
			||||||
	call LoadTitleMonSprite
 | 
						call LoadTitleMonSprite
 | 
				
			||||||
 | 
					.skip
 | 
				
			||||||
	ld a, HIGH(vBGMap0 + $300)
 | 
						ld a, HIGH(vBGMap0 + $300)
 | 
				
			||||||
	call TitleScreenCopyTileMapToVRAM
 | 
						call TitleScreenCopyTileMapToVRAM
 | 
				
			||||||
	call SaveScreenTilesToBuffer1
 | 
						call SaveScreenTilesToBuffer1
 | 
				
			||||||
| 
						 | 
					@ -347,6 +362,43 @@ DrawPlayerCharacter:
 | 
				
			||||||
	jr nz, .loop
 | 
						jr nz, .loop
 | 
				
			||||||
	ret
 | 
						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:
 | 
					ClearBothBGMaps:
 | 
				
			||||||
	ld hl, vBGMap0
 | 
						ld hl, vBGMap0
 | 
				
			||||||
	ld bc, $400 * 2
 | 
						ld bc, $400 * 2
 | 
				
			||||||
| 
						 | 
					@ -387,15 +439,15 @@ CopyrightTextString:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INCLUDE "data/pokemon/title_mons.asm"
 | 
					INCLUDE "data/pokemon/title_mons.asm"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
; prints version text (red, blue)
 | 
					; prints version text
 | 
				
			||||||
PrintGameVersionOnTitleScreen:
 | 
					PrintGameVersionOnTitleScreen:
 | 
				
			||||||
	hlcoord 7, 8
 | 
						hlcoord 6, 8
 | 
				
			||||||
	ld de, VersionOnTitleScreenText
 | 
						ld de, VersionOnTitleScreenText
 | 
				
			||||||
	jp PlaceString
 | 
						jp PlaceString
 | 
				
			||||||
 | 
					
 | 
				
			||||||
; these point to special tiles specifically loaded for that purpose and are not usual text
 | 
					; these point to special tiles specifically loaded for that purpose and are not usual text
 | 
				
			||||||
VersionOnTitleScreenText:
 | 
					VersionOnTitleScreenText:
 | 
				
			||||||
	db $61,$62,$63,$64,$65,$66,$67,$68,"@" ; "Blue Version"
 | 
						db $61,$62,$63,$64,$65,$66,$67,$68,"@"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DebugNewGamePlayerName:
 | 
					DebugNewGamePlayerName:
 | 
				
			||||||
	db "NINTEN@"
 | 
						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"
 | 
					CircleTile: INCBIN "gfx/trainer_card/circle_tile.2bpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BadgeNumbersTileGraphics: INCBIN "gfx/trainer_card/badge_numbers.2bpp"
 | 
					BadgeNumbersTileGraphics: INCBIN "gfx/trainer_card/badge_numbers.2bpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FPlayerCharacterTitleGraphics: INCBIN "gfx/title/fplayer.2bpp"
 | 
				
			||||||
 | 
					FPlayerCharacterTitleGraphicsEnd:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -861,6 +861,7 @@ wNumShakes::
 | 
				
			||||||
wWhichBadge::
 | 
					wWhichBadge::
 | 
				
			||||||
wTitleMonSpecies::
 | 
					wTitleMonSpecies::
 | 
				
			||||||
wPlayerCharacterOAMTile::
 | 
					wPlayerCharacterOAMTile::
 | 
				
			||||||
 | 
					wFPlayerCharacterOAMTile::
 | 
				
			||||||
; the number of small stars OAM entries to move down
 | 
					; the number of small stars OAM entries to move down
 | 
				
			||||||
wMoveDownSmallStarsOAMCount::
 | 
					wMoveDownSmallStarsOAMCount::
 | 
				
			||||||
wChargeMoveNum::
 | 
					wChargeMoveNum::
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue