Commit Graph
53 Commits
Author SHA1 Message Date
Filippos Karapetis 3490819a66 - Removed debug_mode from the engine state
- Turned all SCIkwarn and SCIkdebug functions to ScummVM's debugC function
- Placed some debug code in appropriate defines: DEBUG_PARSER, DEBUG_AVOIDPATH and DEBUG_SOUND
- Removed the "debuglog" command and the "script_checkloads_flag" and "sci_debug_flags" variables

svn-id: r41033
2009-05-30 15:40:49 +00:00
Max Horn fb79b18571 Changed SaveFileManager methods to take Common::String params (instead of char pointers)
svn-id: r41000
2009-05-29 14:38:22 +00:00
Max Horn 518e005ec2 SCI: Revised code for listing savegames
svn-id: r40999
2009-05-29 14:36:56 +00:00
Willem Jan Palenstijn 67fa1fb59c SCI: Fix potential dangling pointer more robustly,
by changing the executionStack implementation to a list.

svn-id: r40971
2009-05-28 22:42:18 +00:00
Walter van Niftrik e3178daf13 SCI: Cleanup.
svn-id: r40931
2009-05-27 00:24:32 +00:00
Max Horn 7d5f3e1714 Turned some static tables into static const tables; added some FIXME comments to global static vars that should be removed (many more exist in SCI, Tinsel, and some other engines)
svn-id: r40908
2009-05-26 11:30:21 +00:00
Max Horn bba91075bf removed trailing whitespaces
svn-id: r40742
2009-05-20 17:53:31 +00:00
Walter van Niftrik 4d59f620f9 SCI: Changed K_FILEIO_FILE_EXISTS to check regular files too.
svn-id: r40724
2009-05-19 11:30:51 +00:00
Max Horn b0c1cf52e0 SCI: Got rid of EngineState::execution_stack_pos; overally, the resulting code should be even stricter in detecting invalid VM stack access (and some bugs when loading saves might be fixed now...)
svn-id: r40694
2009-05-18 18:15:45 +00:00
Filippos Karapetis 1239949ef2 Changed errors to be fatal, as most of them are fatal conditions. Some of them have been changed to warnings for now, as they occur in certain games (e.g. SQ4 floppy, SQ4 CD and KQ5 CD)
svn-id: r40675
2009-05-18 07:55:13 +00:00
Max Horn 57f367acb5 SCI: Renamed bp_flag -> breakpointFlag; replaced global send_calls_allocated & send_calls vars by a local Common::Stack instance
svn-id: r39930
2009-04-11 09:58:30 +00:00
Max Horn 40b313c28e SCI: Moved savegame specific stuff from state.h to a new header savegame.h
svn-id: r39351
2009-03-12 03:26:21 +00:00
Willem Jan Palenstijn 3bfc345350 Add support for saving Common::String objects.
Use it to simplify SavegameMetadata handling.

svn-id: r38959
2009-02-28 11:07:36 +00:00
Max Horn 479751104f SCI: Renamed include/engine.h to engine/state.h; added a corresponding .cpp file with the EngineState constructor
svn-id: r38921
2009-02-27 02:23:40 +00:00
Max Horn bf0860fc5e SCI: Commited file handling revamp, work in progress
svn-id: r38919
2009-02-27 01:17:24 +00:00
Andre Heider 2d1fd81f90 start out with an empty array of file handles, so the Enginestates matches between startup and restart. really check its size before accessing it (fixes LSL3 restart)
svn-id: r38915
2009-02-26 21:17:53 +00:00
Paweł Kołodziejski 859477c968 not needed anymore
svn-id: r38856
2009-02-24 20:55:43 +00:00
Max Horn b5df97ad2b SCI: Moved kernel.h and kdebug.h from include/ to engine/; untangled header deps some more
svn-id: r38833
2009-02-24 05:51:55 +00:00
Max Horn 376e4f86d6 SCI: cleanup
svn-id: r38811
2009-02-23 04:48:29 +00:00
Max Horn c21e6c382d SCI: Moved file specific stuff from tools.h & tools.cpp to kfile.cpp
svn-id: r38810
2009-02-23 04:37:35 +00:00
Max Horn 2413a5690e SCI: Got rid of resource_dir & work_dir (temporarily disabled f_open_mirrored for that)
svn-id: r38807
2009-02-23 04:31:11 +00:00
Max Horn 6147bd3ed9 SCI: Merged kDeviceInfo_Win32 & kDeviceInfo_Unix; added lots of debug calls to the file I/O code, to make it possible to analyze usage patterns; some cleanup
svn-id: r38806
2009-02-23 03:51:22 +00:00
Max Horn 1687a5e8d0 SCI: Rewrite the way file handles are managed
svn-id: r38794
2009-02-22 21:38:46 +00:00
Max Horn 4a6d6e8988 SCI: Moved the code which iterates over the current dir into a small class
svn-id: r38793
2009-02-22 20:48:42 +00:00
Jordi Vilalta Prat b5ce8d9320 Whitespace cleanup
svn-id: r38783
2009-02-22 13:11:43 +00:00
Filippos Karapetis a46a2d9c92 Fixed compilation under Windows
svn-id: r38770
2009-02-22 00:38:39 +00:00
Max Horn d6e397233f SCI: More cleanup
svn-id: r38758
2009-02-21 22:40:58 +00:00
Eugene Sandulenko c6e27ebfcd Fix compilation by implicit including of sys/stat.h
svn-id: r38736
2009-02-21 19:35:30 +00:00
Filippos Karapetis 9260fd38b8 Fixed compilation under MSVC
svn-id: r38723
2009-02-21 18:56:17 +00:00
Willem Jan Palenstijn 34f90ac043 revert large parts of r38621. error() is for fatal errors and does not return. warning() is not for debugging status messages.
svn-id: r38696
2009-02-21 14:11:41 +00:00
Travis Howell 7ce7993c30 Remove excess \n.
svn-id: r38695
2009-02-21 13:19:44 +00:00
Joost Peters 177c4169d1 error() calls don't need \n, as it is already appended in error() itself
svn-id: r38694
2009-02-21 12:58:09 +00:00
Andre Heider 1cbe5c327d replace obsolete creat() with open()
svn-id: r38690
2009-02-21 12:26:10 +00:00
Jordi Vilalta Prat 3cc6cdf719 Replaced "typedef struct _state state_t" with "struct EngineState"
svn-id: r38678
2009-02-21 10:47:56 +00:00
Oystein Eftevaag 25f7c37171 Wrapped the SCI engine in the Sci namespace.
svn-id: r38676
2009-02-21 10:23:36 +00:00
Max Horn 7c87b4901d SCI: Use GCC_PRINTF hint to the compiler for _SCIkprintf and sciprintf; fixed tons of bad format strings
svn-id: r38660
2009-02-21 04:25:56 +00:00
Willem Jan Palenstijn abbca80d61 Converted SCI saving to use saveFileMan. Instead of a savegame being
a directory with an id and a state file, a savegame now consists of
two consecutive CFSML-serialized structs: SavegameMetadata and state_t.
The former contains the savegame title, and is loaded when scanning saves.

svn-id: r38649
2009-02-20 23:41:15 +00:00
Filippos Karapetis 2ddce51a56 Changed more messages to warnings/errors
svn-id: r38621
2009-02-20 20:39:02 +00:00
Filippos Karapetis ac716ad843 Started conversion of debug messages and debug levels to the ScummVM equivalents. Removed the "stubs" and "warnings" debug levels and replaced such kinds of messages with normal warnings
svn-id: r38617
2009-02-20 20:11:12 +00:00
Max Horn bc360ee525 SCI: Started rewriting file handling. Warning: This will likely introduce
regressions, but we just have to start somewhere.
- factored out some common code in engine/kfile.cpp into a separate func
- replaced many uses of chdir, getcwd, sci_init_dir etc. by equivalent
   or better functionality from SearchMan etc.
- replaced many uses of sci_open and sci_fopen by using Common::File
   and Common::Stream
- C++ified some stuff
- simplified ResourceSource a bit (loosing some unused functionality)

svn-id: r38597
2009-02-20 16:03:50 +00:00
Paweł Kołodziejski 427196cde4 formating
svn-id: r38560
2009-02-19 18:52:00 +00:00
Paweł Kołodziejski ebff01c463 shat up ARRAYSIZE redefine compiler warnings
svn-id: r38444
2009-02-17 20:26:57 +00:00
Eugene Sandulenko 22a009d3c6 Update headers. engine/
svn-id: r38408
2009-02-17 15:02:16 +00:00
Filippos Karapetis d39d83e525 Replaced sci_free() with free() - it's OK to free a NULL pointer, so the checking that sci_free() performed is not necessary
svn-id: r38406
2009-02-17 13:51:52 +00:00
Travis Howell 2d0a897d16 Replace strcasecmp with scumm_stricmp.
svn-id: r38356
2009-02-16 09:17:49 +00:00
Max Horn 74132ed71a SCI: cleanup
svn-id: r38336
2009-02-16 00:35:22 +00:00
Max Horn 57434d955f SCI: Run astyle to make the code be more compliant with our Code Formatting Guidelines: engine dir
svn-id: r38317
2009-02-15 22:28:12 +00:00
Max Horn e90eed4ff3 SCI: Changed _WIN32 -> WIN32; _DREAMCAST -> __DC__; removed _DOS stuff
svn-id: r38305
2009-02-15 21:27:42 +00:00
Max Horn a49d29cf6f cleanup, fixed warnings
svn-id: r38282
2009-02-15 19:15:43 +00:00
Max Horn e28ed6b4c9 SCI: Got rid of HAVE_FNMATCH_H
svn-id: r38279
2009-02-15 18:58:10 +00:00