Split the window program into files by topic
struct App moves out of main.cpp into app/app.hpp (state and declarations; the return types are spelled out now, taken from the compiler) and its 94 member functions into app_run.cpp handle() and run(): wiring, title screen, event loop app_live.cpp live match, interventions, event animations, reality mode app_transfer.cpp offers, decisions, market sales, loan returns, poaching app_season.cpp season end and start: tax, promotion, highscore, cup draw app_services.cpp timers and deadlines served between inputs app_club.cpp the club dialogs app_sportschau.cpp the Sportschau app_notices.cpp notices and questions over a screen main.cpp keeps main(): game data, window, sound (238 lines instead of 4,550). The function bodies moved unchanged. docs/DIFFERENCES.md is regenerated (a marker moved to app_run.cpp). Verified: 211 of 211 tests; careers, UI walk and robot (234 commands) identical; long robot run (52 kick-offs to April of the season, indoor tournament included): every desk picture identical. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
c8dee2c377
commit
8a37be898a
12 files changed
+4523
-4433
No files matched your search
@@ -470,8 +470,18 @@ target_link_libraries(start_screen_tests PRIVATE openbmh_start_screen)
|
||||
add_test(NAME start_screen_tests COMMAND start_screen_tests)
|
||||
|
||||
# The playable program: the shared UI library connected to the engine by src/app.
|
||||
# The game program: main() sets up data, window and sound; struct App (src/app/app.hpp) is the running
|
||||
# program, its member functions are defined by topic in the app_*.cpp files.
|
||||
add_executable(openbmh_play
|
||||
src/app/main.cpp
|
||||
src/app/app_run.cpp
|
||||
src/app/app_services.cpp
|
||||
src/app/app_season.cpp
|
||||
src/app/app_sportschau.cpp
|
||||
src/app/app_transfer.cpp
|
||||
src/app/app_club.cpp
|
||||
src/app/app_notices.cpp
|
||||
src/app/app_live.cpp
|
||||
${BMH_APP_CONTROLLER_SOURCE}
|
||||
${BMH_APP_SESSION_SDL_SOURCE})
|
||||
target_link_libraries(openbmh_play PRIVATE bmhui bmhlaunch_dialog openbmh_audio ${BMH_SDL_TARGET})
|
||||
|
||||
Reference in new issue
Block a user