#include <windows.h>#include <windowsx.h>#include <assert.h>#include <ctype.h>#include <direct.h>#include <dos.h>#include <errno.h>#include <fcntl.h>#include <fstream.h>#include <io.h>#include <locale.h>#include <math.h>#include <mbctype.h>#include <mmsystem.h>#include <process.h>#include <stdlib.h>#include <string.h>#include <stdio.h>#include <strstrea.h>#include <sys\stat.h>#include <time.h>#include <winuser.h>#include "args.h"#include "autorun.h"#include "drawbutton.h"#include "resource.h"#include "wnd_file.h"#include "winfix.h"#include "cdcntrl.h"#include "igr.h"#include "viewhtml.h"#include "utils.h"#include "locale_api.h"#include "getcd.h"#include "WSYS_FileSystem.h"#include "WSYS_STDFileSystem.h"#include <string>#include "GameText.h"#include "leanAndMeanAutorun.h"Go to the source code of this file.
Macros | |
| #define | STRICT |
| #define | PRETEND_ON_CD_TEST FALSE |
| #define | WINDOW_BRUSH FALSE |
| #define | BACKGROUND_BITMAP TRUE |
| #define | USE_MOUSE_MOVES TRUE |
| #define | DISABLE_KEYBOARD FALSE |
| #define | BUTTON_WIDTH 150 |
| #define | BUTTON_HEIGHT 45 |
| #define | NUM_BUTTONS 10 |
| #define | NUM_ARGUMENTS 10 |
| #define | NUM_SONGS 2 |
| #define | NUM_FLICKER_FRAMES 1 |
| #define | NUM_FLICKER_POSITIONS 15 |
| #define | MOUSE_WAV "MouseMove" |
| #define | SOUND_FILE1 "SPEECH_FILE1" |
| #define | SOUND_FILE2 "SPEECH_FILE2" |
| #define | MOH_DEMO_PROGRAM "MOHAADEMO\\SETUP.EXE" |
| #define | SHOW_MOH_DEMO FALSE |
| #define | BFAVI_FILENAME "Autorun\\BF1942RTR.avi" |
| #define | SC4AVI_FILENAME "Autorun\\Preview.avi" |
| #define | HELP_FILENAME "HELP:FILENAME" |
| #define | SHOW_GAMESPY_BUTTON FALSE |
| #define | GAMESPY_WEBSITE "http://www.gamespyarcade.com/features/launch.asp?svcname=ccrenegade&distID=391" |
| #define | RESOURCE_FILE "Autorun.loc" |
| #define | SETUP_INI_FILE1 "Setup\\Setup.ini" |
| #define | SETUP_INI_FILE2 "Setup.ini" |
| #define | UNINSTALL_EXECUTABLE "IDriver.exe" |
| #define | SETUP_MAIN_WINDOW_NAME "%s Setup" |
| #define | CLASS_NAME "%s Autorun" |
| #define | GAME_MAIN_WINDOW_NAME "%s Game Window" |
| #define | GAME_WEBSITE "http://generals.ea.com" |
| #define | AUTORUN_MUTEX_OBJECT "01AF9993-3492-11d3-8F6F-0060089C05B1" |
| #define | GAME_MUTEX_OBJECT "685EAFF2-3216-4265-B047-251C5F4B82F3" |
| #define | PRODUCT_VOLUME_CD1 "Generals1" |
| #define | PRODUCT_VOLUME_CD2 "Generals2" |
Functions | |
| void | Cant_Find_MessageBox (HINSTANCE hInstance, char *szPath) |
| HPALETTE | CreateDIBPalette (LPBITMAPINFO lpbmi, LPINT lpiNumColors) |
| void | Debug_Date_And_Time_Stamp (void) |
| void | Error_Message (HINSTANCE hInstance, int title, int string, char *path) |
| void | Error_Message (HINSTANCE hInstance, const char *title, const char *string, char *path) |
| bool | Is_On_CD (char *) |
| HBITMAP | LoadResourceBitmap (HMODULE hInstance, char *lpString, HPALETTE FAR *lphPalette, bool loading_a_button=FALSE) |
| HBITMAP | LoadResourceButton (HMODULE hInstance, char *lpString, HPALETTE FAR lphPalette) |
| BOOL | Options (Command_Line_Arguments *Orgs) |
| void | Prog_End (void) |
| bool | Prompt_For_CD (HWND window_handle, char *volume_name, const char *message1, const char *message2, int *cd_drive) |
| void | Reformat_Volume_Name (char *volume_name, char *new_volume_name) |
| int | Show_Message (HWND window_handle, const char *message_num1, const char *message_num2) |
| int | Show_Message (HWND window_handle, int message_num1) |
| void | Stop_Sound_Playing (void) |
| BOOL | Valid_Environment (void) |
| BOOL CALLBACK | Dialog_Box_Proc (HWND window_handle, UINT message, WPARAM w_param, LPARAM l_param) |
| LRESULT CALLBACK | Wnd_Proc (HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) |
| int PASCAL | WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpszCmdLine, int nCmdShow) |
| HBITMAP | LoadResourceBitmap (HINSTANCE hInstance, LPTSTR lpString, HPALETTE FAR *lphPalette, bool loading_a_button) |
| HBITMAP | LoadResourceButton (HINSTANCE hInstance, LPTSTR lpString, HPALETTE FAR lphPalette) |
| #define AUTORUN_MUTEX_OBJECT "01AF9993-3492-11d3-8F6F-0060089C05B1" |
Definition at line 177 of file autorun.cpp.
| #define BACKGROUND_BITMAP TRUE |
Definition at line 135 of file autorun.cpp.
| #define BFAVI_FILENAME "Autorun\\BF1942RTR.avi" |
Definition at line 154 of file autorun.cpp.
| #define BUTTON_HEIGHT 45 |
Definition at line 140 of file autorun.cpp.
| #define BUTTON_WIDTH 150 |
Definition at line 139 of file autorun.cpp.
| #define CLASS_NAME "%s Autorun" |
Definition at line 171 of file autorun.cpp.
| #define DISABLE_KEYBOARD FALSE |
Definition at line 137 of file autorun.cpp.
| #define GAME_MAIN_WINDOW_NAME "%s Game Window" |
Definition at line 172 of file autorun.cpp.
| #define GAME_MUTEX_OBJECT "685EAFF2-3216-4265-B047-251C5F4B82F3" |
Definition at line 179 of file autorun.cpp.
| #define GAME_WEBSITE "http://generals.ea.com" |
Definition at line 175 of file autorun.cpp.
| #define GAMESPY_WEBSITE "http://www.gamespyarcade.com/features/launch.asp?svcname=ccrenegade&distID=391" |
Definition at line 159 of file autorun.cpp.
| #define HELP_FILENAME "HELP:FILENAME" |
Definition at line 156 of file autorun.cpp.
| #define MOH_DEMO_PROGRAM "MOHAADEMO\\SETUP.EXE" |
Definition at line 151 of file autorun.cpp.
| #define MOUSE_WAV "MouseMove" |
Definition at line 147 of file autorun.cpp.
| #define NUM_ARGUMENTS 10 |
Definition at line 142 of file autorun.cpp.
| #define NUM_BUTTONS 10 |
Definition at line 141 of file autorun.cpp.
| #define NUM_FLICKER_FRAMES 1 |
Definition at line 144 of file autorun.cpp.
| #define NUM_FLICKER_POSITIONS 15 |
Definition at line 145 of file autorun.cpp.
| #define NUM_SONGS 2 |
Definition at line 143 of file autorun.cpp.
| #define PRETEND_ON_CD_TEST FALSE |
Definition at line 131 of file autorun.cpp.
| #define PRODUCT_VOLUME_CD1 "Generals1" |
Definition at line 180 of file autorun.cpp.
| #define PRODUCT_VOLUME_CD2 "Generals2" |
Definition at line 181 of file autorun.cpp.
| #define RESOURCE_FILE "Autorun.loc" |
Definition at line 161 of file autorun.cpp.
| #define SC4AVI_FILENAME "Autorun\\Preview.avi" |
Definition at line 155 of file autorun.cpp.
| #define SETUP_INI_FILE1 "Setup\\Setup.ini" |
Definition at line 162 of file autorun.cpp.
| #define SETUP_INI_FILE2 "Setup.ini" |
Definition at line 163 of file autorun.cpp.
| #define SETUP_MAIN_WINDOW_NAME "%s Setup" |
Definition at line 170 of file autorun.cpp.
| #define SHOW_GAMESPY_BUTTON FALSE |
Definition at line 158 of file autorun.cpp.
| #define SHOW_MOH_DEMO FALSE |
Definition at line 152 of file autorun.cpp.
| #define SOUND_FILE1 "SPEECH_FILE1" |
Definition at line 148 of file autorun.cpp.
| #define SOUND_FILE2 "SPEECH_FILE2" |
Definition at line 149 of file autorun.cpp.
| #define STRICT |
Definition at line 71 of file autorun.cpp.
| #define UNINSTALL_EXECUTABLE "IDriver.exe" |
Definition at line 165 of file autorun.cpp.
| #define USE_MOUSE_MOVES TRUE |
Definition at line 136 of file autorun.cpp.
| #define WINDOW_BRUSH FALSE |
Definition at line 134 of file autorun.cpp.
| void Cant_Find_MessageBox | ( | HINSTANCE | hInstance, |
| char * | szPath ) |
Definition at line 5065 of file autorun.cpp.
| HPALETTE CreateDIBPalette | ( | LPBITMAPINFO | lpbmi, |
| LPINT | lpiNumColors ) |
Definition at line 4913 of file autorun.cpp.
| void Debug_Date_And_Time_Stamp | ( | void | ) |
Definition at line 5290 of file autorun.cpp.
Definition at line 2552 of file autorun.cpp.
| void Error_Message | ( | HINSTANCE | hInstance, |
| const char * | title, | ||
| const char * | string, | ||
| char * | path ) |
Definition at line 5139 of file autorun.cpp.
| void Error_Message | ( | HINSTANCE | hInstance, |
| int | title, | ||
| int | string, | ||
| char * | path ) |
| bool Is_On_CD | ( | char * | volume_name | ) |
Definition at line 5363 of file autorun.cpp.
| HBITMAP LoadResourceBitmap | ( | HINSTANCE | hInstance, |
| LPTSTR | lpString, | ||
| HPALETTE FAR * | lphPalette, | ||
| bool | loading_a_button ) |
Definition at line 4848 of file autorun.cpp.
| HBITMAP LoadResourceBitmap | ( | HMODULE | hInstance, |
| char * | lpString, | ||
| HPALETTE FAR * | lphPalette, | ||
| bool | loading_a_button = FALSE ) |
| HBITMAP LoadResourceButton | ( | HINSTANCE | hInstance, |
| LPTSTR | lpString, | ||
| HPALETTE FAR | lphPalette ) |
Definition at line 4987 of file autorun.cpp.
| HBITMAP LoadResourceButton | ( | HMODULE | hInstance, |
| char * | lpString, | ||
| HPALETTE FAR | lphPalette ) |
| BOOL Options | ( | Command_Line_Arguments * | Orgs | ) |
Definition at line 4624 of file autorun.cpp.
| void Prog_End | ( | void | ) |
Definition at line 870 of file autorun.cpp.
| bool Prompt_For_CD | ( | HWND | window_handle, |
| char * | volume_name, | ||
| const char * | message1, | ||
| const char * | message2, | ||
| int * | cd_drive ) |
Definition at line 5376 of file autorun.cpp.
| void Reformat_Volume_Name | ( | char * | volume_name, |
| char * | new_volume_name ) |
Definition at line 5459 of file autorun.cpp.
| int Show_Message | ( | HWND | window_handle, |
| const char * | message_num1, | ||
| const char * | message_num2 ) |
Definition at line 5428 of file autorun.cpp.
| int Show_Message | ( | HWND | window_handle, |
| int | message_num1 ) |
| void Stop_Sound_Playing | ( | void | ) |
Definition at line 4605 of file autorun.cpp.
| BOOL Valid_Environment | ( | void | ) |
Definition at line 4809 of file autorun.cpp.
| int PASCAL WinMain | ( | HINSTANCE | hInstance, |
| HINSTANCE | hPrevInstance, | ||
| LPTSTR | lpszCmdLine, | ||
| int | nCmdShow ) |
Definition at line 377 of file autorun.cpp.
| LRESULT CALLBACK Wnd_Proc | ( | HWND | hWnd, |
| UINT | iMessage, | ||
| WPARAM | wParam, | ||
| LPARAM | lParam ) |
Definition at line 2509 of file autorun.cpp.
| HINSTANCE ApplicationHInstance |
main application instance
application main instance handle
<
our application instance
Definition at line 311 of file autorun.cpp.
| HWND ApplicationHWnd = NULL |
our application window handle
application main window handle
Definition at line 310 of file autorun.cpp.
| HANDLE AppMutex = NULL |
Definition at line 290 of file autorun.cpp.
| char Arguments[NUM_ARGUMENTS][30] |
Definition at line 197 of file autorun.cpp.
Definition at line 277 of file autorun.cpp.
Definition at line 278 of file autorun.cpp.
| char ButtonImages[NUM_BUTTONS][MAX_PATH] |
Definition at line 194 of file autorun.cpp.
| DrawButton* ButtonList[NUM_BUTTONS] |
Definition at line 192 of file autorun.cpp.
| RECT ButtonSizes[NUM_BUTTONS] |
Definition at line 193 of file autorun.cpp.
Definition at line 286 of file autorun.cpp.
| char dir[_MAX_DIR] |
Definition at line 215 of file autorun.cpp.
Definition at line 284 of file autorun.cpp.
| char drive[_MAX_DRIVE] |
Definition at line 214 of file autorun.cpp.
| int FlickerPositions[NUM_FLICKER_POSITIONS][2] |
Definition at line 318 of file autorun.cpp.
| char FocusedButtonImages[NUM_BUTTONS][MAX_PATH] |
Definition at line 196 of file autorun.cpp.
| const char* g_csfFile = "Autorun.csf" |
Definition at line 314 of file autorun.cpp.
| const char* g_strFile = "Autorun.str" |
Definition at line 313 of file autorun.cpp.
| HANDLE GameAppMutex = NULL |
Definition at line 291 of file autorun.cpp.
| char* gAppPrefix = "ar_" |
Definition at line 316 of file autorun.cpp.
| MainWindow* GlobalMainWindow = NULL |
Definition at line 188 of file autorun.cpp.
Definition at line 280 of file autorun.cpp.
Definition at line 281 of file autorun.cpp.
Definition at line 275 of file autorun.cpp.
Definition at line 283 of file autorun.cpp.
Definition at line 285 of file autorun.cpp.
| int Language = 0 |
Definition at line 189 of file autorun.cpp.
| int LanguageToUse = 0 |
Definition at line 190 of file autorun.cpp.
| LaunchObjectClass LaunchObject |
Definition at line 187 of file autorun.cpp.
| int NumberArguments = 0 |
Definition at line 288 of file autorun.cpp.
Definition at line 279 of file autorun.cpp.
| HANDLE SetupAppMutex = NULL |
Definition at line 292 of file autorun.cpp.
| int SongNumber = 0 |
Definition at line 289 of file autorun.cpp.
| char szArgvPath[_MAX_PATH] |
Definition at line 213 of file autorun.cpp.
| char szBuffer[MAX_PATH] |
Definition at line 199 of file autorun.cpp.
| char szBuffer1[MAX_PATH] |
Definition at line 200 of file autorun.cpp.
| char szBuffer2[MAX_PATH] |
Definition at line 201 of file autorun.cpp.
| char szBuffer3[MAX_PATH *2] |
Definition at line 202 of file autorun.cpp.
| char szButtonWav[_MAX_PATH] |
Definition at line 211 of file autorun.cpp.
| char szClassName[_MAX_PATH] |
Definition at line 219 of file autorun.cpp.
| wchar_t szFullProductName[_MAX_PATH] |
Definition at line 232 of file autorun.cpp.
| char szGamePath[_MAX_PATH] |
Definition at line 204 of file autorun.cpp.
| char szGameWindow[_MAX_PATH] |
Definition at line 217 of file autorun.cpp.
| char szInternetPath[_MAX_PATH] |
Definition at line 203 of file autorun.cpp.
| char szPatchgetPath[_MAX_PATH] |
Definition at line 206 of file autorun.cpp.
| char szProduct_Name[_MAX_PATH] |
Definition at line 222 of file autorun.cpp.
| wchar_t szProductName[_MAX_PATH] |
Definition at line 231 of file autorun.cpp.
| char szRegisterPath[_MAX_PATH] |
Definition at line 210 of file autorun.cpp.
| char szRegistryKey[_MAX_PATH] |
Definition at line 218 of file autorun.cpp.
| char szSetupPath[_MAX_PATH] |
Definition at line 207 of file autorun.cpp.
| char szSetupWindow[_MAX_PATH] |
Definition at line 216 of file autorun.cpp.
| CHAR szSongPath[MAX_PATH] |
Definition at line 195 of file autorun.cpp.
| char szSpeechWav[_MAX_PATH] |
Definition at line 212 of file autorun.cpp.
| char szUninstallCommandLine[_MAX_PATH] |
Definition at line 209 of file autorun.cpp.
| char szUninstallPath[_MAX_PATH] |
Definition at line 208 of file autorun.cpp.
| char szVolumeName[_MAX_PATH] |
Definition at line 220 of file autorun.cpp.
| char szWavs[NUM_SONGS][_MAX_PATH] |
Definition at line 198 of file autorun.cpp.
| wchar_t szWideBuffer[_MAX_PATH] |
Definition at line 227 of file autorun.cpp.
| wchar_t szWideBuffer0[_MAX_PATH] |
Definition at line 228 of file autorun.cpp.
| wchar_t szWideBuffer2[_MAX_PATH] |
Definition at line 229 of file autorun.cpp.
| wchar_t szWideBuffer3[_MAX_PATH] |
Definition at line 230 of file autorun.cpp.
| char szWorldbuilderPath[_MAX_PATH] |
Definition at line 205 of file autorun.cpp.
|
extern |
This is the FileSystem's singleton class. All file access should be through TheFileSystem, unless code needs to use an explicit File or FileSystem derivative.
Using TheFileSystem->open and File exclusively for file access, particularly in library or modular code, allows applications to transparently implement file access as they see fit. This is particularly important for code that needs to be shared between applications, such as games and tools.
Definition at line 104 of file FileSystem.cpp.
Definition at line 282 of file autorun.cpp.
Definition at line 276 of file autorun.cpp.
| int WindowsVersion = 0 |
Definition at line 287 of file autorun.cpp.