diff options
Diffstat (limited to 'engines/cruise')
-rw-r--r-- | engines/cruise/cruise.cpp | 9 | ||||
-rw-r--r-- | engines/cruise/font.cpp | 2 | ||||
-rw-r--r-- | engines/cruise/gfxModule.cpp | 6 | ||||
-rw-r--r-- | engines/cruise/gfxModule.h | 1 |
4 files changed, 18 insertions, 0 deletions
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp index 4656704cb8..3d3a44a36c 100644 --- a/engines/cruise/cruise.cpp +++ b/engines/cruise/cruise.cpp @@ -118,6 +118,7 @@ void CruiseEngine::initialize() { // video init stuff initSystem(); + gfxModuleData_Init(); // another bit of video init @@ -139,6 +140,14 @@ void CruiseEngine::initialize() { void CruiseEngine::deinitialise() { polyStructNorm.clear(); polyStructExp.clear(); + + // Clear any backgrounds + for (int i = 0; i < 8; ++i) { + if (backgroundScreens[i]) { + free(backgroundScreens[i]); + backgroundScreens[i] = NULL; + } + } } bool CruiseEngine::loadLanguageStrings() { diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp index 8da3621bdc..c1afba3c45 100644 --- a/engines/cruise/font.cpp +++ b/engines/cruise/font.cpp @@ -159,7 +159,9 @@ void initSystem(void) { switchPal = 0; masterScreen = 0; + changeCursor(CURSOR_NOMOUSE); changeCursor(CURSOR_NORMAL); + mouseOn(); strcpy(cmdLine, ""); diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp index 47d3f49204..003a335e42 100644 --- a/engines/cruise/gfxModule.cpp +++ b/engines/cruise/gfxModule.cpp @@ -217,6 +217,12 @@ void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, i } } +void gfxModuleData_Init(void) { + memset(globalScreen, 0, 320 * 200); + memset(page00, 0, 320 * 200); + memset(page10, 0, 320 * 200); +} + void gfxModuleData_flipScreen(void) { memcpy(globalScreen, gfxModuleData.pPage00, 320 * 200); diff --git a/engines/cruise/gfxModule.h b/engines/cruise/gfxModule.h index 4b06e62991..dc085d8b0d 100644 --- a/engines/cruise/gfxModule.h +++ b/engines/cruise/gfxModule.h @@ -56,6 +56,7 @@ void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, i void gfxModuleData_gfxCopyScreen(const uint8 *sourcePtr, uint8 *destPtr); void convertGfxFromMode4(const uint8 *sourcePtr, int width, int height, uint8 *destPtr); void convertGfxFromMode5(const uint8 *sourcePtr, int width, int height, uint8 *destPtr); +void gfxModuleData_Init(void); void gfxModuleData_flipScreen(void); //void gfxModuleData_setPal(uint8 * ptr); void gfxModuleData_convertOldPalColor(uint16 oldColor, uint8 *pOutput); |