// Pre-flight title / config screen. // // FS2 itself boots straight into the simulation -- "LOADING ... VERSION // 2.0" was just a static splash burned into the panel bitmap, with all // mode selection happening at runtime via Edit-mode key bindings. The // port adds a small menu that gates entry into the sim and lets the // user pick the starting mode the same way FS2's runtime toggles do // (free flight, demo auto-pilot, slew, WW1 Ace). #ifndef TITLE_H #define TITLE_H #include #include #include #include "framebuffer.h" typedef enum TitleSelectionE { TITLE_FREE_FLIGHT = 0, TITLE_DEMO = 1, TITLE_SLEW = 2, TITLE_WW1_ACE = 3, TITLE_QUIT = 4 } TitleSelectionE; typedef struct TitleStateT { TitleSelectionE cursor; bool done; // user pressed Enter } TitleStateT; void titleInit(TitleStateT *t); // Process a single SDL key event. Returns true once `done` is set // (the caller should then consume `cursor` and exit the title loop). bool titleHandleKey(TitleStateT *t, const SDL_Event *ev); // Render the title screen into the framebuffer. void titleDraw(const TitleStateT *t, FramebufferT *fb); #endif