summaryrefslogtreecommitdiff
path: root/noncore/games/kbill/Monster.h
authormark <mark>2002-04-14 17:08:03 (UTC)
committer mark <mark>2002-04-14 17:08:03 (UTC)
commitbfeb067c8acfb5f1797fdc886ac71ca1b10ccf57 (patch) (side-by-side diff)
treead77e90c90f4bfb598bbe93aa4b3e14b689c96f4 /noncore/games/kbill/Monster.h
parenta0fe593db4e700989cc19e28b67a58f87823afeb (diff)
downloadopie-bfeb067c8acfb5f1797fdc886ac71ca1b10ccf57.zip
opie-bfeb067c8acfb5f1797fdc886ac71ca1b10ccf57.tar.gz
opie-bfeb067c8acfb5f1797fdc886ac71ca1b10ccf57.tar.bz2
Import of kbill
Diffstat (limited to 'noncore/games/kbill/Monster.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kbill/Monster.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/games/kbill/Monster.h b/noncore/games/kbill/Monster.h
new file mode 100644
index 0000000..84a8961
--- a/dev/null
+++ b/noncore/games/kbill/Monster.h
@@ -0,0 +1,53 @@
+#ifndef BILL_H
+#define BILL_H
+
+#include "Picture.h"
+
+class Monster { /*structure for Bills*/
+public:
+ int state; /*what is it doing?*/
+ int index; /*index to animation frame*/
+ Picture *cels; /*pointer to array of animation frames*/
+ int x, y; /*location*/
+ int target_x; /*target x position*/
+ int target_y; /*target y position*/
+ int target_c; /*target computer*/
+ int cargo; /*which OS carried*/
+ int x_offset; /*accounts for width differences*/
+ int y_offset; /*'bounce' factor for OS carried*/
+ int sx, sy; /*used for drawing extra OS during switch*/
+
+ static const int SLOW = 0; /* speeds of moving bills */
+ static const int FAST = 1;
+
+ static const int OFF = 0; /* Bill's states */
+ static const int IN = 1;
+ static const int AT = 2;
+ static const int OUT = 3;
+ static const int DYING = 4;
+ static const int STRAY = 5;
+
+ static const int GRAVITY = 3; /*speed at which os drops*/
+
+ static const int XOFFSET = 20; /*offset from right of computer*/
+ static const int YOFFSET = 3; /*offset from top of computer*/
+
+ void get_border();
+ void enter();
+ int move(int mode);
+ void draw();
+ void draw_std();
+ void draw_at();
+ void draw_stray();
+ void update();
+ void update_in();
+ void update_at();
+ void update_out();
+ void update_dying();
+ int clicked(int locx, int locy);
+ int clickedstray(int locx, int locy);
+ int step_size(unsigned int lev);
+
+};
+
+#endif