Commit Graph

72 Commits

Author SHA1 Message Date
Willem Jan Palenstijn
b9cdb1abb7 SCI: Merge new GUI code written by m_kiewitz.
This is a major rewrite of the graphics code. A slightly adapted
version of the old code is still available and currently the default.
The new code is selectable in sci.cpp, but is not yet finished.

svn-id: r44565
2009-10-03 20:49:18 +00:00
Max Horn
ba0bd938e4 SCI: Rename _sciVersion to s_sciVersion and made it local to resource.cpp (i.e. follow CFG and achieve code/data isolation)
svn-id: r44271
2009-09-23 12:12:37 +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
Max Horn
eb77efda78 SCI: Add a global getSciVersion() function and make use of it
svn-id: r44170
2009-09-17 16:50:53 +00:00
Filippos Karapetis
f98dc19f71 Removed some leftover debug code, and turned p0printf messages into debug messages, introducing a new debug level
svn-id: r43993
2009-09-06 21:56:49 +00:00
Filippos Karapetis
1bbab8f191 Some renaming:
getresourceManager -> getResourceManger
resourceManager -> resMan
segmentManager ->segMan

svn-id: r43908
2009-09-02 12:02:37 +00:00
Walter van Niftrik
fff023794f SCI: Cleanup
svn-id: r43811
2009-08-30 01:37:27 +00:00
Filippos Karapetis
ed66cad677 - Simplified the parameters of some functions
- Replaced some EngineState parameters
- The SCI version is now obtained from the resource manager or the segment manager, thereby simplifying several functions
- Plugged 2 leaks in the fallback detector
- Renamed the segment manager and resource manager to "segmentManager" and "resourceManager" in all places, for consistency

svn-id: r43722
2009-08-25 08:38:14 +00:00
Walter van Niftrik
00f4794c0a SCI: Stage 1 of the game detection overhaul. The end goal is to autodetect
as much as possible. All SCI_VERSION_* information was removed from
detection.cpp (much of it was incorrect anyway).

svn-id: r43449
2009-08-16 19:18:19 +00:00
Walter van Niftrik
5709e524f9 SCI: Rename sci_version_t to SciVersion
svn-id: r43407
2009-08-15 12:09:47 +00:00
Walter van Niftrik
f99932b72a SCI: Added enum for map and volume versions. Removed res_version setting from
detection.cpp (should be detectable). Cleanup.

svn-id: r43390
2009-08-15 00:28:59 +00:00
Filippos Karapetis
31a0c80905 Moved the kernel and the vocabulary outside of the engine state (they're static data, which never changes during a game)
svn-id: r42398
2009-07-11 23:45:54 +00:00
Filippos Karapetis
d55f7e72d0 Added auto-detection for games with older headers for script blocks, and removed game flag GF_SCI0_OLD
svn-id: r42211
2009-07-07 10:28:05 +00:00
Filippos Karapetis
c716e43a2b - Added auto-detection for EGA graphics. As a result of this, GF_SCI1_EGA has been removed and versions SCI_VERSION_01_EGA and SCI_VERSION_01_VGA have been merged into SCI_VERSION_01
- Simplified the checks for EGA and VGA graphics
- Fixed a bug in script_adjust_opcode_formats()
- Simplified the code in GfxResManager::getView() a bit

svn-id: r42206
2009-07-07 07:44:25 +00:00
Filippos Karapetis
219b0de0d2 Renamed SCI_VERSION_01 -> SCI_VERSION_01_EGA
svn-id: r42181
2009-07-06 16:22:14 +00:00
Filippos Karapetis
bceacbd922 Added seChanged the warning displayed when a selector can't be mapped to a debugC - it's perfectly normal not to find certain selectors in certain SCI versions. Also, fixed the SCI version enums
svn-id: r42169
2009-07-06 11:15:42 +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
d424bee608 Merged the two SCI1 versions in one more file
svn-id: r42136
2009-07-05 13:07:11 +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
fddc5915f7 - Changed some comments to DOxygen style
svn-id: r42094
2009-07-04 15:39:31 +00:00
Filippos Karapetis
8726f01986 Removed silly FIXME (mixup between debug and engine debug levels)
svn-id: r42088
2009-07-04 11:33:51 +00:00
Filippos Karapetis
230e7a8d2c Newer DoSound() semantics are now detected automatically, by the existence of the "setVol" selector. Removed game flag GF_SCI1_NEWDOSOUND
svn-id: r42087
2009-07-04 11:24:09 +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
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
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
Max Horn
0dcb1fa84f SCI: Got rid of g_EngineState
svn-id: r41359
2009-06-07 23:04:34 +00:00
Filippos Karapetis
317da8756e - Moved the engine state and the console to be private members of SciEngine
- Implemented pauseEngineIntern()
- Music now stops and resumes when entering/leaving the debugger

svn-id: r41139
2009-06-03 14:09:25 +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
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
Filippos Karapetis
e9444e2b93 - Rewrote kSetCursor to be a bit simpler to understand, and got rid of GF_SCI1_NEWSETCURSOR
- Removed the 3 mouse pointer view, loop and cell variables (and their 3 "save" versions) from the game state, as they're all actually not used anywhere
- Cleanup

svn-id: r40976
2009-05-29 08:25:42 +00:00
Max Horn
bba91075bf removed trailing whitespaces
svn-id: r40742
2009-05-20 17:53:31 +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
d8d18d14ef SCI: Keep a single copy of the versionNames array; this fixes warning about it (well, one of its many copies) being unused
svn-id: r40600
2009-05-15 09:29:03 +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
Filippos Karapetis
d5e1ca4630 - Added a new game flag to distinguish SCI1 EGA versions
- Fixed the wrong detected versions of Laura Bow 2
- Changed some code regarding the resource loader of Jones in the Fast Lane (which is still non-functional)

svn-id: r40564
2009-05-14 17:50:09 +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
Max Horn
b3ace666d0 SCI: Renamed GF_SCI0_BEFORE_* macros to GF_FOR_SCI0_BEFORE_* (to emphasise that those are not Game Features); also moved their definitions into detection.cpp, to minimize the risk that they are accidentally used by other code
svn-id: r40557
2009-05-14 11:30:21 +00:00
Filippos Karapetis
4ec6c4127f Added a feature flag for the SCI1.1 behavior of kSetCursor() in Eco 1 and KQ5 CD. Some cleanup
svn-id: r40554
2009-05-14 11:11:56 +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
Filippos Karapetis
2ca7605050 - Enabled the code which puts the text inside the screen if it doesn't fit for all SCI versions
- Removed the check for the mechanism to resume suspended songs (it's no longer used)

svn-id: r40551
2009-05-14 07:28:06 +00:00
Filippos Karapetis
3117a8d87f Removed the hack used to check for the existence of the CantBeHere() selector
svn-id: r40549
2009-05-14 07:14:08 +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
Filippos Karapetis
e280f301e7 Rearranged all the different version checks based on SCI version in versions.h, and added some WIP and unused game flags, which will hopefully replace the SCI version numbers
svn-id: r40509
2009-05-12 20:12:49 +00:00
Filippos Karapetis
ca52388f11 Console is a class, not a struct
svn-id: r40455
2009-05-11 17:07:38 +00:00
Max Horn
7c75e8e2ef SCI: Reduced header deps
svn-id: r40451
2009-05-11 13:31:17 +00:00
Filippos Karapetis
cdb4cdf070 The ScummVM debug console is now working (though only the "version" command is assigned, for now)
svn-id: r39195
2009-03-07 17:32:11 +00:00