Just put screen's width and height as definitions.
authorRicardo Cruz <rick2@aeiou.pt>
Tue, 4 May 2004 11:27:47 +0000 (11:27 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Tue, 4 May 2004 11:27:47 +0000 (11:27 +0000)
SVN-Revision: 964

src/defines.h
src/setup.cpp

index 163f1bd..306a661 100644 (file)
@@ -48,6 +48,11 @@ enum DyingType {
   DYING_FALLING = 2
 };
 
+/* Screen proprities: */
+
+#define SCREEN_W 640
+#define SCREEN_H 480
+
 /* Sizes: */
 
 #define SMALL 0
index b215a59..040f9be 100644 (file)
@@ -664,7 +664,7 @@ void st_video_setup_sdl(void)
 
   if (use_fullscreen)
     {
-      screen = SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN ) ; /* | SDL_HWSURFACE); */
+      screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_FULLSCREEN ) ; /* | SDL_HWSURFACE); */
       if (screen == NULL)
         {
           fprintf(stderr,
@@ -677,7 +677,7 @@ void st_video_setup_sdl(void)
     }
   else
     {
-      screen = SDL_SetVideoMode(640, 480, 0, SDL_HWSURFACE | SDL_DOUBLEBUF );
+      screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_HWSURFACE | SDL_DOUBLEBUF );
 
       if (screen == NULL)
         {
@@ -702,7 +702,7 @@ void st_video_setup_gl(void)
 
   if (use_fullscreen)
     {
-      screen = SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN | SDL_OPENGL) ; /* | SDL_HWSURFACE); */
+      screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_FULLSCREEN | SDL_OPENGL) ; /* | SDL_HWSURFACE); */
       if (screen == NULL)
         {
           fprintf(stderr,
@@ -715,7 +715,7 @@ void st_video_setup_gl(void)
     }
   else
     {
-      screen = SDL_SetVideoMode(640, 480, 0, SDL_OPENGL);
+      screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_OPENGL);
 
       if (screen == NULL)
         {