tools/installer/GamesList.h
changeset 1952 b7aa2b626807
child 2289 44045ead61cd
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/installer/GamesList.h	Sun Mar 30 07:00:22 2008 +0000
     1.3 @@ -0,0 +1,72 @@
     1.4 +#ifndef _INCLUDE_INSTALLER_GAMES_LIST_H_
     1.5 +#define _INCLUDE_INSTALLER_GAMES_LIST_H_
     1.6 +
     1.7 +#include "platform_headers.h"
     1.8 +
     1.9 +#define GAMEINFO_IS_USABLE			0
    1.10 +#define GAMEINFO_DOES_NOT_EXIST		1
    1.11 +#define GAMEINFO_IS_READ_ONLY		2
    1.12 +
    1.13 +#define GAME_LIST_HALFLIFE1			-2
    1.14 +#define GAME_LIST_CANT_READ			-1
    1.15 +#define GAME_LIST_NO_GAMES			0
    1.16 +
    1.17 +#define GAMES_DEDICATED				1
    1.18 +#define GAMES_LISTEN				2
    1.19 +#define GAMES_STANDALONE			3
    1.20 +
    1.21 +#define SOURCE_ENGINE_UNKNOWN		0
    1.22 +#define SOURCE_ENGINE_2004			1
    1.23 +#define SOURCE_ENGINE_2007			2
    1.24 +
    1.25 +struct valve_game_t
    1.26 +{
    1.27 +	const TCHAR *folder;
    1.28 +	const TCHAR *subfolder;
    1.29 +	int eng_type;
    1.30 +};
    1.31 +
    1.32 +/* One game */
    1.33 +struct game_info_t
    1.34 +{
    1.35 +	TCHAR name[128];
    1.36 +	TCHAR game_path[MAX_PATH];
    1.37 +	int source_engine;
    1.38 +};
    1.39 +
    1.40 +/* A list of games under one "account" */
    1.41 +struct game_list_t
    1.42 +{
    1.43 +	TCHAR root_name[128];
    1.44 +	unsigned int *games;
    1.45 +	unsigned int game_count;
    1.46 +};
    1.47 +
    1.48 +/* A list of accounts */
    1.49 +struct game_group_t
    1.50 +{
    1.51 +	game_list_t **lists;
    1.52 +	unsigned int list_count;
    1.53 +	int error_code;
    1.54 +};
    1.55 +
    1.56 +/* All games on the system */
    1.57 +struct game_database_t
    1.58 +{
    1.59 +	game_info_t *game_list;
    1.60 +	unsigned int game_count;
    1.61 +	game_group_t dedicated;
    1.62 +	game_group_t listen;
    1.63 +	game_group_t standalone;
    1.64 +};
    1.65 +
    1.66 +int IsValidFolder(const TCHAR *path);
    1.67 +void DisplayBadFolderDialog(HWND hWnd, int reason);
    1.68 +
    1.69 +void BuildGameDB();
    1.70 +void ReleaseGameDB();
    1.71 +void DisplayBadGamesDialog(HWND hWnd, int reason);
    1.72 +
    1.73 +extern game_database_t g_games;
    1.74 +
    1.75 +#endif //_INCLUDE_INSTALLER_GAMES_LIST_H_