diff options
author | Filippos Karapetis | 2009-03-17 08:03:42 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-03-17 08:03:42 +0000 |
commit | 80c243e5ca48680bf85c752c976f4ccc11941fb0 (patch) | |
tree | 117d8b0067ef4b5e4908d506b1825f69f9d5de02 /engines | |
parent | a9da116ceb318d3223bb515cad46f613dfdc0d36 (diff) | |
download | scummvm-rg350-80c243e5ca48680bf85c752c976f4ccc11941fb0.tar.gz scummvm-rg350-80c243e5ca48680bf85c752c976f4ccc11941fb0.tar.bz2 scummvm-rg350-80c243e5ca48680bf85c752c976f4ccc11941fb0.zip |
Renamed some defines:
- FREESCI_CURRENT_SAVEGAME_VERSION, FREESCI_MINIMUM_SAVEGAME_VERSION -> CURRENT_SAVEGAME_VERSION, MINIMUM_SAVEGAME_VERSION (saved games are not compatible with FreeSCI's ones anymore)
- _K_VIEW_SIG_FLAG_FREESCI_STOPUPD -> _K_VIEW_SIG_FLAG_STOPUPD (like the rest of the flags)
- Removed FREESCI_KFUNCT_GLUTTON (unused)
svn-id: r39478
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel.h | 4 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 10 | ||||
-rw-r--r-- | engines/sci/engine/savegame.cpp | 20 | ||||
-rw-r--r-- | engines/sci/engine/state.h | 4 |
4 files changed, 18 insertions, 20 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 8e7c8b7b8e..ec1dcb8e97 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -286,7 +286,7 @@ List *lookup_list(EngineState *s, reg_t addr, const char *file, int line); #define _K_VIEW_SIG_FLAG_IGNORE_ACTOR 0x4000 #define _K_VIEW_SIG_FLAG_DISPOSE_ME 0x8000 -#define _K_VIEW_SIG_FLAG_FREESCI_STOPUPD 0x20000000 /* View has been stop-updated */ +#define _K_VIEW_SIG_FLAG_STOPUPD 0x20000000 /* View has been stop-updated */ /* Sound status */ @@ -307,8 +307,6 @@ List *lookup_list(EngineState *s, reg_t addr, const char *file, int line); /* Generic description: */ typedef reg_t kfunct(EngineState *s, int funct_nr, int argc, reg_t *argv); -#define FREESCI_KFUNCT_GLUTTON 1 - struct kfunct_sig_pair_t { kfunct *fun; /* The actual function */ const char *signature; /* kfunct signature */ diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 90deb1a3a2..446f5be4b7 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -816,7 +816,7 @@ reg_t kCanBeHere(EngineState *s, int funct_nr, int argc, reg_t * argv) { SCIkdebug(SCIkBRESEN, "Checking vs dynviews:\n"); while (widget) { - if (widget->ID && (widget->signal & _K_VIEW_SIG_FLAG_FREESCI_STOPUPD) + if (widget->ID && (widget->signal & _K_VIEW_SIG_FLAG_STOPUPD) && ((widget->ID != obj.segment) || (widget->subID != obj.offset)) && is_object(s, make_reg(widget->ID, widget->subID))) if (collides_with(s, abs_zone, make_reg(widget->ID, widget->subID), 1, GASEOUS_VIEW_MASK_ACTIVE, funct_nr, argc, argv)) @@ -1697,7 +1697,7 @@ static void _k_view_list_do_postdraw(EngineState *s, gfxw_list_t *list) { * this fixes a few problems, but doesn't match SSCI's logic. * The semantics of the private flag need to be verified before this can be uncommented. * Fixes bug #326 (CB1, ego falls down stairs) - * if ((widget->signal & (_K_VIEW_SIG_FLAG_FREESCI_PRIVATE | _K_VIEW_SIG_FLAG_REMOVE | _K_VIEW_SIG_FLAG_NO_UPDATE)) == _K_VIEW_SIG_FLAG_FREESCI_PRIVATE) { + * if ((widget->signal & (_K_VIEW_SIG_FLAG_PRIVATE | _K_VIEW_SIG_FLAG_REMOVE | _K_VIEW_SIG_FLAG_NO_UPDATE)) == _K_VIEW_SIG_FLAG_PRIVATE) { */ if ((widget->signal & (_K_VIEW_SIG_FLAG_REMOVE | _K_VIEW_SIG_FLAG_NO_UPDATE)) == 0) { int has_nsrect = lookup_selector(s, obj, s->selector_map.nsBottom, NULL, NULL) == kSelectorVariable; @@ -2024,7 +2024,7 @@ static void _k_prepare_view_list(EngineState *s, gfxw_list_t *list, int options) // CR (from :Bob Heitman:) stopupdated views (like pic views) have // their clipped nsRect drawn to the control map if (view->signal & _K_VIEW_SIG_FLAG_STOP_UPDATE) { - view->signal |= _K_VIEW_SIG_FLAG_FREESCI_STOPUPD; + view->signal |= _K_VIEW_SIG_FLAG_STOPUPD; SCIkdebug(SCIkGRAPHICS, "Setting magic STOP_UPD for "PREG"\n", PRINT_REG(obj)); } @@ -2063,7 +2063,7 @@ static void _k_prepare_view_list(EngineState *s, gfxw_list_t *list, int options) // Never happens /* if (view->signal & 0) { - view->signal &= ~_K_VIEW_SIG_FLAG_FREESCI_STOPUPD; + view->signal &= ~_K_VIEW_SIG_FLAG_STOPUPD; fprintf(stderr, "Unsetting magic StopUpd for view "PREG"\n", PRINT_REG(obj)); } */ @@ -2090,7 +2090,7 @@ static void _k_update_signals_in_view_list(gfxw_list_t *old_list, gfxw_list_t *n new_widget = (gfxw_dyn_view_t *) new_widget->next; if (new_widget) { - int carry = old_widget->signal & _K_VIEW_SIG_FLAG_FREESCI_STOPUPD; + int carry = old_widget->signal & _K_VIEW_SIG_FLAG_STOPUPD; // Transfer 'stopupd' flag if ((new_widget->pos.x != old_widget->pos.x) diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 367ca8ce1c..43125e7450 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -477,14 +477,14 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename g_system->getTimeAndDate(curTime); SavegameMetadata meta; - meta.savegame_version = FREESCI_CURRENT_SAVEGAME_VERSION; + meta.savegame_version = CURRENT_SAVEGAME_VERSION; meta.savegame_name = savename; meta.version = s->version; meta.game_version = s->game_version; meta.savegame_date = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF); meta.savegame_time = ((curTime.tm_hour & 0xFF) << 16) | (((curTime.tm_min) & 0xFF) << 8) | ((curTime.tm_sec) & 0xFF); - s->savegame_version = FREESCI_CURRENT_SAVEGAME_VERSION; + s->savegame_version = CURRENT_SAVEGAME_VERSION; s->dyn_views_list_serial = (s->dyn_views)? s->dyn_views->serial : -2; s->drop_views_list_serial = (s->drop_views)? s->drop_views->serial : -2; s->port_serial = (s->port)? s->port->serial : -2; @@ -791,12 +791,12 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { if (fh->eos()) return false; - if ((meta.savegame_version < FREESCI_MINIMUM_SAVEGAME_VERSION) || - (meta.savegame_version > FREESCI_CURRENT_SAVEGAME_VERSION)) { - if (meta.savegame_version < FREESCI_MINIMUM_SAVEGAME_VERSION) + if ((meta.savegame_version < MINIMUM_SAVEGAME_VERSION) || + (meta.savegame_version > CURRENT_SAVEGAME_VERSION)) { + if (meta.savegame_version < MINIMUM_SAVEGAME_VERSION) sciprintf("Old savegame version detected- can't load\n"); else - sciprintf("Savegame version is %d- maximum supported is %0d\n", meta.savegame_version, FREESCI_CURRENT_SAVEGAME_VERSION); + sciprintf("Savegame version is %d- maximum supported is %0d\n", meta.savegame_version, CURRENT_SAVEGAME_VERSION); return NULL; } @@ -922,12 +922,12 @@ bool get_savegame_metadata(Common::SeekableReadStream *stream, SavegameMetadata if (stream->eos()) return false; - if ((meta->savegame_version < FREESCI_MINIMUM_SAVEGAME_VERSION) || - (meta->savegame_version > FREESCI_CURRENT_SAVEGAME_VERSION)) { - if (meta->savegame_version < FREESCI_MINIMUM_SAVEGAME_VERSION) + if ((meta->savegame_version < MINIMUM_SAVEGAME_VERSION) || + (meta->savegame_version > CURRENT_SAVEGAME_VERSION)) { + if (meta->savegame_version < MINIMUM_SAVEGAME_VERSION) sciprintf("Old savegame version detected- can't load\n"); else - sciprintf("Savegame version is %d- maximum supported is %0d\n", meta->savegame_version, FREESCI_CURRENT_SAVEGAME_VERSION); + sciprintf("Savegame version is %d- maximum supported is %0d\n", meta->savegame_version, CURRENT_SAVEGAME_VERSION); return false; } diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index 118757363a..5cc624c50c 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -73,8 +73,8 @@ public: void nextFile(); }; -#define FREESCI_CURRENT_SAVEGAME_VERSION 8 -#define FREESCI_MINIMUM_SAVEGAME_VERSION 8 +#define CURRENT_SAVEGAME_VERSION 8 +#define MINIMUM_SAVEGAME_VERSION 8 #define MAX_GAMEDIR_SIZE 32 /* Used for subdirectory inside of "~/.freesci/" */ #define MAX_SAVEGAME_NR 20 /* Maximum number of savegames */ |