summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/arena.h4
-rw-r--r--include/pipe.h36
-rw-r--r--include/shot.h7
-rw-r--r--include/teleport.h31
-rw-r--r--include/tux.h5
5 files changed, 79 insertions, 4 deletions
diff --git a/include/arena.h b/include/arena.h
index 59290fd..38a0a18 100644
--- a/include/arena.h
+++ b/include/arena.h
@@ -10,11 +10,15 @@
typedef struct arena_struct
{
char music[STR_SIZE];
+
SDL_Surface *background;
+
list_t *listTux;
list_t *listShot;
list_t *listWall;
list_t *listItem;
+ list_t *listTeleport;
+ list_t *listPipe;
} arena_t;
extern arena_t* newArena();
diff --git a/include/pipe.h b/include/pipe.h
new file mode 100644
index 0000000..e665e0a
--- /dev/null
+++ b/include/pipe.h
@@ -0,0 +1,36 @@
+
+#ifndef PIPE_H
+
+#define PIPE_H
+
+#include "interface.h"
+#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
+
+ SDL_Surface *img; //obrazok
+} pipe_t;
+
+extern pipe_t* newPipe(int x, int y, int w, int h, int layer,
+ int id, int id_out, int position, SDL_Surface *img);
+
+extern void drawPipe(pipe_t *p);
+extern void drawListPipe(list_t *listPipe);
+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 c248538..749767f 100644
--- a/include/shot.h
+++ b/include/shot.h
@@ -19,8 +19,7 @@ typedef struct shot_struct
int px;
int py;
- int course;
- int speed;
+ int position;
int gun;
tux_t *author;
@@ -36,6 +35,10 @@ extern void drawShot(shot_t *p);
extern void drawListShot(list_t *listShot);
extern int isConflictWithListShot(list_t *listShot, int x, int y, int w, int h);
extern void eventMoveListShot(list_t *listShot);
+
+extern void moveShot(shot_t *shot, int position, int src_x, int src_y,
+ int dist_x, int dist_y, int dist_w, int dist_h);
+
extern void destroyShot(shot_t *p);
extern void quitShot();
diff --git a/include/teleport.h b/include/teleport.h
new file mode 100644
index 0000000..4b9ed66
--- /dev/null
+++ b/include/teleport.h
@@ -0,0 +1,31 @@
+
+#ifndef TELEPORT_H
+
+#define TELEPORT_H
+
+#include <interface.h>
+#include "list.h"
+
+typedef struct teleport_struct
+{
+ int x; // poloha steny
+ int y;
+
+ int w; // rozmery steny
+ int h;
+
+ int layer; // vrstva
+
+ SDL_Surface *img; //obrazok
+} teleport_t;
+
+extern teleport_t* newTeleport(int x, int y, int w, int h, int layer, SDL_Surface *img);
+extern void drawTeleport(teleport_t *p);
+extern void drawListTeleport(list_t *listTeleport);
+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 ed5e01e..ebc8ac7 100644
--- a/include/tux.h
+++ b/include/tux.h
@@ -10,7 +10,7 @@
#define TUX_LAYER 0
#define TUX_MAX_ANIMATION_FRAME 10
#define TUX_MAX_PICKUP 50
-#define TUX_MAX_BONUS 250
+#define TUX_MAX_BONUS 500
#define TUX_TIME_SPAWN 2000
#define TUX_TIME_CAN_SHOT 500
@@ -107,7 +107,8 @@ extern void drawListTux(list_t *listTux);
extern void eventTuxIsDead(tux_t *tux);
extern tux_t* isConflictWithListTux(list_t *listTux, int x, int y, int w, int h);
extern int isConflictTuxWithListTux(tux_t *tux, list_t *listTux);
-extern void eventConflictShotWithTux(list_t *listTux, list_t *listShot);
+extern void eventConflictTuxWithShot(list_t *listTux, list_t *listShot);
+extern void eventConflictTuxWithTeleport(list_t *listTux, list_t *listTeleport);
extern void tuxTeleport(tux_t *tux);
extern void actionTux(tux_t *tux, int action);
extern void eventListTux(list_t *listTux);