- 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
This commit is contained in:
parent
874e340d25
commit
b43094cec0
4 changed files with 34 additions and 87 deletions
|
@ -167,42 +167,19 @@ void con_init() {
|
||||||
" particular sequence of bytes, re-\n presented as hexadecimal numbers.\n\n"
|
" 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");
|
"EXAMPLES:\n hexgrep script e8 03 c8 00\n hexgrep pic.042 fe");
|
||||||
|
|
||||||
con_hook_page("addresses", "Passing address parameters\n\n"
|
// These were in sci.cpp
|
||||||
" Address parameters may be passed in one of\n"
|
/*
|
||||||
" three forms:\n"
|
con_hook_int(&(gfx_options.buffer_pics_nr), "buffer_pics_nr",
|
||||||
" - ssss:oooo -- where 'ssss' denotes a\n"
|
"Number of pics to buffer in LRU storage\n");
|
||||||
" segment and 'oooo' an offset. Example:\n"
|
con_hook_int(&(gfx_options.pic0_dither_mode), "pic0_dither_mode",
|
||||||
" \"a:c5\" would address something in seg-\n"
|
"Mode to use for pic0 dithering\n");
|
||||||
" ment 0xa at offset 0xc5.\n"
|
con_hook_int(&(gfx_options.pic0_dither_pattern), "pic0_dither_pattern",
|
||||||
" - &scr:oooo -- where 'scr' is a script number\n"
|
"Pattern to use for pic0 dithering\n");
|
||||||
" and oooo an offset within that script; will\n"
|
con_hook_int(&(gfx_options.pic0_unscaled), "pic0_unscaled",
|
||||||
" fail if the script is not currently loaded\n"
|
"Whether pic0 should be drawn unscaled\n");
|
||||||
" - $REG -- where 'REG' is one of 'PC', 'ACC',\n"
|
con_hook_int(&(gfx_options.dirty_frames), "dirty_frames",
|
||||||
" 'PREV' or 'OBJ': References the address\n"
|
"Dirty frames management\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");
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,6 +187,20 @@ static inline int clone_is_used(CloneTable *t, int idx) {
|
||||||
return t->isValidEntry(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 parse_reg_t(EngineState *s, const char *str, reg_t *dest) { // Returns 0 on success
|
||||||
int rel_offsetting = 0;
|
int rel_offsetting = 0;
|
||||||
const char *offsetting = NULL;
|
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);
|
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) {
|
int con_hook_command(ConCommand command, const char *name, const char *param, const char *description) {
|
||||||
cmd_command_t *cmd = NULL;
|
cmd_command_t *cmd = NULL;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
|
@ -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.
|
** 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);
|
int con_hook_int(int *pointer, const char *name, const char *description);
|
||||||
/* Adds an int to the list of modifyable ints.
|
/* Adds an int to the list of modifyable ints.
|
||||||
** Parameters: pointer: Pointer to the int to add to the list
|
** Parameters: pointer: Pointer to the int to add to the list
|
||||||
|
|
|
@ -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(&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_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
|
} // If commands were not hooked up
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,9 @@ protected:
|
||||||
void removeFromLRU(Resource *res);
|
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 {
|
class ResourceSync : public Resource {
|
||||||
public:
|
public:
|
||||||
ResourceSync() {}
|
ResourceSync() {}
|
||||||
|
@ -309,7 +311,10 @@ protected:
|
||||||
//bool _syncStarted; // not used
|
//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 {
|
class AudioResource {
|
||||||
public:
|
public:
|
||||||
AudioResource(ResourceManager *resMgr, int sciVersion);
|
AudioResource(ResourceManager *resMgr, int sciVersion);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue