diff options
| author | Filippos Karapetis | 2009-05-29 17:39:55 +0000 | 
|---|---|---|
| committer | Filippos Karapetis | 2009-05-29 17:39:55 +0000 | 
| commit | b43094cec05e639b43e9e14ad7a9001b9c5d7fac (patch) | |
| tree | 1ed4b6c1d76b5c7ddf9de6b0fc0e6d48afcac5b9 | |
| parent | 874e340d25e79d067b7b5c2d72fe82c39da4a934 (diff) | |
| download | scummvm-rg350-b43094cec05e639b43e9e14ad7a9001b9c5d7fac.tar.gz scummvm-rg350-b43094cec05e639b43e9e14ad7a9001b9c5d7fac.tar.bz2 scummvm-rg350-b43094cec05e639b43e9e14ad7a9001b9c5d7fac.zip  | |
- Added brief Doxygen comments to the ResourceSync and AudioResource classes to explain what they do
- Removed the outdated info page on "codebugging"
- Moved the "addresses" info page as a comment above parse_reg_t()
- Removed con_hook_page()
svn-id: r41013
| -rw-r--r-- | engines/sci/engine/sciconsole.cpp | 72 | ||||
| -rw-r--r-- | engines/sci/engine/sciconsole.h | 7 | ||||
| -rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 33 | ||||
| -rw-r--r-- | engines/sci/resource.h | 9 | 
4 files changed, 34 insertions, 87 deletions
diff --git a/engines/sci/engine/sciconsole.cpp b/engines/sci/engine/sciconsole.cpp index 6d4059492f..0fee370972 100644 --- a/engines/sci/engine/sciconsole.cpp +++ b/engines/sci/engine/sciconsole.cpp @@ -167,42 +167,19 @@ void con_init() {  		                 "  particular sequence of bytes, re-\n  presented as hexadecimal numbers.\n\n"  		                 "EXAMPLES:\n  hexgrep script e8 03 c8 00\n  hexgrep pic.042 fe"); -		con_hook_page("addresses", "Passing address parameters\n\n" -		              "  Address parameters may be passed in one of\n" -		              "  three forms:\n" -		              "  - ssss:oooo -- where 'ssss' denotes a\n" -		              "    segment and 'oooo' an offset. Example:\n" -		              "    \"a:c5\" would address something in seg-\n" -		              "    ment 0xa at offset 0xc5.\n" -		              "  - &scr:oooo -- where 'scr' is a script number\n" -		              "    and oooo an offset within that script; will\n" -		              "    fail if the script is not currently loaded\n" -		              "  - $REG -- where 'REG' is one of 'PC', 'ACC',\n" -		              "    'PREV' or 'OBJ': References the address\n" -		              "    indicated by the register of this name.\n" -		              "  - $REG+n (or -n) -- Like $REG, but modifies\n" -		              "    the offset part by a specific amount (which\n" -		              "    is specified in hexadecimal).\n" -		              "  - ?obj -- Looks up an object with the specified\n" -		              "    name, uses its address. This will abort if\n" -		              "    the object name is ambiguous; in that case,\n" -		              "    a list of addresses and indices is provided.\n" -		              "    ?obj.idx may be used to disambiguate 'obj'\n" -		              "    by the index 'idx'.\n"); - -			// These were in sci.cpp -			/* -			con_hook_int(&(gfx_options.buffer_pics_nr), "buffer_pics_nr", -				"Number of pics to buffer in LRU storage\n"); -			con_hook_int(&(gfx_options.pic0_dither_mode), "pic0_dither_mode", -				"Mode to use for pic0 dithering\n"); -			con_hook_int(&(gfx_options.pic0_dither_pattern), "pic0_dither_pattern", -				"Pattern to use for pic0 dithering\n"); -			con_hook_int(&(gfx_options.pic0_unscaled), "pic0_unscaled", -				"Whether pic0 should be drawn unscaled\n"); -			con_hook_int(&(gfx_options.dirty_frames), "dirty_frames", -				"Dirty frames management\n"); -			*/ +		// These were in sci.cpp +		/* +		con_hook_int(&(gfx_options.buffer_pics_nr), "buffer_pics_nr", +			"Number of pics to buffer in LRU storage\n"); +		con_hook_int(&(gfx_options.pic0_dither_mode), "pic0_dither_mode", +			"Mode to use for pic0 dithering\n"); +		con_hook_int(&(gfx_options.pic0_dither_pattern), "pic0_dither_pattern", +			"Pattern to use for pic0 dithering\n"); +		con_hook_int(&(gfx_options.pic0_unscaled), "pic0_unscaled", +			"Whether pic0 should be drawn unscaled\n"); +		con_hook_int(&(gfx_options.dirty_frames), "dirty_frames", +			"Dirty frames management\n"); +		*/  	}  } @@ -210,6 +187,20 @@ static inline int clone_is_used(CloneTable *t, int idx) {  	return t->isValidEntry(idx);  } +/** + * Address parameters may be passed in one of three forms: + * - ssss:oooo -- where 'ssss' denotes a segment and 'oooo' an offset. + *   Example: "a:c5" would address something in segment 0xa at offset 0xc5. + * - &scr:oooo -- where 'scr' is a script number and oooo an offset within that script; will + *   fail if the script is not currently loaded + * - $REG -- where 'REG' is one of 'PC', 'ACC', 'PREV' or 'OBJ': References the address + *   indicated by the register of this name. + * - $REG+n (or -n) -- Like $REG, but modifies the offset part by a specific amount (which + *   is specified in hexadecimal). + * - ?obj -- Looks up an object with the specified name, uses its address. This will abort if + *   the object name is ambiguous; in that case, a list of addresses and indices is provided. + *   ?obj.idx may be used to disambiguate 'obj' by the index 'idx'. +**/  int parse_reg_t(EngineState *s, const char *str, reg_t *dest) { // Returns 0 on success  	int rel_offsetting = 0;  	const char *offsetting = NULL; @@ -590,15 +581,6 @@ static cmd_mm_entry_t *con_alloc_page_entry(int ID) {  	return (cmd_mm_entry_t *)(((byte *)cmd_mm[ID].data) + entry * cmd_mm[ID].size_per_entry);  } -int con_hook_page(const char *name, const char *body) { -	cmd_page_t *page = (cmd_page_t *)con_alloc_page_entry(CMD_MM_DOC); - -	page->name = name; -	page->description = body; - -	return 0; -} -  int con_hook_command(ConCommand command, const char *name, const char *param, const char *description) {  	cmd_command_t *cmd = NULL;  	unsigned int i; diff --git a/engines/sci/engine/sciconsole.h b/engines/sci/engine/sciconsole.h index 96a3d71608..718d30fb8f 100644 --- a/engines/sci/engine/sciconsole.h +++ b/engines/sci/engine/sciconsole.h @@ -106,13 +106,6 @@ int con_hook_command(ConCommand command, const char *name, const char *param, co  ** as no element beyond strlen(cmd_params[x].str)+1 is accessed.  */ -int con_hook_page(const char *topic, const char *body); -/* Hooks a general information page to the manual page system -** Parameters: (const char *) topic: The topic name -**             (const char *) body: The text body to assign to the topic -** Returns   : (int) 0 on success -*/ -  int con_hook_int(int *pointer, const char *name, const char *description);  /* Adds an int to the list of modifyable ints.  ** Parameters: pointer: Pointer to the int to add to the list diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 2415194032..f066dcbe2c 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -3213,39 +3213,6 @@ void script_debug(EngineState *s, reg_t *pc, StackPtr *sp, StackPtr *pp, reg_t *  			con_hook_int(&script_gc_interval, "gc-interval", "Number of kernel calls in between gcs");  			con_hook_int(&debug_sleeptime_factor, "sleep-factor", "Factor to multiply with wait times\n  Set to 0 to speed up games"); - -			con_hook_page("codebugging", -			              "Co-debugging allows to run two (sufficiently\n" -			              "  recent) versions of FreeSCI concurrently,\n" -			              "  with one acting as a client of the other.\n" -			              "    Co-debugging can be started by calling\n" -			              "  'codebug' (see codebug.1); note that the\n" -			              "  argument passed to it must be a version of\n" -			              "  FreeSCI that performs fflush(NULL) before\n" -			              "  each read; only late 0.3.3-devel and later\n" -			              "  have this property.\n\n" -			              "  In co-debug mode, all commands are sent to\n" -			              "  both programs, UNLESS one of the following\n" -			              "  prefixes is used:\n\n" -			              "    '.' : Only sends to the foreground version\n" -			              "    ':' : Only sends to tbe background version\n\n" -			              "  For example, when running 0.3.3 from within\n" -			              "  0.6.0, \".version\" would determine the version\n" -			              "  as 0.6.0, and \"0.3.3\" would be returned for\n" -			              "  \":version\". Both versions would be print\n" -			              "  if only \"version\" was invoked, each result\n" -			              "  coming from a different process.\n\n" -			              "COLORS\n\n" -			              "  Whenever possible, the background process will\n" -			              "  have its output marked by a non-default color\n" -			              "  (usually red).\n\n" -			              "TROUBLESHOOTING\n\n" -			              "  If the background version appears to be silent,\n" -			              "  make sure it is calling fflush(NULL) before\n" -			              "  reading input.\n\n" -			              "SEE ALSO\n\n" -			              "  codebug.1"); -  		} // If commands were not hooked up  	} diff --git a/engines/sci/resource.h b/engines/sci/resource.h index a90d786d29..a4de00d4f4 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -293,7 +293,9 @@ protected:  	void removeFromLRU(Resource *res);  }; -// Used for speech playback in CD games +/** + * Used for lip and animation syncing in CD talkie games + */  class ResourceSync : public Resource {  public:  	ResourceSync() {} @@ -309,7 +311,10 @@ protected:  	//bool _syncStarted;	// not used  }; -// Used for speech playback in CD games +/** + * Used for speech playback and digital music playback + * in CD talkie games + */  class AudioResource {  public:  	AudioResource(ResourceManager *resMgr, int sciVersion);  | 
