High scores implemented.

This commit is contained in:
Randy Thiemann 2023-11-11 17:17:15 +01:00
parent 920bfa7553
commit dd61282ebd
14 changed files with 1821 additions and 1396 deletions

View File

@ -16,6 +16,7 @@ The game is heavily inspired by the TGM series of games and has the following fe
- Invisible rolls, big mode, including big mode rolls, bone pieces, and even torikans!
- Grading systems that are inspired by, but do not exactly mimic, those in the TGM series of games in many of the speed curves.
- A challenging final challenge awaits you at the end of all the finite modes.
- High scores.
## Playing
@ -94,7 +95,7 @@ ScoreIncrement points are then awarded.
- A/B/Start — Navigate the menus
- Up/Down — Change which option is selected
- Left/Right — Change the value of the option
- Select — Switch profiles while on the main menu
- Select — Switch profiles while on the main menu, hold for 5 seconds to wipe the score table currently displayed when on the records screen.
### Gameplay
- A — Rotate 1

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -364,7 +364,26 @@ GBCTitleProcess::
jp UnsafeMemSet
.eventLoopRecords
ret
; Palette for the title?
ldh a, [hFrameCtr]
and $0F
cp a, $01
jr nz, .noinc4
ld a, [wTitlePal]
inc a
cp a, $07
jr c, .nores4
ld a, $00
.nores4
ld [wTitlePal], a
.noinc4
; Set the palette for the title.
ld a, [wTitlePal]
ld d, a
ld hl, wShadowTileAttrs + (0*32)
ld bc, (1*32)
jp UnsafeMemSet
.eventLoopCredits
; Palette for the title?

View File

@ -452,6 +452,14 @@ DEF TITLE_PROFILE_NAME_2 EQU $98AF
DEF TITLE_PROFILE_SEL_RESET EQU 4
DEF TITLE_PROFILE_SEL_BACK EQU 5
DEF TITLE_RECORDS_MODE EQU $9848
DEF TITLE_RECORDS_SCORE_BASE EQU $98A2
DEF TITLE_RECORDS_RNG_BASE EQU 144
DEF TITLE_RECORDS_ROT_BASE EQU 149
DEF TITLE_RECORDS_DROP_BASE EQU 153
DEF TITLE_RECORDS_HIG_BASE EQU 158
DEF TITLE_RECORDS_GRADE_BASE EQU 160
DEF PROFILE_SIZE EQU 64
DEF PROFILE_COUNT EQU 10
DEF HISCORE_ENTRY_SIZE EQU 32

View File

@ -1059,11 +1059,11 @@ sTitleTiles::
DB $30,$30,$30,$30,$30,$30,$30,$30
DB $30,$30,$30,$30,$30,$30,$30,$30
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$C0,$C0,$C0,$C0,$00,$00
DB $70,$70,$D8,$D8,$D8,$D8,$D8,$D8
DB $D8,$D8,$DB,$DB,$73,$73,$00,$00
DB $03,$03,$0F,$0F,$3F,$3F,$FF,$FF
DB $3F,$3F,$0F,$0F,$03,$03,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
@ -1116,114 +1116,114 @@ sTitleTiles::
DB $C0,$C0,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$75,$00,$47,$00,$55,$00,$55
DB $00,$75,$00,$00,$00,$3E,$00,$00
DB $00,$75,$00,$47,$00,$55,$00,$55
DB $00,$75,$00,$00,$00,$36,$00,$00
DB $00,$75,$00,$47,$00,$55,$00,$55
DB $00,$75,$00,$00,$00,$2A,$00,$00
DB $00,$00,$00,$3E,$00,$7F,$00,$6B
DB $00,$3E,$00,$2A,$00,$00,$00,$00
DB $00,$00,$00,$FF,$20,$81,$76,$81
DB $20,$81,$00,$FF,$00,$00,$00,$00
DB $00,$26,$00,$55,$00,$76,$00,$55
DB $00,$55,$00,$00,$00,$3E,$00,$00
DB $00,$26,$00,$55,$00,$76,$00,$55
DB $00,$55,$00,$00,$00,$36,$00,$00
DB $00,$00,$00,$FF,$20,$81,$76,$81
DB $20,$81,$00,$FF,$00,$00,$00,$00
DB $18,$18,$2C,$34,$62,$5E,$76,$6E
DB $24,$3C,$24,$3C,$18,$18,$00,$00
DB $02,$70,$02,$40,$02,$60,$07,$40
DB $07,$40,$02,$00,$00,$1F,$00,$00
DB $02,$70,$02,$40,$02,$70,$07,$10
DB $07,$70,$02,$00,$00,$1F,$00,$00
DB $02,$50,$02,$50,$02,$70,$07,$50
DB $07,$50,$02,$00,$00,$1F,$00,$00
DB $02,$40,$02,$40,$02,$40,$07,$40
DB $07,$70,$02,$00,$00,$1F,$00,$00
DB $02,$50,$02,$50,$02,$20,$07,$50
DB $07,$50,$02,$00,$00,$1F,$00,$00
DB $00,$3E,$02,$61,$04,$51,$24,$49
DB $00,$45,$30,$43,$00,$3E,$00,$00
DB $00,$00,$00,$62,$00,$15,$00,$25
DB $00,$45,$00,$72,$00,$00,$00,$00
DB $02,$02,$05,$05,$05,$05,$03,$03
DB $01,$01,$05,$05,$02,$02,$00,$00
DB $02,$02,$05,$05,$05,$05,$02,$02
DB $05,$05,$05,$05,$02,$02,$00,$00
DB $07,$07,$01,$01,$01,$01,$02,$02
DB $02,$02,$02,$02,$02,$02,$00,$00
DB $02,$02,$05,$05,$04,$04,$06,$06
DB $05,$05,$05,$05,$02,$02,$00,$00
DB $07,$07,$04,$04,$04,$04,$06,$06
DB $01,$01,$01,$01,$06,$06,$00,$00
DB $05,$05,$05,$05,$05,$05,$07,$07
DB $01,$01,$01,$01,$01,$01,$00,$00
DB $06,$06,$01,$01,$01,$01,$02,$02
DB $01,$01,$01,$01,$06,$06,$00,$00
DB $06,$06,$01,$01,$01,$01,$02,$02
DB $04,$04,$04,$04,$07,$07,$00,$00
DB $02,$02,$06,$06,$02,$02,$02,$02
DB $02,$02,$02,$02,$07,$07,$00,$00
DB $E2,$E2,$86,$86,$82,$82,$E2,$E2
DB $22,$22,$22,$22,$E7,$E7,$00,$00
DB $E6,$E6,$81,$81,$81,$81,$E2,$E2
DB $24,$24,$24,$24,$E7,$E7,$00,$00
DB $E6,$E6,$81,$81,$81,$81,$E2,$E2
DB $21,$21,$21,$21,$E6,$E6,$00,$00
DB $E5,$E5,$85,$85,$85,$85,$E7,$E7
DB $21,$21,$21,$21,$E1,$E1,$00,$00
DB $E7,$E7,$84,$84,$84,$84,$E6,$E6
DB $21,$21,$21,$21,$E6,$E6,$00,$00
DB $E2,$E2,$85,$85,$84,$84,$E6,$E6
DB $25,$25,$25,$25,$E2,$E2,$00,$00
DB $E7,$E7,$81,$81,$81,$81,$E2,$E2
DB $22,$22,$22,$22,$E2,$E2,$00,$00
DB $E2,$E2,$85,$85,$85,$85,$E2,$E2
DB $25,$25,$25,$25,$E2,$E2,$00,$00
DB $E2,$E2,$85,$85,$85,$85,$E3,$E3
DB $21,$21,$25,$25,$E2,$E2,$00,$00
DB $D2,$D2,$95,$95,$95,$95,$D5,$D5
DB $55,$55,$55,$55,$D2,$D2,$00,$00
DB $D2,$D2,$96,$96,$92,$92,$D2,$D2
DB $52,$52,$52,$52,$D7,$D7,$00,$00
DB $D6,$D6,$91,$91,$91,$91,$D2,$D2
DB $54,$54,$54,$54,$D7,$D7,$00,$00
DB $D6,$D6,$91,$91,$91,$91,$D2,$D2
DB $51,$51,$51,$51,$D6,$D6,$00,$00
DB $02,$02,$06,$06,$02,$02,$A2,$A2
DB $E2,$E2,$A2,$A2,$A7,$A7,$00,$00
DB $06,$06,$01,$01,$01,$01,$A2,$A2
DB $E4,$E4,$A4,$A4,$A7,$A7,$00,$00
DB $06,$06,$01,$01,$01,$01,$A2,$A2
DB $E1,$E1,$A1,$A1,$A6,$A6,$00,$00
DB $05,$05,$05,$05,$05,$05,$A7,$A7
DB $E1,$E1,$A1,$A1,$A1,$A1,$00,$00
DB $07,$07,$04,$04,$04,$04,$A6,$A6
DB $E1,$E1,$A1,$A1,$A6,$A6,$00,$00
DB $02,$02,$05,$05,$04,$04,$A6,$A6
DB $E5,$E5,$A5,$A5,$A2,$A2,$00,$00
DB $07,$07,$01,$01,$01,$01,$A2,$A2
DB $E2,$E2,$A2,$A2,$A2,$A2,$00,$00
DB $02,$02,$05,$05,$05,$05,$A2,$A2
DB $E5,$E5,$A5,$A5,$A2,$A2,$00,$00
DB $02,$02,$05,$05,$05,$05,$A3,$A3
DB $E1,$E1,$A5,$A5,$A2,$A2,$00,$00
DB $A0,$A0,$E0,$E0,$A0,$A0,$A0,$A0
DB $A0,$A0,$A0,$A0,$A0,$A0,$00,$00
DB $AA,$AA,$EA,$EA,$AE,$AE,$AE,$AE
DB $A4,$A4,$A4,$A4,$A4,$A4,$00,$00
DB $A4,$A4,$E4,$E4,$AE,$AE,$AA,$AA
DB $AE,$AE,$A4,$A4,$A4,$A4,$00,$00
DB $AE,$AE,$E0,$E0,$A0,$A0,$A4,$A4
DB $A0,$A0,$A0,$A0,$AE,$AE,$00,$00
DB $A4,$A4,$EA,$EA,$AA,$AA,$AA,$AA
DB $A4,$A4,$AA,$AA,$AA,$AA,$00,$00
DB $EA,$EA,$8E,$8E,$8A,$8A,$AA,$AA
DB $AA,$AA,$AA,$AA,$EA,$EA,$00,$00
DB $00,$00,$66,$66,$66,$66,$3C,$3C
DB $3C,$3C,$66,$66,$66,$66,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -407,5 +407,76 @@ sTitleScreenProfileMap::
DB $00,$00
sTitleScreenProfileMapEnd::
sTitleScreenRecordsMap::
DB $01,$01,$01,$01,$01,$01,$01,$1E,$0E,$1A
DB $1D,$10,$1E,$01,$01,$01,$01,$01,$01,$01
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
DB $75,$28,$23,$23,$23,$23,$29,$5C,$01,$01
DB $01,$01,$01,$01,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $03,$73,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$04,$73,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$05,$73,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$06,$73,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$07,$73
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $08,$73,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$09,$73,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$0A,$73,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$0B,$73,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$03,$74
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$0D,$2A,$0D,$0C,$0E,$16
DB $01,$6D,$2A,$19,$0C,$21,$14,$01,$1E,$17
DB $2A,$1D,$1E,$1F,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
DB $00,$00
sTitleScreenRecordsMapEnd::
ENDC

View File

@ -341,30 +341,63 @@ InitializeSRAM:
ld [rProfileName9+2], a
; Set the default scores.
ResetScores::
ld a, [wSelected]
ld b, a
add a, b
add a, b
ld c, a
ld b, 0
ld hl, .jumps
add hl, bc
jp hl
.jumps
jp .dmgt
jp .tgm1
jp .tgm3
jp .deat
jp .shir
jp .chil
jp .myco
.dmgt
ld hl, rScoreTableDMGT
ld de, sHiscoreDefaultData
ld bc, (HISCORE_ENTRY_COUNT * HISCORE_ENTRY_SIZE)
call UnsafeMemCopy
jp UnsafeMemCopy
.tgm1
ld hl, rScoreTableTGM1
ld de, sHiscoreDefaultData
ld bc, (HISCORE_ENTRY_COUNT * HISCORE_ENTRY_SIZE)
call UnsafeMemCopy
jp UnsafeMemCopy
.tgm3
ld hl, rScoreTableTGM3
ld de, sHiscoreDefaultData
ld bc, (HISCORE_ENTRY_COUNT * HISCORE_ENTRY_SIZE)
call UnsafeMemCopy
jp UnsafeMemCopy
.deat
ld hl, rScoreTableDEAT
ld de, sHiscoreDefaultData
ld bc, (HISCORE_ENTRY_COUNT * HISCORE_ENTRY_SIZE)
call UnsafeMemCopy
jp UnsafeMemCopy
.shir
ld hl, rScoreTableSHIR
ld de, sHiscoreDefaultData
ld bc, (HISCORE_ENTRY_COUNT * HISCORE_ENTRY_SIZE)
call UnsafeMemCopy
jp UnsafeMemCopy
.chil
ld hl, rScoreTableCHIL
ld de, sHiscoreDefaultData
ld bc, (HISCORE_ENTRY_COUNT * HISCORE_ENTRY_SIZE)
call UnsafeMemCopy
jp UnsafeMemCopy
.myco
ld hl, rScoreTableMYCO
ld de, sHiscoreDefaultData
ld bc, (HISCORE_ENTRY_COUNT * HISCORE_ENTRY_SIZE)
@ -620,5 +653,4 @@ ResetProfile::
ld [rSelectedStartLevel+1], a
ret
ENDC

View File

@ -344,10 +344,14 @@ SwitchTitleMode:
ret
.switchRecords
ld de, sTitleScreenRecordsMap
ld hl, $9800
ld bc, sTitleScreenRecordsMapEnd - sTitleScreenRecordsMap
call UnsafeMemCopy
call GBCTitleInit
ld a, LCDCF_ON | LCDCF_BGON | LCDCF_BLK01
ldh [rLCDC], a
ret
xor a, a
ldh [hSelectState], a
jp RenderScores
.switchCredits
ld de, sTitleScreenCreditsMap
@ -536,7 +540,24 @@ TitleEventLoopHandlerB:
jp SettingsHandleRight
.eventLoopRecords
ret
; B?
ldh a, [hBState]
cp a, 1
jp z, .quitrecords
; L/R?
ldh a, [hLeftState]
cp a, 1
jp z, RecordsHandleLeft
ldh a, [hRightState]
cp a, 1
jp z, RecordsHandleRight
; Select
ldh a, [hSelectState]
cp a, 255 ; Max hold duraction
ret nz
jp RecordsHandleSelect
.eventLoopCredits
ldh a, [hAState]
@ -551,6 +572,7 @@ TitleEventLoopHandlerB:
ret
.quitcredits
.quitrecords
ld a, TITLE_MAIN
jp SwitchTitleMode
@ -889,7 +911,7 @@ MainHandleA:
jp SwitchToGameplayBig
jp .toprofile
jp .tosettings
no_jump
jp .torecords
jp .tocredits
.tosettings
@ -904,6 +926,10 @@ MainHandleA:
ld a, TITLE_PROFILE
jp SwitchTitleMode
.torecords
ld a, TITLE_RECORDS
jp SwitchTitleMode
MainHandleUp:
ld a, [wSelected]
@ -1493,6 +1519,171 @@ CheckLevelRange:
.notatstart
ret
RecordsHandleLeft:
xor a, a
ldh [hSelectState], a
ld a, [wSelected]
cp a, 0
jr z, :+
dec a
ld [wSelected], a
jp RenderScores
: ld a, SCURVE_COUNT-1
ld [wSelected], a
jp RenderScores
RecordsHandleRight:
xor a, a
ldh [hSelectState], a
ld a, [wSelected]
cp a, SCURVE_COUNT-1
jr z, :+
inc a
ld [wSelected], a
jp RenderScores
: xor a, a
ld [wSelected], a
jp RenderScores
RecordsHandleSelect:
xor a, a
ldh [hSelectState], a
call ResetScores
jp RenderScores
RenderScores:
; Turn the screen off if it's on.
ldh a, [rLCDC]
and LCDCF_ON
jr z, :+ ; Screen is already off.
wait_vram
xor a, a
ldh [rLCDC], a
; Draw the mode.
: ld b, 0
ld a, [wSelected]
sla a
sla a
ld c, a
ld hl, sCURVEMode
add hl, bc
ld d, h
ld e, l
ld hl, TITLE_RECORDS_MODE
ld bc, 4
call UnsafeMemCopy
; Get the correct speed curve.
ld a, [wSelected]
call InitTargetHSTable
; Start of table is at HL. Put it in DE.
ld d, h
ld e, l
ld hl, TITLE_RECORDS_SCORE_BASE+4
REPT 10
; Render score.
ld a, [de]
inc de
add a, "0"
ld [hl+], a
ld a, [de]
inc de
add a, "0"
ld [hl+], a
ld a, [de]
inc de
add a, "0"
ld [hl+], a
ld a, [de]
inc de
add a, "0"
ld [hl+], a
ld a, [de]
inc de
add a, "0"
ld [hl+], a
ld a, [de]
inc de
add a, "0"
ld [hl+], a
ld a, [de]
inc de
add a, "0"
ld [hl+], a
ld a, [de]
inc de
add a, "0"
ld [hl+], a
; Jump back to Name.
ld bc, -12
add hl, bc
; Render it.
ld a, [de]
inc de
ld [hl+], a
ld a, [de]
inc de
ld [hl+], a
ld a, [de]
inc de
ld [hl+], a
; Jump to tells.
ld bc, 10
add hl, bc
; Render them.
ld a, [de]
inc de
cp a, GRADE_NONE
jr nz, .grade\@
.nograde\@
ld a, TILE_BLANK
ld [hl+], a
jr .postgrade\@
.grade\@
add a, TITLE_RECORDS_GRADE_BASE
ld [hl+], a
.postgrade\@
ld a, [de]
inc de
add a, TITLE_RECORDS_RNG_BASE
ld [hl+], a
ld a, [de]
inc de
add a, TITLE_RECORDS_ROT_BASE
ld [hl+], a
ld a, [de]
inc de
add a, TITLE_RECORDS_DROP_BASE
ld [hl+], a
ld a, [de]
inc de
add a, TITLE_RECORDS_HIG_BASE
ld [hl+], a
; Jump to next line.
push hl
ld h, d
ld l, e
ld bc, 16
add hl, bc
ld d, h
ld e, l
pop hl
ld bc, 18
add hl, bc
ENDR
ld a, LCDCF_ON | LCDCF_BGON | LCDCF_BLK01
ldh [rLCDC], a
ret
ENDC