summaryrefslogtreecommitdiff
path: root/src/base/item.h
diff options
context:
space:
mode:
authorxHire <xhire@tuxportal.cz>2008-10-25 14:11:06 +0200
committerxHire <xhire@tuxportal.cz>2008-10-25 14:11:06 +0200
commitc8a9209d77a896bf49227e5aeccd54e91ccf29cc (patch)
tree6b7367406ebbc6ce3ea5e0c8668c75f6fb3f6ae9 /src/base/item.h
parentcb9deba915dd7b114eeb76601eb1c8b07c1ba90f (diff)
Changed style of the code to the K&R standard
Diffstat (limited to 'src/base/item.h')
-rw-r--r--src/base/item.h85
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);