Blinking HUD - RetroKoH/S1Fixed GitHub Wiki

(Original guide by Mercury)
Source: ReadySonic
Original Commit: c1ac73b
This mod can be toggled in S1Fixed by setting HUDBlinking to 0 or 1.

In Sonic 1 and Sonic 2, whenever you have zero rings, the word "RINGS" will flash red. The same thing will happen to the word "TIME" if you are within 1 minute of attaining a TIME OVER. In Sonic 3K, the HUD does the same thing, but there is one small difference. Instead of flashing red, the HUD elements will blink on and off, appearing and disappearing to provide a similar effect.

The biggest reason for this was likely due to wanting more freedom with their color palettes. If you want that in your hack then this mod will help somewhat. Doing this is incredibly easy too. Simply open _maps/HUD.asm and on frames where the RINGS and TIME words are supposed to use palette line 1 (to flash red), remove those pieces:

; ---------------------------------------------------------------------------
; Sprite mappings - SCORE, TIME, RINGS
; Tile offsets are dependent on your VRAM arrangements.
; ---------------------------------------------------------------------------
Map_HUD:	mappingsTable
		mappingsTableEntry.w	.allyellow
		mappingsTableEntry.w	.ringred
		mappingsTableEntry.w	.timered
		mappingsTableEntry.w	.allred

.allyellow:	spriteHeader
	spritePiece	0, -$80, 4, 2, 0, 0, 0, 0, 1		; SCOR
	spritePiece	$20, -$80, 4, 2, $16, 0, 0, 0, 1	; E ###
	spritePiece	$40, -$80, 4, 2, $1E, 0, 0, 0, 1	; ####
	spritePiece	0, -$70, 4, 2, $E, 0, 0, 0, 1		; TIME
	spritePiece	$28, -$70, 4, 2, $26, 0, 0, 0, 1	; #:##
	spritePiece	0, -$60, 4, 2, 6, 0, 0, 0, 1		; RING
	spritePiece	$20, -$60, 1, 2, 0, 0, 0, 0, 1		; S
	spritePiece	$30, -$60, 3, 2, $2E, 0, 0, 0, 1	; ###
	spritePiece	0, $40, 2, 2, $10A, 0, 0, 0, 1		; Lives Icon
	spritePiece	$10, $40, 4, 2, $10E, 0, 0, 0, 1	; Lives x ##
.allyellow_End
	even

.ringred:	spriteHeader
	spritePiece	0, -$80, 4, 2, 0, 0, 0, 0, 1		; SCOR
	spritePiece	$20, -$80, 4, 2, $16, 0, 0, 0, 1	; E ###
	spritePiece	$40, -$80, 4, 2, $1E, 0, 0, 0, 1	; ####
	spritePiece	0, -$70, 4, 2, $E, 0, 0, 0, 1		; TIME
	spritePiece	$28, -$70, 4, 2, $26, 0, 0, 0, 1	; #:##
-	spritePiece	0, -$60, 4, 2, 6, 0, 0, 1, 1		; RING
-	spritePiece	$20, -$60, 1, 2, 0, 0, 0, 1, 1		; S
	spritePiece	$30, -$60, 3, 2, $2E, 0, 0, 0, 1	; ###
	spritePiece	0, $40, 2, 2, $10A, 0, 0, 0, 1		; Lives Icon
	spritePiece	$10, $40, 4, 2, $10E, 0, 0, 0, 1	; Lives x ##
.ringred_End
	even

.timered:	spriteHeader
	spritePiece	0, -$80, 4, 2, 0, 0, 0, 0, 1		; SCOR
	spritePiece	$20, -$80, 4, 2, $16, 0, 0, 0, 1	; E ###
	spritePiece	$40, -$80, 4, 2, $1E, 0, 0, 0, 1	; ####
-	spritePiece	0, -$70, 4, 2, $E, 0, 0, 1, 1		; TIME
	spritePiece	$28, -$70, 4, 2, $26, 0, 0, 0, 1	; #:##
	spritePiece	0, -$60, 4, 2, 6, 0, 0, 0, 1		; RING
	spritePiece	$20, -$60, 1, 2, 0, 0, 0, 0, 1		; S
	spritePiece	$30, -$60, 3, 2, $2E, 0, 0, 0, 1	; ###
	spritePiece	0, $40, 2, 2, $10A, 0, 0, 0, 1		; Lives Icon
	spritePiece	$10, $40, 4, 2, $10E, 0, 0, 0, 1	; Lives x ##
.timered_End
	even

.allred:	spriteHeader
	spritePiece	0, -$80, 4, 2, 0, 0, 0, 0, 1		; SCOR
	spritePiece	$20, -$80, 4, 2, $16, 0, 0, 0, 1	; E ###
	spritePiece	$40, -$80, 4, 2, $1E, 0, 0, 0, 1	; ####
-	spritePiece	0, -$70, 4, 2, $E, 0, 0, 1, 1		; TIME
	spritePiece	$28, -$70, 4, 2, $26, 0, 0, 0, 1	; #:##
-	spritePiece	0, -$60, 4, 2, 6, 0, 0, 1, 1		; RING
-	spritePiece	$20, -$60, 1, 2, 0, 0, 0, 1, 1		; S
	spritePiece	$30, -$60, 3, 2, $2E, 0, 0, 0, 1	; ###
	spritePiece	0, $40, 2, 2, $10A, 0, 0, 0, 1		; Lives Icon
	spritePiece	$10, $40, 4, 2, $10E, 0, 0, 0, 1	; Lives x ##
.allred_End
	even