summaryrefslogtreecommitdiff
path: root/include/tux.h
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-02-01 22:59:06 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-02-01 22:59:06 +0000
commit6d4e1eae16b84918009625a866104ec26a234277 (patch)
treea340a8a547a60c9f63c8dfafe8909242f9c9bbd8 /include/tux.h
nahranie tarballu tuxanci-ng na SVN server
Dusan Durech ( Oroborus ) git-svn-id: http://opensvn.csie.org/tuxanci_ng@1 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'include/tux.h')
-rw-r--r--include/tux.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/include/tux.h b/include/tux.h
new file mode 100644
index 0000000..072cbbe
--- /dev/null
+++ b/include/tux.h
@@ -0,0 +1,117 @@
+
+#ifndef TUX_H
+
+#define TUX_H
+
+#include "main.h"
+#include "list.h"
+
+#define TUX_STEP 4
+#define TUX_LAYER 0
+#define TUX_MAX_ANIMATION_FRAME 10
+#define TUX_MAX_PICKUP 50
+#define TUX_MAX_BONUS 500
+
+#define TUX_TIME_SPAWN 2000
+#define TUX_TIME_CAN_SHOT 500
+#define TUX_TIME_CAN_SWITCH_GUN 100
+
+#define TUX_STATUS_ALIVE 0
+#define TUX_STATUS_DEAD 1
+
+#define TUX_CONTROL_NONE 0
+#define TUX_CONTROL_KEYBOARD_LEFT 1
+#define TUX_CONTROL_KEYBOARD_RIGHT 2
+#define TUX_CONTROL_NET 3
+#define TUX_CONTROL_ROBOT 4
+
+#define TUX_WIDTH 30
+#define TUX_HEIGHT 30
+
+#define TUX_IMG_WIDTH 40
+#define TUX_IMG_HEIGHT 54
+
+#define TUX_UP 8
+#define TUX_LEFT 4
+#define TUX_RIGHT 6
+#define TUX_DOWN 2
+
+
+#define GUN_NONE -1
+
+#define GUN_COUNT 7
+#define GUN_MAX_SHOT 5
+
+#define BONUS_COUNT 6
+#define ITEM_COUNT 16
+
+
+#define GUN_SIMPLE 0
+#define GUN_DUAL_SIMPLE 1
+#define GUN_SCATTER 2
+#define GUN_TOMMY 3
+#define GUN_LASSER 4
+#define GUN_MINE 5
+#define GUN_BOMBBALL 6
+
+#define ITEM_MINE 7
+#define ITEM_EXPLOSION 8
+#define ITEM_BIG_EXPLOSION 9
+
+#define BONUS_NONE -1
+#define BONUS_SPEED 10
+#define BONUS_SHOT 11
+#define BONUS_TELEPORT 12
+#define BONUS_GHOST 13
+#define BONUS_4X 14
+#define BONUS_HIDDEN 15
+
+typedef struct tux_struct
+{
+ int id;
+
+ int x;
+ int y;
+
+ char name[STR_NAME_SIZE];
+
+ int status;
+ int control;
+ int position;
+ int score;
+
+ int gun;
+ int shot[GUN_COUNT];
+ int round;
+ int bonus;
+
+ int bonus_time;
+ int pickup_time;
+
+ bool_t isCanShot;
+ bool_t isCanSwitchGun;
+
+ int frame;
+} tux_t;
+
+extern bool_t isTuxInicialized();
+extern void initTux();
+extern tux_t* newTux();
+extern bool_t isTuxAnyGun(tux_t *tux);
+extern void switchTuxGun(tux_t *tux);
+extern void getCourse(int n, int *x, int *y);
+extern void drawTux(tux_t *p);
+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 void eventConflictShotWithTux(list_t *listTux, list_t *listShot);
+extern void moveTux(tux_t *p,int n);
+extern void shotTux(tux_t *p);
+extern void tuxTeleport(tux_t *tux);
+extern void eventListTux(list_t *listTux);
+extern tux_t* getTuxID(list_t *listTux, int id);
+extern void getTuxProportion(tux_t *p, int *x,int *y, int *w, int *h);
+extern void destroyTux(tux_t *p);
+extern void quitTux();
+
+#endif