network_data.h
changeset 1804 fbe724472bb4
parent 1466 93e67e9654c5
child 1820 d03c56850dc2
equal deleted inserted replaced
1803:8fd9dca6d2c6 1804:fbe724472bb4
    31 	byte buffer[SEND_MTU];
    31 	byte buffer[SEND_MTU];
    32 } Packet;
    32 } Packet;
    33 
    33 
    34 typedef struct CommandPacket {
    34 typedef struct CommandPacket {
    35 	struct CommandPacket *next;
    35 	struct CommandPacket *next;
    36 	byte player;
    36 	byte player;   /// player that is executing the command (PlayerID)
    37 	uint32 cmd;
    37 	uint32 cmd;    /// command being executed
    38 	uint32 p1;
    38 	uint32 p1;     /// parameter p1
    39 	uint32 p2;
    39 	uint32 p2;     /// parameter p2
    40 	uint32 tile; // Always make it uint32, so it is bigmap compatible
    40 	uint32 tile;   /// tile command being executed on ; always make it uint32, so it is bigmap compatible (TileIndex)
    41 	uint32 dp[20]; // decode_params
    41 	uint32 dp[20]; /// _decode_parameters (for sending strings, etc.)
    42 	uint32 frame; // In which frame must this packet be executed?
    42 	uint32 frame;  /// the frame in which this packet is executed
    43 	byte callback;
    43 	byte callback; /// any callback function executed upon successful completion of the command
    44 } CommandPacket;
    44 } CommandPacket;
    45 
    45 
    46 typedef enum {
    46 typedef enum {
    47 	STATUS_INACTIVE,
    47 	STATUS_INACTIVE,
    48 	STATUS_AUTH, // This means that the client is authorized
    48 	STATUS_AUTH, // This means that the client is authorized