Cause it was easy enough to add.

This commit is contained in:
Randy Thiemann 2023-10-21 21:25:57 +02:00
parent 8d474b3638
commit 50c7ab130b
10 changed files with 107 additions and 201 deletions

Binary file not shown.

View File

@ -23,6 +23,7 @@ Please do not try running it on older emulators such as VBA, since this game use
- A/B/Start — Start the game - A/B/Start — Start the game
- Left/Right — Switch A/B rotation direction - Left/Right — Switch A/B rotation direction
- Up/Down — Select starting level - Up/Down — Select starting level
- Select — Select amount of times a piece will be rerolled if it was given to you in the previous 4 pieces. TGM2 uses 6 for this value, TGM1 uses 4 for this value. You can set this to 0 (pure RNG except you'll never start with O, S, or Z), to 16 (F. Basically never get duplicates.)
### Gameplay ### Gameplay
- A — Rotate 1 - A — Rotate 1

View File

@ -108,9 +108,10 @@ DEF PALETTE_LIGHTER_0 EQU %11100100
DEF PALETTE_LIGHTER_1 EQU %10010000 DEF PALETTE_LIGHTER_1 EQU %10010000
DEF PALETTE_LIGHTER_2 EQU %01000000 DEF PALETTE_LIGHTER_2 EQU %01000000
DEF PALETTE_LIGHTER_3 EQU %00000000 DEF PALETTE_LIGHTER_3 EQU %00000000
DEF TITLE_A EQU $99ED DEF TITLE_A EQU $99CD
DEF TITLE_B EQU $99EF DEF TITLE_B EQU $99CF
DEF TITLE_LEVEL EQU $998C DEF TITLE_LEVEL EQU $996C
DEF TITLE_ROLLS EQU $9A2F
DEF FIELD_TOP_LEFT EQU $9800+1 DEF FIELD_TOP_LEFT EQU $9800+1
DEF TILE_FIELD_EMPTY EQU 4 DEF TILE_FIELD_EMPTY EQU 4
DEF TILE_PIECE_0 EQU 10 DEF TILE_PIECE_0 EQU 10

View File

@ -65,6 +65,8 @@ Main::
ldh [hStartSpeed], a ldh [hStartSpeed], a
ld a, h ld a, h
ldh [hStartSpeed+1], a ldh [hStartSpeed+1], a
ld a, 6
ldh [hRNGRerolls], a
call TimeInit call TimeInit
call IntrInit call IntrInit
call InputInit call InputInit

Binary file not shown.

Binary file not shown.

View File

@ -406,132 +406,10 @@ Tiles::
DB $03,$03,$03,$03,$0F,$0F,$00,$00 DB $03,$03,$03,$03,$0F,$0F,$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 $03,$03,$02,$02,$02,$02,$03,$03
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$03,$03,$00,$00
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $BA,$BA,$22,$22,$22,$22,$B2,$B2
DB $00,$00,$00,$00,$00,$00,$00,$00 DB $A2,$A2,$A2,$A2,$BB,$BB,$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,$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
TilesEnd:: TilesEnd::

View File

@ -21,74 +21,74 @@ DEF TITLE_MAP_INC EQU 1
SECTION "Title Screen Tilemap", ROM0 SECTION "Title Screen Tilemap", ROM0
TitleScreenTilemap:: TitleScreenTilemap::
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$68,$6A,$6C,$6E,$70,$72,$74
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $76,$78,$7A,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$68,$6A,$6C,$6E,$70 DB $01,$01,$01,$01,$01,$69,$6B,$6D,$6F,$71
DB $72,$74,$76,$78,$7A,$01,$01,$01,$01,$01 DB $73,$75,$77,$79,$7B,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$69,$6B,$6D DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $6F,$71,$73,$75,$77,$79,$7B,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $5B,$5D,$50,$5E,$5E,$01,$5E,$5F,$4C,$5D
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $5F,$66,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$5B,$5D,$50,$5E,$5E,$01,$5E,$5F DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $4C,$5D,$5F,$66,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$7E,$01,$57,$50,$61,$50
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $57,$01,$01,$81,$42,$42,$42,$42,$82,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$7E,$01,$57,$50 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $61,$50,$57,$01,$01,$81,$42,$42,$42,$42 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $82,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $7F,$01,$4D,$60,$5F,$5F,$5A,$59,$5E,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $81,$4C,$80,$4D,$82,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$7F,$01,$4D,$60,$5F,$5F,$5A,$59 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $5E,$01,$81,$4C,$80,$4D,$82,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$C1,$C2,$C3,$5D,$59
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $52,$01,$5D,$5A,$57,$57,$5E,$01,$81,$48
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $82,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01 DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
DB $01,$01 DB $01,$01
TitleScreenTilemapEnd:: TitleScreenTilemapEnd::

View File

@ -26,6 +26,7 @@ SECTION "High RNG Variables", HRAM
hRNGSeed: ds 4 hRNGSeed: ds 4
hPieceHistory: ds 4 hPieceHistory: ds 4
hNextPiece:: ds 1 hNextPiece:: ds 1
hRNGRerolls:: ds 1
section "RNG Functions", ROM0 section "RNG Functions", ROM0
@ -71,9 +72,15 @@ RNGInit::
GetNextPiece:: GetNextPiece::
ld e, 7 ldh a, [hRNGRerolls]
cp a, 0
jr nz, :+
call NextPiece
jr .donerolling
: inc a
ld e, a
: dec e : dec e
jr z, :+ jr z, .donerolling
call NextPiece call NextPiece
ld hl, hPieceHistory ld hl, hPieceHistory
@ -89,7 +96,8 @@ GetNextPiece::
cp a, [hl] cp a, [hl]
jr z, :- jr z, :-
: ldh [hNextPiece], a .donerolling
ldh [hNextPiece], a
ld b, a ld b, a
ldh a, [hPieceHistory+2] ldh a, [hPieceHistory+2]
ldh [hPieceHistory+3], a ldh [hPieceHistory+3], a

View File

@ -63,8 +63,18 @@ SwitchToTitle::
TitleEventLoopHandler:: TitleEventLoopHandler::
; Increment RNG leniency?
ldh a, [hSelectState]
cp a, 1
jr nz, :+
ldh a, [hRNGRerolls]
inc a
and a, $0F
ldh [hRNGRerolls], a
jp EventLoopPostHandler
; Start game? ; Start game?
ldh a, [hStartState] : ldh a, [hStartState]
ld b, a ld b, a
ldh a, [hAState] ldh a, [hAState]
ld c, a ld c, a
@ -219,6 +229,12 @@ TitleVBlankHandler::
ld hl, TITLE_LEVEL+1 ld hl, TITLE_LEVEL+1
ld [hl], a ld [hl], a
; Draw RNG
ldh a, [hRNGRerolls]
add a, TILE_0
ld hl, TITLE_ROLLS
ld [hl], a
; Draw A/B ; Draw A/B
ldh a, [hSwapAB] ldh a, [hSwapAB]
cp a, 0 cp a, 0