MCPcopy Create free account
hub / github.com/TASEmulators/fceux / MakeMPS

Function MakeMPS

fceux-server/server.cpp:212–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212static uint8 *MakeMPS(ClientEntry *client)
213{
214 static uint8 buf[64];
215 uint8 *bp = buf;
216 int x;
217 GameEntry *game = (GameEntry *)client->game;
218
219 for(x=0;x<4;x++)
220 {
221 if(game->Players[x] == client)
222 {
223 *bp = '0' + x + 1;
224 bp++;
225 *bp = ',';
226 bp++;
227 }
228 }
229 if(*(bp-1) == ',') bp--;
230
231 *bp = 0;
232 return(buf);
233}
234
235/* Returns 1 if we are back to normal game mode, 0 if more data is yet to arrive. */
236static int CheckNBTCPReceive(ClientEntry *client) throw()

Callers 2

CheckNBTCPReceiveFunction · 0.85
KillClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected