aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/draci.cpp
AgeCommit message (Collapse)Author
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
2009-07-18* Added support for "walking" with the hero (i.e. moving the sprite to ↵Denis Kasak
locations allowed by the walking map) * Enabled drawing the walking map with the 'w' hotkey for testing svn-id: r42581
2009-07-18Removed room switching hack from Mouse and re-added it to DraciEngine::go() ↵Denis Kasak
(right arrow switches to the next room, left to the previous. svn-id: r42577
2009-07-17Added sanity checks for all archives (whether opening succeeded).Denis Kasak
svn-id: r42547
2009-07-17* Added Game::loop()Denis Kasak
* Added WalkingMap::isWalkable() * Renamed remaining _priority identifiers to _z which were left by mistake in the previous commit svn-id: r42546
2009-07-16* Added WalkingMaps classDenis Kasak
* Added DraciEngine::walkingMapsArchive * Made Game::loadRoom() read in the current walking map svn-id: r42541
2009-07-16Added _iconsArchive to DraciEngine and modified the Mouse class to use it.Denis Kasak
svn-id: r42535
2009-07-16Added proper cursor state handling (when in rooms that don't use the mouse). ↵Denis Kasak
Added a HACK note for running the gates' scripts. svn-id: r42532
2009-07-15Renamed Font::setFont() to loadFont(). Removed DraciEngine::_font and added ↵Denis Kasak
_smallFont and _bigFont so each font can be handled separately. svn-id: r42514
2009-07-08Made the engine clear some more caches when it changes rooms (room, sprites ↵Denis Kasak
and palette caches). Made the DraciEngine destructor delete the rooms, overlays and animations archives. svn-id: r42250
2009-07-05Renaming Animation -> AnimationManager and AnimObj -> Animation in light of ↵Denis Kasak
the new API change. svn-id: r42133
2009-07-04* Added Game::init() and moved some functionality from Game::Game to it ↵Denis Kasak
(loading objects, changing rooms) * Made Game::load*(), Game::getObject() and Game::changeRoom() methods public * Stopped specifying Z coordinate when creating some Sprites (which I forgot in my previous commit) svn-id: r42101
2009-07-04Added _animationsArchive member to DraciEngine.Denis Kasak
svn-id: r42091
2009-07-04Restructured Script so I can start adding callbacks to GPL commands (added ↵Denis Kasak
DraciEngine * member to Script, added Script::setupCommandList() which initialises the command list array, added Script::dummy() callback for the Load command for testing). svn-id: r42090
2009-07-03Enabled loading room number 1 as a test.Denis Kasak
svn-id: r42071
2009-07-03Added two more debug levels (logic and animation).Denis Kasak
svn-id: r42065
2009-07-03Removed demo code so I can start working on the real intro.Denis Kasak
svn-id: r42063