Aggiungi suono di caduta nel vuoto
Quando il giocatore cade per un salto fallito: - CH1: pitch sweep verso il basso (parte acuta, scende rapidamente) - CH4: rumore medio-basso (colpo di caduta) Effetto 'Wile E. Coyote': tono discendente + impatto.
This commit is contained in:
@@ -80,6 +80,17 @@ void update_player_movement(uint8_t keys, uint8_t prev_keys) {
|
|||||||
if (fall_offset > 0) {
|
if (fall_offset > 0) {
|
||||||
game_over = 1; // sconfitta
|
game_over = 1; // sconfitta
|
||||||
game_over_timer = 30; // timer per animazione di caduta
|
game_over_timer = 30; // timer per animazione di caduta
|
||||||
|
// Suono di caduta: pitch sweep verso il basso (CH1) + rumore (CH4)
|
||||||
|
NR10_REG = 0x7F; // sweep down, massimo shift
|
||||||
|
NR11_REG = 0x80; // 50% duty
|
||||||
|
NR12_REG = 0xF1; // volume max, fade down lento
|
||||||
|
NR13_REG = 0xFF; // freq alta (parte acuta)
|
||||||
|
NR14_REG = 0x87; // trigger + sweep abilitato
|
||||||
|
// Rumore di caduta (CH4)
|
||||||
|
NR41_REG = 0x02;
|
||||||
|
NR42_REG = 0xA1; // volume alto, fade down
|
||||||
|
NR43_REG = 0x60; // freq medio-bassa
|
||||||
|
NR44_REG = 0x80;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ void show_credits(void) {
|
|||||||
ending_puttext(3, 1, "A SCREAM FROM");
|
ending_puttext(3, 1, "A SCREAM FROM");
|
||||||
ending_puttext(6, 2, "THE DARK");
|
ending_puttext(6, 2, "THE DARK");
|
||||||
ending_puttext(2, 5, "A GAME BY");
|
ending_puttext(2, 5, "A GAME BY");
|
||||||
ending_puttext(3, 6, "MATTEO B.");
|
ending_puttext(3, 6, "MATTEO BENEDETTO");
|
||||||
ending_puttext(2, 9, "GBDK 2020");
|
ending_puttext(2, 9, "GBDK 2020");
|
||||||
ending_puttext(2, 10, "SDCC SM83");
|
ending_puttext(2, 10, "SDCC SM83");
|
||||||
ending_puttext(2, 11, "PYBOY TEST");
|
ending_puttext(2, 11, "ME@ENNE2.NET 202606");
|
||||||
ending_puttext(1, 14, "PRESS B TO RETURN");
|
ending_puttext(1, 14, "PRESS B TO RETURN");
|
||||||
// Window layer: tile map separato dal BG
|
// Window layer: tile map separato dal BG
|
||||||
set_win_tiles(0, 0, 32, 32, map_buffer);
|
set_win_tiles(0, 0, 32, 32, map_buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user