Missile Command: arcade rules, crafts, trail system v2, emulator wave skip
Game (examples/MissileCommand): - Trails rewritten as an analytic flight path (pos is a pure function of distance travelled): paint and erase replay the exact same pixels, so blinking trails leave zero residue. Smart bombs wiggle (S-curves) with deterministic paths; erase band widened to a symmetric 7px so the ±1px Bresenham slope jitter between paint/erase endpoints can never leak paint ink (verified zero strays across dense frame captures). - 2600 look: bright steady missile head dot with a flashing trail (shared blink phase), trails vanish on death/impact; AA rockets stay moving dots. - Arcade rules: bomber planes (100x mult) and satellites (250x mult) cross the sky dropping bombs; max 3 city kills per wave; bonus cities at every 10k kept in reserve and deployed between waves; battery silos rebuilt and replenished at each wave start (they no longer stay dead across levels); center battery fires fast rockets, sides slow. - Wave-start attack alarm (four falling tones, once); volume U/V/M with OSD; sound task zeroes the I2S DMA ring when the queue drains so a finished sound's tail no longer loops forever. Emulator: - --wave N flag to skip straight to a wave for quick testing - --dump-interval N rolling frame captures (seq%05d.bmp) - shim: uxQueueMessagesWaiting added
This commit is contained in:
@@ -139,6 +139,13 @@ inline int xQueueSend(QueueHandle_t q, const void *item, unsigned /*timeout*/)
|
||||
return pdTRUE;
|
||||
}
|
||||
|
||||
inline unsigned uxQueueMessagesWaiting(QueueHandle_t q)
|
||||
{
|
||||
if (!q) return 0;
|
||||
std::lock_guard<std::mutex> lk(q->m);
|
||||
return (unsigned)q->items.size();
|
||||
}
|
||||
|
||||
inline int xQueueReceive(QueueHandle_t q, void *out, unsigned timeout)
|
||||
{
|
||||
if (!q) return pdFALSE;
|
||||
|
||||
Reference in New Issue
Block a user