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

Last change on this file since 528 was 524, checked in by Sam Hocevar, 11 years ago

core: Get rid of mostly useless headers, move endianness handling to
common.h (and rewrite functions so that they do not need the SDL headers)
and move a few functions out of sdlport's video.cpp. These functions
were in the original video.cpp (which reappears) and shouldn't be part
of the SDL port.

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