summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/starfield.h
authorandyq <andyq>2003-01-20 23:11:56 (UTC)
committer andyq <andyq>2003-01-20 23:11:56 (UTC)
commit92419b025aa5d82bb7592281af5505ff931c2e58 (patch) (unidiff)
tree374ee9ca86ef716ce388c8a28e38261f6a04ce7a /noncore/games/sfcave-sdl/starfield.h
parent02090d2e63ad8398c0a8a9f1fb895a9c6e42514b (diff)
downloadopie-92419b025aa5d82bb7592281af5505ff931c2e58.zip
opie-92419b025aa5d82bb7592281af5505ff931c2e58.tar.gz
opie-92419b025aa5d82bb7592281af5505ff931c2e58.tar.bz2
Initial Revision
Diffstat (limited to 'noncore/games/sfcave-sdl/starfield.h') (more/less context) (show 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