-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgraphics.h
executable file
·217 lines (185 loc) · 6.11 KB
/
graphics.h
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/**************
* File Name: graphics.h
* Author: G. J. Krafsig
* Date: July 3rd, 2007
* Purpose: header files for game engine graphics
**************/
#ifndef GAMEGRAPHICS_H
#define GAMEGRAPHICS_H
#include <cstdlib>
#include <cmath>
#include <allegro.h>
#include "sprite.h"
#include "game.h"
//backgroung image
#define BGIMAGE "images/bg.pcx"
//character images
#define ALEXIMAGE "images/person1.pcx" //pigtail boy
#define KITTYIMAGE "images/person2.pcx" //cat girl
#define TANYAIMAGE "images/person3.pcx" //pirate girl
#define LISAIMAGE "images/person4.pcx" //flower girl
#define RAVENIMAGE "images/person5.pcx" //pricess girl
#define BELLAIMAGE "images/person6.pcx" //bunny girl
//character name images
#define ALEXNAMEIMAGE ""
#define KITTYNAMEIMAGE ""
#define TANYANAMEIMAGE ""
#define LISANAMEIMAGE ""
#define RAVENNAMEIMAGE ""
#define BELLANAMEIMAE ""
//game obstacles
#define ROCKIMAGE "images/rock.pcx"
#define TALLTREEIMAGE "images/tree2.pcx"
#define SHRUBIMAGE "images/tree1.pcx"
#define BUSHIMAGE "images/tree3.pcx"
#define BUGIMAGE ""
//jewels
#define BLUEJEWELIMAGE "images/gem1.pcx"
#define GREENJEWELIMAGE "images/gem2.pcx"
#define YELLOWJEWELIMAGE "images/gem3.pcx"
//selector image
#define SELECTIMAGE "images/select.pcx"
//store items
#define SHOVELIMAGE ""
#define DYNAMITEIMAGE ""
#define FIRSTAIDIMAGE ""
//side menu images
#define STARIMAGE "images/star.pcx"
#define HEARTIMAGE "images/heart.pcx"
#define KEYIMAGE "images/key.pcx"
#define TALKBOXIMAGE "images/talkbox.pcx"
#define TALKBUBBLEIMAGE "images/talkbubble.pcx"
#define STOREIMAGE "images/store.pcx"
//ground block images
#define WOODIMAGE "images/block10.pcx"
#define WATERIMAGE "images/block9.pcx"
#define THOUSEIMAGE "images/block8.pcx"
#define HOUSEIMAGE "images/block7.pcx"
#define TSTONEIMAGE "images/block6.pcx"
#define STONEIMAGE "images/block5.pcx"
#define GRAYIMAGE "images/block4.pcx"
#define GRASSIMAGE "images/block3.pcx"
#define DIRTIMAGE "images/block2.pcx"
#define BROWNIMAGE "images/block1.pcx"
//house block images
#define WINDOWIMAGE "images/window.pcx"
#define CLOSEDDOORIMAGE "images/closeddoor.pcx"
#define OPENDOORIMAGE "images/dooropen.pcx"
#define ROOFNORTHIMAGE "images/roof5.pcx"
#define ROOFNORTHEASTIMAGE "images/roof4.pcx"
#define ROOFEASTIMAGE "images/roof3.pcx"
#define ROOFSOUTHEASTIMAGE "images/roof2.pcx"
#define ROOFSOUTHIMAGE "images/roof1.pcx"
#define ROOFNORTHWESTIMAGE "images/roof6.pcx"
//ramp block image
#define RAMPNORTHIMAGE "images/ramp1.pcx"
#define RAMPSOUTHIMAGE "images/ramp3.pcx"
#define RAMPEASTIMAGE "images/ramp2.pcx"
#define RAMPWESTIMAGE "images/ramp4.pcx"
//shadow images
#define SHADOWNORTHIMAGE ""
#define SHADOWSOUTHIMAGE ""
#define SHADOWEASTIMAGE ""
#define SHADOWWESTIMAGE ""
#define SHADOWNORTEASTIMAGE ""
#define SHADOWNORTHWESTIMAGE ""
#define SHADOWSOUTEASTIMAGE ""
#define SHADOWSOUTHWESTIMAGE ""
class gamegraphics
{
public:
gamegraphics(); //class constructor
/******************
* Purpose: loading/destroying game graphics
* EXCLUDING:
* menu graphics
* movie graphics
* and music graphics
******************/
void loadGraphics();
void destoryGraphics();
//position an image on a larger screen
BITMAP *blitBigger(BITMAP *image, int x, int y, int width, int height);
BITMAP *blitSmaller(BITMAP *image, int width, int height, double divisor);
//return the block image for this block number
BITMAP *getBlock(int block);
//background image
BITMAP *bgimg;
//character images
BITMAP *aleximg;
BITMAP *kittyimg;
BITMAP *tanyaimg;
BITMAP *lisaimg;
BITMAP *ravenimg;
BITMAP *bellaimg;
//character name images
BITMAP *alexnameimg;
BITMAP *kittynameimg;
BITMAP *tanyanameimg;
BITMAP *lisanameimg;
BITMAP *ravennameimg;
BITMAP *bellanameimg;
//game obstacles
BITMAP *rockimg;
BITMAP *talltreeimg;
BITMAP *shrubimg;
BITMAP *bushimg;
BITMAP *bugimg;
//jewels
BITMAP *bluejewelimg;
BITMAP *greenjewelimg;
BITMAP *yellowjewelimg;
//store items
BITMAP *shovelimg;
BITMAP *dynamiteimg;
BITMAP *firstaidimg;
//side menu images
BITMAP *starimg;
BITMAP *heartimg;
BITMAP *keyimg;
BITMAP *talkboximg;
BITMAP *talkbubbleimg;
BITMAP *storeimg;
//selector
BITMAP *selectimg;
//ground block images
BITMAP *woodimg;
BITMAP *waterimg;
BITMAP *thouseimg;
BITMAP *houseimg;
BITMAP *tstoneimg;
BITMAP *stoneimg;
BITMAP *grayimg;
BITMAP *grassimg;
BITMAP *dirtimg;
BITMAP *brownimg;
//house block images
BITMAP *windowimg;
BITMAP *closeddoorimg;
BITMAP *opendoorimg;
BITMAP *roofnorthimg;
BITMAP *roofnortheastimg;
BITMAP *roofeastimg;
BITMAP *roofsoutheastimg;
BITMAP *roofsouthimg;
BITMAP *roofsouthwestimg;
BITMAP *roofwestimg;
BITMAP *roofnorthwestimg;
//ramp block image
BITMAP *rampnorthimg;
BITMAP *rampsouthimg;
BITMAP *rampeastimg;
BITMAP *rampwestimg;
//shadow images
BITMAP *shadownorthimg;
BITMAP *shadowsouthimg;
BITMAP *shadoweastimag;
BITMAP *shadowwestimg;
BITMAP *shadownortheastimg;
BITMAP *shadownorthwestimg;
BITMAP *shadowsoutheastimg;
BITMAP *shadowsouthwestimg;
//screen capture of the board before a character is on it
BITMAP *boardimg;
};
#endif