85 Commits

Author SHA1 Message Date
Filippos Karapetis
e5e80dd6d6 Fixed the deletion of save games - the wrong save game would be deleted with the previous code, as we sort the list by date
svn-id: r45499
2009-10-29 09:58:36 +00:00
Filippos Karapetis
c957d75fd0 Fix for bug #2874489 - "SCI: Larry 3 crashes at startup"
svn-id: r45169
2009-10-16 17:29:36 +00:00
Max Horn
2e964baeef Some const correctness changes; cleanup
svn-id: r44850
2009-10-09 21:47:33 +00:00
Max Horn
6ad5840181 SCI: Rename EngineState::segMan to _segMan
svn-id: r44629
2009-10-04 18:38:18 +00:00
Filippos Karapetis
30084d72a5 Added a new special reg_t, SIGNAL_REG, for signaling when an error occurs (usually), or to signal success in some special occasions
svn-id: r44505
2009-09-30 23:00:03 +00:00
Willem Jan Palenstijn
a5d1094dab SCI: Make kFile error messages slightly more verbose
svn-id: r44497
2009-09-30 19:44:03 +00:00
Filippos Karapetis
c76041d46d Fixed a crash in KQ1SCI, when the user types something wrong - the game tries to open a file with an empty file name, and an odd file mode
svn-id: r44491
2009-09-30 15:43:28 +00:00
Filippos Karapetis
f9296a6445 - Changed the unimplemented debug SCI kernel functions (InspectObj, ShowSends, ShowObjs, ShowFree, StackUsage and Profiler) to be dummy functions - we have our own debugger, and don't use these functions for debugging
- Removed the function number parameter from all kernel functions, as it's no longer needed, and removed the FAKE_FUNCT_NR hack
- Removed kUnknown() and kStub()
- Dummy/unknown kernel functions are no longer invoked, and a warning is shown instead, with the paremeters passed to them

Note: there is an evil hack used for debugging scripts in invoke_selector(), which probably no longer works now

svn-id: r44461
2009-09-29 14:24:07 +00:00
Willem Jan Palenstijn
bec07b42a0 SCI: Remove directory prefix added by QfG3's char import
svn-id: r44423
2009-09-27 21:52:14 +00:00
Willem Jan Palenstijn
8c8b996f56 SCI: Add workaround for file mask used by QfG3
svn-id: r44411
2009-09-27 16:33:59 +00:00
Willem Jan Palenstijn
d3c1916384 SCI: Major string handling update.
All string access to segments should now work with both raw and non-raw
(reg_t) segments, using the new utility functions in segMan.

There will likely be regressions.

svn-id: r44388
2009-09-27 01:50:26 +00:00
Willem Jan Palenstijn
f7d7140876 SCI: Ignore size argument to FILEIO_WRITE_STRING.
This matches LSL5's expectations when saving the password.

svn-id: r44385
2009-09-26 23:43:45 +00:00
Willem Jan Palenstijn
a49da8381b SCI: Fix copy/paste error
svn-id: r44382
2009-09-26 22:50:35 +00:00
Filippos Karapetis
180b3f1247 Create a define for the special "signal" offset used throughout the engine, and fixed the arbitrary 0 values from commit #44294, set when some math functions do invalid calculations
svn-id: r44359
2009-09-25 16:15:57 +00:00
Max Horn
2fe6b32968 SCI: Remove EngineState::game_version, it was only used for saving anyway. Also remove syncCStr()
svn-id: r44358
2009-09-25 13:02:11 +00:00
Johannes Schickel
ade3204b56 Fix warnings.
svn-id: r44304
2009-09-24 13:59:09 +00:00
Johannes Schickel
75113ad5f3 COMMON: Add "ignoreCase" parameter to matchString.
svn-id: r44265
2009-09-23 00:14:06 +00:00
Max Horn
8ac3db0801 SCI: Rename SegManager::kernelDeref*() methods to SegManager::deref*()
svn-id: r44083
2009-09-14 13:27:09 +00:00
Max Horn
0e834d0b87 SCI: kernelDeref*() functions are now seSegmentManager methods
svn-id: r44082
2009-09-14 13:13:20 +00:00
Max Horn
c00edfb64f SCI: Merge kernelDerefCharPtr and kernelDerefString and change it from a macro to a function
svn-id: r44081
2009-09-14 12:59:42 +00:00
Filippos Karapetis
1bbab8f191 Some renaming:
getresourceManager -> getResourceManger
resourceManager -> resMan
segmentManager ->segMan

svn-id: r43908
2009-09-02 12:02:37 +00:00
Max Horn
b391f08b46 SCI: Renamed kernel_dereference_* to kernelDeref*, and added kernelDerefString
svn-id: r43907
2009-09-02 11:38:16 +00:00
Max Horn
6c44eafa97 SCI: funct_nr is not used in 99% of all opcodes -- hide it in those (to be removed eventually)
svn-id: r43905
2009-09-02 11:33:25 +00:00
Filippos Karapetis
fd92b49486 - Reverted the *vga targets back to *sci, and used the extras field again for VGA remakes
- The extras field is now filled by the fallback detector for VGA games

svn-id: r43893
2009-09-01 19:40:29 +00:00
Matthew Hoops
e8406cc7c3 Throw a warning when kGetSaveDir is called with a parameter
svn-id: r43774
2009-08-27 17:25:13 +00:00
Filippos Karapetis
97e0293dfd When opening files, open the English language part of the filename. Fixes some multilingual SCI1 games
svn-id: r43730
2009-08-25 18:27:55 +00:00
Filippos Karapetis
ac025f4294 - Replaced more cases of EngineState parameters
- Made some version comparisons for old SCI0 versions easier to read
- Removed the GET_SEL32SV macro

svn-id: r43729
2009-08-25 15:14:29 +00:00
Filippos Karapetis
522b161bec Replaced sciprintf() calls with printf, DebugPrintf, warning and error calls
svn-id: r42167
2009-07-06 10:39:22 +00:00
Filippos Karapetis
f3ac0a62c4 Applied patch #2815937 - "SCI: ReadString fix to repair LSL5 password". This fixes the problems with the LSL5 password for good
svn-id: r42049
2009-07-03 07:06:48 +00:00
Filippos Karapetis
744323ca33 Replaced/removed KP_UINT, KP_SINT, SKPV and UKPV as well as the VIEW_PRIORITY and PRIORITY_BAND_FIRST wrappers
svn-id: r41338
2009-06-07 15:53:30 +00:00
Filippos Karapetis
7c84cca81d Moved some more debug commands to ScummVM's coneole and removed some unused code
svn-id: r41198
2009-06-05 19:04:14 +00:00
Torbjörn Andersson
0999534749 The error() and warning() functions add ! and newline automatically. (I didn't
look at debug() and debugC(), since I'm really bored with this now. :-)

svn-id: r41061
2009-05-31 10:02:16 +00:00
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