1234567891011121314151617181920212223242526272829303132333435363738 |
- # ifndef TERRAIN_HEADER_FILE
- # define TERRAIN_HEADER_FILE
- // Basiques
- # include <iostream>
- # include <vector>
- // Random
- # include <ctime>
- # include <cstdlib>
- // SDL
- # include <SDL/SDL.h>
- # undef main
- # include <SDL/SDL_gfxPrimitives.h>
- // bBox2D
- # include <box2d/box2d.h>
- # define MULTI 100.0f
- class Terrain
- {
- public:
- Terrain( const unsigned int size );
- ~Terrain();
-
- void addPlot( float x, float y );
- void build( b2World &world );
- void draw( SDL_Surface* screen, b2Vec2 origin );
- protected :
- const unsigned int m_size ;
- unsigned int m_nextAdd ;
- b2Vec2* m_plot; // Static array
- };
- # endif // TERRAIN_HEADER_FILE
|