summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/terrain.cpp
Unidiff
Diffstat (limited to 'noncore/games/sfcave-sdl/terrain.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/terrain.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/noncore/games/sfcave-sdl/terrain.cpp b/noncore/games/sfcave-sdl/terrain.cpp
index c001a56..b243f45 100644
--- a/noncore/games/sfcave-sdl/terrain.cpp
+++ b/noncore/games/sfcave-sdl/terrain.cpp
@@ -49,2 +49,3 @@ void Terrain :: initTerrain()
49 SDL_FillRect( terrainSurface, 0, 0 ); 49 SDL_FillRect( terrainSurface, 0, 0 );
50
50 // Draw Terrain into surface 51 // Draw Terrain into surface
@@ -93,3 +94,2 @@ void Terrain :: moveTerrain( int amountToMove )
93 94
94 //printf( "offset - %d, speed - %d\n", offset, speed );
95 if ( offset >= segSize ) 95 if ( offset >= segSize )
@@ -197,3 +197,2 @@ void Terrain :: drawTerrain( SDL_Surface *screen )
197 dst.h = sHeight; 197 dst.h = sHeight;
198 //dst.h = maxHeight;
199 198
@@ -206,18 +205,2 @@ void Terrain :: drawTerrain( SDL_Surface *screen )
206 stars->draw( screen ); 205 stars->draw( screen );
207
208 //dst.y = sHeight - maxHeight;
209 //dst2.y = sHeight - maxHeight;
210 //SDL_BlitSurface(terrainSurface, &dst, screen, &dst2 );
211
212/*
213 for ( int i = 0 ; i < MAPSIZE ; ++i )
214 {
215 int x1 = (i*segSize) - (offset*speed);
216 int x2 = ((i+1)*segSize)-(offset*speed);
217 if ( x2 >= sWidth )
218 x2 = sWidth-1;
219 aalineRGBA( screen, x1, mapTop[i], x2, mapTop[i+1], 0, 220, 0, 255 );
220 aalineRGBA( screen, x1, mapBottom[i], x2, mapBottom[i+1], 0, 220, 0, 255 );
221 }
222*/
223} 206}
@@ -228,2 +211,3 @@ bool Terrain :: checkCollision( int x, int y, int h )
228 return true; 211 return true;
212
229 // First get segment that matches x 213 // First get segment that matches x
@@ -249,3 +233,3 @@ void go()
249{ 233{
250 /* Initialize SDL */ 234 // Initialize SDL
251 if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) 235 if ( SDL_Init(SDL_INIT_VIDEO) < 0 )