Ignore:
Timestamp:
Apr 29, 2011, 9:18:23 PM (11 years ago)
Author:
Sam Hocevar
Message:

ps3: make everything compile on the PS3. Of course, nothing links yet
because so much support is missing.

File:
1 edited

Legend:

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

    r554 r555  
    55 *
    66 *  This software was released into the Public Domain. As with most public
    7  *  domain software, no warranty is made or implied by Crack dot Com or
    8  *  Jonathan Clark.
     7 *  domain software, no warranty is made or implied by Crack dot Com, by
     8 *  Jonathan Clark, or by Sam Hocevar.
    99 */
    1010
    11 #include "config.h"
     11#if defined HAVE_CONFIG_H
     12#   include "config.h"
     13#endif
    1214
    1315#include <ctype.h>
    1416#include <setjmp.h>
     17#include <unistd.h>
    1518
    1619#ifdef __APPLE__
     
    8285
    8386// Enabled TCPIP driver
     87#if !defined __CELLOS_LV2__
    8488#include "tcpip.h"
    8589tcpip_protocol tcpip;
     90#endif
    8691
    8792FILE *open_FILE(char const *filename, char const *mode)
     
    543548    }
    544549
     550#if !defined __CELLOS_LV2__
    545551    base->current_tick=(current_level->tick_counter()&0xff);
     552#endif
    546553
    547554    current_level->level_loaded_notify();
     
    13971404  calc_light_table(pal);
    13981405
     1406#if !defined __CELLOS_LV2__
    13991407  if(current_level == NULL && net_start())  // if we joined a net game get level from server
    14001408  {
     
    14061414//    load_level(NET_STARTFILE);
    14071415  }
    1408 
     1416#endif
    14091417
    14101418  set_mode(19, argc, argv);
     
    14741482  gamma_correct(pal);
    14751483
     1484#if defined __CELLOS_LV2__
     1485  if(!start_edit)
     1486    do_title();
     1487#else
    14761488  if(main_net_cfg == NULL || (main_net_cfg->state != net_configuration::SERVER &&
    14771489                 main_net_cfg->state != net_configuration::CLIENT))
     
    14841496    start_running = 1;
    14851497  }
     1498#endif
    14861499
    14871500
     
    16791692        if(ev.type != EV_KEY || !key_down(ev.key) || ev.window || (dev & EDIT_MODE))
    16801693        {
     1694#if !defined __CELLOS_LV2__
    16811695            if(ev.type == EV_KEY)
    16821696            {
     
    17161730                }
    17171731            }
     1732#endif
    17181733
    17191734            if((dev & EDIT_MODE) || start_edit || ev.type == EV_MESSAGE)
     
    19301945void net_send(int force = 0)
    19311946{
     1947#if !defined __CELLOS_LV2__
    19321948  if((!(dev & EDIT_MODE)) || force)
    19331949  {
     
    19641980    }
    19651981  }
     1982#endif
    19661983}
    19671984
    19681985void net_receive()
    19691986{
     1987#if !defined __CELLOS_LV2__
    19701988  if(!(dev & EDIT_MODE) && current_level)
    19711989  {
     
    19882006    process_packet_commands(buf, size);
    19892007  }
     2008#endif
    19902009}
    19912010
     
    23562375void game_net_init(int argc, char **argv)
    23572376{
     2377#if !defined __CELLOS_LV2__
    23582378  int nonet=!net_init(argc, argv);
    23592379  if(nonet)
     
    23802400    }
    23812401  }
    2382 
     2402#endif
    23832403}
    23842404
     
    24432463        timer_init();
    24442464
     2465#if !defined __CELLOS_LV2__
    24452466    // look to see if we are supposed to fetch the data elsewhere
    24462467    if (getenv("ABUSE_PATH"))
     
    24502471    if (getenv("ABUSE_SAVE_PATH"))
    24512472        set_save_filename_prefix(getenv("ABUSE_SAVE_PATH"));
     2473#endif
    24522474
    24532475    jrand_init();
     
    24792501        g->get_input(); // prime the net
    24802502
     2503#if !defined __CELLOS_LV2__
    24812504        for (int i = 1; i + 1 < argc; i++)
    24822505        {
     
    25022525            g->update_screen(); // redraw the screen with any changes
    25032526        }
     2527#endif
    25042528
    25052529        while (!g->done())
     
    25362560                demo_man.do_inputs();
    25372561
     2562#if !defined __CELLOS_LV2__
    25382563            service_net_request();
     2564#endif
    25392565
    25402566            // process all the objects in the world
    25412567            g->step();
     2568#if !defined __CELLOS_LV2__
    25422569            server_check();
     2570#endif
    25432571            g->calc_speed();
    25442572
     
    25482576        }
    25492577
     2578#if !defined __CELLOS_LV2__
    25502579        net_uninit();
    25512580
     
    25532582            net_crcs->clean_up();
    25542583        delete net_crcs; net_crcs = NULL;
     2584#endif
    25552585
    25562586        delete chat;
     
    25912621        lisp_uninit();
    25922622
     2623#if !defined __CELLOS_LV2__
    25932624        base->packet.packet_reset();
     2625#endif
    25942626    }
    25952627    while (main_net_cfg && main_net_cfg->restart_state());
Note: See TracChangeset for help on using the changeset viewer.