Every source file in ui, app, game, formats, cli, audio and launch that had none now starts with a short English comment: what it implements, what state it owns and how it relates to its neighbours (request/acknowledge flow, pairs of files, random generator use). Comment lines only; the full build and the runnable tests are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
27 lines
989 B
C++
27 lines
989 B
C++
// SPDX-License-Identifier: GPL-3.0-only
|
|
// Start screen shown before the game data is loaded: one embedded picture drawn with its
|
|
// own renderer logical size, independent of the indexed game canvas. Owns the SDL
|
|
// texture; non-copyable. Implemented in start_screen.cpp, the image bytes come from
|
|
// start_screen_data.hpp.
|
|
#pragma once
|
|
struct SDL_Renderer;
|
|
struct SDL_Texture;
|
|
namespace bmh::app {
|
|
// Owned, embedded artwork, rendered independently of the indexed game canvas.
|
|
// Destruction restores the caller's logical size and therefore its input mapping.
|
|
class StartScreen {
|
|
public:
|
|
explicit StartScreen(SDL_Renderer*);
|
|
~StartScreen();
|
|
StartScreen(const StartScreen&)=delete;
|
|
StartScreen& operator=(const StartScreen&)=delete;
|
|
void present();
|
|
int width()const{return width_;}
|
|
int height()const{return height_;}
|
|
private:
|
|
SDL_Renderer* renderer_;
|
|
SDL_Texture* texture_=nullptr;
|
|
int width_=0,height_=0,previous_width_=0,previous_height_=0;
|
|
};
|
|
}
|