Willem Jan Palenstijn
a5d1094dab
SCI: Make kFile error messages slightly more verbose
...
svn-id: r44497
2009-09-30 19:44:03 +00:00
Max Horn
8ba75fc522
Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
...
svn-id: r44495
2009-09-30 16:16:53 +00:00
Max Horn
27026f6565
SCI: Replace magic '-42' by an enum
...
svn-id: r44492
2009-09-30 16:00:44 +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
1497f9845a
Fixed regression in r44417, found by waltervn. The score in KQ1SCI should be diplayed correctly again
...
svn-id: r44490
2009-09-30 15:21:44 +00:00
Filippos Karapetis
fa077237c1
Fixed a crash when starting KQ1SCI
...
svn-id: r44484
2009-09-30 13:09:18 +00:00
Filippos Karapetis
fd21bb2611
- Moved the list of synonyms and parser nodes inside the vocabulary class
...
- Added a convenience member inside the EngineState struct to access the instance of the Vocabulary class
svn-id: r44481
2009-09-30 12:17:38 +00:00
Willem Jan Palenstijn
77bd8d0bfb
SCI: Add callk stackframe directly in run_vm
...
svn-id: r44473
2009-09-30 00:13:59 +00:00
Filippos Karapetis
6f6b699390
Added a FIXME comment for the removed functionality in the script debugger
...
svn-id: r44466
2009-09-29 15:51:45 +00:00
Johannes Schickel
270104fc70
Remove unused variable.
...
svn-id: r44464
2009-09-29 14:37:09 +00:00
Filippos Karapetis
2c2cf614c8
Oops - don't attempt to print the sought kernel function name when its empty
...
svn-id: r44462
2009-09-29 14:28:37 +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
Filippos Karapetis
f78428384e
QFG3 clears clones with underbits set, so disable the warning for this behavior
...
svn-id: r44458
2009-09-29 07:40:04 +00:00
Willem Jan Palenstijn
88a9099949
SCI: Remove unsafe unmarkDeleted function.
...
It did not undo all effects of a script being deleted (specifically its
superclasses remain unlocked), causing an inconsistent
state. Also removed EcoQuest CD hack that worked around a specific
instance of this problem.
svn-id: r44449
2009-09-28 20:21:09 +00:00
Filippos Karapetis
033b587bd2
Added topString to the list of static selectors, for commit #44429
...
svn-id: r44443
2009-09-28 09:09:15 +00:00
Walter van Niftrik
725377f090
SCI: Fix scrolling in SCI1 list controls.
...
svn-id: r44429
2009-09-27 23:06:39 +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
7971d77dd6
SCI: Adjust isValidOffset to match changes from r44396,
...
and make maxSize report the valid space starting at offset.
svn-id: r44421
2009-09-27 21:00:45 +00:00
Max Horn
460d7b269b
Simplify kFormat slightly
...
svn-id: r44417
2009-09-27 19:24:18 +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
33e9b0baf9
SCI: turn assert into warning, as it used in QfG2 char import
...
svn-id: r44400
2009-09-27 14:18:21 +00:00
Willem Jan Palenstijn
08e4d96a7d
SCI: clear strcpy's dest string if src is invalid.
...
This fixes moving the plank at the start of KQ6 in Text mode.
svn-id: r44397
2009-09-27 13:05:50 +00:00
Willem Jan Palenstijn
77751a0455
SCI: change segment offsets in reg segments to be in half reg_t.
...
This makes offsets in raw and reg segments consistent, which
fixes string addressing in savegame dialogs.
svn-id: r44396
2009-09-27 12:23:14 +00:00
Willem Jan Palenstijn
56e2e32268
SCI: clean up kStrAt
...
svn-id: r44394
2009-09-27 11:14:01 +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
5d2d8c580a
SCI: Add utility functions for copying data between raw/non-raw segments
...
svn-id: r44387
2009-09-27 01:49:56 +00:00
Willem Jan Palenstijn
933bdcf829
SCI: Add warning when dereferencing non-aligned stack pointer
...
svn-id: r44386
2009-09-27 01:49:35 +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
c12a78eaa8
SCI: Fix compile error with DEBUG_AVOIDPATH
...
svn-id: r44384
2009-09-26 22:56:15 +00:00
Willem Jan Palenstijn
be0b1e060b
SCI: Fix regression in r44081 breaking walking in QfG2
...
svn-id: r44383
2009-09-26 22:55:24 +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
Max Horn
78d2ea9fcf
SCI: Fix a memory leak
...
svn-id: r44357
2009-09-25 13:01:50 +00:00
Max Horn
4221773f6a
SCI: Pedantic cleanup
...
svn-id: r44356
2009-09-25 13:01:35 +00:00
Max Horn
881eee8105
SCI: Fix spelling
...
svn-id: r44318
2009-09-24 22:10:39 +00:00
Johannes Schickel
f2a07d7ae9
Fix what looks like a typo in the condition, which checks for a divide by zero.
...
svn-id: r44306
2009-09-24 14:07:02 +00:00
Johannes Schickel
ade3204b56
Fix warnings.
...
svn-id: r44304
2009-09-24 13:59:09 +00:00
Filippos Karapetis
1cc326dda0
Changed make_reg to accept the same type of parameters as a reg_t does - i.e. 16-bit integers, instead of 32-bit ones
...
svn-id: r44302
2009-09-24 10:30:05 +00:00
Filippos Karapetis
fbe1586abc
The maximum value that a signed 16-bit integer can hold is 32767, not 32768 (0x8000)
...
svn-id: r44294
2009-09-24 09:41:11 +00:00
Filippos Karapetis
13ad217cdd
- Moved the SCI version in a global variable
...
- Changed all the SCI version checks to use getSciVersion()
- Also made getSciVersionDesc a global function (removes some ugly accessing of the SCI engine)
The fallback detector should work correctly now
svn-id: r44269
2009-09-23 10:55:35 +00:00
Johannes Schickel
75113ad5f3
COMMON: Add "ignoreCase" parameter to matchString.
...
svn-id: r44265
2009-09-23 00:14:06 +00:00
Filippos Karapetis
5184f86e15
- Merged scriptObjInit0() and scriptObjInit11()
...
- Replaced some cases where getSciVersion() is used with _resMan->sciVersion(), as getSciVersion() will fail with the fallback detector (as the engine is not initialized). Object property accessors still crash currently, when used with the fallback detector
svn-id: r44261
2009-09-22 14:33:46 +00:00
Filippos Karapetis
4df106e1f0
Copy the internal game name when loading, and don't recreate it
...
svn-id: r44250
2009-09-22 09:16:16 +00:00
Filippos Karapetis
e331269a36
Removed unused variable
...
svn-id: r44249
2009-09-22 09:00:32 +00:00
Max Horn
c5cc785802
SCI: Change SystemStrings to use RAW storage consistenly
...
svn-id: r44246
2009-09-22 01:08:42 +00:00
Max Horn
6424a1e9e2
SCI: Add some FIXMEs, and print warning if accessing a raw segment as non-raw or vice versa
...
svn-id: r44245
2009-09-22 00:51:55 +00:00
Max Horn
5f5ab54810
SCI: Add new type SegmentRef which ultimately will allow us to distinguish between raw and 'reg_t' memory blocks in client code
...
svn-id: r44244
2009-09-22 00:36:24 +00:00
Max Horn
97d1f79e2d
SCI: Change SystemString::name from char* to Common::String
...
svn-id: r44243
2009-09-22 00:36:05 +00:00
Max Horn
5fc2428c99
SCI: SegmentObj's now set their type in constructor; replace central SegmentObj::createSegmentObj call in SegManager::allocSegment by several explicit 'new' statements; some extra cleanup
...
svn-id: r44242
2009-09-22 00:35:46 +00:00