aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/draci.cpp
AgeCommit message (Collapse)Author
2010-02-21Patch for bug 2943361 by littleboy, adding full kb modifier support to all ↵Yotam Barnoy
engines + GUI and proper keypad handling svn-id: r48101
2010-02-09Remove last traces of File::addDefaultDirectoryMax Horn
svn-id: r48027
2010-01-12Rename all "Adlib" uses to "AdLib" to match the real name of the sound card ↵Johannes Schickel
/ 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-10Handle properly shouldQuit()Robert Špalek
svn-id: r47215
2009-12-09DRACI: Reduce header interdependencies; some cleanupMax Horn
svn-id: r46320
2009-12-09Changed MidiDriver::createMidi to take a MidiDriverType instead of an intMax Horn
svn-id: r46316
2009-12-07For consistency, make F5 bring up the main menu in the Draci engine too, justTorbjörn Andersson
like megath just did in the TeenAgent engine. svn-id: r46284
2009-11-22Only enable changing rooms by left/right arrows when debuggingRobert Špalek
svn-id: r46059
2009-11-12Handled loading/saving from the map locationRobert Špalek
svn-id: r45876
2009-11-12Removed 2 old TODOsRobert Špalek
svn-id: r45874
2009-11-10Fixed two bugs.Robert Špalek
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-10Huge refactoring of data structures.Robert Špalek
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-04Implemented and debugged the walking framework.Robert Špalek
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-02Refactored running loop().Robert Špalek
- 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-01Fix SIGSEGV when quitting the game during playing soundsRobert Špalek
svn-id: r45605
2009-11-01Debugged computation and displaying of optimal walking pathsRobert Špalek
svn-id: r45597
2009-10-29Implement flipping the QuickHero and SpeedText flags in GPL2.Robert Špalek
All GPL2 callbacks are now fully implemented. It remains to implement proper walking. svn-id: r45501
2009-10-28Implement palette fadingRobert Špalek
svn-id: r45455
2009-10-26Fix 2 MIDI bugsRobert Špalek
svn-id: r45392
2009-10-26Fix Escape in the intro, and switching map and the inventoryRobert Špalek
svn-id: r45389
2009-10-22Improved music handling:Robert Špalek
- 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-21Enabled music.Robert Špalek
Several TODO's added. svn-id: r45298
2009-10-13Set all sound/subtitle-related parameters from ConfMan.Robert Špalek
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-12Sound effects are now correctly played.Robert Špalek
Dubbing is not yet played. svn-id: r45000
2009-10-11Loading and caching sound samples in memory.Robert Špalek
The sounds are not played yet, but the infrastructure is getting ready. svn-id: r44957
2009-10-11Added support for sound archives.Robert Špalek
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-04Removed Ctrl-Left Click treating as a Right ClickRobert Špalek
svn-id: r44633
2009-10-04Implemented rudimentary game loading/saving.Robert Špalek
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-04Implement all boilerplate concerning Global Main Menu.Robert Špalek
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-03Let Ctrl-Left click behave like Right lick in Dragon History.Robert Špalek
Also, started implementing Advanced Engine Features: - pause support - RTL support svn-id: r44575
2009-10-01Fixed event handling. ValGrind fixups.Robert Špalek
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-01Clean up room changing code and support returning from the map.Robert Špalek
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-09-30Remove trailing whitespacesMax Horn
svn-id: r44493
2009-09-30- Adapt parts of the Draci code to match our code formatting guidelinesJohannes Schickel
- 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-30Implemented the map room, entered when 'm' is pressed.Robert Špalek
svn-id: r44474
2009-09-28Make getFile() return a const pointer and clean-up all uses of it.Robert Špalek
svn-id: r44433
2009-09-25Make engines/draci/ compilable after merging from a branchRobert Špalek
svn-id: r44327
2009-08-17Enabled hotkey 'i' for accessing or exiting the inventory.Denis Kasak
svn-id: r43488
2009-08-15Removed _roomChange hack since it's no longer needed.Denis Kasak
svn-id: r43392
2009-08-11Added dialogue support.Denis Kasak
svn-id: r43253
2009-08-06Fixed the 'ESC room' feature to work as intended.Denis Kasak
svn-id: r43087
2009-08-05* Made some type changes to struct/class members in game.cpp (uint -> int ↵Denis Kasak
and uint16 -> uint) * Added enum constant kNoEscRoom for rooms that have no escape room defined * Fixed crash when ESC is pressed in rooms which have no escape room defined * Renamed kNotFound (used as a return value for Game::getObjectWithAnimation) to kObjectNotFound for clarity. svn-id: r43072
2009-08-05* Implemented the "escape room" feature of the original engine which lets a ↵Denis Kasak
user switch to another location (or skip the intro) by pressing ESC (the escRoom for every location is stored in the data files). * Reworked the left and right arrow key commands so they don't call changeRoom() themselves but instead schedule the room change via Game::setRoomNum(). In this way, changing rooms like that is still a hack but a bit more "natural", since the loop doesn't get skipped, the gate scripts get run, etc. svn-id: r43065
2009-08-02Added the strings archive to DraciEngine.Denis Kasak
svn-id: r42989
2009-08-01Added archives for item descriptions and images.Denis Kasak
svn-id: r42970
2009-07-29* Moved event handling to DraciEngine::handleEvents()Denis Kasak
* Added Game::start() method which is called from DraciEngine::go() * Made Game::loop() suitable for calling from other places (like GPL scripts) by handling events, redrawing the screen, etc from inside. This way it doesn't freeze the game if it doesn't return immediately. * Added Game::shouldQuit() and Game::setQuit() which can be used to signal the engine to quit. * Fixed race condition related to mouse buttons not getting released. * Instead of deleting frames for the title animation and adding a new one, reset the text for its frame. svn-id: r42875
2009-07-27Fixed segfault when the screen is deleted before animations (the Animation ↵Denis Kasak
destructor still needs to use the screen). svn-id: r42837
2009-07-25* Added DraciEngine::_initArchive and made Game use it. Fixes a memory bug ↵Denis Kasak
because Game uses pointers from the init archive which should outlive it (but didn't previously). * Added support for setting loop status to Game. * Made some GPL commands check whether we are in the correct loop status before executing. svn-id: r42731
2009-07-22Check whether the walking map overlay is already in the desired state so we ↵Denis Kasak
don't start/stop it over and over. svn-id: r42651
2009-07-20Made 'show walking map overlay' setting persist when changing rooms.Denis Kasak
svn-id: r42628