How leansart/tp_pokemon works
This is an early, SFML-based Pokémon game prototype; the README says it currently does not compile. Its apparent player journey is title and starter selection, exploration, then trainer or wild encounters, with party and Pokédex screens available along the way. The graph preserves these documented-in-code stages and supporting UI/domain layers. Many implementation files are listed as read in the source index but their contents were not excerpted, so those links are dashed and unverified rather than asserted as confirmed calls.
Main entry points: BattleState.cpp Trainer battle · WildEncounterState.cpp Wild encounter · TitleScreen.cpp Title and starters · Exploration.cpp Exploration
Components 20
Game flow
- Game engine
src/GameEngine.cpp
Pokémon domain
- Pokédex
src/Pokedex.cpp - Pokémon party
src/PokemonParty.cpp - Attack data
src/PokemonAttack.cpp - Pokémon model
src/Pokemon.cpp
Player screens
- Title and starters
src/TitleScreen.cpp - Exploration
src/Exploration.cpp - Trainer battle
src/BattleState.cpp - Wild encounter
src/WildEncounterState.cpp - Game over
src/GameOverState.cpp - Party viewer
src/PokemonPartyViewver.cpp - Attack viewer
src/PokemonAttackViewver.cpp
Shared presentation
- Pokémon sprite
src/PokemonSprite.cpp - Status panel
src/PokemonInfoBox.cpp - Buttons
src/Button.cpp - UI helpers
src/UIHelpers.cpp - Health bar
src/HealthBar.cpp - Theme
includes/Theme.hpp - Battle layout
includes/BattleLayout.hpp
Other components
- Player
Connections 33
- Player → Game engine: starts game
- Game engine → Title and starters: sets initial state
- Title and starters → Exploration: starts exploration
- Exploration → Trainer battle: enters battle
- Exploration → Wild encounter: starts encounter
- Exploration → Party viewer: opens party
- Exploration → Attack viewer: opens attacks
- Trainer battle → Game over: changes state
- Wild encounter → Game over: changes state
- Title and starters → Pokédex: selects starter
- Title and starters → Pokémon model: chooses starter
- Trainer battle → Pokémon model: battles with
- Wild encounter → Pokémon model: battles or captures
- Trainer battle → Status panel: uses status panel
- Wild encounter → Status panel: uses status panel
- Status panel → Health bar: shows health
- Trainer battle → Pokémon sprite: shows combatants
- Wild encounter → Pokémon sprite: shows combatants
- Title and starters → Pokémon sprite: shows starters
- Title and starters → Buttons: uses buttons
- Exploration → Buttons: uses buttons
- Trainer battle → Buttons: uses buttons
- Wild encounter → Buttons: uses buttons
- Buttons → UI helpers: uses helpers
- Trainer battle → Battle layout: uses layout
src/BattleState.cpp - Wild encounter → Battle layout: uses layout
src/WildEncounterState.cpp - Title and starters → Theme: uses theme
src/TitleScreen.cpp - Exploration → Theme: uses theme
src/Exploration.cpp - Trainer battle → Theme: uses theme
src/BattleState.cpp - Wild encounter → Theme: uses theme
src/WildEncounterState.cpp - Party viewer → Pokémon party: views party
- Attack viewer → Attack data: views attacks
- Pokédex → Pokémon model: stores entries