aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/include
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/include')
-rw-r--r--engines/sci/include/kernel.h24
-rw-r--r--engines/sci/include/list.h2
-rw-r--r--engines/sci/include/sci_widgets.h12
-rw-r--r--engines/sci/include/sciresource.h6
-rw-r--r--engines/sci/include/vm.h43
-rw-r--r--engines/sci/include/vocabulary.h11
6 files changed, 46 insertions, 52 deletions
diff --git a/engines/sci/include/kernel.h b/engines/sci/include/kernel.h
index d1c54d1994..c5d6452610 100644
--- a/engines/sci/include/kernel.h
+++ b/engines/sci/include/kernel.h
@@ -79,7 +79,7 @@ struct abs_rect_t {
#define INV_SEL(_object_, _selector_, _noinvalid_) \
- s, _object_, s->selector_map._selector_, _noinvalid_, funct_nr, argv, argc, __FILE__, __LINE__
+ s, _object_, s->selector_map._selector_, _noinvalid_, funct_nr, argv, argc, __FILE__, __LINE__
/* Kludge for use with invoke_selector(). Used for compatibility with compilers that can't
** handle vararg macros.
*/
@@ -88,7 +88,7 @@ struct abs_rect_t {
reg_t read_selector(EngineState *s, reg_t object, selector_t selector_id, const char *fname, int line);
void write_selector(EngineState *s, reg_t object, selector_t selector_id, reg_t value, const char *fname, int line);
int invoke_selector(EngineState *s, reg_t object, int selector_id, int noinvalid, int kfunct,
- stack_ptr_t k_argp, int k_argc, const char *fname, int line, int argc, ...);
+ stack_ptr_t k_argp, int k_argc, const char *fname, int line, int argc, ...);
/******************** Text functionality ********************/
@@ -111,15 +111,15 @@ char *kernel_lookup_text(EngineState *s, reg_t address, int index);
#ifdef SCI_KERNEL_DEBUG
#define CHECK_THIS_KERNEL_FUNCTION if (s->debug_mode & (1 << SCIkFUNCCHK_NR)) {\
- int i;\
- sciprintf("Kernel CHECK: %s[%x](", s->kernel_names[funct_nr], funct_nr); \
- for (i = 0; i < argc; i++) { \
- sciprintf("%04x", 0xffff & UKPV(i)); \
- if (i+1 < argc) sciprintf(", "); \
- } \
- sciprintf(")\n"); \
+ int i;\
+ sciprintf("Kernel CHECK: %s[%x](", s->kernel_names[funct_nr], funct_nr); \
+ for (i = 0; i < argc; i++) { \
+ sciprintf("%04x", 0xffff & UKPV(i)); \
+ if (i+1 < argc) sciprintf(", "); \
+ } \
+ sciprintf(")\n"); \
} \
-
+
#else /* !SCI_KERNEL_DEBUG */
#define CHECK_THIS_KERNEL_FUNCTION
@@ -200,13 +200,13 @@ int _find_view_priority(EngineState *s, int y);
+ ((((y) - s->priority_first) * 14) / (s->priority_last - s->priority_first))))
#define SCI0_PRIORITY_BAND_FIRST_14_ZONES(nr) ((((nr) == 0)? 0 : \
- ((s->priority_first) + (((nr)-1) * (s->priority_last - s->priority_first)) / 14)))
+ ((s->priority_first) + (((nr)-1) * (s->priority_last - s->priority_first)) / 14)))
#define SCI0_VIEW_PRIORITY(y) (((y) < s->priority_first)? 0 : (((y) >= s->priority_last)? 14 : 1\
+ ((((y) - s->priority_first) * 15) / (s->priority_last - s->priority_first))))
#define SCI0_PRIORITY_BAND_FIRST(nr) ((((nr) == 0)? 0 : \
- ((s->priority_first) + (((nr)-1) * (s->priority_last - s->priority_first)) / 15)))
+ ((s->priority_first) + (((nr)-1) * (s->priority_last - s->priority_first)) / 15)))
#define VIEW_PRIORITY(y) _find_view_priority(s, y)
#define PRIORITY_BAND_FIRST(nr) _find_priority_band(s, nr)
diff --git a/engines/sci/include/list.h b/engines/sci/include/list.h
index ec5e15ec67..cc7c2530ed 100644
--- a/engines/sci/include/list.h
+++ b/engines/sci/include/list.h
@@ -106,7 +106,7 @@ struct { \
#define LIST_REMOVE(elm, field) do { \
if ((elm)->field.le_next != NULL) \
- (elm)->field.le_next->field.le_prev = \
+ (elm)->field.le_next->field.le_prev = \
(elm)->field.le_prev; \
*(elm)->field.le_prev = (elm)->field.le_next; \
} while (0)
diff --git a/engines/sci/include/sci_widgets.h b/engines/sci/include/sci_widgets.h
index 4c03b072de..4fefd43d70 100644
--- a/engines/sci/include/sci_widgets.h
+++ b/engines/sci/include/sci_widgets.h
@@ -71,8 +71,8 @@ void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, char *text, in
*/
gfxw_port_t *sciw_new_window(EngineState *s, rect_t area, int font, gfx_color_t color, gfx_color_t bgcolor,
- int title_font, gfx_color_t title_color, gfx_color_t title_bg_color,
- const char *title, int flags);
+ int title_font, gfx_color_t title_color, gfx_color_t title_bg_color,
+ const char *title, int flags);
/* Creates a new SCI style window
** Parameters: (EngineState *) s: The affected game state
** (rect_t) area: The screen area to frame (not including a potential window title)
@@ -106,7 +106,7 @@ gfxw_list_t *sciw_new_button_control(gfxw_port_t *port, reg_t ID, rect_t zone, c
*/
gfxw_list_t *sciw_new_text_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font,
- gfx_alignment_t align, char frame, char inverse);
+ gfx_alignment_t align, char frame, char inverse);
/* Creates a new text control list
** Parameters: (gfxw_port_t *) port: The port containing the color values to use
** (reg_t) ID: Text widget ID
@@ -120,7 +120,7 @@ gfxw_list_t *sciw_new_text_control(gfxw_port_t *port, reg_t ID, rect_t zone, cha
*/
gfxw_list_t *sciw_new_edit_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, unsigned int cursor,
- char inverse);
+ char inverse);
/* Creates a new edit control list
** Parameters: (gfxw_port_t *) port: The port containing the color values to use
** (reg_t) ID: Text widget ID
@@ -133,7 +133,7 @@ gfxw_list_t *sciw_new_edit_control(gfxw_port_t *port, reg_t ID, rect_t zone, cha
*/
gfxw_list_t *sciw_new_icon_control(gfxw_port_t *port, reg_t ID, rect_t zone, int view, int loop, int cel,
- char frame, char inverse);
+ char frame, char inverse);
/* Creates a new icon control list
** Parameters: (gfxw_port_t *) port: The port containing the color values to use
** (reg_t) ID: Text widget ID
@@ -145,7 +145,7 @@ gfxw_list_t *sciw_new_icon_control(gfxw_port_t *port, reg_t ID, rect_t zone, int
*/
gfxw_list_t *sciw_new_list_control(gfxw_port_t *port, reg_t ID, rect_t zone, int font_nr, char **entries_list,
- int entries_nr, int list_top, int selection, char inverse);
+ int entries_nr, int list_top, int selection, char inverse);
/* Creates a new list control list
** Parameters: (gfxw_port_t *) port: The port containing the color values to use
** (int) ID: Text widget ID
diff --git a/engines/sci/include/sciresource.h b/engines/sci/include/sciresource.h
index 1bad516e1f..9be5d0ed3a 100644
--- a/engines/sci/include/sciresource.h
+++ b/engines/sci/include/sciresource.h
@@ -160,7 +160,7 @@ struct resource_t {
resource_t *prev;
resource_altsource_t *alt_sources; /* SLL of alternative resource data sources */
-};
+};
struct ResourceManager {
@@ -206,7 +206,7 @@ ResourceSource *scir_add_patch_dir(ResourceManager *mgr, const char *path);
ResourceSource *scir_get_volume(ResourceManager *mgr, ResourceSource *map, int volume_nr);
ResourceSource *scir_add_volume(ResourceManager *mgr, ResourceSource *map, const char *filename,
- int number, int extended_addressing);
+ int number, int extended_addressing);
/* Add a volume to the resource manager's list of sources.
** Parameters: (ResourceManager *) mgr: The resource manager to look up in
** (ResourceSource *) map: The map associated with this volume
@@ -280,7 +280,7 @@ int sci0_read_resource_map(ResourceManager *mgr, ResourceSource *map, resource_t
*/
int sci1_read_resource_map(ResourceManager *mgr, ResourceSource *map, ResourceSource *vol,
- resource_t **resource_p, int *resource_nr_p, int *sci_version);
+ resource_t **resource_p, int *resource_nr_p, int *sci_version);
/* Reads the SCI1 resource.map file from a local directory
** Parameters: (char *) path: (unused)
** (resource_t **) resources: Pointer to a pointer
diff --git a/engines/sci/include/vm.h b/engines/sci/include/vm.h
index 6362c2f072..1a720988de 100644
--- a/engines/sci/include/vm.h
+++ b/engines/sci/include/vm.h
@@ -156,23 +156,23 @@ struct code_block_t {
};
#define VM_OBJECT_GET_VARSELECTOR(obj, i) \
- (s->version < SCI_VERSION(1,001,000) ? \
- getUInt16(obj->base_obj + obj->variables_nr * 2 + i*2) : \
- *(obj->base_vars + i))
+ (s->version < SCI_VERSION(1,001,000) ? \
+ getUInt16(obj->base_obj + obj->variables_nr * 2 + i*2) : \
+ *(obj->base_vars + i))
#define VM_OBJECT_READ_PROPERTY(obj, i) (obj->variables[i])
#define VM_OBJECT_GET_FUNCSELECTOR(obj, i) \
- (s->version < SCI_VERSION(1,001,000) ? \
- getUInt16((byte *) (obj->base_method + i)) : \
- getUInt16((byte *) (obj->base_method + i*2 + 1)))
+ (s->version < SCI_VERSION(1,001,000) ? \
+ getUInt16((byte *) (obj->base_method + i)) : \
+ getUInt16((byte *) (obj->base_method + i*2 + 1)))
#define VM_OBJECT_READ_FUNCTION(obj, i) \
- (s->version < SCI_VERSION(1,001,000) ? \
- make_reg(obj->pos.segment, \
- getUInt16((byte *) (obj->base_method \
- + obj->methods_nr + 1 \
- + i))) : \
- make_reg(obj->pos.segment, \
- getUInt16((byte *) (obj->base_method \
- + i * 2 + 2))))
+ (s->version < SCI_VERSION(1,001,000) ? \
+ make_reg(obj->pos.segment, \
+ getUInt16((byte *) (obj->base_method \
+ + obj->methods_nr + 1 \
+ + i))) : \
+ make_reg(obj->pos.segment, \
+ getUInt16((byte *) (obj->base_method \
+ + i * 2 + 2))))
@@ -466,7 +466,7 @@ extern int max_instance;
/*inline*/
exec_stack_t *execute_method(EngineState *s, uint16 script, uint16 pubfunct, stack_ptr_t sp, reg_t calling_obj,
- uint16 argc, stack_ptr_t argp);
+ uint16 argc, stack_ptr_t argp);
/* Executes function pubfunct of the specified script.
** Parameters: (EngineState *) s: The state which is to be executed with
** (uint16) script: The script which is called
@@ -480,7 +480,7 @@ exec_stack_t *execute_method(EngineState *s, uint16 script, uint16 pubfunct, sta
exec_stack_t *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj,
- stack_ptr_t sp, int framesize, stack_ptr_t argp);
+ stack_ptr_t sp, int framesize, stack_ptr_t argp);
/* Executes a "send" or related operation to a selector
** Parameters: (EngineState *) s: The EngineState to operate on
** (reg_t) send_obj: Heap address of the object to send to
@@ -498,8 +498,7 @@ exec_stack_t *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj,
#define SCI_XS_CALLEE_LOCALS -1
exec_stack_t *add_exec_stack_entry(EngineState *s, reg_t pc, stack_ptr_t sp, reg_t objp, int argc,
- stack_ptr_t argp, selector_t selector, reg_t sendp, int origin,
- seg_id_t local_segment);
+ stack_ptr_t argp, selector_t selector, reg_t sendp, int origin, seg_id_t local_segment);
/* Adds an entry to the top of the execution stack
** Parameters: (EngineState *) s: The state with which to execute
** (reg_t) pc: The initial program counter
@@ -520,7 +519,7 @@ exec_stack_t *add_exec_stack_entry(EngineState *s, reg_t pc, stack_ptr_t sp, reg
exec_stack_t *add_exec_stack_varselector(EngineState *s, reg_t objp, int argc, stack_ptr_t argp,
- selector_t selector, reg_t *address, int origin);
+ selector_t selector, reg_t *address, int origin);
/* Adds one varselector access to the execution stack
** Parameters: (EngineState *) s: The EngineState to use
** (reg_t) objp: Pointer to the object owning the selector
@@ -552,10 +551,8 @@ void vm_handle_fatal_error(EngineState *s, int line, const char *file);
void script_debug(EngineState *s, reg_t *pc, stack_ptr_t *sp, stack_ptr_t *pp, reg_t *objp,
- int *restadjust,
- seg_id_t *segids, reg_t **variables, reg_t **variables_base,
- int *variables_nr,
- int bp);
+ int *restadjust, seg_id_t *segids, reg_t **variables, reg_t **variables_base,
+ int *variables_nr, int bp);
/* Debugger functionality
** Parameters: (EngineState *) s: The state at which debugging should take place
** (reg_t *) pc: Pointer to the program counter
diff --git a/engines/sci/include/vocabulary.h b/engines/sci/include/vocabulary.h
index 3e2239b952..9f9c3367bc 100644
--- a/engines/sci/include/vocabulary.h
+++ b/engines/sci/include/vocabulary.h
@@ -284,8 +284,7 @@ void vocab_free_branches(parse_tree_branch_t *parser_branches);
*/
result_word_t *vocab_lookup_word(char *word, int word_len,
- word_t **words, int words_nr,
- suffix_t **suffices, int suffices_nr);
+ word_t **words, int words_nr, suffix_t **suffices, int suffices_nr);
/* Looks up a single word in the words and suffixes list
** Parameters: (char *) word: Pointer to the word to look up
** (int) word_len: Length of the word to look up
@@ -299,9 +298,7 @@ result_word_t *vocab_lookup_word(char *word, int word_len,
result_word_t *vocab_tokenize_string(char *sentence, int *result_nr,
- word_t **words, int words_nr,
- suffix_t **suffices, int suffices_nr,
- char **error);
+ word_t **words, int words_nr, suffix_t **suffices, int suffices_nr, char **error);
/* Tokenizes a string and compiles it into word_ts.
** Parameters: (char *) sentence: The sentence to examine
** (int *) result_nr: The variable to store the resulting number of words in
@@ -338,7 +335,7 @@ void vocab_free_rule_list(parse_rule_list_t *rule_list);
int vocab_build_parse_tree(parse_tree_node_t *nodes, result_word_t *words, int words_nr,
- parse_tree_branch_t *branch0, parse_rule_list_t *rules);
+ parse_tree_branch_t *branch0, parse_rule_list_t *rules);
/* Builds a parse tree from a list of words
** Parameters: (parse_tree_node_t *) nodes: A node list to store the tree in (must have
** at least VOCAB_TREE_NODES entries)
@@ -396,7 +393,7 @@ void vocab_synonymize_tokens(result_word_t *words, int words_nr, synonym_t *syno
*/
int vocab_gnf_parse(parse_tree_node_t *nodes, result_word_t *words, int words_nr,
- parse_tree_branch_t *branch0, parse_rule_list_t *tlist, int verbose);
+ parse_tree_branch_t *branch0, parse_rule_list_t *tlist, int verbose);
void vocab_gnf_dump(parse_tree_branch_t *branches, int branches_nr);