119 |
119 |
120 /* network.c */ |
120 /* network.c */ |
121 typedef void CommandCallback(bool success, uint tile, uint32 p1, uint32 p2); |
121 typedef void CommandCallback(bool success, uint tile, uint32 p1, uint32 p2); |
122 bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd); |
122 bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd); |
123 |
123 |
124 void NetworkConnect(const char *hostname, int port); |
|
125 void NetworkReceive(); |
124 void NetworkReceive(); |
126 void NetworkSend(); |
125 void NetworkSend(); |
127 void NetworkProcessCommands(); |
126 void NetworkProcessCommands(); |
128 void NetworkListen(int port); |
127 void NetworkListen(); |
129 void NetworkInitialize(const char *hostname); |
128 void NetworkInitialize(); |
130 void NetworkShutdown(); |
129 void NetworkShutdown(); |
131 void NetworkSendCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback); |
130 void NetworkSendCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback); |
132 void NetworkStartSync(); |
131 void NetworkStartSync(bool fcreset); |
133 void NetworkUDPListen(int port); |
132 void NetworkClose(bool client); |
134 void NetworkUDPReceive(); |
133 |
135 void NetworkIPListInit(); |
134 void NetworkIPListInit(); |
136 bool NetworkUDPSearchServer(); |
135 |
|
136 void NetworkCoreInit(); |
|
137 void NetworkCoreShutdown(); |
|
138 void NetworkCoreDisconnect(); |
|
139 void NetworkCoreLoop(bool incomming); |
|
140 bool NetworkCoreConnectGame(byte* b, unsigned short port); |
|
141 bool NetworkCoreStartGame(); |
|
142 |
|
143 void NetworkLobbyShutdown(); |
|
144 void NetworkLobbyInit(); |
|
145 |
|
146 void NetworkGameListClear(); |
|
147 char * NetworkGameListAdd(); |
|
148 void NetworkGameListFromLAN(); |
|
149 void NetworkGameListFromInternet(); |
|
150 char * NetworkGameListItem(uint16 index); |
|
151 |
|
152 void NetworkGameFillDefaults(); |
|
153 void NetworkGameChangeDate(uint16 newdate); |
137 |
154 |
138 /* misc_cmd.c */ |
155 /* misc_cmd.c */ |
139 void PlaceTreesRandomly(); |
156 void PlaceTreesRandomly(); |
140 |
157 |
141 uint GetTileDist(TileIndex xy1, TileIndex xy2); |
158 uint GetTileDist(TileIndex xy1, TileIndex xy2); |