diff options
-rw-r--r-- | sword2/driver/d_draw.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sword2/driver/d_draw.cpp b/sword2/driver/d_draw.cpp index 329680a2db..a01651549e 100644 --- a/sword2/driver/d_draw.cpp +++ b/sword2/driver/d_draw.cpp @@ -561,6 +561,9 @@ int32 PlaySmacker(char *filename, _movieTextObject *text[], uint8 *musicOut) { BS2_SetPalette(0, 256, tmpPal, RDPAL_INSTANT); while (1) { + if (!text[textCounter]) + break; + if (frameCounter == text[textCounter]->startFrame) { EraseBackBuffer(); OpenTextObject(text[textCounter]); @@ -571,9 +574,6 @@ int32 PlaySmacker(char *filename, _movieTextObject *text[], uint8 *musicOut) { CloseTextObject(text[textCounter]); EraseBackBuffer(); textCounter++; - - if (text[textCounter] == NULL) - break; } frameCounter++; @@ -590,6 +590,9 @@ int32 PlaySmacker(char *filename, _movieTextObject *text[], uint8 *musicOut) { } BS2_SetPalette(0, 256, oldPal, RDPAL_INSTANT); + + if (textSurface) + CloseTextObject(text[textCounter]); } return(RD_OK); |