Commit Graph

41 Commits

Author SHA1 Message Date
Max Horn
02837a3229 SCI: Cleanup the grammar/vocab code: Move defs from vocabulary.h to grammar.cpp where possible, turn comments into doxygen format etc.
svn-id: r45253
2009-10-19 22:13:51 +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
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
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
c38f150d56 SCI: Moved Kernel::findSelector from vocabulary.cpp to engine/kernel.cpp
svn-id: r44161
2009-09-17 14:54:11 +00:00
Max Horn
15652675b2 SCI: Removed dead code
svn-id: r44159
2009-09-17 14:53: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
Filippos Karapetis
faa3c64d1b Stop loading opcodes from vocab.998. They are the same in all SCI games and are hardcoded anyway (plus, vocab.998 is unreliable in some games, e.g. QFG3, or completely missing in others). Also hardcoded the opcode names for the script debugger, the only place they're actually used. The only place where vocab.998 is loaded on demand is when using the "opcodes" console command (for debug/verification purposes)
svn-id: r43775
2009-08-27 23:39:59 +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
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
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
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
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
Walter van Niftrik
a6ed05740f SCI: Moved resource36 handling into resource manager.
svn-id: r41349
2009-06-07 19:15:55 +00:00
Walter van Niftrik
e3d3195a43 SCI: Resmgr cleanup and preparations for moving resource36 handling into resmgr.
svn-id: r41318
2009-06-07 02:18:38 +00:00
Filippos Karapetis
e572811aed Moved some more debug commands to ScummVM's coneole
svn-id: r41227
2009-06-06 16:43:13 +00:00
Max Horn
fa02e0df7b SCI: Made some members of class Resource protected; some cleanup
svn-id: r41180
2009-06-04 22:16:31 +00:00
Max Horn
4f08dc538c SCI: cleanup
svn-id: r41165
2009-06-04 11:44:55 +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
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
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
Max Horn
4fba6e5d4c SCI: Fixed loading; added 'const' keywords to several Vocabulary methods
svn-id: r41071
2009-05-31 15:08:16 +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
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
Max Horn
70a04c8b51 SCI: Made vocab_version static again (a global static var is bad, but a really global var is worse); also clarified some FIXME comments that we want to avoid *any* non-const global var, no matter whether it is static or not
svn-id: r41045
2009-05-30 20:37:33 +00:00
Filippos Karapetis
539094d5a8 Reverted the vocab loading function to be like it was before commit #40979 (but without the static variable)
svn-id: r41044
2009-05-30 20:19:20 +00:00
Filippos Karapetis
33a924e766 Swapped the checks for suffixes and branches to first check for SCI1 resources, and then for SCI0 resources (as in SCI1 games, tree branches are in resource 901, which coincides with the SCI0 suffix vocabulary resource 901)
svn-id: r41026
2009-05-30 10:54:25 +00:00
Filippos Karapetis
4960b64b48 Fixed a silly typo in commit #40979. Suffixes should be loaded correctly again
svn-id: r41018
2009-05-30 09:07:28 +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
Filippos Karapetis
b242d05563 - Fixed usage of kSetCursor in SCI1.1 games (e.g. when starting KQ6 floppy)
- Removed a static variable (vocab_version)
- vocab.996 is now freed after creating the class table in SCI1 games, like in SCI0 games

svn-id: r40979
2009-05-29 09:42:11 +00:00
Max Horn
78b3c80b11 SCI: Turned vocab_version into a static var, and added several FIXMEs related to it (either vocab_version needs to become a member of EngineState/SciEngine, or we need to derive its value e.g. from the game version/flags, if that's possible)
svn-id: r40955
2009-05-28 10:28:51 +00:00
Filippos Karapetis
4717533dea Added a fix to get QFG3 working and changed an error to a warning to get EcoQuest 2 working
svn-id: r40944
2009-05-27 17:13:42 +00:00
Max Horn
099a29b6bf SCI: Added 'opcodes' command to the debugger; fixed output wrapping in the selectors & kernelnames debugger commands
svn-id: r40919
2009-05-26 15:06:21 +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
e0366f00bc SCI: Removed SCI_SIMPLE_SAID_CODE and the associated heavily bitrotted code
svn-id: r40691
2009-05-18 15:07:51 +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