Commit graph

277 commits

Author SHA1 Message Date
Max Horn
824dd44ddf SCI: Revise how ResourceManager is instantiated.
This should allow for better error handling. Also, it
means that g_sci->getResMan() returns a valid value much sooner,
allowing me to simplify some code.

Also added a note about potentially replacing Common::FSList usage
by Common::Archive (and FSNode by Archive/ArchiveMember ?). This
might be a way to unify the addAppropriateSources variants again.

svn-id: r49825
2010-06-15 12:15:52 +00:00
Filippos Karapetis
60d8cc5180 Removed the now unused EngineState parameter of script_adjust_opcode_formats(), as well as an obsolete TODO
svn-id: r49684
2010-06-15 07:21:52 +00:00
Filippos Karapetis
cfdbfaa28e SCI: Limit the screen refresh rate to 60fps
svn-id: r49647
2010-06-14 08:36:52 +00:00
Filippos Karapetis
711f679b7f camelCase changes
svn-id: r49570
2010-06-10 11:43:20 +00:00
Filippos Karapetis
93f33c7dab Resolved a FIXME with getSciLanguage(), by creating a separate setter. Also, some camelCase changes
svn-id: r49568
2010-06-10 11:18:10 +00:00
Filippos Karapetis
eb4ec596cd Use the SELECTOR() macro for readability
svn-id: r49563
2010-06-10 09:18:57 +00:00
Filippos Karapetis
0ab7c908bb Removed the pointer to the game object from the EngineState class
svn-id: r49562
2010-06-10 08:11:38 +00:00
Filippos Karapetis
abc5f97608 Fixed compilation with the old music code
svn-id: r49560
2010-06-10 07:41:48 +00:00
Filippos Karapetis
9b8e4e8359 Moved all of the game init/run/exit logic inside the SciEngine class
svn-id: r49559
2010-06-10 07:32:05 +00:00
Filippos Karapetis
14437e6394 The segment manager is now initialized before the graphics subsystem. Fixes the detection of the fastCast object on startup, and hence fixes LSL1VGA
svn-id: r49553
2010-06-09 21:41:20 +00:00
Filippos Karapetis
c486b77bb7 Fixed crash in SCI2.1 games
svn-id: r49546
2010-06-09 18:42:21 +00:00
Filippos Karapetis
a542ce174b Proper fix for kernel name loading (regression from commit #49537)
svn-id: r49544
2010-06-09 15:28:14 +00:00
Filippos Karapetis
3c9ab81a07 Fixed regression from commit #49537
svn-id: r49543
2010-06-09 15:21:10 +00:00
Filippos Karapetis
2c629a04dd Merged script_init_engine() and game_init() and cleaned up SciEngine::run() a bit
svn-id: r49537
2010-06-09 10:45:54 +00:00
Filippos Karapetis
5cb311ee2c Renamed the SciEvent class to EventManager, to separate it from the sciEvent structure, and removed it from the engine state
svn-id: r49534
2010-06-09 07:59:42 +00:00
Martin Kiewitz
dc8b826f5e SCI: set default palette after initializing music driver, fixes palette getting messed up when using mt32 emulation
svn-id: r49523
2010-06-08 22:00:59 +00:00
Filippos Karapetis
9304b5fbeb Merged the restarting_flags, script_abort_flag, and restoring members of the EngineState class into one variable, abortScriptProcessing. The flag kept to signify a game restart has been placed in a boolean, gameWasRestarted
svn-id: r49518
2010-06-08 21:05:46 +00:00
Filippos Karapetis
3c82b6578f Now that EngineState is not deleted when loading games, we can move some more state-related variables to it, and remove several FIXME's about non-const global variables. Also, the entries in the data stack are now deleted when loading (fixes a memory leak - thanks to digitall for this).
svn-id: r49465
2010-06-06 23:00:33 +00:00
Filippos Karapetis
9c92bd1b81 The parser vocabulary remains static throughout the game, thus it has been removed from the engine state
svn-id: r49373
2010-06-01 15:11:20 +00:00
Filippos Karapetis
e083c20da1 The system strings segment is a fixed segment of the segment manager, which doesn't change during the game, thus move all the system strings code and variables inside the segment manager
svn-id: r49372
2010-06-01 14:41:48 +00:00
Martin Kiewitz
58a7dbe721 SCI: forgot one rename in r49202 - MSVC, why?
svn-id: r49203
2010-05-24 21:51:45 +00:00
Martin Kiewitz
830d17ed31 SCI: renaming MacIconBar to GfxMacIconBar
svn-id: r49202
2010-05-24 21:47:06 +00:00
Matthew Hoops
f5ec3a3f74 Oops, forgot to delete the icon bar.
svn-id: r49199
2010-05-24 17:55:23 +00:00
Matthew Hoops
d49fb8f42d Add support for showing the icon bar in SCI1.1 Mac.
svn-id: r49196
2010-05-24 17:21:11 +00:00
Filippos Karapetis
c874ff15a8 Cleaned up the game ID code:
- The game ID is now obtained from ScummVM ID directly, not by converting Sierra's internal ID
- Moved the code which reads the internal Sierra ID inside the resource manager
- Moved the code which converts the internal Sierra ID to ScummVM's IDs together with the rest of the detection code

svn-id: r49152
2010-05-23 10:28:03 +00:00
Filippos Karapetis
46af5a5162 - Moved kernel_lookup_text inside the Kernel class
- Added a pointer to the segment manager from within the Kernel class, thus simplifying the calls to it

svn-id: r49076
2010-05-18 12:16:48 +00:00
Filippos Karapetis
75f4791a4a - Moved determine_reg_type() and kernel_matches_signature() inside the Kernel class, where they belong
- Moved the kernel signature defines inside kernel.h
- Removed some unused references to EngineState

svn-id: r49075
2010-05-18 11:23:13 +00:00
Martin Kiewitz
f3b2627179 SCI: adding special 640x440 upscaling mode for kq6, finally hires portraits are drawn at the right position
svn-id: r49041
2010-05-15 15:16:32 +00:00
Martin Kiewitz
eb2b3f352e SCI: adding upscaled hires mode 640x480 for kq6 and gk1, fixing valgrind error in GfxPortrait class, not using priority anymore when drawing hires cels (shouldnt be needed for kq6)
svn-id: r49040
2010-05-15 14:17:50 +00:00
Max Horn
970745e60c Move DebugChannel related code to new header
svn-id: r48935
2010-05-04 11:59:22 +00:00
Max Horn
b3e404109c Move initGraphics and initCommonGFX from to new header.
These functions are only used internally be Engine subclasses, and
by moving them to a separate header we can reduce indirect header
dependencies.

svn-id: r48934
2010-05-04 11:58:12 +00:00
Max Horn
5568a8473b Get rid of Engine::_gameDataDir.
This greatly reduces indirect dependencies on several header files
from common.

svn-id: r48933
2010-05-04 11:56:52 +00:00
Max Horn
460d69e885 COMMON: Move DebugChannel stuff into a new DebugMan singleton
svn-id: r48821
2010-04-27 21:40:52 +00:00
Martin Kiewitz
194bdd9b83 SCI: reverting r48787 port updates were actually introduced (heard that before) in SCI1. I used the outdated wiki before and that one lists qfg2 and xmas90ega being SCI01. They are actually SCI1
svn-id: r48789
2010-04-24 21:45:17 +00:00
Martin Kiewitz
cbd8faa82e SCI: r48786 port updates were actually introduced during SCI01, qfg2 and xmas90ega only. We enable port updates only for non-multilingual SCI01 games now - fixes percentage bar for qfg1 japanese as well
svn-id: r48787
2010-04-24 20:41:26 +00:00
Martin Kiewitz
aaa6e7ee54 SCI: key presses of extended chars (umlauts, etc.) will now get ignored in games that don't support them (which is all non-multilingual games)
svn-id: r48693
2010-04-17 20:43:09 +00:00
Max Horn
da95a98203 SCI: Stop storing EngineState in SciGui32
svn-id: r48117
2010-02-23 22:41:20 +00:00
Filippos Karapetis
f034b8bd5f Fixed typo
svn-id: r48060
2010-02-14 12:32:25 +00:00
Filippos Karapetis
07e405588d Moved the reference to AudioPlayer inside SciEngine (as it doesn't have a state, per se, and is static)
svn-id: r48059
2010-02-14 12:23:22 +00:00
Max Horn
e45f0f309a SCI: Remove EngineState::_kernel, use SciEngine::_kernel instead
svn-id: r48050
2010-02-13 17:45:40 +00:00
Max Horn
9575cc08a2 SCI: Move GameFeatures from EngineState to SciEngine
svn-id: r48049
2010-02-13 17:44:58 +00:00
Max Horn
a82939c9be SCI: Get rid of EngineState::resMan
svn-id: r48048
2010-02-13 17:44:19 +00:00
Max Horn
721a57a661 SCI: Move Gui/Gfx related permanent objects from EngineState to SciEngine
svn-id: r48047
2010-02-13 17:43:31 +00:00
Max Horn
ac4d325e0d SCI: Add global g_sci pointer to the active SciEngine instance
svn-id: r48046
2010-02-13 17:42:49 +00:00
Max Horn
e17a2bd37d SCI: Change getSciVersionDesc() to return 'const char *' instead of 'Common::String'
svn-id: r48044
2010-02-13 11:58:15 +00:00
Matthew Hoops
ec91387837 Add the missing ResMan debug channel.
svn-id: r47986
2010-02-08 02:47:05 +00:00
Willem Jan Palenstijn
5d23dd6fa3 SCI: Fix build without SCI32 (again)
svn-id: r47966
2010-02-07 15:48:47 +00:00
Filippos Karapetis
3c8ab42eea With the new detection for setCursor, the game object and game ID are no longer required, which makes some ugly code obsolete. Yay! :)
svn-id: r47951
2010-02-07 09:33:53 +00:00
Martin Kiewitz
e7cffa90b2 SCI: frameout sci32 stuff now gets called directly w/o SciGui/32
svn-id: r47907
2010-02-05 16:03:14 +00:00
Martin Kiewitz
03dd0ac7bb SCI: screen specific debug functions are now called directly w/o SciGui/32
svn-id: r47905
2010-02-05 15:53:36 +00:00