#ifdef _WIN32_WCE // Browse directories to locate SCUMM games #include "stdafx.h" #include #include #include "resource.h" #define MAX_GAMES 20 struct ScummGame { const char *gamename; const char *description; const char *directory; const char *check_file_1; const char *check_file_2; const char *filename; unsigned char next_demo; }; struct InstalledScummGame { unsigned char reference; TCHAR directory[MAX_PATH]; }; static const ScummGame GameList[] = { { "Simon The Sorcerer 1 (win)", "To be tested", "", "SIMON.GME", "GAMEPC", "simon1win", 0 }, { "Simon The Sorcerer 2 (win)", "To be tested", "", "SIMON2.GME", "GSPTR30", "simon2win", 0 }, { "Indiana Jones 3 (new)", "Buggy, unplayable", "indy3", "", "", "indy3", 0 }, { "Zak Mc Kracken (new)", "Buggy, unplayable", "zak256", "", "", "zak256", 0 }, { "Loom (old)", "Not working", "loom", "", "", "loom", 0 }, { "Monkey Island 1 (EGA)", "Not tested", "monkeyEGA", "", "", "monkeyEGA", 0 }, { "Loom (VGA)", "Completable", "loomcd", "", "", "loomcd", 0 }, { "Monkey Island 1 (VGA)", "Completable, no music", "", "MONKEY.000", "MONKEY.001", "monkey", 0 }, { "Monkey Island 2 (VGA)", "Completable", "", "MONKEY2.000", "MONKEY2.001", "monkey2", 0 }, { "Indiana Jones 4", "Completable", "", "ATLANTIS.000", "ATLANTIS.001", "atlantis", 1 }, { "Indiana Jones 4 demo", "Completable", "", "PLAYFATE.000", "PLAYFATE.001", "playfate", 0 }, { "Day of the Tentacle", "Completable", "", "TENTACLE.000", "TENTACLE.001", "tentacle", 1 }, { "Day of the Tentacle demo", "Completable", "", "DOTTDEMO.000", "DOTTDEMO.001", "dottdemo", 0 }, { "Sam & Max", "Completable,glitches,no music", "", "SAMNMAX.000", "SAMNMAX.001", "samnmax", 1 }, { "Sam & Max demo", "Completable, minor glitches, no music", "", "SNMDEMO.000", "SNMDEMO.001", "snmdemo", 0 }, { "Full Throttle", "Partially working", "", "FT.LA0", "FT.LA1", "ft", 0 }, { "The Dig", "Partially working", "", "DIG.LA0", "DIG.LA1", "dig", 0 }, { NULL, NULL, NULL, NULL, NULL, NULL, 0 } }; void findGame(TCHAR*); int displayFoundGames(void); void doScan(); void startFindGame(); char gamesFound[MAX_GAMES]; unsigned char listIndex[MAX_GAMES]; InstalledScummGame gamesInstalled[MAX_GAMES]; int installedGamesNumber; HWND hwndDlg; TCHAR basePath[MAX_PATH]; TCHAR old_basePath[MAX_PATH]; BOOL prescanning; BOOL isPrescanning() { return prescanning; } void setFindGameDlgHandle(HWND x) { hwndDlg = x; } bool loadGameSettings() { HKEY hkey; DWORD disposition; DWORD keyType, keySize, dummy; int index; int i; unsigned char references[MAX_PATH]; prescanning = FALSE; if(RegCreateKeyEx(HKEY_CURRENT_USER, TEXT("Software\\PocketSCUMM"), 0, NULL, 0, 0, NULL, &hkey, &disposition) == ERROR_SUCCESS) { keyType = REG_DWORD; keySize = sizeof(DWORD); if (RegQueryValueEx(hkey, TEXT("GamesInstalled"), NULL, &keyType, (unsigned char*)&dummy, &keySize) == ERROR_SUCCESS) index = dummy; else return FALSE; installedGamesNumber = index; keyType = REG_BINARY; keySize = index; if (RegQueryValueEx(hkey, TEXT("GamesReferences"), NULL, &keyType, references, &keySize) != ERROR_SUCCESS) return FALSE; for (i=0; i