diff options
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.h | 8 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 39 | ||||
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 5 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 16 |
4 files changed, 27 insertions, 41 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index e1da6a7851..1e49afda55 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -388,7 +388,7 @@ reg_t kSetDebug(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kCheckSaveGame(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kSaveGame(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kRestoreGame(EngineState *s, int funct_nr, int argc, reg_t *argv); -reg_t kFileIO(EngineState *s, int funct_nr, int argc, reg_t *argp); +reg_t kFileIO(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kGetTime(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kHaveMouse(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kJoystick(EngineState *s, int funct_nr, int argc, reg_t *argv); @@ -400,8 +400,8 @@ reg_t kMemory(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kAvoidPath(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kParse(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kSaid(EngineState *s, int funct_nr, int argc, reg_t *argv); -reg_t kStrCpy(EngineState *s, int funct_nr, int argc, reg_t *argp); -reg_t kStrAt(EngineState *s, int funct_nr, int argc, reg_t *argp); +reg_t kStrCpy(EngineState *s, int funct_nr, int argc, reg_t *argv); +reg_t kStrAt(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kEditControl(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kDrawControl(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kHiliteControl(EngineState *s, int funct_nr, int argc, reg_t *argv); @@ -411,7 +411,7 @@ reg_t kCanBeHere(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kSetNowSeen(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kInitBresen(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kDoBresen(EngineState *s, int funct_nr, int argc, reg_t *argv); -reg_t kBaseSetter(EngineState *s, int funct_nr, int argc, reg_t *argp); +reg_t kBaseSetter(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kAddToPic(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kAnimate(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv); diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index ddaa0f30e3..c949f3ce92 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -40,26 +40,29 @@ namespace Sci { #define MAX_TEXT_WIDTH_MAGIC_VALUE 192 // Graph subfunctions -#define K_GRAPH_GET_COLORS_NR 2 -#define K_GRAPH_DRAW_LINE 4 -#define K_GRAPH_SAVE_BOX 7 -#define K_GRAPH_RESTORE_BOX 8 -#define K_GRAPH_FILL_BOX_BACKGROUND 9 -#define K_GRAPH_FILL_BOX_FOREGROUND 10 -#define K_GRAPH_FILL_BOX_ANY 11 -#define K_GRAPH_UPDATE_BOX 12 -#define K_GRAPH_REDRAW_BOX 13 -#define K_GRAPH_ADJUST_PRIORITY 14 +enum { + K_GRAPH_GET_COLORS_NR = 2, + K_GRAPH_DRAW_LINE = 4, + K_GRAPH_SAVE_BOX = 7, + K_GRAPH_RESTORE_BOX = 8, + K_GRAPH_FILL_BOX_BACKGROUND = 9, + K_GRAPH_FILL_BOX_FOREGROUND = 10, + K_GRAPH_FILL_BOX_ANY = 11, + K_GRAPH_UPDATE_BOX = 12, + K_GRAPH_REDRAW_BOX = 13, + K_GRAPH_ADJUST_PRIORITY = 14 +}; // Control types and flags -#define K_CONTROL_BUTTON 1 -#define K_CONTROL_TEXT 2 -#define K_CONTROL_EDIT 3 -#define K_CONTROL_ICON 4 -#define K_CONTROL_CONTROL 6 -#define K_CONTROL_CONTROL_ALIAS 7 -#define K_CONTROL_BOX 10 - +enum { + K_CONTROL_BUTTON = 1, + K_CONTROL_TEXT = 2, + K_CONTROL_EDIT = 3, + K_CONTROL_ICON = 4, + K_CONTROL_CONTROL = 6, + K_CONTROL_CONTROL_ALIAS = 7, + K_CONTROL_BOX = 10 +}; #define ADD_TO_CURRENT_PORT(widget) \ {if (s->port) \ diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index 1af9f779ba..8b0291cc51 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -65,7 +65,6 @@ But the solution resulting from that is a lot more complicated, so we use the ab Still, what we compute in the end is of course not a real velocity anymore, but an integer approximation, used in an iterative stepping algorithm */ - reg_t kSetJump(EngineState *s, int funct_nr, int argc, reg_t *argv) { // Input data reg_t object = argv[0]; @@ -163,7 +162,7 @@ reg_t kSetJump(EngineState *s, int funct_nr, int argc, reg_t *argv) { #define _K_BRESEN_AXIS_X 0 #define _K_BRESEN_AXIS_Y 1 -void initialize_bresen(EngineState *s, int funct_nr, int argc, reg_t *argv, reg_t mover, int step_factor, int deltax, int deltay) { +static void initialize_bresen(EngineState *s, int argc, reg_t *argv, reg_t mover, int step_factor, int deltax, int deltay) { reg_t client = GET_SEL32(mover, client); int stepx = GET_SEL32SV(client, xStep) * step_factor; int stepy = GET_SEL32SV(client, yStep) * step_factor; @@ -223,7 +222,7 @@ reg_t kInitBresen(EngineState *s, int funct_nr, int argc, reg_t *argv) { int deltax = GET_SEL32SV(mover, x) - GET_SEL32SV(client, x); int deltay = GET_SEL32SV(mover, y) - GET_SEL32SV(client, y); - initialize_bresen(s, funct_nr, argc, argv, mover, KP_UINT(KP_ALT(1, make_reg(0, 1))), deltax, deltay); + initialize_bresen(s, argc, argv, mover, KP_UINT(KP_ALT(1, make_reg(0, 1))), deltax, deltay); return s->r_acc; } diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 9354ac4676..6212abf423 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -673,22 +673,6 @@ void script_uninstantiate(EngineState *s, int script_nr); */ -int game_save_state(EngineState *s, char *name, int coredump); -/* Saves the game state to the harddisk -** Parameters: (EngineState *) s: The game state to save -** (char *) name: Name of the subdirectory (relative to s->save_dir) -** (int) coredump: Set to non-zero in order to write additional debug information -** Returns : (int) 0 on success, 1 otherwise -*/ - - -EngineState *game_restore_state(char *name); -/* Restores the game state from a file -** Parameters: (char *) name: Name of the saved game state to restore -** Returns : (EngineState *): The restored game state, or NULL on failure -*/ - - int game_init(EngineState *s); /* Initializes an SCI game ** Parameters: (EngineState *) s: The state to operate on |