disable multi in FS2 demo with emscripten for now
authorTaylor Richards <taylor@icculus.org>
Fri, 5 Jan 2018 00:33:21 +0000 (19:33 -0500)
committerTaylor Richards <taylor@icculus.org>
Sat, 17 Mar 2018 15:23:54 +0000 (11:23 -0400)
src/menuui/barracks.cpp
src/menuui/mainhallmenu.cpp
src/menuui/optionsmenu.cpp
src/menuui/playermenu.cpp

index f612455..e0b3005 100644 (file)
@@ -1037,6 +1037,7 @@ void barracks_init_player_stuff(int mode)
 
 }
 
+#if !(defined(DEMO) || defined(OEM_BUILD) || defined(__EMSCRIPTEN__))
 static void barracks_convert_pilot_callback(int choice)
 {
        char old_pic[256] = "";
@@ -1068,6 +1069,7 @@ static void barracks_convert_pilot_callback(int choice)
 
        gamesnd_play_iface(SND_USER_SELECT);
 }
+#endif
 
 void barracks_button_pressed(int n)
 {
@@ -1148,7 +1150,7 @@ void barracks_button_pressed(int n)
                        break;
 
                case B_PILOT_CONVERT_BUTTON: {
-#if defined(DEMO) || defined(OEM_BUILD)
+#if defined(DEMO) || defined(OEM_BUILD) || defined(__EMSCRIPTEN__)
                        game_feature_not_in_demo_popup();
 #else
                        const char *str;
@@ -1207,7 +1209,7 @@ void barracks_button_pressed(int n)
                        break;
 
                case B_PILOT_MULTI_MODE_BUTTON:
-#if defined(DEMO) || defined(OEM_BUILD) // not for FS2_DEMO
+#if defined(DEMO) || defined(OEM_BUILD) || defined(__EMSCRIPTEN__) // not for FS2_DEMO
                        game_feature_not_in_demo_popup();
 #else
                        if (Player_sel_mode != PLAYER_SELECT_MODE_MULTI) {
@@ -1631,7 +1633,7 @@ void barracks_do_frame(float frametime)
                                break;
 
                        case SDLK_TAB:  // switch mode (simgle/multi)
-#if defined(DEMO) || defined(OEM_BUILD) // not for FS2_DEMO
+#if defined(DEMO) || defined(OEM_BUILD) || defined(__EMSCRIPTEN__) // not for FS2_DEMO
        game_feature_not_in_demo_popup();
 #else
                                if (Player_sel_mode == PLAYER_SELECT_MODE_SINGLE) {
index d44b69c..2708ef1 100644 (file)
@@ -1208,7 +1208,7 @@ void main_hall_do(float frametime)
 
                // clicked on the multiplayer region
                case MULTIPLAYER_REGION:
-#if defined(DEMO) || defined(OEM_BUILD) // not for FS2_DEMO
+#if defined(DEMO) || defined(OEM_BUILD) || defined(__EMSCRIPTEN__) // not for FS2_DEMO
                        game_feature_not_in_demo_popup();
 #else
                        if (Player->flags & PLAYER_FLAGS_IS_MULTI){
index 1546263..1105a2c 100644 (file)
@@ -892,7 +892,7 @@ void options_tab_setup(int set_palette)
        // do other special processing
        switch (Tab) {
                case MULTIPLAYER_TAB:
-#if !defined(DEMO) && !defined(OEM_BUILD) // not for FS2_DEMO
+#if !defined(DEMO) && !defined(OEM_BUILD) && !defined(__EMSCRIPTEN__) // not for FS2_DEMO
                        options_multi_select();
 #ifdef MAKE_FS1                
                        // need to hide the hud config and control config buttons
@@ -913,7 +913,7 @@ void options_tab_close()
 {
        switch (Tab) {
                case MULTIPLAYER_TAB:
-#if !defined(DEMO) && !defined(OEM_BUILD) // not for FS2_DEMO
+#if !defined(DEMO) && !defined(OEM_BUILD) && !defined(__EMSCRIPTEN__) // not for FS2_DEMO
                        options_multi_unselect();               
 #endif
                        break;
@@ -928,7 +928,7 @@ void options_change_tab(int n)
 {
        int idx;
 
-#if defined(DEMO) || defined(OEM_BUILD) // not for FS2_DEMO
+#if defined(DEMO) || defined(OEM_BUILD) || defined(__EMSCRIPTEN__) // not for FS2_DEMO
        if (n == MULTIPLAYER_TAB) {
                game_feature_not_in_demo_popup();
                return;
@@ -939,7 +939,7 @@ void options_change_tab(int n)
                case MULTIPLAYER_TAB:
                        if ( !Options_multi_inited ) {
                                // init multiplayer
-#if !defined(DEMO) && !defined(OEM_BUILD) // not for FS2_DEMO
+#if !defined(DEMO) && !defined(OEM_BUILD) && !defined(__EMSCRIPTEN__) // not for FS2_DEMO
                                options_multi_init(&Ui_window);
                                options_multi_unselect();
 #endif
@@ -1261,7 +1261,7 @@ void options_accept()
 {
        // apply the selected multiplayer options
        if ( Options_multi_inited ) {
-               #if !defined(DEMO) && !defined(OEM_BUILD) // not for FS2_DEMO
+               #if !defined(DEMO) && !defined(OEM_BUILD) && !defined(__EMSCRIPTEN__) // not for FS2_DEMO
                options_multi_accept();
                #endif
        }
@@ -1421,7 +1421,7 @@ void options_menu_close()
                Voice_vol_handle = -1;
        }
 
-#if !defined(DEMO) && !defined(OEM_BUILD) // not for FS2_DEMO
+#if !defined(DEMO) && !defined(OEM_BUILD) && !defined(__EMSCRIPTEN__) // not for FS2_DEMO
        options_multi_close();
 #endif
 
@@ -1596,7 +1596,7 @@ void options_menu_do_frame(float frametime)
        // do specific processing for the multiplayer tab
        switch (Tab) {
                case MULTIPLAYER_TAB:
-#if !defined(DEMO) && !defined(OEM_BUILD) // not for FS2_DEMO
+#if !defined(DEMO) && !defined(OEM_BUILD) && !defined(__EMSCRIPTEN__) // not for FS2_DEMO
                        options_multi_do(k);
 #endif
                        break;
index 217b83f..4e48ac7 100644 (file)
@@ -933,7 +933,7 @@ void player_select_button_pressed(int n)
                player_select_set_bottom_text("");
 
                Player_select_autoaccept = 0;
-#if defined(DEMO) || defined(OEM_BUILD) // not for FS2_DEMO
+#if defined(DEMO) || defined(OEM_BUILD) || defined(__EMSCRIPTEN__) // not for FS2_DEMO
                game_feature_not_in_demo_popup();
 #else
                // switch to multiplayer mode