Add Missile Command game for T-Deck + desktop emulator
Game (examples/MissileCommand): - Classic Missile Command: 6 cities, 3 batteries x 10 missiles, escalating waves, smart bombs, score multiplier, session high score - Trackball aims, press/tap fires, keyboard A/S/D selects battery, screen tap aims+fires - Rendering: incremental TFT_eSPI drawing (persistent enemy trails that vanish on death, no AA-rocket trails, explosion circles that repair terrain, ghost-free crosshair) - Sound (sound_engine.cpp): non-blocking I2S task on core 0; wave-start alarm of four falling tones (like the original), sweeps/noise effects, U/V/M keyboard volume control with OSD, master volume scaling Emulator (emulator/): - SDL2 host that compiles the unmodified sketch against shim headers (Arduino, TFT_eSPI->framebuffer, GT911 touch, I2C keyboard, I2S->SDL audio); arrow keys emulate the trackball, --autoplay/--frames/--dump flags for headless smoke tests
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Framebuffer shared between the TFT_eSPI shim and the SDL2 host.
|
||||
*/
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
struct SDL_Texture;
|
||||
|
||||
namespace emuGfx {
|
||||
constexpr int W = 320;
|
||||
constexpr int H = 240;
|
||||
extern uint32_t fb[W * H]; // ABGR8888 pixels
|
||||
extern SDL_Texture *tex;
|
||||
extern bool dirty;
|
||||
} // namespace emuGfx
|
||||
Reference in New Issue
Block a user