Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members

waveManager.h

Go to the documentation of this file.
00001 #ifndef WAVEMANAGER_H
00002 #define WAVEMANAGER_H
00003 
00004 #include <GL/glut.h>
00005 
00006 #include "ssgaWaveSystem2.h"
00007 
00008 #define WM_ACTIVE_WAVESYSTEMS 9
00009 #define WM_WS_SIZE 1004
00010 #define WM_WS_TRANSLOC 1000
00011 
00012 class waveManager {
00013   public:
00014     waveManager(int x, int y);
00015     void update(float dt);
00016     void set_center(int x, int y);
00017     void prepare_move(int x, int y);
00018   private:
00019     void first_init();
00020     void _reset_prep_null();
00021     void fill_wavesystem(ssgaWaveSystem2* tws, float ws, float wd);
00022     ssgaWaveSystem2* make_ws(int poly);
00023    
00024     ssgaWaveSystem2* active_ws[WM_ACTIVE_WAVESYSTEMS];
00025     // 0 1 2
00026     // 3 4 5
00027     // 6 7 8   where 4 is the current sector
00028     ssgaWaveSystem2* prepared_ws[WM_ACTIVE_WAVESYSTEMS];
00029     // thus going north:
00030     // i > 2 : i -> i - 3
00031     // south
00032     // i < 6 : i -> i + 3
00033     // west
00034     // i % 3 == 0 || i % 3 == 1 : i -> i + 1
00035     // east
00036     // i % 3 == 0 || i % 3 == 1 : i -> i - 1
00037    
00038     ssgTransform* ws_transforms[WM_ACTIVE_WAVESYSTEMS];
00039     
00040     int curr_x;
00041     int curr_y;
00042     ssgSimpleState* sea_state;
00043 };
00044 
00045 #endif
00046 

Generated on Sat Jul 12 04:29:21 2003 for glPirates by doxygen 1.3.2