diff --git a/DMGTRIS.GBC b/DMGTRIS.GBC index 2d5fd5c..be5ae89 100644 Binary files a/DMGTRIS.GBC and b/DMGTRIS.GBC differ diff --git a/src/field.asm b/src/field.asm index 402cdda..d6f942e 100644 --- a/src/field.asm +++ b/src/field.asm @@ -1348,6 +1348,13 @@ FieldProcess:: ldh a, [hDownState] cp a, 0 jr z, .dontforcelock + ldh a, [hCurrentGravityPerTick] + cp a, 20 + jr nz, .forcelock + ldh a, [hDownState] + cp a, 1 + jr nz, .dontforcelock + ; Set the lock delay to 0 and save it. .forcelock @@ -1396,16 +1403,20 @@ FieldProcess:: ; If the piece is locked, skip the ghost piece. ldh a, [hCurrentLockDelayRemaining] cp a, 0 - jr z, :+ + jr z, .postghost ; If the gravity is <= 1G, draw a ghost piece. ldh a, [hWantedG] cp a, 1 - jr nz, :+ + jr nz, .postghost + ld a, [wInitialA] + cp a, $11 + jr z, .ghost ldh a, [hEvenFrame] cp a, 1 jr nz, :+ +.ghost ldh a, [hYPosAtStartOfFrame] ld b, a ldh a, [hActualG] @@ -1425,7 +1436,8 @@ FieldProcess:: call DrawPiece ; If the lock delay is at the highest value, draw the piece normally. -: ldh a, [hCurrentPiece] +.postghost + ldh a, [hCurrentPiece] ld b, TILE_PIECE_0 add a, b ldh [hWantedTile], a diff --git a/src/gbc.asm b/src/gbc.asm index e1e0024..6b9cf0c 100644 --- a/src/gbc.asm +++ b/src/gbc.asm @@ -64,7 +64,7 @@ ToATTR:: ldh [rHDMA3], a ld a, LOW($9800) ldh [rHDMA4], a - ld a, 39 + ld a, 40 ldh [rHDMA5], a ld a, 0 ldh [rVBK], a @@ -83,7 +83,7 @@ ToVRAM:: ldh [rHDMA3], a ld a, LOW($9800) ldh [rHDMA4], a - ld a, 39 + ld a, 40 ldh [rHDMA5], a @@ -734,9 +734,38 @@ GBCGameplayProcess:: cp a, $11 ret nz + ; 20G? + ldh a, [hCurrentGravityPerTick] + cp a, 20 + jr nz, :+ + + ld a, $00 + ld d, a + ld hl, wShadowTileAttrs + ld bc, 32-12 + + ld a, 21 + ld [wOuterReps], a +.outer0 + ld a, 12 + ld [wInnerReps], a +.inner0 + ld [hl], d + inc hl + ld a, [wInnerReps] + dec a + ld [wInnerReps], a + jr nz, .inner0 + + add hl, bc + ld a, [wOuterReps] + dec a + ld [wOuterReps], a + jr nz, .outer0 + ; What to copy - ld de, wField + 40 +: ld de, wField + 40 ; Where to put it ld hl, wShadowTilemap + 1 ; How much to increment hl after each row diff --git a/src/res/sources/tiles.gbr b/src/res/sources/tiles.gbr index 9076ca5..aa1df37 100644 Binary files a/src/res/sources/tiles.gbr and b/src/res/sources/tiles.gbr differ diff --git a/src/res/tiles.inc b/src/res/tiles.inc index 88bd77e..7d3886e 100644 --- a/src/res/tiles.inc +++ b/src/res/tiles.inc @@ -530,8 +530,8 @@ Tiles:: DB $4A,$4A,$4A,$4A,$E4,$E4,$00,$00 DB $CA,$CA,$2A,$2A,$2A,$2A,$4E,$4E DB $82,$82,$82,$82,$E2,$E2,$00,$00 - DB $04,$04,$0A,$0A,$0A,$0A,$0E,$0E - DB $0A,$0A,$0A,$0A,$0A,$0A,$00,$00 + DB $0C,$0C,$0A,$0A,$0A,$0A,$0C,$0C + DB $0A,$0A,$0A,$0A,$0C,$0C,$00,$00 TilesEnd::