diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/idManager.h | 3 | ||||
| -rw-r--r-- | include/item.h | 1 | ||||
| -rwxr-xr-x | include/layer.h | 1 | ||||
| -rw-r--r-- | include/pipe.h | 50 | ||||
| -rw-r--r-- | include/shot.h | 1 | ||||
| -rw-r--r-- | include/teleport.h | 45 | ||||
| -rw-r--r-- | include/tux.h | 3 | ||||
| -rw-r--r-- | include/wall.h | 49 |
8 files changed, 6 insertions, 147 deletions
diff --git a/include/idManager.h b/include/idManager.h index a525a56..1684186 100644 --- a/include/idManager.h +++ b/include/idManager.h @@ -4,7 +4,8 @@ #define ID_MANAGER_H -#define MAX_ID 1000 +#define MAX_ID 1000 +#define ID_UNKNOWN -1 #include "list.h" diff --git a/include/item.h b/include/item.h index 3413452..7c1043a 100644 --- a/include/item.h +++ b/include/item.h @@ -62,6 +62,7 @@ extern bool_t isItemInicialized(); extern void initItem(); extern item_t* newItem(int x, int y, int type, int author_id); extern item_t* getItemID(list_t *listItem, int id); +extern void replaceItemID(item_t *item, int id); extern void addNewItem(list_t *listItem, int author_id); #ifndef PUBLIC_SERVER extern void drawItem(item_t *p); diff --git a/include/layer.h b/include/layer.h index 1aded63..04a4617 100755 --- a/include/layer.h +++ b/include/layer.h @@ -47,6 +47,7 @@ extern void addLayer(SDL_Surface *img, */ extern void drawLayer(); extern void drawLayerCenter(int x, int y); +extern void flushLayer(); extern void quitLayer(); #endif diff --git a/include/pipe.h b/include/pipe.h deleted file mode 100644 index af8e180..0000000 --- a/include/pipe.h +++ /dev/null @@ -1,50 +0,0 @@ - -#ifndef PIPE_H - -#define PIPE_H - -#include "main.h" -#ifndef PUBLIC_SERVER -#include "interface.h" -#endif -#include "list.h" - -typedef struct pipe_struct -{ - int x; // poloha steny - int y; - - int w; // rozmery steny - int h; - - int id; - int id_out; - int position; - - int layer; // vrstva - -#ifndef PUBLIC_SERVER - SDL_Surface *img; //obrazok -#endif -} pipe_t; - -#ifndef PUBLIC_SERVER -extern pipe_t* newPipe(int x, int y, int w, int h, int layer, - int id, int id_out, int position, SDL_Surface *img); -#endif - -#ifdef PUBLIC_SERVER -extern pipe_t* newPipe(int x, int y, int w, int h, int layer, - int id, int id_out, int position); -#endif - -#ifndef PUBLIC_SERVER -extern void drawPipe(pipe_t *p); -extern void drawListPipe(list_t *listPipe); -#endif -extern pipe_t* isConflictWithListPipe(list_t *listPipe, int x, int y, int w, int h); -extern void eventConflictShotWithPipe(list_t *listPipe, list_t *listShot); -extern void destroyPipe(pipe_t *p); - -#endif - diff --git a/include/shot.h b/include/shot.h index 156a736..526727b 100644 --- a/include/shot.h +++ b/include/shot.h @@ -38,6 +38,7 @@ 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); #ifndef PUBLIC_SERVER extern void drawShot(shot_t *p); extern void drawListShot(list_t *listShot); diff --git a/include/teleport.h b/include/teleport.h deleted file mode 100644 index 1101a57..0000000 --- a/include/teleport.h +++ /dev/null @@ -1,45 +0,0 @@ - -#ifndef TELEPORT_H - -#define TELEPORT_H - -#ifndef PUBLIC_SERVER -#include "interface.h" -#endif -#include "main.h" -#include "list.h" - -typedef struct teleport_struct -{ - int x; // poloha steny - int y; - - int w; // rozmery steny - int h; - - int layer; // vrstva - -#ifndef PUBLIC_SERVER - SDL_Surface *img; //obrazok -#endif -} teleport_t; - -#ifndef PUBLIC_SERVER -extern teleport_t* newTeleport(int x, int y, int w, int h, int layer, SDL_Surface *img); -#endif - -#ifdef PUBLIC_SERVER -extern teleport_t* newTeleport(int x, int y, int w, int h, int layer); -#endif - -#ifndef PUBLIC_SERVER -extern void drawTeleport(teleport_t *p); -extern void drawListTeleport(list_t *listTeleport); -#endif -extern teleport_t* isConflictWithListTeleport(list_t *listTeleport, int x, int y, int w, int h); -extern void eventConflictShotWithTeleport(list_t *listTeleport, list_t *listShot); -extern void eventTeleportTux(list_t *listTeleport, teleport_t *teleport, tux_t *tux); -extern void destroyTeleport(teleport_t *p); - -#endif - diff --git a/include/tux.h b/include/tux.h index 05c0c8c..1343274 100644 --- a/include/tux.h +++ b/include/tux.h @@ -6,8 +6,6 @@ #include "main.h" #include "list.h" -#define ID_UNKNOWN -1 - #define TUX_STEP 6 #define TUX_LAYER 0 @@ -123,6 +121,7 @@ extern void actionTux(tux_t *tux, int action); extern void eventListTux(list_t *listTux); extern tux_t* getTuxID(list_t *listTux, int id); extern void getTuxProportion(tux_t *tux, int *x,int *y, int *w, int *h); +extern void replaceTuxID(tux_t *tux, int id); extern void setTuxProportion(tux_t *tux, int x, int y); extern void destroyTux(tux_t *tux); extern void quitTux(); diff --git a/include/wall.h b/include/wall.h deleted file mode 100644 index 1389539..0000000 --- a/include/wall.h +++ /dev/null @@ -1,49 +0,0 @@ - -#ifndef WALL_H - -#define WALL_H - -#include "main.h" - -#ifndef PUBLIC_SERVER -#include "interface.h" -#endif - -#include "list.h" - -typedef struct wall_struct -{ - int x; // poloha steny - int y; - - int w; // rozmery steny - int h; - - int img_x; // poloha obrazka - int img_y; - - int layer; // vrstva - -#ifndef PUBLIC_SERVER - SDL_Surface *img; //obrazok -#endif -} wall_t; - -#ifndef PUBLIC_SERVER -extern wall_t* newWall(int x, int y, int w, int h, - int img_x, int img_y, int layer, SDL_Surface *img); -#endif - -#ifdef PUBLIC_SERVER -extern wall_t* newWall(int x, int y, int w, int h, - int img_x, int img_y, int layer); -#endif - -extern void drawWall(wall_t *p); -extern void drawListWall(list_t *listWall); -extern int isConflictWithListWall(list_t *listWall, int x, int y, int w, int h); -extern void eventConflictShotWithWall(list_t *listWall, list_t *listShot); -extern void destroyWall(wall_t *p); - -#endif - |