multi:: split-screen mode is now an option
This commit is contained in:
parent
bcc7c9c646
commit
08cfed6658
|
@ -1497,6 +1497,7 @@ EX int calcfps() {
|
||||||
EX namespace subscreens {
|
EX namespace subscreens {
|
||||||
|
|
||||||
EX vector<display_data> player_displays;
|
EX vector<display_data> player_displays;
|
||||||
|
/** 'in' is on if we are currently working on a single display */
|
||||||
EX bool in;
|
EX bool in;
|
||||||
EX int current_player;
|
EX int current_player;
|
||||||
|
|
||||||
|
@ -1528,7 +1529,7 @@ EX namespace subscreens {
|
||||||
EX bool split(reaction_t what) {
|
EX bool split(reaction_t what) {
|
||||||
using namespace racing;
|
using namespace racing;
|
||||||
if(in) return false;
|
if(in) return false;
|
||||||
if(!racing::on && !(shmup::on && GDIM == 3)) return false;
|
if(!multi::split_screen) return false;
|
||||||
if(!player_displays.empty()) {
|
if(!player_displays.empty()) {
|
||||||
in = true;
|
in = true;
|
||||||
int& p = current_player;
|
int& p = current_player;
|
||||||
|
|
|
@ -28,6 +28,8 @@ EX namespace multi {
|
||||||
EX config scfg;
|
EX config scfg;
|
||||||
EX charstyle scs[MAXPLAYER];
|
EX charstyle scs[MAXPLAYER];
|
||||||
|
|
||||||
|
EX bool split_screen;
|
||||||
|
|
||||||
EX int players = 1;
|
EX int players = 1;
|
||||||
EX cellwalker player[MAXPLAYER];
|
EX cellwalker player[MAXPLAYER];
|
||||||
EX vector<int> revive_queue; // queue for revival
|
EX vector<int> revive_queue; // queue for revival
|
||||||
|
@ -519,6 +521,7 @@ EX void showConfigureMultiplayer() {
|
||||||
|
|
||||||
dialog::addSelItem(XLAT("keyboard & joysticks"), "", 'k');
|
dialog::addSelItem(XLAT("keyboard & joysticks"), "", 'k');
|
||||||
dialog::add_action(multi::configure);
|
dialog::add_action(multi::configure);
|
||||||
|
add_edit(split_screen);
|
||||||
}
|
}
|
||||||
else dialog::addBreak(200);
|
else dialog::addBreak(200);
|
||||||
|
|
||||||
|
@ -690,6 +693,8 @@ EX void initConfig() {
|
||||||
|
|
||||||
#if CAP_CONFIG
|
#if CAP_CONFIG
|
||||||
addsaver(multi::players, "mode-number of players");
|
addsaver(multi::players, "mode-number of players");
|
||||||
|
param_b(multi::split_screen, "splitscreen", false)
|
||||||
|
->editable("split screen mode", 's');
|
||||||
addsaver(alwaysuse, "use configured keys");
|
addsaver(alwaysuse, "use configured keys");
|
||||||
// unfortunately we cannot use key names here because SDL is not yet initialized
|
// unfortunately we cannot use key names here because SDL is not yet initialized
|
||||||
for(int i=0; i<512; i++)
|
for(int i=0; i<512; i++)
|
||||||
|
|
Loading…
Reference in New Issue