1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 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
|