Add basic sounds and bloops for NetDeck
- Add SoundEngine I2S audio renderer (TONE/SWEEP/NOISE) - Add gameplay sounds: unit hit, unit death, door open/close, laser fire - Add network sounds: ICE cracking, trace progress, link severed - Add UI sounds: click confirm, key presses, view switch, FRENZY/BLIND - Add network state sounds: node select, link build, ICE cracking - Emulator: default to 960x720 window (3x scaling) - Update STATUS.md with M4 done All 21 tests pass (14 unit + 7 integration, 0 failures).
This commit is contained in:
+6
-4
@@ -73,17 +73,19 @@ smoke: $(EMU)
|
||||
|
||||
# --- tests -----------------------------------------------------------------
|
||||
# fast layer: unit + integration (deterministic, sim stepped directly)
|
||||
SOUND_SRC := $(wildcard $(APP_DIR)/sound_engine.cpp)
|
||||
|
||||
$(APP)-tests: tests/test_main.cpp tests/shim_globals.cpp tests/harness.h \
|
||||
tests/sim_helpers.h tests/unit_tests.h tests/integration_tests.h \
|
||||
$(SHIMS) $(SKETCH_SRCS)
|
||||
$(SHIMS) $(SKETCH_SRCS) $(SOUND_SRC)
|
||||
$(CXX) $(CXXFLAGS) $(SDLFLAGS) $(TESTS_INC) $(DEFS) \
|
||||
tests/shim_globals.cpp tests/test_main.cpp -o $@ $(LIBS)
|
||||
tests/shim_globals.cpp tests/test_main.cpp $(SOUND_SRC) -o $@ $(LIBS)
|
||||
|
||||
# slow layer: E2E journeys through the real loop() + input pipeline (own build)
|
||||
$(APP)-e2e: tests/e2e_tests.cpp tests/shim_globals.cpp tests/harness.h \
|
||||
tests/sim_helpers.h $(SHIMS) $(SKETCH_SRCS)
|
||||
tests/sim_helpers.h $(SHIMS) $(SKETCH_SRCS) $(SOUND_SRC)
|
||||
$(CXX) $(CXXFLAGS) $(SDLFLAGS) $(TESTS_INC) $(DEFS) \
|
||||
tests/shim_globals.cpp tests/e2e_tests.cpp -o $@ $(LIBS)
|
||||
tests/shim_globals.cpp tests/e2e_tests.cpp $(SOUND_SRC) -o $@ $(LIBS)
|
||||
|
||||
test-unit: $(APP)-tests
|
||||
./$(APP)-tests unit
|
||||
|
||||
@@ -134,7 +134,7 @@ int main(int argc, char **argv)
|
||||
TTF_Init();
|
||||
|
||||
SDL_Window *win = SDL_CreateWindow("T-Deck emulator — " APP_NAME,
|
||||
640, 480, SDL_WINDOW_RESIZABLE);
|
||||
960, 720, SDL_WINDOW_RESIZABLE);
|
||||
SDL_Renderer *ren = SDL_CreateRenderer(win, NULL);
|
||||
if (!ren) ren = SDL_CreateRenderer(win, "software"); // fallback (headless)
|
||||
SDL_SetRenderLogicalPresentation(ren, emuGfx::W, emuGfx::H,
|
||||
|
||||
@@ -116,7 +116,7 @@ TEST(integration/daemon_gating_messages)
|
||||
handleKey('p');
|
||||
clickNode(N_JUNC); stepTicks(LINK_TICKS);
|
||||
clickNode(N_HIVE); stepTicks(ICE_TICKS);
|
||||
handleKey('1'); // HIVE online -> armed
|
||||
EXPECT_EQ(strcmp(msgText, "M4 PENDING"), 0); // payload lands in M4
|
||||
EXPECT(test::serialHas("daemon 1 armed"));
|
||||
handleKey('1'); // HIVE online -> FRENZY.EXE activated
|
||||
EXPECT_EQ(strcmp(msgText, "FRENZY ACTIVE"), 0); // FRENZY effect lands in M4
|
||||
EXPECT(test::serialHas("[key] frenzy"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user