Commit Graph

114 Commits

Author SHA1 Message Date
Robert Špalek
8d26e7c2d2 Dragon History tries uses compressed dubbing when available
Timing of speaking is not fixed yet.

svn-id: r50614
2010-07-03 03:48:26 +00:00
Robert Špalek
c7f6a5b286 Generalize the sound archive framework to be able to open new formats
svn-id: r50519
2010-06-30 08:27:09 +00:00
Robert Špalek
c7554c267e Implement shortcuts for switching items in the inventory
slash: switch between the last held item and normal mouse
comma, period: replace the currently held item with the previous/next item in the inventory

Also, commented a bit better what happens when ESCAPE is present with respect to map
programs and cut-scenes.

svn-id: r50407
2010-06-28 04:04:16 +00:00
Florian Kagerer
c35e350531 AUDIO: get rid of MDT_PREFER_MIDI since it should be sufficient to either select MDT_PREFER_MT32 or MDT_PREFER_GM
svn-id: r50288
2010-06-25 20:51:57 +00:00
Max Horn
bbad3f333a Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
2010-06-21 21:36:36 +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
Yotam Barnoy
ef330ed9b4 Patch for bug 2943361 by littleboy, adding full kb modifier support to all engines + GUI and proper keypad handling
svn-id: r48101
2010-02-21 04:04:13 +00:00
Max Horn
ba1d97211f Remove last traces of File::addDefaultDirectory
svn-id: r48027
2010-02-09 22:37:13 +00:00
Johannes Schickel
0d995c5920 Rename all "Adlib" uses to "AdLib" to match the real name of the sound card / company.
Check this for reference:
http://en.wikipedia.org/wiki/Ad_Lib,_Inc.
http://www.crossfire-designs.de/images/articles/soundcards/adlib.jpg (note the upper left of the card)

This commit does not touch "adlib" and "ADLIB" uses!

Also it does not update all the SCUMM detection entries, which still use "Adlib".

svn-id: r47279
2010-01-12 21:07:56 +00:00
Robert Špalek
96068d30d9 Handle properly shouldQuit()
svn-id: r47215
2010-01-10 01:25:37 +00:00
Max Horn
f3420c6372 DRACI: Reduce header interdependencies; some cleanup
svn-id: r46320
2009-12-09 21:03:22 +00:00
Max Horn
c8873d8492 Changed MidiDriver::createMidi to take a MidiDriverType instead of an int
svn-id: r46316
2009-12-09 18:12:51 +00:00
Torbjörn Andersson
184a741757 For consistency, make F5 bring up the main menu in the Draci engine too, just
like megath just did in the TeenAgent engine.

svn-id: r46284
2009-12-07 20:32:54 +00:00
Robert Špalek
3ddf90a872 Only enable changing rooms by left/right arrows when debugging
svn-id: r46059
2009-11-22 05:42:46 +00:00
Robert Špalek
de6dc9a784 Handled loading/saving from the map location
svn-id: r45876
2009-11-12 23:33:22 +00:00
Robert Špalek
0a2b2a2256 Removed 2 old TODOs
svn-id: r45874
2009-11-12 22:57:01 +00:00
Robert Špalek
9ba6e8138c Fixed two bugs.
Putting items back to the inventory into clipped coordinates, and exiting
running GPL2 programs when the game engine it to be interrupted.

svn-id: r45822
2009-11-10 23:21:29 +00:00
Robert Špalek
e2ca397e63 Huge refactoring of data structures.
Replaced IDs of objects by pointers, which saves many lookups, each of which
is horribly ineffective.  Moved a lot of code into methods of structs now
turned into objects.

Tested the new code a lot and seems to work as well as the old code.

svn-id: r45799
2009-11-10 05:16:34 +00:00
Robert Špalek
14f2685134 Implemented and debugged the walking framework.
The hero does not walk yet (it still teleports to the target immediately),
but that is just because the actual walking algorithm is left trivial first.
However, the main game loop, callbacks, and waiting all already work with
the general framework.

svn-id: r45648
2009-11-04 00:42:37 +00:00
Robert Špalek
c45f0343f4 Refactored running loop().
- shouldExitLoop() is a bool again and introduced new flag isReloaded() instead
  of adding special hacky value 2
- loop() accepts 2 parameters: loop substatus and shouldExit flag, because each
  caller previously had to set and restore these manually.  loop() now also
  tests whether the substatuses are properly nested.  reordered the
  loop-exitting code.
- renamed loop substatuses to logical names
- enterNewRoom() returns bool whether loop() should continue so that start()
  doesn't have to test and clear shouldEndProgram().  it doesn't need
  force_reload as a parameter anymore.
- dialog selections use new inner substatus instead of outer substatus, for
  consistency

svn-id: r45607
2009-11-02 02:28:43 +00:00
Robert Špalek
9ad86a800a Fix SIGSEGV when quitting the game during playing sounds
svn-id: r45605
2009-11-01 23:20:19 +00:00
Robert Špalek
c1cc230e4b Debugged computation and displaying of optimal walking paths
svn-id: r45597
2009-11-01 12:57:06 +00:00
Robert Špalek
403668898f Implement flipping the QuickHero and SpeedText flags in GPL2.
All GPL2 callbacks are now fully implemented.  It remains to implement
proper walking.

svn-id: r45501
2009-10-29 15:26:48 +00:00
Robert Špalek
c781f01321 Implement palette fading
svn-id: r45455
2009-10-28 07:34:17 +00:00
Robert Špalek
7bec12bbec Fix 2 MIDI bugs
svn-id: r45392
2009-10-26 09:03:54 +00:00
Robert Špalek
74da9e5e3b Fix Escape in the intro, and switching map and the inventory
svn-id: r45389
2009-10-26 04:59:52 +00:00
Robert Špalek
3903be61e7 Improved music handling:
- reading the volume from the configuration
- error handling of non-existent MIDI files
- pausing/resuming music

unfortunately, sometimes music stops playing or slows down, and my log
messages have so far not helped me to identify why

svn-id: r45326
2009-10-22 06:21:39 +00:00
Robert Špalek
8d8b4dc50a Enabled music.
Several TODO's added.

svn-id: r45298
2009-10-21 08:41:57 +00:00
Robert Špalek
baec8c2421 Set all sound/subtitle-related parameters from ConfMan.
Made it intelligent so that when, for example, the dubbing file doesn't exist,
we don't fail, but instead always show subtitles even if the GUI settings
says dubbing only, etc.

svn-id: r45002
2009-10-13 05:38:45 +00:00
Robert Špalek
e779284403 Sound effects are now correctly played.
Dubbing is not yet played.

svn-id: r45000
2009-10-12 22:27:23 +00:00
Robert Špalek
f71b32dd96 Loading and caching sound samples in memory.
The sounds are not played yet, but the infrastructure is getting ready.

svn-id: r44957
2009-10-11 23:01:59 +00:00
Robert Špalek
c4563616ae Added support for sound archives.
We initialize them in the DraciEngine constructor, but don't play any sounds
yet.  Checked that it works for all existing sound files (required several
work-arounds against unspoken specification).

When copying the interface from barchive.h, I decided to remove some const's
from there, because getFile() wasn't really behaving like const.

Removed some static Common::String instances.

svn-id: r44953
2009-10-11 22:30:40 +00:00
Robert Špalek
c8f002ae43 Removed Ctrl-Left Click treating as a Right Click
svn-id: r44633
2009-10-04 20:08:11 +00:00
Robert Špalek
df14027c41 Implemented rudimentary game loading/saving.
Fixed many bugs in the boilerplate.  Saving (only) things that really need to
be saved.  Loading seems to work modulo dialogs and (possibly) inventory.

svn-id: r44586
2009-10-04 05:44:23 +00:00
Robert Špalek
b6d7da6927 Implement all boilerplate concerning Global Main Menu.
All currently defined featues will be supported.  I have implemented 
everything boilerplatish, except for the actual game saving/loading (which
will come in the next commit), getting volumes from the configuration
(because we don't play sounds yet), and changing subtitles.

svn-id: r44583
2009-10-04 03:50:10 +00:00
Robert Špalek
3035ca2fd3 Let Ctrl-Left click behave like Right lick in Dragon History.
Also, started implementing Advanced Engine Features:
- pause support
- RTL support

svn-id: r44575
2009-10-03 22:07:18 +00:00
Robert Špalek
4a7cea6813 Fixed event handling. ValGrind fixups.
My yesterday's fix on handling 1 event per call caused the game to be
unbearably slow on Linux.  The old way was much faster.  I have solved too
fast a succession of mouse button down and up by not clearing the mouse flag
when the button goes up instead.

Fixed a memory leak and uninitialized variable after my refactoring of game
location changes; found by ValGrind.

svn-id: r44525
2009-10-01 16:47:34 +00:00
Robert Špalek
24d649b972 Clean up room changing code and support returning from the map.
Completely changed the interface, removing unused methods and attributes,
renaming other ones to reflect what they do, and moving some methods into the
private section.  Code changing the location, originally scattered over many
pieces of code, has been unified into one place.  Remember the previous room
when entering the map so that one can return there.

Also, the event handler processes one event at a time, preventing lost clicks
on touchpads.

svn-id: r44508
2009-10-01 08:32:35 +00:00
Max Horn
cc54ad650d Remove trailing whitespaces
svn-id: r44493
2009-09-30 16:04:21 +00:00
Johannes Schickel
c9ca057ae2 - Adapt parts of the Draci code to match our code formatting guidelines
- Remove use of tabs for formatting, now in nearly all cases tabs are only used for indentation
- Use "uint" instead of "unsigned int" in the whole engine for consistency's sake
- Strip some trailing tabs and leading whitespaces

svn-id: r44478
2009-09-30 10:45:14 +00:00
Robert Špalek
76a0bcb6c4 Implemented the map room, entered when 'm' is pressed.
svn-id: r44474
2009-09-30 04:33:52 +00:00
Robert Špalek
8a78e96838 Make getFile() return a const pointer and clean-up all uses of it.
svn-id: r44433
2009-09-28 03:51:23 +00:00
Robert Špalek
edd338b229 Make engines/draci/ compilable after merging from a branch
svn-id: r44327
2009-09-25 06:43:33 +00:00
Denis Kasak
85bf130a50 Enabled hotkey 'i' for accessing or exiting the inventory.
svn-id: r43488
2009-08-17 18:51:45 +00:00
Denis Kasak
1c0df34b4d Removed _roomChange hack since it's no longer needed.
svn-id: r43392
2009-08-15 02:53:14 +00:00
Denis Kasak
51cc821619 Added dialogue support.
svn-id: r43253
2009-08-11 04:03:22 +00:00
Denis Kasak
58c56e28b9 Fixed the 'ESC room' feature to work as intended.
svn-id: r43087
2009-08-06 07:42:14 +00:00