Browse Source

add sfx debug menu

Thomas B 1 month ago
parent
commit
0285ee5ef9
2 changed files with 24 additions and 6 deletions
  1. 23
    5
      src/main.c
  2. 1
    1
      src/main.h

+ 23
- 5
src/main.c View File

49
 BANKREF(main)
49
 BANKREF(main)
50
 
50
 
51
 const struct debug_entry debug_entries[DEBUG_ENTRY_COUNT] = {
51
 const struct debug_entry debug_entries[DEBUG_ENTRY_COUNT] = {
52
-    { .name = "marker",   .flag = DBG_MARKER,      .max = 1 },
53
-    { .name = "invuln",   .flag = DBG_GOD_MODE,    .max = 1 },
54
-    { .name = "music",    .flag = DBG_NONE,        .max = 3 },
55
-    { .name = "cl score", .flag = DBG_CLEAR_SCORE, .max = 1 },
52
+    { .name = "marker",   .flag = DBG_MARKER,      .max = 1 }, // 0
53
+    { .name = "invuln",   .flag = DBG_GOD_MODE,    .max = 1 }, // 1
54
+    { .name = "music",    .flag = DBG_NONE,        .max = 3 }, // 2
55
+    { .name = "sfx-test", .flag = DBG_NONE,        .max = 3 }, // 3
56
+    { .name = "cl score", .flag = DBG_CLEAR_SCORE, .max = 1 }, // 4
56
 };
57
 };
57
 
58
 
58
 static void highscore(uint8_t is_black) NONBANKED {
59
 static void highscore(uint8_t is_black) NONBANKED {
317
                     snd_menu_music();
318
                     snd_menu_music();
318
                 }
319
                 }
319
 
320
 
320
-                if (switch_special) {
321
+                if (switch_special && (debug_menu_index == 2)) {
321
                     switch (debug_special_value) {
322
                     switch (debug_special_value) {
322
                         case 0:
323
                         case 0:
323
                             snd_music_off();
324
                             snd_music_off();
342
                         default:
343
                         default:
343
                             break;
344
                             break;
344
                     }
345
                     }
346
+                } else if (switch_special && (debug_menu_index == 3)) {
347
+                    switch (debug_special_value) {
348
+                        case 1:
349
+                            sample_play_shoot();
350
+                            break;
351
+
352
+                        case 2:
353
+                            sample_play_explosion_orbs();
354
+                            break;
355
+
356
+                        case 3:
357
+                            sample_play_explosion_ship();
358
+                            break;
359
+
360
+                        default:
361
+                            break;
362
+                    }
345
                 }
363
                 }
346
             }
364
             }
347
         }
365
         }

+ 1
- 1
src/main.h View File

49
 extern uint8_t debug_menu_index;
49
 extern uint8_t debug_menu_index;
50
 extern uint8_t debug_special_value;
50
 extern uint8_t debug_special_value;
51
 
51
 
52
-#define DEBUG_ENTRY_COUNT 4
52
+#define DEBUG_ENTRY_COUNT 5
53
 extern const struct debug_entry debug_entries[DEBUG_ENTRY_COUNT];
53
 extern const struct debug_entry debug_entries[DEBUG_ENTRY_COUNT];
54
 
54
 
55
 #endif // __MAIN_H__
55
 #endif // __MAIN_H__

Loading…
Cancel
Save