97 Commits

Author SHA1 Message Date
Martin Kiewitz
a7fa0649df SCI: implemented checking of keyboard driver in case of SCI1EGA/EARLY, also renamed SCI_EVENT_JOYSTICK to SCI_EVENT_DIRECTION
svn-id: r50045
2010-06-19 09:46:04 +00:00
Martin Kiewitz
25c86e8b03 SCI: set resulting type to keyboard+joystick for sci1middle+ in kMapKeyToDir - fixes keyboard controlling of mouse in all sorts of games - although this is not 100% done, the change actually happened inbetween sci1early, added fixme
svn-id: r50034
2010-06-18 22:16:05 +00:00
Max Horn
a2bcf9ac31 SCI: Rename sciEvent to SciEvent
svn-id: r49960
2010-06-17 23:11:12 +00:00
Max Horn
8e07a1e167 SCI: Moved the event code a little bit around.
* Move sleep() from EventManager to SciEngine
* Rename EventManager methods: get -> getSciEvent, and
  getFromScummVM -> getScummVMEvent
* Make scancode_rows static const
* Turn altify & numlockify from EventManager methods into static
  functions (and comment out the currently unused numlockify)

svn-id: r49959
2010-06-17 23:10:37 +00:00
Martin Kiewitz
b25aba1d1e SCI: SciGui/SciGui32 gone for good...
svn-id: r49860
2010-06-15 15:44:24 +00:00
Max Horn
651e2760a3 Fix spelling, cleanup
svn-id: r49843
2010-06-15 12:33:20 +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
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
67690e89a3 Merged _game_run() inside game_run(). Some cleanup
svn-id: r49513
2010-06-08 18:44:27 +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
576306c323 Re-enabled the cursor position limiting code
svn-id: r49413
2010-06-03 21:52:21 +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
67de5b1bd3 Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase

svn-id: r49317
2010-05-29 23:37:15 +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
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
f86618f92b SCI: Add a 'SELECTOR' macro
svn-id: r47918
2010-02-05 22:55:18 +00:00
Martin Kiewitz
f3ea96d168 SCI: GfxCoordAdjuster class added, local2Global and global2Local use that class directly, kGraph / RedrawBox is now using GfxPaint16 directly
svn-id: r47908
2010-02-05 18:56:13 +00:00
Martin Kiewitz
f8f490c565 SCI: calling most of the cursor functions directly via _gfxCursor instead of SciGui/32
svn-id: r47903
2010-02-05 14:48:51 +00:00
Filippos Karapetis
2fb37063a4 Placed all the game feature detection code in a separate class
svn-id: r47850
2010-02-03 11:02:43 +00:00
Matthew Hoops
5b9b6b6b70 Fix compile when ENABLE_SCI32 is not set.
svn-id: r47682
2010-01-29 22:02:28 +00:00
Martin Kiewitz
a800855bf4 SCI: added new SciGui32 class, Gfx class needs some work though and hopefully i didnt overlook some kernel function that is also used by sci32. now using plane left/top
svn-id: r47679
2010-01-29 21:30:46 +00:00
Max Horn
4ffec28103 SCI: Move selector stuff to new header; reorder k_argc & k_argp param of invoke_selector
svn-id: r47665
2010-01-29 11:03:54 +00:00
Johannes Schickel
aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Filippos Karapetis
722233fd0d - Moved all of the parser-related variables inside the Vocabulary class
- Moved the kSetSynonyms() function inside kscripts (as it's for script synonyms, not parser word synonyms)
- The parser vocabulary is now only initialized for SCI0 and SCI01 games, which had a parser

svn-id: r47483
2010-01-23 19:10:56 +00:00
Filippos Karapetis
254850aa23 - Some work on kLocalToGlobal and kGlobalToLocal for SCI2+
- Removed the custom types MemoryHandle, LoopNo, CelNo (cause we ended up having code like LoopNo loopNo = ...)
- Improved the sanity checks in frameOut()

svn-id: r47087
2010-01-06 17:25:54 +00:00
Filippos Karapetis
d99aa0f126 More renaming
svn-id: r47009
2010-01-05 01:37:57 +00:00
Filippos Karapetis
84cd8d2dc7 Renamed /gui to /graphics and /sfx to /sound, to better illustrate their purpose
svn-id: r47007
2010-01-05 01:22:16 +00:00
Filippos Karapetis
f66d5a7f53 SCI: Removed the old graphics code
svn-id: r47005
2010-01-05 00:54:53 +00:00
Filippos Karapetis
8cc690935a Updated comment
svn-id: r46974
2010-01-04 16:18:35 +00:00
Filippos Karapetis
5560f93c2a SCI/new sound code: update sound cues when kGetEvent() is called, instead of kAnimate(), fixes music fading in LSL3
svn-id: r46973
2010-01-04 16:16:58 +00:00
Martin Kiewitz
e56dedec3f SCI: keyboard change cleanup, fixed Ctrl and Alt related keys on foreign keyboards as well
svn-id: r46803
2009-12-31 17:43:54 +00:00
Matthew Hoops
92a8d1360a kLocalToGlobal has a 'Plane' variant in SCI32 like its kGlobalToLocal sibling. The restore menu is now slightly navigatable.
svn-id: r46790
2009-12-31 05:30:25 +00:00
Matthew Hoops
ef79d7f017 SCI32:
- Fully implement kArray and kIsHiRes and mostly implement kString (printf and atoi subfunctions still missing).
	- Add a dummy SciGui class for SCI32 to bypass the views. Gabriel Knight 1 will now play the Sierra logo music and the main menu music.
	- Some other minor SCI32 changes.

svn-id: r46462
2009-12-21 14:32:54 +00:00
Martin Kiewitz
3db1912759 SCI: Renamed "buckybits" to "modifiers" in SciEvent
svn-id: r46256
2009-12-04 18:02:48 +00:00
Martin Kiewitz
d982d10505 SCI: Make event constants more verbose
svn-id: r46255
2009-12-04 17:58:26 +00:00
Martin Kiewitz
a5f1808c83 SCI: SciEvent created, kernel_sleep() created
svn-id: r46252
2009-12-04 17:38:24 +00:00
Martin Kiewitz
055c8b087b SCI: Alt translation. Currently handles Ctrl-X as Ctrl-Alt-X so that bypassing questions in lsl1vga is possible. ScummVM currently doesn't give us event for Ctrl-Alt-X
svn-id: r46251
2009-12-04 14:32:32 +00:00
Martin Kiewitz
dde8743923 SCI: Convert characters to scancode, when Ctrl is pressed (fixes key-shortcuts not working in lsl5, lsl1, qfg1vga and others)
svn-id: r46249
2009-12-04 13:49:43 +00:00
Filippos Karapetis
12e3375f3b Removed the reference to SciGuiCursor from EngineState
svn-id: r45660
2009-11-04 12:19:05 +00:00
Filippos Karapetis
ff284c9f5b Remove unused includes when INCLUDE_OLDGFX is not set. Implemented the full screen updates that the current menu code is doing using new graphics functions (still unfinished). Some cleanup.
svn-id: r45536
2009-10-30 12:33:05 +00:00
Filippos Karapetis
04ab6bc9fc Enclose all of the old graphics code within the INCLUDE_OLDGFX safeguard (defined in sci.h)
svn-id: r45459
2009-10-28 13:20:30 +00:00
Max Horn
f3ab3051d8 SCI: Make the implicit segMan param to GET_SEL32(V) and PUT_SEL32(V) explicit
svn-id: r45234
2009-10-18 19:42:56 +00:00
Max Horn
623098c393 SCI: Fix warning, cleanup
svn-id: r44764
2009-10-07 22:45:50 +00:00
Filippos Karapetis
1562add631 - Cleaned up the cursor code
- Renamed gui -> _gui in EngineState, for consistency
- Added a reference to SciGuiCursor in EngineState, to be used by current code
- Renamed setCursorHide -> hideCursor, setCursorShow -> showCursor
- Moved the cursor zone limiting code inside SciGuiCursor. This code is currently not functioning, as we need to call refreshPosition() before each updateScreen() call to limit the cursor position.

svn-id: r44760
2009-10-07 21:29:47 +00:00
Filippos Karapetis
91a16e0c7d Moved the cursor movement code in the GUI
svn-id: r44664
2009-10-05 16:43:24 +00:00
Max Horn
db8c6e3f6c SCI: Really remove sci/gui/gui.h include from engine/state.h
svn-id: r44644
2009-10-04 22:43:30 +00:00
Max Horn
6ad5840181 SCI: Rename EngineState::segMan to _segMan
svn-id: r44629
2009-10-04 18:38:18 +00:00
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
Filippos Karapetis
f9296a6445 - Changed the unimplemented debug SCI kernel functions (InspectObj, ShowSends, ShowObjs, ShowFree, StackUsage and Profiler) to be dummy functions - we have our own debugger, and don't use these functions for debugging
- Removed the function number parameter from all kernel functions, as it's no longer needed, and removed the FAKE_FUNCT_NR hack
- Removed kUnknown() and kStub()
- Dummy/unknown kernel functions are no longer invoked, and a warning is shown instead, with the paremeters passed to them

Note: there is an evil hack used for debugging scripts in invoke_selector(), which probably no longer works now

svn-id: r44461
2009-09-29 14:24:07 +00:00