How usernob/card-game works
This is an SDL-based deck-building card game. The visible workflow starts with the player interacting with the game window, passes input and frame updates through the application and game controller, and presents game pages built from layouts and widgets. Card and tarot managers provide game-domain state; bitmap fonts and texture atlases support rendering. The README lists assets but does not document gameplay; some subsystem links are therefore omitted where sampled source does not show the runtime call.
Main entry points: main.cpp App Lifecycle · game.cpp Game Controller · widget.cpp UI Widgets · texturemanager.h Texture Atlases
Components 15
Application
- App Lifecycle
src/main.cpp
Game Domain
- Game Controller
src/game.cpp - Card Manager
src/card.cpp - Tarot Manager
src/card.cpp - Card Models
src/card.h
Interface
- Page System
src/pages.cpp - Game Pages
src/pages.cpp - Layout Engine
src/layout.cpp - UI Widgets
src/widget.cpp
Rendering Resources
- Bitmap Text
src/textrenderer.cpp - Font Resources
assets/fonts - Texture Atlases
src/texturemanager.h - Atlas Assets
assets/textures/atlas
Other components
- Player
- SDL Window
Connections 18
- Player → SDL Window: interacts with
- SDL Window → App Lifecycle: dispatches events
src/main.cpp - App Lifecycle → Game Controller: creates
src/main.cpp - App Lifecycle → Game Controller: updates and renders
src/main.cpp - App Lifecycle → Game Controller: forwards input
src/main.cpp - App Lifecycle → Font Resources: loads
src/main.cpp - App Lifecycle → Texture Atlases: loads atlases
src/main.cpp - Texture Atlases → Atlas Assets: loads metadata
src/texturemanager.h - Game Controller → Card Manager: owns game state
- Game Controller → Game Pages: updates game interface
- Card Manager → Card Models: manages cards
src/card.h - Tarot Manager → Card Models: uses tarot models
src/card.h - Page System → Layout Engine: builds layouts
src/pages.cpp - Page System → UI Widgets: adds widgets
src/pages.cpp - Game Pages → Game Controller: reads game state
src/pages.cpp - UI Widgets → Bitmap Text: renders text
- Bitmap Text → Font Resources: uses font glyphs
- UI Widgets → Texture Atlases: uses textures