source: abuse/trunk/src/nfserver.h @ 555

Last change on this file since 555 was 555, checked in by Sam Hocevar, 10 years ago

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

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  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, by
8 *  Jonathan Clark, or by Sam Hocevar.
9 */
10
11#ifndef __NFSERVER_HPP_
12#define __NFSERVER_HPP_
13
14#if !defined __CELLOS_LV2__
15
16#include "specs.h"
17#include "netface.h"
18#include "sock.h"
19
20int net_init(int argc, char **argv);
21void net_uninit();
22void service_net_request();
23void wait_min_players();
24void server_check();
25void remove_client(int client_number);
26
27int net_start();
28bFILE *open_nfs_file(char const *filename, char const *mode);
29
30int NF_open_file(char const *filename, char const *mode);
31long NF_close(int fd);
32long NF_read(int fd, void *buf, long size);
33long NF_filelength(int fd);
34long NF_tell(int fd);
35long NF_seek(int fd, long offset);
36int NF_set_file_server(net_address *addr);
37
38int request_server_entry();
39int server_entry_continue();
40void net_reload();
41void read_new_views();
42int set_file_server(char const *name);
43int set_file_server(net_address *addr);
44
45int join_remote_game(char *name);
46int become_server(char *name);
47int get_remote_lsf(net_address *addr, char *filename);   // filename should be 256 bytes
48
49
50void send_local_request();                          // sends from *base
51int get_inputs_from_server(unsigned char *buf);     // return bytes read into buf (will be less than PACKET_MAX_SIZE
52
53
54int client_number();
55extern net_address *net_server;
56extern base_memory_struct *base;   // points to shm_addr
57
58#endif
59#endif
Note: See TracBrowser for help on using the repository browser.