stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/game game.c intro.c


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/game game.c intro.c
Date: 15 Jan 2004 13:04:52 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/15 13:04:52

Modified files:
        src/game       : game.c intro.c 

Log message:
        USE_SDL_SURFACE is default

Patches:
Index: stratagus/src/game/game.c
diff -u stratagus/src/game/game.c:1.122 stratagus/src/game/game.c:1.123
--- stratagus/src/game/game.c:1.122     Thu Jan 15 04:45:33 2004
+++ stratagus/src/game/game.c   Thu Jan 15 13:04:51 2004
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: game.c,v 1.122 2004/01/14 17:45:33 jsalmon3 Exp $
+//      $Id: game.c,v 1.123 2004/01/15 02:04:51 jsalmon3 Exp $
 
 //@{
 
@@ -424,9 +424,6 @@
        InitMap();         // setup draw functions
        InitMapFogOfWar(); // build tables for fog of war
        PreprocessMap();   // Adjust map for use
-#ifndef USE_SDL_SURFACE
-       MapColorCycle();   // Setup color cycle
-#endif
 
        InitUserInterface(ThisPlayer->RaceName); // Setup the user interface
        LoadUserInterface(); // Load the user interface grafics
@@ -533,13 +530,7 @@
 
        CommandLog(NULL, NoUnitP, FlushCommands, -1, -1, NoUnitP, NULL, -1);
        DestroyCursorBackground();
-#ifdef USE_SDL_SURFACE
-       VideoClearScreen();
-#else
-       VideoLockScreen();
        VideoClearScreen();
-       VideoUnlockScreen();
-#endif
 }
 
 /**
Index: stratagus/src/game/intro.c
diff -u stratagus/src/game/intro.c:1.120 stratagus/src/game/intro.c:1.121
--- stratagus/src/game/intro.c:1.120    Sat Jan 10 05:55:38 2004
+++ stratagus/src/game/intro.c  Thu Jan 15 13:04:51 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: intro.c,v 1.120 2004/01/09 18:55:38 jsalmon3 Exp $
+//      $Id: intro.c,v 1.121 2004/01/15 02:04:51 jsalmon3 Exp $
 
 //@{
 
@@ -402,13 +402,7 @@
        GameCursor = TheUI.Point.Cursor;
        DestroyCursorBackground();
 
-#ifdef USE_SDL_SURFACE
        VideoClearScreen();
-#else
-       VideoLockScreen();
-       VideoClearScreen();
-       VideoUnlockScreen();
-#endif
 
        old_video_sync = VideoSyncSpeed;
        VideoSyncSpeed = 100;
@@ -492,9 +486,6 @@
                        }
                }
 #endif
-#ifndef USE_SDL_SURFACE
-               VideoLockScreen();
-#endif
                HideAnyCursor();
                //
                // Draw background
@@ -536,10 +527,6 @@
                DrawContinueButton();
                DrawAnyCursor();
 
-#ifndef USE_SDL_SURFACE
-               VideoUnlockScreen();
-#endif
-
                if (!line && !c) {
                        Invalidate();
                } else {
@@ -573,13 +560,7 @@
        free(text);
        VideoFree(background);
 
-#ifdef USE_SDL_SURFACE
-       VideoClearScreen();
-#else
-       VideoLockScreen();
        VideoClearScreen();
-       VideoUnlockScreen();
-#endif
 
        VideoSyncSpeed = old_video_sync;
        SetVideoSync();
@@ -608,13 +589,7 @@
        TextLines* scrolling_credits;
        int old_video_sync;
 
-#ifdef USE_SDL_SURFACE
        VideoClearScreen();
-#else
-       VideoLockScreen();
-       VideoClearScreen();
-       VideoUnlockScreen();
-#endif
 
        old_video_sync = VideoSyncSpeed;
        VideoSyncSpeed = 100;
@@ -659,9 +634,6 @@
        scrolling = 1;
        while (1) {
 
-#ifndef USE_SDL_SURFACE
-               VideoLockScreen();
-#endif
                HideAnyCursor();
 
                //
@@ -684,10 +656,6 @@
                DrawContinueButton();
                DrawAnyCursor();
 
-#ifndef USE_SDL_SURFACE
-               VideoUnlockScreen();
-#endif
-
                // FIXME: update only the changed area!!!!
 
                Invalidate();
@@ -715,13 +683,7 @@
                VideoFree(background);
        }
 
-#ifdef USE_SDL_SURFACE
-       VideoClearScreen();
-#else
-       VideoLockScreen();
        VideoClearScreen();
-       VideoUnlockScreen();
-#endif
        DestroyCursorBackground();
 
        VideoSyncSpeed = old_video_sync;
@@ -821,20 +783,13 @@
        i = 0;
        max = chapter->Data.Picture.FadeIn;
        while (IntroNoEvent && i < max) {
-#ifdef USE_SDL_SURFACE
                VideoClearScreen();
-#else
-               VideoLockScreen();
-#endif
                VideoDrawSubClipFaded(background, 0, 0,
                        background->Width, background->Height,
                        (VideoWidth - background->Width) / 2,
                        (VideoHeight - background->Height) / 2,
                        255 * i / max);
                PictureDrawText(chapter, lines);
-#ifndef USE_SDL_SURFACE
-               VideoUnlockScreen();
-#endif
 
                Invalidate();
                RealizeVideoMemory();
@@ -850,17 +805,11 @@
        j = 0;
        max = chapter->Data.Picture.DisplayTime;
        while (IntroNoEvent && j < max) {
-#ifndef USE_SDL_SURFACE
-               VideoLockScreen();
-#endif
                VideoDrawSubClip(background, 0, 0,
                        background->Width, background->Height,
                        (VideoWidth - background->Width) / 2,
                        (VideoHeight - background->Height) / 2);
                PictureDrawText(chapter, lines);
-#ifndef USE_SDL_SURFACE
-               VideoUnlockScreen();
-#endif
 
                Invalidate();
                RealizeVideoMemory();
@@ -874,20 +823,13 @@
        //
        max = chapter->Data.Picture.FadeOut;
        while (i >= 0) {
-#ifdef USE_SDL_SURFACE
                VideoClearScreen();
-#else
-               VideoLockScreen();
-#endif
                VideoDrawSubClipFaded(background, 0, 0,
                        background->Width, background->Height,
                        (VideoWidth - background->Width) / 2,
                        (VideoHeight - background->Height) / 2,
                        255 * i / max);
                PictureDrawText(chapter, lines);
-#ifndef USE_SDL_SURFACE
-               VideoUnlockScreen();
-#endif
 
                Invalidate();
                RealizeVideoMemory();
@@ -907,13 +849,7 @@
                lines = ptr;
        }
 
-#ifdef USE_SDL_SURFACE
        VideoClearScreen();
-#else
-       VideoLockScreen();
-       VideoClearScreen();
-       VideoUnlockScreen();
-#endif
 
        VideoSyncSpeed = old_video_sync;
        SetVideoSync();
@@ -923,11 +859,7 @@
 /**
 **  Draw a box with the text inside
 */
-#ifdef USE_SDL_SURFACE
 local void DrawStatBox(int x, int y, char* text, Uint32 color, int percent)
-#else
-local void DrawStatBox(int x, int y, char* text, VMemType color, int percent)
-#endif
 {
        VideoFillRectangleClip(ColorBlack, x, y, 80, 24);
        VideoDrawRectangleClip(ColorYellow, x + 1, y + 1, 78, 22);
@@ -1349,17 +1281,11 @@
 #endif
        }
 
-#ifndef USE_SDL_SURFACE
-       VideoLockScreen();
-#endif
        VideoClearScreen();
        if (background) {
                VideoDrawSubClip(background, 0, 0, background->Width, 
background->Height,
                        (VideoWidth - background->Width) / 2, (VideoHeight - 
background->Height) / 2);
        }
-#ifndef USE_SDL_SURFACE
-       VideoUnlockScreen();
-#endif
 
        UseContinueButton = 1;
        InitContinueButton(TheUI.Offset640X + 455, TheUI.Offset480Y + 440);
@@ -1371,9 +1297,6 @@
        IntroNoEvent = 1;
        IntroButtonPressed = 0;
        while (1) {
-#ifndef USE_SDL_SURFACE
-               VideoLockScreen();
-#endif
                HideAnyCursor();
 #ifdef USE_OPENGL
                if (background) {
@@ -1388,9 +1311,6 @@
 #endif
                DrawContinueButton();
                DrawAnyCursor();
-#ifndef USE_SDL_SURFACE
-               VideoUnlockScreen();
-#endif
 
                Invalidate();
                RealizeVideoMemory();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]