summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/starfield.h
Unidiff
Diffstat (limited to 'noncore/games/sfcave-sdl/starfield.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/starfield.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/noncore/games/sfcave-sdl/starfield.h b/noncore/games/sfcave-sdl/starfield.h
new file mode 100644
index 0000000..ae9bd34
--- a/dev/null
+++ b/noncore/games/sfcave-sdl/starfield.h
@@ -0,0 +1,41 @@
1#ifndef __STARFIELD_H
2#define __STARFIELD_H
3
4class StarField
5{
6public:
7 StarField( bool side = false, int nrStars = 100, int mx = 240, int my = 320, int minz = 32, int maxz = 725 );
8 ~StarField();
9
10 void init();
11 void move( );
12 void draw( SDL_Surface *screen, int w = 240, int h = 320 );
13
14private:
15 // 3d effect
16 int *x;
17 int *y;
18 int *z;
19
20 int maxX;
21 int maxY;
22 int minZ;
23 int maxZ;
24
25 // Sideways
26 int *star_color;
27 int *vel_x;
28 int *vel_y;
29 int *pos_x;
30 int *pos_y;
31 int min_brightness;
32 int top_star_speed;
33
34 bool sideways;
35 int nrStars;
36
37 void newStar( int i );
38};
39
40
41#endif