37 lines
850 B
C
37 lines
850 B
C
/* =============================================================================
|
|
* # Server Transactions.
|
|
* Transactions in the contexts of a entity, is an action. This action could be
|
|
* anything that my include moving, shooting, douging, etc.
|
|
*
|
|
* Transactions take an entity id, action id, argsize and user
|
|
*
|
|
*
|
|
* =============================================================================
|
|
* */
|
|
#ifndef TRANSACTIONS_H
|
|
|
|
#define ENTITY_ACTION_MOVE_UP 1
|
|
#define ENTITY_ACTION_MOVE_DOWN 2
|
|
#define ENTITY_ACTION_MOVE_LEFT 3
|
|
#define ENTITY_ACTION_MOVE_RIGHT 4
|
|
|
|
|
|
typedef struct {
|
|
int packetTpye, size;
|
|
void* packet;
|
|
}packet;
|
|
|
|
typedef struct {
|
|
int id;
|
|
int action;
|
|
int argsize;
|
|
void* userArg;
|
|
}action;
|
|
|
|
int CreateTransaction(action* act);
|
|
int GetTransaction(action* act);
|
|
int ProssesTransaction(action* act);
|
|
|
|
#define TRANSACTIONS_H
|
|
#endif
|