From 2d776fcd61be168e1ff0ff2e4a5e71835e7cea19 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sat, 28 Jun 2008 16:38:35 +0000 Subject: - prekopanie adresarovej struktury, prva cast git-svn-id: http://opensvn.csie.org/tuxanci_ng@77 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/base/shot.h | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/base/shot.h (limited to 'src/base/shot.h') diff --git a/src/base/shot.h b/src/base/shot.h new file mode 100644 index 0000000..db157cb --- /dev/null +++ b/src/base/shot.h @@ -0,0 +1,61 @@ + +#ifndef SHOT_H + +#define SHOT_H + +#include "base/main.h" +#include "base/list.h" +#include "base/tux.h" +#include "base/arena.h" + +#ifndef PUBLIC_SERVER +#include "client/interface.h" +#endif + +typedef struct shot_struct +{ + int id; + + int x; + int y; + + int w; + int h; + + int px; + int py; + + int position; + int gun; + + int author_id; + bool_t isCanKillAuthor; + +#ifndef PUBLIC_SERVER + SDL_Surface *img; +#endif +} shot_t; + +extern bool_t isShotInicialized(); +extern void initShot(); +extern shot_t* newShot(int x,int y, int px, int py, int gun, int author_id); +extern shot_t* getShotID(list_t *listShot, int id); +extern void replaceShotID(shot_t *shot, int id); +extern void getStatusShot(void *p, int *id, int *x,int *y, int *w, int *h); +extern void setStatusShot(void *p, int x, int y, int w, int h); +#ifndef PUBLIC_SERVER +extern void drawShot(shot_t *p); +extern void drawListShot(list_t *listShot); +#endif +extern int isConflictWithListShot(list_t *listShot, int x, int y, int w, int h); +extern void eventMoveListShot(arena_t *arena); +extern void checkShotIsInTuxScreen(arena_t *arena); + +extern void boundBombBall(shot_t *shot); +extern void transformOnlyLasser(shot_t *shot); + +extern void destroyShot(shot_t *p); +extern void quitShot(); + +#endif + -- cgit v1.2.3