Triple preview.

This commit is contained in:
Randy Thiemann 2023-10-26 15:58:08 +02:00
parent 9097a89bc9
commit 7c781c92b0
8 changed files with 59 additions and 49 deletions

Binary file not shown.

Binary file not shown.

View File

@ -110,10 +110,12 @@ DEF PALETTE_LIGHTER_2 EQU %01000000
DEF PALETTE_LIGHTER_3 EQU %00000000 DEF PALETTE_LIGHTER_3 EQU %00000000
; Sprite base positions. ; Sprite base positions.
DEF NEXT_BASE_X EQU 115 DEF NEXT_BASE_X EQU 113
DEF NEXT_BASE_Y EQU 40 DEF NEXT_BASE_Y EQU 40
DEF HOLD_BASE_X EQU 115 DEF HOLD_BASE_X EQU 113
DEF HOLD_BASE_Y EQU 80 DEF HOLD_BASE_Y EQU 80
DEF QUEUE_BASE_X EQU 150
DEF QUEUE_BASE_Y EQU 38
DEF SCORE_BASE_X EQU 112 DEF SCORE_BASE_X EQU 112
DEF SCORE_BASE_Y EQU 115 DEF SCORE_BASE_Y EQU 115
DEF LEVEL_BASE_X EQU 120 DEF LEVEL_BASE_X EQU 120
@ -157,6 +159,7 @@ DEF TILE_GHOST EQU 125
DEF TILE_SELECTED EQU 193 DEF TILE_SELECTED EQU 193
DEF TILE_UNSELECTED EQU 194 DEF TILE_UNSELECTED EQU 194
DEF TILE_BLANK EQU 1 DEF TILE_BLANK EQU 1
DEF TILE_PIECE_SMALL_0 EQU 239
; Button mode. ; Button mode.
DEF BUTTON_MODE_NORM EQU 0 DEF BUTTON_MODE_NORM EQU 0

Binary file not shown.

View File

@ -498,20 +498,20 @@ Tiles::
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,$FF
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$FF,$00,$00,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$00,$78,$00,$78
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$1E,$00,$1E,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$00,$1E,$00,$1E
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$78,$00,$78,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$00,$7E,$00,$7E
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$06,$00,$06,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$00,$7E,$00,$7E
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$60,$00,$60,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$00,$3C,$00,$3C
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$3C,$00,$3C,$00,$00,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$00,$7E,$00,$7E
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$18,$00,$18,$00,$00,$00,$00
DB $03,$03,$04,$04,$08,$08,$0D,$08 DB $03,$03,$04,$04,$08,$08,$0D,$08
DB $0B,$09,$0D,$08,$0F,$08,$00,$00 DB $0B,$09,$0D,$08,$0F,$08,$00,$00
DB $06,$05,$03,$03,$00,$00,$0F,$0F DB $06,$05,$03,$03,$00,$00,$0F,$0F

View File

@ -26,6 +26,8 @@ SECTION "High RNG Variables", HRAM
hRNGSeed: ds 4 hRNGSeed: ds 4
hPieceHistory: ds 4 hPieceHistory: ds 4
hNextPiece:: ds 1 hNextPiece:: ds 1
hUpcomingPiece1:: ds 1
hUpcomingPiece2:: ds 1
SECTION "TGM3 RNG Variables", WRAM0 SECTION "TGM3 RNG Variables", WRAM0
@ -77,7 +79,7 @@ RNGInit::
cp a, RNG_MODE_HELL cp a, RNG_MODE_HELL
jr nz, .complexinit jr nz, .complexinit
call Next7Piece call Next7Piece
ld [hNextPiece], a ld [hUpcomingPiece2], a
ret ret
; Otherwise do complex init. ; Otherwise do complex init.
@ -106,20 +108,31 @@ RNGInit::
; Save the generated piece and put it in the history. ; Save the generated piece and put it in the history.
ldh [hPieceHistory], a ldh [hPieceHistory], a
ld [hNextPiece], a ld [hUpcomingPiece2], a
; Generate the next 2 to fill up the queue.
call GetNextPiece
call GetNextPiece
ret ret
; Shift the generated piece into the history and save it. ; Shift the generated piece into the history and save it.
ShiftHistory: ShiftHistory:
ld b, a
ldh a, [hUpcomingPiece1]
ldh [hNextPiece], a ldh [hNextPiece], a
ldh a, [hUpcomingPiece2]
ldh [hUpcomingPiece1], a
ld a, b
ldh [hUpcomingPiece2], a
ldh a, [hPieceHistory+2] ldh a, [hPieceHistory+2]
ldh [hPieceHistory+3], a ldh [hPieceHistory+3], a
ldh a, [hPieceHistory+1] ldh a, [hPieceHistory+1]
ldh [hPieceHistory+2], a ldh [hPieceHistory+2], a
ldh a, [hPieceHistory] ldh a, [hPieceHistory]
ldh [hPieceHistory+1], a ldh [hPieceHistory+1], a
ldh a, [hNextPiece] ldh a, [hUpcomingPiece2]
ldh [hPieceHistory], a ldh [hPieceHistory], a
ret ret
@ -127,8 +140,7 @@ ShiftHistory:
; A random piece. Get fucked. ; A random piece. Get fucked.
GetNextHellPiece: GetNextHellPiece:
call Next7Piece call Next7Piece
ldh [hNextPiece], a jr ShiftHistory
ret
; 4 history, 4 rerolls. ; 4 history, 4 rerolls.
@ -188,7 +200,7 @@ GetNextNesPiece:
cp a, [hl] cp a, [hl]
jr nz, ShiftHistory jr nz, ShiftHistory
call Next7Piece call Next7Piece
jr nz, ShiftHistory jr ShiftHistory
; TGM3 mode... It's complex. ; TGM3 mode... It's complex.

View File

@ -58,10 +58,10 @@ wSPRNLevel3:: ds 4
wSPRNLevel4:: ds 4 wSPRNLevel4:: ds 4
wUnused8:: ds 4 wUnused8:: ds 4
wUnused9:: ds 4 wUnused9:: ds 4
wSPRQueue1:: ds 4
wSPRQueue2:: ds 4
wUnusedA:: ds 4 wUnusedA:: ds 4
wUnusedB:: ds 4 wUnusedB:: ds 4
wUnusedC:: ds 4
wUnusedD:: ds 4
wSPRModeRNG:: ds 4 wSPRModeRNG:: ds 4
wSPRModeRot:: ds 4 wSPRModeRot:: ds 4
wSPRModeDrop:: ds 4 wSPRModeDrop:: ds 4
@ -218,6 +218,26 @@ ApplyNext::
ld a, [hl] ld a, [hl]
add a, NEXT_BASE_Y add a, NEXT_BASE_Y
ld [wSPRNext4+0], a ld [wSPRNext4+0], a
; Queue
ld a, QUEUE_BASE_Y
ld [wSPRQueue1], a
add a, 9
ld [wSPRQueue2], a
ld a, QUEUE_BASE_X
ld [wSPRQueue1+1], a
ld [wSPRQueue2+1], a
ldh a, [hUpcomingPiece1]
ld [wSPRQueue1+3], a
add a, TILE_PIECE_SMALL_0
ld [wSPRQueue1+2], a
ldh a, [hUpcomingPiece2]
ld [wSPRQueue2+3], a
add a, TILE_PIECE_SMALL_0
ld [wSPRQueue2+2], a
ret ret
; Index of hold piece in A. ; Index of hold piece in A.

View File

@ -457,31 +457,6 @@ preGameOverMode:
.skip7\@ .skip7\@
ENDR ENDR
; Place a tell on the screen for modes.
ld hl, FIELD_RNG
wait_vram
ld a, [wRNGModeState]
add a, TILE_RNG_MODE_BASE
ld [hl], a
ld hl, FIELD_ROT
wait_vram
ld a, [wRotModeState]
add a, TILE_ROT_MODE_BASE
ld [hl], a
ld hl, FIELD_DROP
wait_vram
ld a, [wDropModeState]
add a, TILE_DROP_MODE_BASE
ld [hl], a
ld hl, FIELD_HIG
wait_vram
ld a, [wAlways20GState]
add a, TILE_HIG_MODE_BASE
ld [hl], a
ld a, MODE_GAME_OVER ld a, MODE_GAME_OVER
ldh [hMode], a ldh [hMode], a