diff options
Diffstat (limited to 'engines/sci/include')
-rw-r--r-- | engines/sci/include/conf_summary.h | 106 | ||||
-rw-r--r-- | engines/sci/include/modules.h | 84 | ||||
-rw-r--r-- | engines/sci/include/sci_conf.h | 187 |
3 files changed, 0 insertions, 377 deletions
diff --git a/engines/sci/include/conf_summary.h b/engines/sci/include/conf_summary.h deleted file mode 100644 index c2a1f8e16e..0000000000 --- a/engines/sci/include/conf_summary.h +++ /dev/null @@ -1,106 +0,0 @@ -/*************************************************************************** - conf_summary.h Copyright (C) 2007 Christoph Reichenbach - - - This program may be modified and copied freely according to the terms of - the GNU general public license (GPL), as long as the above copyright - notice and the licensing information contained herein are preserved. - - Please refer to www.gnu.org for licensing details. - - This work is provided AS IS, without warranty of any kind, expressed or - implied, including but not limited to the warranties of merchantibility, - noninfringement, and fitness for a specific purpose. The author will not - be held liable for any damage caused by this work or derivatives of it. - - By using this source code, you agree to the licensing terms as stated - above. - - - Please contact the maintainer for bug reports or inquiries. - - Current Maintainer: - - Christoph Reichenbach (CR) <jameson@linuxgames.com> - -***************************************************************************/ - -#ifndef CONF_SUMMARY_H_ -#define CONF_SUMMARY_H_ - -#include<conf_parse.h> -#include<conf_driver.h> - -typedef struct { - conf_option_t *option; /* NULL if this is a terminator */ - conf_parse_t *parse; /* Source location we got this information from, - ** or NULL for command-line or default */ - union { char *str; - int nr } choice; - int origin; - int flags; -} conf_option_choice_t; - -#define CONF_CHOICE_ORIGIN_DEFAULT 0 /* Built-in default */ -#define CONF_CHOICE_ORIGIN_CONFDEFAULT 1 /* Config file option */ -#define CONF_CHOICE_ORIGIN_CONFGAME 2 /* Game-specific option */ -#define CONF_CHOICE_ORIGIN_COMMANDLINE 3 - -#define CONF_CHOICE_FLAG_WRITEABLE (1<<0) /* 'parse' can be written to */ -#define CONF_CHOICE_FLAG_DISABLED (1<<1) /* Option isn't set, only listed for completeness */ - -typedef struct { - conf_option_choice_t *options; /* Driver-specific */ - conf_driver_t *driver; -} conf_driver_choice_t; - -typedef struct { - conf_option_choice_t *options; /* Subsystem-specific */ - int driver_origin; /* CONF_CHOICE_ORIGIN_* */ - conf_driver_choice_t *driver; /* The particular driver selected */ - conf_driver_choice_t *drivers; /* All available drivers, with their options */ -} conf_subsystem_choice_t; - -typedef struct { - char *game_id; /* NULL for default */ - conf_option_choice_t *options; /* Global */ - int flags; - conf_parse_t **append_location; /* Into here we can add new configuration options to override */ - - conf_subsystem_choice_t[CONF_SUBSYSTEMS_NR] subsystems; -} conf_game_choice_t; - -#define CONF_GAME_CHOICE_FLAG_OVERRIDE_IN_SECTION (1<<0) /* Override section already exists, need not be re-created */ - -typedef struct { - conf_game_choice_t *default; - - int game_choices_nr; - conf_game_choice_t *game_choices; -} conf_summary_t; - - -conf_summary_t * -conf_summary(conf_parse_t *raw_config); -/* Summarises a config parse in a conf_summary_t -** Parameters: (conf_parse_t *) raw_config: The parse to summarise -** Returns : (conf_summary_t *) A summarised configuration -** The summary includes (default) values for all driver/subsystem options -*/ - -void -conf_free_summary(conf_summary_t *summary); -/* Deallocates a configuration summary -** Parameters: (conf_summary_t *) summary: The summary to deallocate -** This only affects the summary, not the underlying parse. -*/ - -conf_game_choice_t * -conf_find_choice(conf_summary_t *choices, char *game_id); -/* Finds the correct game choice by game ID -** Parameters: (conf_summary_t *) summary: The summary to peruse -** (char *) game_id: Identified game ID. -** We search by exact match or otherwise default. -*/ - -#endif /* !defined (CONF_SUMMARY_H_) */ diff --git a/engines/sci/include/modules.h b/engines/sci/include/modules.h deleted file mode 100644 index 9a64956326..0000000000 --- a/engines/sci/include/modules.h +++ /dev/null @@ -1,84 +0,0 @@ -/*************************************************************************** - modules.h Copyright (C) 2001 Christoph Reichenbach - - - This program may be modified and copied freely according to the terms of - the GNU general public license (GPL), as long as the above copyright - notice and the licensing information contained herein are preserved. - - Please refer to www.gnu.org for licensing details. - - This work is provided AS IS, without warranty of any kind, expressed or - implied, including but not limited to the warranties of merchantibility, - noninfringement, and fitness for a specific purpose. The author will not - be held liable for any damage caused by this work or derivatives of it. - - By using this source code, you agree to the licensing terms as stated - above. - - - Please contact the maintainer for bug reports or inquiries. - - Current Maintainer: - - Christoph Reichenbach (CR) <jameson@linuxgames.com> - -***************************************************************************/ - -#ifndef _FREESCI_MODULES_H_ -#define _FREESCI_MODULES_H_ - -#include <sciresource.h> - -#ifdef _WIN32 -# define MODULE_NAME_SUFFIX ".dll" -#else -# define MODULE_NAME_SUFFIX ".so" -#endif - - -/* Modules must sub-type this structure. Oh, wait, C doesn't do sub-typing. -** Well, they have to start the same, anyway... */ -typedef struct { - char *module_name; /* Module name */ - char *module_version; /* Module version */ - int class_magic; /* Magic ID to identify drivers of certain types */ - int class_version; /* Version of that particular driver class */ - - /* More entries might be added later, but won't be checked if magic or - ** version don't match. */ - -} sci_module_t; - - -void * -sci_find_module(char *path, char *name, char *type, char *struct_prefix, - char *file_suffix, int magic, int version, void **handle); -/* Attempts to open a module with the specified parameters in the path -** Parameters: (char *) path: The path to look in; supports several directories -** (char *) name: Module name -** (char *) type: Module type string (see below) -** (char *) struct_prefix: see below -** (char *) file_suffix: see below -** (int) magic: Magic number to identify the module type -** (int) version: The only version to support -** (void **) handle: Pointer to a void * which a handle is written -** to (for use with sci_close_module()). -** Returns : (void *) NULL if no module was found, a pointer to the structure -** otherwise -** This function looks for the structure 'struct_prefix + name' in a file called -** 'name + file_suffix + MODULE_NAME_SUFFIX' in the 'type' subdirectory. -** It only success if both the magic and the version number match. -*/ - -void -sci_close_module(void *module, char *type, char *name); -/* Closes a previously found module -** Parameters: (void *) module: Reference to the module to close -** (char *) type: Type of the module (for debugging) -** (char *) name: Module name (for debugging) -** Returns : (void) -*/ - - -#endif /* !_FREESCI_MODULES_H_ */ diff --git a/engines/sci/include/sci_conf.h b/engines/sci/include/sci_conf.h deleted file mode 100644 index da411226ed..0000000000 --- a/engines/sci/include/sci_conf.h +++ /dev/null @@ -1,187 +0,0 @@ -/*************************************************************************** - sci_conf.h Copyright (C) 1999,2000,01 Christoph Reichenbach - - - This program may be modified and copied freely according to the terms of - the GNU general public license (GPL), as long as the above copyright - notice and the licensing information contained herein are preserved. - - Please refer to www.gnu.org for licensing details. - - This work is provided AS IS, without warranty of any kind, expressed or - implied, including but not limited to the warranties of merchantibility, - noninfringement, and fitness for a specific purpose. The author will not - be held liable for any damage caused by this work or derivatives of it. - - By using this source code, you agree to the licensing terms as stated - above. - - - Please contact the maintainer for bug reports or inquiries. - - Current Maintainer: - - Christoph Reichenbach (CJR) [jameson@linuxgames.com] - -***************************************************************************/ -/* Configuration and setup stuff for FreeSCI */ - -#ifndef _SCI_CONFIG_H_ -#define _SCI_CONFIG_H_ - -#include <versions.h> -#include <gfx_options.h> - -#define FREESCI_DRIVER_SUBSYSTEMS_NR 1 - -#define FREESCI_DRIVER_SUBSYSTEM_GFX 0 -#define FREESCI_DRIVER_SUBSYSTEM_PCM 1 -#define FREESCI_DRIVER_SUBSYSTEM_MIDIOUT 2 - -#ifdef _WIN32 -# define SCI_DEFAULT_MODULE_PATH "." -#else -# define SCI_DEFAULT_MODULE_PATH "/usr/local/lib/freesci/:/usr/lib/freesci/" -#endif - -typedef struct _driver_option { - char *option; - char *value; - struct _driver_option *next; -} driver_option_t; - -typedef struct _subsystem_options { - char *name; /* Driver name */ - driver_option_t *options; - struct _subsystem_options *next; /* next driver */ -} subsystem_options_t; - -typedef struct { - /* IMPORTANT: these values correspond directly to what's specified in - ** config.l. Where an option is of type OPTION_TYPE_NVP or - ** OPTION_TYPE_INVERSE_NVP, it is cast as an _integer_. Therefore it - ** should not be any other type except for int here. - */ - - char *name; /* Game identifier */ - sci_version_t version; /* The version to emulate */ - - gfx_options_t gfx_options; - - subsystem_options_t *driver_options[FREESCI_DRIVER_SUBSYSTEMS_NR]; - - int x_scale, y_scale, scale, color_depth; /* GFX subsystem initialization values */ - - int animation_delay; /* Number of microseconds to wait between each pic transition animation cycle */ - int animation_granularity; /* Granularity for pic transition animations */ - int alpha_threshold; /* Crossblitting alpha threshold */ - int unknown_count; /* The number of "unknown" kernel functions */ - char *resource_dir; /* Resource directory */ - char *gfx_driver_name; /* The graphics driver to use */ - char *console_log; /* The file to which console output should be echoed */ - char *menu_dir; /* Directory where the game menu searches for games */ - char debug_mode [80]; /* Characters specifying areas for which debug output should be enabled */ - int mouse; /* Whether the mouse should be active */ - int reverse_stereo; - int res_version; - -#ifdef __GNUC__ -# warning "Re-enable sound stuff" -#endif -#if 0 - midiout_driver_t *midiout_driver; /* the midiout method to use */ - midi_device_t *midi_device; /* the midi device to use */ - - pcmout_driver_t *pcmout_driver; /* the pcm driver to use */ - sound_server_t *sound_server; /* The sound server */ -#endif - guint16 pcmout_rate; /* Sample rate */ - guint8 pcmout_stereo; /* Stereo? */ - - char *module_path; /* path to directories modules are loaded from */ - void *dummy; /* This is sad... */ -} config_entry_t; - -int -config_init(config_entry_t **conf, char *conffil); -/* Initializes the config entry structurre based on information found in the config file. -** Parameters: (config_entry_t **) conf: See below -** (char *) conffile: Filename of the config file, or NULL to use the default name -** Returns : (int) The number of config file entries found -** This function reads the ~/.freesci/config file, parses it, and inserts the appropriate -** data into *conf. *conf will be malloc'd to be an array containing default information in [0] -** and game-specific data in each of the subsequent record entries. -** Not threadsafe. Uses flex-generated code. -*/ - -void -config_free(config_entry_t **conf, int entries); -/* Frees a config entry structure -** Parameters: (config_entry_t **) conf: Pointer to the pointer to the first entry of the list -** (int) entries: Number of entries to free -** Returns : (void) -*/ - - -void * -parse_gfx_driver(char *driver_name); -/* Parses a string and looks up an appropriate driver structure -** Parameters: (char *) driver_name: Name of the driver to look up -** Returns : (void *) A matching driver, or NULL on failure -*/ - -void * -parse_midiout_driver(char *driver_name); -/* Parses a string and looks up an appropriate driver structure -** Parameters: (char *) driver_name: Name of the driver to look up -** Returns : (void *) A matching driver, or NULL on failure -*/ - -void * -parse_midi_device(char *driver_name); -/* Parses a string and looks up an appropriate driver structure -** Parameters: (char *) driver_name: Name of the driver to look up -** Returns : (void *) A matching driver, or NULL on failure -*/ - -void * -parse_pcmout_driver(char *driver_name); -/* Parses a string and looks up an appropriate driver structure -** Parameters: (char *) driver_name: Name of the driver to look up -** Returns : (void *) A matching driver, or NULL on failure -*/ - -void * -parse_sound_server(char *driver_name); -/* Parses a string and looks up an appropriate driver structure -** Parameters: (char *) driver_name: Name of the driver to look up -** Returns : (void *) A matching sound server, or NULL on failure -*/ - -driver_option_t * -get_driver_options(config_entry_t *config, int subsystem, const char *name); -/* Retreives the driver options for one specific driver in a subsystem -** Parameters: (config_entry_t *) config: The config entry to search in -** (int) subsystem: Any of the FREESCI_DRIVER_SUBSYSTEMs -** (const char *) name: Name of the driver to look for -** Returns : (driver_option_t *) A pointer to the first option in -** a singly-linked list of options, or NULL if none was -** found -*/ - -#if 0 -void * -find_module(char *path, char *module_name, char *module_suffix); -/* Tries to find a module in the specified path -** Parameters: (char *) path: The path to search in (specified in config) -** (char *) module_name: Name of the module to look for -** (char *) module_suffix: Module structure to look for -** More precisely, the module "module_name" + MODULE_NAME_SUFFIX is -** looked for in all members of the path. If it is found, - -** FIXME: First need to add generic module architecture - -*/ -#endif - -#endif /* !_SCI_CONFIG_H */ |