diff options
Diffstat (limited to 'src/base/item.h')
| -rw-r--r-- | src/base/item.h | 85 |
1 files changed, 42 insertions, 43 deletions
diff --git a/src/base/item.h b/src/base/item.h index f007e59..5782ffa 100644 --- a/src/base/item.h +++ b/src/base/item.h @@ -1,52 +1,51 @@ #ifndef ITEM_H -#define ITEM_H -#define ITEM_SYNC_TIMEOUT 5000 -#ifdef __WIN32__ -#define random rand -#endif -#define ITEM_MAX_COUNT 1 -#define ITEM_GUN_MAX_FRAME 8 -#define ITEM_MINE_MAX_FRAME 1 -#define ITEM_EXPLOSION_MAX_FRAME 10 -#define ITEM_BONUS_MAX_FRAME 8 -#define ITEM_GUN_WIDTH 50 -#define ITEM_GUN_HEIGHT 20 -#define ITEM_MINE_WIDTH 15 -#define ITEM_MINE_HEIGHT 11 -#define ITEM_EXPLOSION_WIDTH 40 -#define ITEM_EXPLOSION_HEIGHT 40 -#define ITEM_BIG_EXPLOSION_WIDTH 100 -#define ITEM_BIG_EXPLOSION_HEIGHT 100 -#define ITEM_BONUS_WIDTH 20 -#define ITEM_BONUS_HEIGHT 20 +# define ITEM_H +# define ITEM_SYNC_TIMEOUT 5000 +# ifdef __WIN32__ +# define random rand +# endif +# define ITEM_MAX_COUNT 1 +# define ITEM_GUN_MAX_FRAME 8 +# define ITEM_MINE_MAX_FRAME 1 +# define ITEM_EXPLOSION_MAX_FRAME 10 +# define ITEM_BONUS_MAX_FRAME 8 +# define ITEM_GUN_WIDTH 50 +# define ITEM_GUN_HEIGHT 20 +# define ITEM_MINE_WIDTH 15 +# define ITEM_MINE_HEIGHT 11 +# define ITEM_EXPLOSION_WIDTH 40 +# define ITEM_EXPLOSION_HEIGHT 40 +# define ITEM_BIG_EXPLOSION_WIDTH 100 +# define ITEM_BIG_EXPLOSION_HEIGHT 100 +# define ITEM_BONUS_WIDTH 20 +# define ITEM_BONUS_HEIGHT 20 -#include "main.h" -#ifndef PUBLIC_SERVER -#include "image.h" -#endif -#include "list.h" -#include "tux.h" -#include "myTimer.h" +# include "main.h" +# ifndef PUBLIC_SERVER +# include "image.h" +# endif +# include "list.h" +# include "tux.h" +# include "myTimer.h" -typedef struct item_struct -{ - int id; - int type; // type of thing +typedef struct item_struct { + int id; + int type; // type of thing - int x; // item position - int y; + int x; // item position + int y; - int w; // item size - int h; + int w; // item size + int h; - int frame; //number of animation - int count; + int frame; //number of animation + int count; - int author_id; -#ifndef PUBLIC_SERVER - image_t *img; //picture -#endif + int author_id; +# ifndef PUBLIC_SERVER + image_t *img; //picture +# endif } item_t; extern bool_t isItemInicialized(); @@ -56,10 +55,10 @@ extern void getStatusItem(void *p, int *id, int *x, int *y, int *w, int *h); extern void setStatusItem(void *p, int x, int y, int w, int h); extern void replaceItemID(item_t * item, int id); extern void addNewItem(space_t * spaceItem, int author_id); -#ifndef PUBLIC_SERVER +# ifndef PUBLIC_SERVER extern void drawItem(item_t * p); extern void drawListItem(list_t * listItem); -#endif +# endif extern void eventListItem(space_t * listSpace); extern void eventConflictShotWithItem(arena_t * arena); extern void eventGiveTuxItem(tux_t * tux, item_t * item, space_t * spaceItem); |