From a45b8d389a2df15f1ec1ea4228df89896b82efea Mon Sep 17 00:00:00 2001 From: avolkov Date: Thu, 20 Jan 2005 02:04:18 +0000 Subject: [PATCH] 2 new presentation commands: CLS and CALL git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1469 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/intro.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sc2/src/sc2code/intro.c b/sc2/src/sc2code/intro.c index ce5b0bad3..413237f9a 100644 --- a/sc2/src/sc2code/intro.c +++ b/sc2/src/sc2code/intro.c @@ -431,6 +431,24 @@ DoPresentation (PVOID pIS) { /* fade to white */ return DoFadeScreen (pPIS, pStr, FadeAllToWhite); } + else if (strcmp (Opcode, "CLS") == 0) + { /* clear screen */ + RECT r; + + LockMutex (GraphicsLock); + GetContextClipRect (&r); + r.corner.x = r.corner.y = 0; + /* paint black rect over screen */ + SetContextForeGroundColor (BUILD_COLOR ( + MAKE_RGB15 (0x0, 0x0, 0x0), 0x00)); + DrawFilledRectangle (&r); + UnlockMutex (GraphicsLock); + } + else if (strcmp (Opcode, "CALL") == 0) + { /* call another script */ + CopyTextString (pPIS->Buffer, sizeof(pPIS->Buffer), pStr); + ShowPresentation (pPIS->Buffer); + } else if (strcmp (Opcode, "NOOP") == 0) { /* no operation - must be a comment in script */ /* do nothing */