109 Commits

Author SHA1 Message Date
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
c31d1b3180 - Fixed feature auto-detection for Conquests of Camelot
- Auto-detected features are now printed in the console (to ease debugging)

svn-id: r42132
2009-07-05 11:49:05 +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
b093511239 - Merged the "early" and "late" SCI1 versions - these are functionally equivalent, and the code that does the version check is unreliable (e.g. it sets SQ1 VGA to SCI1 "late" and EcoQuest 1 to SCI1 "early")
- Cleanup of the vocabulary setting functions
- Cleanup of the cursor manipulation code

svn-id: r42097
2009-07-04 16:30:20 +00:00
Filippos Karapetis
c5522b3766 - Kernel function names are no longer loaded from vocab.999, but are constructed from the hardcoded function table, depending on the SCI version used
- SCI0 games using older graphics functions are now detected by the presence of the "curAngle" selector
- SCI0 games using a SCI1 table (like KQ1 demo version and full version) are detected by the presence of the "sightAngle" selector (as no SCI0 game seems to have it)

svn-id: r42095
2009-07-04 15:45:04 +00:00
Filippos Karapetis
df9570cb32 SCI0 games using older graphics functions are automatically detected now, from the presence of the "TimesSin" and "SinMult" kernel functions. Removed the GF_SCI0_OLDGFXFUNCS game flag
svn-id: r42081
2009-07-03 23:37:08 +00:00
Filippos Karapetis
9664050ff0 Simplified the kernel name loading code: Merged the default SCI0 and SCI1 kernel name tables in one table. vocab.999 is only used in SCI0 and SCI01 games if it exists as an override to the default kernel name table (which works with SCI0/SCI01 demos with no vocab.999, like KQ1 and xmas1998). Removed GF_SCI0_SCI1VOCAB.
svn-id: r42050
2009-07-03 09:01:51 +00:00
Matthew Hoops
4df9dd82fb After discussing with waltervn, committing my fix for the King's Quest I Demo (original from Patch #2795916). I'm also fixing the full game as well :)
svn-id: r41841
2009-06-25 00:14:07 +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
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
23a9b5544c SCI: Added MemObject::isValidOffset method; use it to simplify determine_reg_type
svn-id: r41175
2009-06-04 20:51:40 +00:00
Max Horn
ae3c6c3053 SCI: cleanup
svn-id: r41173
2009-06-04 20:51:09 +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
c730e0290d Replaced kernel_oops with error(), and added an enum to clarify the cases where invoke_selector should stop
svn-id: r41095
2009-06-01 08:00:58 +00:00
Filippos Karapetis
76bd1b7c0e Removed the sci_max_allowed_unknown_kernel_functions array
svn-id: r41094
2009-06-01 07:06:04 +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
Max Horn
cf68dc1a7b SCI: Renamed some Vocabulary methods for clarity; also renamed decypherSaidBlock -> decipherSaidBlock; some cleanup in Console::cmdSentenceFragments
svn-id: r41072
2009-05-31 15:08:47 +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
Filippos Karapetis
e317012cce Further objectification of the SCI vocabulary functions. Removed the "kernel_words" console command, as it's exactly the same as "parser_words"
svn-id: r41065
2009-05-31 12:05:49 +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
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
Max Horn
32975b25f4 SCI: cleanup
svn-id: r40959
2009-05-28 11:15:09 +00:00
Walter van Niftrik
fd191a4920 SCI: Changed signatures of StrLen and StrCpy to allow NULL pointers. This is
needed for a game bug in KQ6CD.

svn-id: r40930
2009-05-26 23:34:57 +00:00
Max Horn
c96cf97ea7 SCI: Merged vocab_debug.cpp into vocabulary.cpp; cleanup
svn-id: r40915
2009-05-26 14:44:14 +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
Walter van Niftrik
de5ca1e472 SCI: Some small fixes for KQ6CD.
svn-id: r40898
2009-05-26 00:03:41 +00:00
Walter van Niftrik
5e68c1f4a0 SCI: Force movie palettes (KQ6).
svn-id: r40883
2009-05-25 11:14:42 +00:00
Filippos Karapetis
39f9894ee5 Added a stub for SetVideoMode(), and fixed some of the palette glitches in the intro of KQ6 thanks to some comments by waltervn. Also, commented out the bounds rect in gfxr_pic_t, as it's currently unused
svn-id: r40808
2009-05-23 13:26:45 +00:00
Walter van Niftrik
36fe37443d SCI: Added support for KQ6 movies.
svn-id: r40774
2009-05-21 22:03:23 +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
Max Horn
4f55f1e730 SCI: Moved code related to loading/setting up kernel function names from vocab_debug.cpp to engine/kernel.cpp
svn-id: r40741
2009-05-20 17:52:49 +00:00
Max Horn
7d54385dea SCI: Moved some private decls from kernel.h to kernel.cpp; removed pointless (and incorrect) fallback code in k_Unknown
svn-id: r40739
2009-05-20 17:52:12 +00:00
Max Horn
f5f48fff3a SCI: Moved the few kernel functions that were in kernel.cpp to a new file kmisc.cpp
svn-id: r40738
2009-05-20 17:51:55 +00:00
Walter van Niftrik
df3357159c SCI: Added some stubs for LSL6CD (lores).
svn-id: r40719
2009-05-19 02:10:58 +00:00
Max Horn
a652e1ae3d SCI: Added FIXME
svn-id: r40695
2009-05-18 18:16:01 +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
790e235ae1 SCI: Removed ENTRY_IS_VALID macro
svn-id: r40690
2009-05-18 15:07:31 +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
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
Filippos Karapetis
891a8fae05 - Removed SCI_VERSION_FTU_NEW_GETTIME
- Added defines for SCI0 flags, to simplify game entries
- Removed the leftover version_lock_flag from EngineState

svn-id: r40553
2009-05-14 10:24:39 +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
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
0255cd0213 SCI: Removed sci_memory.h/.cpp
svn-id: r40514
2009-05-12 23:30:10 +00:00
Walter van Niftrik
c299dbeb26 SCI: Merged Message() and GetMessage(). Set SCI1.1 to use SCI1 kernel table (for now).
svn-id: r40481
2009-05-12 12:31:09 +00:00
Max Horn
1949133d22 SCI: Simplified the Table class, by making it use an Common::Array internally. Increased savegame version, breaking compatibility to the previous one -- sorry for that, but some of my previous changes accidentally messed up the table syncing, resulting in messed up savegames anyway; these breakages should be fixed with this commit
svn-id: r40453
2009-05-11 13:32:00 +00:00
Max Horn
019f87fd1b SCI: Changed object list in Script instances to use Common:::Array
svn-id: r40431
2009-05-10 19:17:51 +00:00
Walter van Niftrik
be7acea217 SCI: Set signature for GetMessage.
svn-id: r40396
2009-05-08 23:10:25 +00:00