stratagus-cvs
[Top][All Lists]
Advanced

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

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


From: Nehal Mistry
Subject: [Stratagus-CVS] stratagus/src/game intro.c
Date: Sat, 22 Nov 2003 17:32:31 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Nehal Mistry <address@hidden>   03/11/22 17:32:31

Modified files:
        src/game       : intro.c 

Log message:
        fix campaign intro screen

Patches:
Index: stratagus/src/game/intro.c
diff -u stratagus/src/game/intro.c:1.107 stratagus/src/game/intro.c:1.108
--- stratagus/src/game/intro.c:1.107    Thu Nov 20 15:04:52 2003
+++ stratagus/src/game/intro.c  Sat Nov 22 17:32:31 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: intro.c,v 1.107 2003/11/20 20:04:52 jsalmon3 Exp $
+//     $Id: intro.c,v 1.108 2003/11/22 22:32:31 nehalmistry Exp $
 
 //@{
 
@@ -714,10 +714,15 @@
        VideoFree(background);
     }
 
+#ifdef USE_SDL_SURFACE
+    VideoClearScreen();
+    DestroyCursorBackground();
+#else
     VideoLockScreen();
     VideoClearScreen();
     VideoUnlockScreen();
     DestroyCursorBackground();
+#endif
 
     VideoSyncSpeed = old_video_sync;
     SetVideoSync();
@@ -814,6 +819,14 @@
     i = 0;
     max = chapter->Data.Picture.FadeIn;
     while (IntroNoEvent && i < max) {
+#ifdef USE_SDL_SURFACE
+       VideoDrawSubClipFaded(background, 0, 0,
+           background->Width, background->Height,
+           (VideoWidth - background->Width) / 2,
+           (VideoHeight - background->Height) / 2,
+           255 - (255 * i / max));
+       PictureDrawText(chapter, lines);
+#else
        VideoLockScreen();
        VideoDrawSubClipFaded(background, 0, 0,
            background->Width, background->Height,
@@ -822,6 +835,7 @@
            255 * i / max);
        PictureDrawText(chapter, lines);
        VideoUnlockScreen();
+#endif
 
        Invalidate();
        RealizeVideoMemory();
@@ -837,6 +851,13 @@
     j = 0;
     max = chapter->Data.Picture.DisplayTime;
     while (IntroNoEvent && j < max) {
+#ifdef USE_SDL_SURFACE
+       VideoDrawSubClip(background, 0, 0,
+           background->Width, background->Height,
+           (VideoWidth - background->Width) / 2,
+           (VideoHeight - background->Height) / 2);
+       PictureDrawText(chapter, lines);
+#else
        VideoLockScreen();
        VideoDrawSubClip(background, 0, 0,
            background->Width, background->Height,
@@ -844,6 +865,7 @@
            (VideoHeight - background->Height) / 2);
        PictureDrawText(chapter, lines);
        VideoUnlockScreen();
+#endif
 
        Invalidate();
        RealizeVideoMemory();
@@ -857,6 +879,14 @@
     //
     max = chapter->Data.Picture.FadeOut;
     while (i >= 0) {
+#ifdef USE_SDL_SURFACE
+       VideoDrawSubClipFaded(background, 0, 0,
+           background->Width, background->Height,
+           (VideoWidth - background->Width) / 2,
+           (VideoHeight - background->Height) / 2,
+           255 - (255 * i / max));
+       PictureDrawText(chapter, lines);
+#else
        VideoLockScreen();
        VideoDrawSubClipFaded(background, 0, 0,
            background->Width, background->Height,
@@ -865,6 +895,7 @@
            255 * i / max);
        PictureDrawText(chapter, lines);
        VideoUnlockScreen();
+#endif
 
        Invalidate();
        RealizeVideoMemory();
@@ -884,9 +915,13 @@
        lines = ptr;
     }
 
+#ifdef USE_SDL_SURFACE
+    VideoClearScreen();
+#else
     VideoLockScreen();
     VideoClearScreen();
     VideoUnlockScreen();
+#endif
 
     VideoSyncSpeed = old_video_sync;
     SetVideoSync();
@@ -1322,13 +1357,17 @@
 #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);
@@ -1340,7 +1379,9 @@
     IntroNoEvent = 1;
     IntroButtonPressed = 0;
     while (1) {
+#ifndef USE_SDL_SURFACE
        VideoLockScreen();
+#endif
        HideAnyCursor();
 #ifdef USE_OPENGL
        if (background) {
@@ -1355,7 +1396,9 @@
 #endif
        DrawContinueButton();
        DrawAnyCursor();
+#ifndef USE_SDL_SURFACE
        VideoUnlockScreen();
+#endif
 
        Invalidate();
        RealizeVideoMemory();




reply via email to

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