Ignore:
Timestamp:
May 14, 2011, 3:06:27 AM (9 years ago)
Author:
Sam Hocevar
Message:

build: add a --disable-network compilation flag and get rid of most of
the CELLOS_LV2 ifdefs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/game.cpp

    r650 r651  
    8484extern uint8_t chatting_enabled;
    8585
    86 // Enabled TCPIP driver
    87 #if !defined __CELLOS_LV2__
     86// Enable TCP/IP driver
     87#if HAVE_NETWORK
    8888#include "tcpip.h"
    8989tcpip_protocol tcpip;
     
    548548    }
    549549
    550 #if !defined __CELLOS_LV2__
    551550    base->current_tick=(current_level->tick_counter()&0xff);
    552 #endif
    553551
    554552    current_level->level_loaded_notify();
     
    13891387  calc_light_table(pal);
    13901388
    1391 #if !defined __CELLOS_LV2__
    13921389  if(current_level == NULL && net_start())  // if we joined a net game get level from server
    13931390  {
     
    13991396//    load_level(NET_STARTFILE);
    14001397  }
    1401 #endif
    14021398
    14031399  set_mode(19, argc, argv);
     
    14661462  gamma_correct(pal);
    14671463
    1468 #if defined __CELLOS_LV2__
    1469   if(!start_edit)
    1470     do_title();
    1471 #else
    14721464  if(main_net_cfg == NULL || (main_net_cfg->state != net_configuration::SERVER &&
    14731465                 main_net_cfg->state != net_configuration::CLIENT))
     
    14801472    start_running = 1;
    14811473  }
    1482 #endif
    14831474
    14841475
     
    16621653        if(ev.type != EV_KEY || !key_down(ev.key) || ev.window || (dev & EDIT_MODE))
    16631654        {
    1664 #if !defined __CELLOS_LV2__
    16651655            if(ev.type == EV_KEY)
    16661656            {
     
    17001690                }
    17011691            }
    1702 #endif
    17031692
    17041693            if((dev & EDIT_MODE) || start_edit || ev.type == EV_MESSAGE)
     
    19151904void net_send(int force = 0)
    19161905{
    1917 #if !defined __CELLOS_LV2__
    19181906  if((!(dev & EDIT_MODE)) || force)
    19191907  {
     
    19501938    }
    19511939  }
    1952 #endif
    19531940}
    19541941
    19551942void net_receive()
    19561943{
    1957 #if !defined __CELLOS_LV2__
    19581944  if(!(dev & EDIT_MODE) && current_level)
    19591945  {
     
    19761962    process_packet_commands(buf, size);
    19771963  }
    1978 #endif
    19791964}
    19801965
     
    23442329void game_net_init(int argc, char **argv)
    23452330{
    2346 #if !defined __CELLOS_LV2__
    23472331  int nonet=!net_init(argc, argv);
    23482332  if(nonet)
     
    23692353    }
    23702354  }
    2371 #endif
    23722355}
    23732356
     
    24662449        g->get_input(); // prime the net
    24672450
    2468 #if !defined __CELLOS_LV2__
    24692451        for (int i = 1; i + 1 < argc; i++)
    24702452        {
     
    24902472            g->update_screen(); // redraw the screen with any changes
    24912473        }
    2492 #endif
    24932474
    24942475        while (!g->done())
     
    25252506                demo_man.do_inputs();
    25262507
    2527 #if !defined __CELLOS_LV2__
    25282508            service_net_request();
    2529 #endif
    25302509
    25312510            // process all the objects in the world
    25322511            g->step();
    2533 #if !defined __CELLOS_LV2__
    25342512            server_check();
    2535 #endif
    25362513            g->calc_speed();
    25372514
     
    25412518        }
    25422519
    2543 #if !defined __CELLOS_LV2__
    25442520        net_uninit();
    25452521
     
    25472523            net_crcs->clean_up();
    25482524        delete net_crcs; net_crcs = NULL;
    2549 #endif
    25502525
    25512526        delete chat;
     
    25862561        Lisp::Uninit();
    25872562
    2588 #if !defined __CELLOS_LV2__
    25892563        base->packet.packet_reset();
    2590 #endif
    25912564    }
    25922565    while (main_net_cfg && main_net_cfg->restart_state());
Note: See TracChangeset for help on using the changeset viewer.