diff options
author | Torbjörn Andersson | 2003-09-09 15:54:13 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-09-09 15:54:13 +0000 |
commit | d5f42972218a11522ac12bc580b566295fa2f7e4 (patch) | |
tree | 584c6d0ce26f94cf3c8496cea33e5c18caffc266 | |
parent | 78afd89698b41943feb9d49b607e7b70895f185a (diff) | |
download | scummvm-rg350-d5f42972218a11522ac12bc580b566295fa2f7e4.tar.gz scummvm-rg350-d5f42972218a11522ac12bc580b566295fa2f7e4.tar.bz2 scummvm-rg350-d5f42972218a11522ac12bc580b566295fa2f7e4.zip |
HACK: Display instructions during the cutscenes, so that the user won't
think ScummVM has hung or something.
svn-id: r10138
-rw-r--r-- | sword2/driver/d_draw.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sword2/driver/d_draw.cpp b/sword2/driver/d_draw.cpp index cac04c1dd0..20d52a4a00 100644 --- a/sword2/driver/d_draw.cpp +++ b/sword2/driver/d_draw.cpp @@ -20,6 +20,9 @@ #include <stdio.h> #include "stdafx.h" #include "driver96.h" +#include "bs2/header.h" // HACK: For cutscenes instruction message +#include "bs2/memory.h" // HACK: For cutscenes instruction message +#include "bs2/maketext.h" // HACK: For cutscenes instruction message #include "rdwin.h" #include "_mouse.h" #include "d_draw.h" @@ -551,6 +554,31 @@ int32 PlaySmacker(char *filename, _movieTextObject *text[], uint8 *musicOut) { EraseBackBuffer(); + // HACK: Draw instructions + // + // I'm using the the menu area, because that's unlikely to be + // touched by anything else during the cutscene. + + memset(lpBackBuffer, 0, screenWide * MENUDEEP); + + uint8 msg[] = "Cutscene - Press ESC to exit"; + mem *data = MakeTextSprite(msg, 640, 255, speech_font_id); + _frameHeader *frame = (_frameHeader *) data->ad; + _spriteInfo msgSprite; + uint8 *msgSurface; + + msgSprite.x = screenWide / 2 - frame->width / 2; + msgSprite.y = RDMENU_MENUDEEP / 2 - frame->height / 2; + msgSprite.w = frame->width; + msgSprite.h = frame->height; + msgSprite.h = RDSPR_DISPLAYALIGN | RDSPR_NOCOMPRESSION | RDSPR_TRANS; + msgSprite.data = data->ad + sizeof(_frameHeader); + + CreateSurface(&msgSprite, &msgSurface); + DrawSurface(&msgSprite, msgSurface); + DeleteSurface(msgSurface); + Free_mem(data); + // In case the cutscene has a long lead-in, start just before // the first line of text. @@ -609,6 +637,15 @@ int32 PlaySmacker(char *filename, _movieTextObject *text[], uint8 *musicOut) { BS2_SetPalette(0, 256, oldPal, RDPAL_INSTANT); CloseTextObject(text[textCounter]); + + // HACK: Remove the instructions created above + ScummVM::Rect r; + + memset(lpBackBuffer, 0, screenWide * MENUDEEP); + r.left = r.top = 0; + r.right = screenWide; + r.bottom = MENUDEEP; + UploadRect(&r); } return(RD_OK); |