~ubuntu-branches/ubuntu/hardy/xbill/hardy

« back to all changes in this revision

Viewing changes to Game.h

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Bridgett
  • Date: 2004-09-07 09:52:14 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040907095214-d0m46ojc8f7upuqm
Tags: 2.1-4
maintainer upload of NMU - many thanks Tollef (closes: #268885) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef GAME_H
2
2
#define GAME_H
3
3
 
4
 
#include "objects.h"
5
 
 
6
 
class Game {
7
 
        unsigned state;
8
 
        int efficiency;
9
 
public:
10
 
        unsigned score, level, iteration;
11
 
        Picture logo;
12
 
        int grabbed;
13
 
 
14
 
        static const unsigned short scrwidth = 400;
15
 
        static const unsigned short scrheight = 400;
16
 
 
17
 
        static const int PLAYING = 1;
18
 
        static const int BETWEEN = 2;
19
 
        static const int END = 3;
20
 
        static const int WAITING = 4;
21
 
 
22
 
        static const int DEFAULTC = 0;          /* cursors */
23
 
        static const int DOWNC = -1;
24
 
        static const int BUCKETC = -2;
25
 
 
26
 
        static const int ENDGAME = 200;         /* dialog window IDs */
27
 
        static const int ENTERNAME = 201;
28
 
        static const int HIGHSCORE = 202;
29
 
        static const int SCORE = 203;
30
 
 
31
 
        static const int ENDLEVEL = -1;         /* Codes for updating score */
32
 
        static const int BILLPOINTS = 5;
33
 
 
34
 
        static const int EMPTY = -2;            /* Grabbed object */
35
 
        static const int BUCKET = -1;
36
 
 
37
 
        int RAND(int lb, int ub);
38
 
        int MAX(int x, int y);
39
 
        int MIN(int x, int y);
40
 
        int INTERSECT(int x1, int y1, int w1, int h1, int x2, int y2, int w2,
41
 
                int h2);
42
 
 
43
 
        void setup_level (unsigned int lev);
44
 
        void start(unsigned int lev);
45
 
        void quit();
46
 
        void update_info();
47
 
        void update_score (int action);
48
 
        void warp_to_level (unsigned int lev);
49
 
        void button_press(int x, int y);
50
 
        void button_release(int x, int y);
51
 
        void update();
52
 
        void main(int argc, char **argv);
53
 
};
 
4
void Game_start(int newlevel);
 
5
void Game_quit(void);
 
6
void Game_warp_to_level(int lev);
 
7
void Game_add_high_score(const char *str);
 
8
void Game_button_press(int x, int y);
 
9
void Game_button_release(int x, int y);
 
10
void Game_update(void);
 
11
 
 
12
int Game_score(void);
 
13
int Game_level(void);
 
14
int Game_screensize(void);
 
15
double Game_scale(int dimensions);
54
16
 
55
17
#endif