From f6226665d05d479eae3b8417048d89b8afb1b96f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 18 Nov 2018 00:36:31 +0100 Subject: [PATCH] racing:: subscreens used with multiple players --- graph.cpp | 6 +++++- racing.cpp | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/graph.cpp b/graph.cpp index 90afc914..9515bc03 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5689,7 +5689,11 @@ void gamescreen(int _darken) { current_display->set_viewport(0); compute_graphical_distance(); gamescreen(_darken); - })) return; + })) { + current_display->set_projection(0, false); + current_display->set_viewport(0); + return; + } if((cmode & sm::MAYDARK) && !current_display->sidescreen) { _darken += 2; diff --git a/racing.cpp b/racing.cpp index 0f55db26..04190ecf 100644 --- a/racing.cpp +++ b/racing.cpp @@ -375,9 +375,46 @@ void show() { dialog::display(); } - } + +vector player_displays; +bool in_subscreen; void prepare_subscreens() { + int N = multi::players; + if(N > 1) { + player_displays.resize(N, *current_display); + int qrows[10] = {1, 1, 1, 1, 2, 2, 2, 3, 3, 3}; + int rows = qrows[N]; + int cols = (N + rows - 1) / rows; + for(int i=0; i c(current_display, &player_displays[p]); + what(); + } + in_subscreen = false; + return true; + } + return false; } }