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
5c60d94725
SCI1 games with absolute parameters to lofs instructions are automatically detected now. Removed the GF_SCI1_LOFSABSOLUTE game flag
...
svn-id: r42118
2009-07-05 11:08:53 +00:00
Filippos Karapetis
9a96b20cd0
Replaced script_error and CORE_ERROR with error()
...
svn-id: r42079
2009-07-03 21:59:07 +00:00
Filippos Karapetis
6fa8541aed
- Pushed debugstate into debug.h
...
- When an error occurs, manipulate the execution stack before error() opens the console inside getDebugger(), like FreeSCI did. Added another method for obtaining the SCI console for use by the engine itself.
svn-id: r42062
2009-07-03 14:22:50 +00:00
Filippos Karapetis
c3403ac739
Moved some more debug state related variables in the DebugState struct
...
svn-id: r42044
2009-07-02 23:58:05 +00:00
Max Horn
42de7a1573
Patch
...
svn-id: r41647
2009-06-18 22:09:57 +00:00
Max Horn
0dcb1fa84f
SCI: Got rid of g_EngineState
...
svn-id: r41359
2009-06-07 23:04:34 +00:00
Walter van Niftrik
a6ed05740f
SCI: Moved resource36 handling into resource manager.
...
svn-id: r41349
2009-06-07 19:15:55 +00:00
Max Horn
ee21d82948
SCI: Fixed the broken SciEngine::pauseEngineIntern code by ensuring that SciEngine::_gamestate is updated whenever the EngineState gets changed (due to loading a savestate)
...
svn-id: r41346
2009-06-07 17:18:11 +00:00
Willem Jan Palenstijn
60e02ad6a8
Store long-term pointers to object variables in a new ObjVarRef struct.
...
Storing them as reg_t* could cause the pointers to become invalid
when they pointed into CloneTable since CloneTable can be re-allocated.
svn-id: r41220
2009-06-06 11:38:20 +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
Max Horn
10c54394bd
SCI: Renamed EngineState::flags and version to _flags and _version (following our conventions); also slightly changed the EngineState constructor to init _version & _flags, and used this to make them constant
...
svn-id: r41177
2009-06-04 21:44:39 +00:00
Max Horn
870db34cd1
SCI: Renamed _kfuncTable -> _kernelFuncs; and simplified/streamlined the kernel func map in kernel.cpp a bit
...
svn-id: r41176
2009-06-04 21:42:24 +00:00
Max Horn
382ebea3fa
SCI: Renamed various debug related global variables to have a g_ prefix; and moved any 'extern' decls of them into a new header file
...
svn-id: r41163
2009-06-04 11:28:05 +00:00
Filippos Karapetis
634e023485
Turned debug_weak_validations on by default again, as apparently some games like SQ3 fail in some validations (e.g. when loading). Also, fixed a potential out of bounds access when copying the value of __FILE__ into a buffer (as its value can be quite long in some cases).
...
svn-id: r41154
2009-06-04 08:25:48 +00:00
Filippos Karapetis
3c7b434b04
- Sorted the console commands a bit more
...
- Removed the commands which manipulated variables and turned them into debug variables instead
- Rewrote help so that it's more organized and easier to read
- Unified the debug variable names
svn-id: r41136
2009-06-03 09:45:16 +00:00
Filippos Karapetis
2ce6cca98b
Moved some more console commands to ScummVM's debug console
...
svn-id: r41129
2009-06-02 23:29:58 +00:00
Filippos Karapetis
780926991e
Moved some more console commands to ScummVM's debug console
...
svn-id: r41126
2009-06-02 19:03:43 +00:00
Filippos Karapetis
98f64cfa2f
Removed the gfxw_new_visual and gfxw_new_port wrappers, moved _kfuncTable inside the Kernel class and moved gfxw_find_port inside the GfxVisual struct
...
svn-id: r41125
2009-06-02 14:16:59 +00:00
Filippos Karapetis
99c6874630
Split the kernel functions away from the vocabulary functions (WIP, saving/loading is broken)
...
svn-id: r41101
2009-06-01 14:12:43 +00:00
Filippos Karapetis
e55388c787
Removed script_error_flag and script_debug_flag, which were used to error out if something went wrong and open the debugger console. Changed all the places where they were used to error() out instead, as ScummVM's debugger console can open on error()
...
svn-id: r41073
2009-05-31 15:34:23 +00:00
Filippos Karapetis
4441ca4b3e
- Further objectification of the SCI vocabulary functions
...
- Rewrote the sci_opcodes enum so that it's easier to read
- Made the engine error out if data is sent to an invalid selector (which is a fatal condition)
svn-id: r41069
2009-05-31 14:55:32 +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
a4d13cef8c
More objectification of the Vocabulary functions
...
svn-id: r41057
2009-05-31 02:37:24 +00:00
Filippos Karapetis
76406c35ec
Started objectifying the vocabulary functions (WIP)
...
svn-id: r41051
2009-05-30 22:15:00 +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
813853ccc2
SCI: Converted several fprintf(stderr) calls to warning/error (the remaining fprintf calls should probably be replaced by suitable debug/debugC/debugN invocations)
...
svn-id: r40993
2009-05-29 13:07:14 +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
Max Horn
99b520dd09
SCI: Merged SfxPlayer/NewPlayer code into sfx/core.cpp
...
svn-id: r40965
2009-05-28 22:02:45 +00:00
Willem Jan Palenstijn
7d5bbd7f71
SCI: Fix potential dangling pointer after reallocation
...
svn-id: r40963
2009-05-28 19:18:29 +00:00
Filippos Karapetis
4799cbf1c3
Removed the PREG, PSTK, IS_NULL_REG and REG_EQ defines
...
svn-id: r40767
2009-05-21 17:18:46 +00:00
Walter van Niftrik
a1364e37f7
SCI: Some debugger fixes and cleanup.
...
svn-id: r40732
2009-05-19 20:40:21 +00:00
Max Horn
8add60bf8c
SCI: Cleanup/paranoia checks
...
svn-id: r40711
2009-05-19 00:02:10 +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
Max Horn
fc9096ba1d
SCI: Replaced SegManager::getHeap() by Script::getHeap()
...
svn-id: r40683
2009-05-18 12:34:03 +00:00
Walter van Niftrik
7c5fbf83f5
SCI: LSL6 invalid selector workaround is now always active, not just at
...
startup. Added support for mirrored pic drawing.
svn-id: r40648
2009-05-17 13:37:54 +00:00
Walter van Niftrik
7f5bd2447e
SCI: Allow the VM to continue when the invalid selector access occurs at the start of LSL6.
...
svn-id: r40627
2009-05-16 12:46:59 +00:00
Filippos Karapetis
87e8f94fde
- Moved all the files out of /sci/scicore and into /sci
...
- Moved /scicore/sciconsole.h into /engine, and renamed /engine/scriptconsole.cpp to /engine/sciconsole.cpp
svn-id: r40608
2009-05-15 14:07:45 +00:00
Max Horn
9c44705f05
SCI: Got rid of SEG_ID/SCRIPT_ID
...
svn-id: r40599
2009-05-15 09:28:31 +00:00
Max Horn
8f0b776afb
SCI: Added SegManager::getScriptIfLoaded() method
...
svn-id: r40598
2009-05-15 09:27:39 +00:00
Max Horn
75c0d719c9
SCI: Turned several script related SegManager methods into Script methods
...
svn-id: r40597
2009-05-15 09:27:07 +00:00
Filippos Karapetis
565cfa074d
Simplified SCI versions to be SCI version generations, and fixed some game entries in the process. Also, added a sanity check for invalid game entries
...
svn-id: r40596
2009-05-15 09:04:21 +00:00
Max Horn
cd063606a0
SCI: Changed sci_obj_* enum value names to uppercase, in accordance with our code formatting conventions
...
svn-id: r40578
2009-05-14 23:09:30 +00:00
Max Horn
a3efc5611c
Fixed various GCC 4.2 warnings, among them an actual longstanding bug (3 years :) in the quicktime midi code
...
svn-id: r40577
2009-05-14 23:09:04 +00:00
Filippos Karapetis
4a9e7e4393
Replaced the SCI_VERSION_FTU_DOSOUND_VARIANT_2 version check with the game feature flag GF_SCI1_NEWDOSOUND
...
svn-id: r40561
2009-05-14 13:51:42 +00:00
Filippos Karapetis
f75c950457
- Replaced SCI_VERSION_FTU_LOFS_ABSOLUTE with the GF_SCI1_LOFSABSOLUTE game flag
...
- Moved the version defines outside of versions.h
svn-id: r40559
2009-05-14 12:38:50 +00:00
Filippos Karapetis
999d46b241
Started using game-specific flags and removed/replaced some SCI version checks with flags.
...
- The SCI0 new script header and the angles check have been replaced by the GF_SCI0_OLD flag
- The SCI0 new drawpic parameter and the new priority check have been replaced by the GF_SCI0_OLDGFXFUNCS flag
- Removed the code which retries to use the newer script header in SCI0 games if the detected one is wrong, as that case should be covered by the GF_SCI0_OLD flag
- Removed the leftover min_version and max_version variables from gamestate
- Cleaned up kGetTime() a bit
svn-id: r40552
2009-05-14 09:12:27 +00:00
Filippos Karapetis
e940bcff23
- Simplified SCI version detection a bit and clarified the different version feature flags (not used yet)
...
- Removed the version verification functions (they were only used for two specific cases, but the SCI executable reader is able to detect the exact SCI game version anyway, so there is no point in having these)
- Removed the empty GameFlags structure and replaced it with a 32-bit integer instead
svn-id: r40524
2009-05-13 16:52:41 +00:00
Max Horn
7f29670843
SCI: Changed object / script local vars storage to use a Common::Array
...
svn-id: r40515
2009-05-12 23:30:42 +00:00
Max Horn
5481806635
SCI: Hook FreeSCI console commands into the ScummVM console (incomplete as of now, because printf output is not yet redirect to the GUI console)
...
svn-id: r40459
2009-05-11 18:02:48 +00:00