/** * Close down facilities used by the program. Always called just before the * program terminates. */ void PrepareEnd() { Animation_Uninit(); Explosion_Uninit(); GameLoop_Uninit(); String_Uninit(); Sprites_Uninit(); Font_Uninit(); GFX_Uninit(); Video_Uninit(); A5_Uninit(); }
/** * Close down facilities used by the program. Always called just before the * program terminates. */ void PrepareEnd(void) { free(g_palette_998A); g_palette_998A = NULL; GameLoop_Uninit(); String_Uninit(); Sprites_Uninit(); Font_Uninit(); Voice_UnloadVoices(); Drivers_All_Uninit(); if (g_mouseFileID != 0xFF) Mouse_SetMouseMode(INPUT_MOUSE_MODE_NORMAL, NULL); File_Uninit(); Timer_Uninit(); GFX_Uninit(); Video_Uninit(); }
/** * Shows the game credits. */ static void GameLoop_GameCredits(void) { static const uint8 colours[] = {0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0}; uint16 i; uint8 *memory; GUI_Mouse_Hide_Safe(); Widget_SetCurrentWidget(20); Sprites_LoadImage("BIGPLAN.CPS", SCREEN_1, g_palette_998A); GUI_ClearScreen(SCREEN_0); GUI_Screen_Copy(g_curWidgetXBase, g_curWidgetYBase, g_curWidgetXBase, g_curWidgetYBase, g_curWidgetWidth, g_curWidgetHeight, SCREEN_1, SCREEN_0); GUI_SetPaletteAnimated(g_palette_998A, 60); Music_Play(0); GameLoop_Uninit(); Music_Play(33); memory = GFX_Screen_Get_ByIndex(SCREEN_2); for (i = 0; i < 256; i++) { uint8 loc06; uint8 loc04; memory[i] = i & 0xFF; loc06 = i / 16; loc04 = i % 16; if (loc06 == 9 && loc04 <= 6) { memory[i] = (g_playerHouseID * 16) + loc04 + 144; } } Sprites_LoadImage("MAPPLAN.CPS", SCREEN_1, g_palette_998A); GUI_Palette_RemapScreen(g_curWidgetXBase << 3, g_curWidgetYBase, g_curWidgetWidth << 3, g_curWidgetHeight, SCREEN_1, memory); GUI_Screen_FadeIn2(g_curWidgetXBase << 3, g_curWidgetYBase, g_curWidgetWidth << 3, g_curWidgetHeight, SCREEN_1, SCREEN_0, 1, false); GameCredits_LoadPalette(); GUI_Mouse_Hide_Safe(); GUI_InitColors(colours, 0, lengthof(colours) - 1); g_fontCharOffset = -1; GFX_SetPalette(g_palette1); for (;; sleepIdle()) { File_ReadBlockFile(String_GenerateFilename("CREDITS"), s_buffer_1832, GFX_Screen_GetSize_ByIndex(SCREEN_3)); GameCredits_Play(s_buffer_1832, 20, SCREEN_1, SCREEN_2, 6); if (Input_Keyboard_NextKey() != 0) break; Music_Play(33); } GUI_SetPaletteAnimated(g_palette2, 60); Driver_Music_FadeOut(); GFX_ClearScreen(); }