aboutsummaryrefslogtreecommitdiff
path: root/engines
AgeCommit message (Collapse)Author
2009-07-22* Moved scaling support from Animation to SpriteDenis Kasak
* Now each Sprite (and hence frame in an animation) can have a separate zoom (which is needed for some animations in the game) * Scale factors are not stored any more; instead, we only store scaled dimensions (since these are stored in the data files) and calculate the factors from those. svn-id: r42647
2009-07-20Made 'show walking map overlay' setting persist when changing rooms.Denis Kasak
svn-id: r42628
2009-07-20* Added scaling supportDenis Kasak
* Made the dragon scale when it is in different parts of the room * Added getters for relative coordinates (Animation::getRelativeX() and Animation::getRelativeY()) * Commented Game::loop() and Sprite::draw*() methods in more detail svn-id: r42627
2009-07-19* Used ldexp() in real_to_double() instead of doing the calculation manuallyDenis Kasak
* Moved static declaration of real_to_double() to game.cpp svn-id: r42616
2009-07-19Added capability for reading in Pascal 6-byte floats and made ↵Denis Kasak
Game::loadRoom() read in pers0 and persStep correctly. svn-id: r42612
2009-07-18Fixed bug which caused the dragon to be animated with the wrong Z coordinate ↵Denis Kasak
for short periods of time when moved to a new location. svn-id: r42586
2009-07-18Fixed bug which caused animations to sometimes be played too fast if the ↵Denis Kasak
engine was busier than usual (like when redrawing the whole screen when returning from minimized state). svn-id: r42585
2009-07-18Made the engine handle the Z coordinate for the hero properly.Denis Kasak
svn-id: r42584
2009-07-18Made the engine stop the dragon animation when the room changes.Denis Kasak
svn-id: r42583
2009-07-18Fixed a bug where the cursor was not shown when the first room is loaded and ↵Denis Kasak
has mouse enabled. svn-id: r42582
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-18Fixed bug where certain animations were played very fast when not played ↵Denis Kasak
immediately when they are created. svn-id: r42580
2009-07-18* Added Animation::getFrame()Denis Kasak
* Added support for sorting animations when Z is changed later on (AnimationManager::sortAnimations()) * Added support for relative coordinates (Animation::setRelative()) * Fixed bug where AnimationManager::deleteOverlays() deleted all animations svn-id: r42579
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-17* Made Game::changeRoom() clear some more archivesDenis Kasak
* Modified the engine to leverage BArchive's memory management capabilities by using its pointers to data directly instead of copying * Removed GameObject destructor (not needed because of the above change) * Changed some more data members from uint16 to uint svn-id: r42555
2009-07-17* Renamed BAFile::closeFile() to close()Denis Kasak
* Fixed leak in BArchive::loadFileDFW() svn-id: r42554
2009-07-17* Renamed Room::_numMasks to _numOverlays for consistency.Denis Kasak
* Fixed unsigned to signed comparison. svn-id: r42549
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-16Renamed GameObject::_priority to _z.Denis Kasak
svn-id: r42542
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-16Fixed loading the location's walking map index (needed to subtract 1).Denis Kasak
svn-id: r42534
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-15* Changed Game members _numMasks, _init, _look, _use and _canUse from uint16 ↵Denis Kasak
to int * Modified Game::loadRoom to load gates and execute their scripts * The first room loaded is now Game::_info._startRoom instead of 0 * Fixed reading of _pers0 and _persStep from the data files (they are 6 instead of 12 bytes) * Added more debug info to Script and Game svn-id: r42515
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-14Adjusted levels for some Game debug messages and added some new ones.Denis Kasak
svn-id: r42489
2009-07-14* Fixed bug in Animation which made the first frame of an animation being ↵Denis Kasak
drawn after it's stopped * Fixed debugging info when starting and stopping animations svn-id: r42485
2009-07-14Renamed GameInfo::_currentRoom to _startRoom to better reflect its purpose.Denis Kasak
svn-id: r42465
2009-07-14Made Game allocate its _info member statically instead of dinamically.Denis Kasak
svn-id: r42464
2009-07-13* Implemented the following GPL functions: IsIcoOn, IcoStat, IsObjOn, ↵Denis Kasak
IsObjOff, IsObjAway * Changed GameObject::_location to an int since we sometimes use location -1. * Some more uint <-> int changes to prevent comparisons between signed and unsigned. svn-id: r42452
2009-07-13Renamed Game::_itemStatus to _iconStatus. Added an assert to check if the ↵Denis Kasak
number of icons is correct. svn-id: r42449
2009-07-13Fixed bug in the NoScene logo room; the screen surface is now cleared ↵Denis Kasak
between scene redraws (filled with the colour 0) to fix artifacts when animating the logo. svn-id: r42448
2009-07-13Added Surface::fill() method and made Screen::fillScreen() use that instead ↵Denis Kasak
of filling the surface manually. Changed Surface to use uint instead of uint8 throughout. svn-id: r42447
2009-07-12Moved the delay mechanism from Animation to Drawable since each frame in an ↵Denis Kasak
animation can have a different delay. svn-id: r42427
2009-07-12Enabled some more rooms in the demo and disabled loading the former ↵Denis Kasak
distributor logo. svn-id: r42426
2009-07-12Enabled clearing the screen when the room changes since some rooms do not ↵Denis Kasak
draw anything on some parts of the screen. svn-id: r42425
2009-07-12Fixed bug in the GPL math evaluator (GPL function results were not pushed ↵Denis Kasak
onto the evaluation stack). svn-id: r42424
2009-07-08Made Script::run() seek in SEEK_CUR mode when jumping instead of the default ↵Denis Kasak
SEEK_SET. It also now checks whether there is a non-zero jump value set before doing the jump. svn-id: r42254
2009-07-08Stopped doing a screen update immediately after changing the palette. This ↵Denis Kasak
caused a noisy effect when changing rooms because the palette was changed before the new scene was loaded. svn-id: r42251
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-08* Implemented GPL jumpsDenis Kasak
* Implemented c_If, c_Goto and c_Let opcodes * Changed the interpreter to work with signed ints instead of uints (the interpreter uses negative values sometimes) * Fixed documentation of Script::run() which said it is a disassembler (forgot to change it earlier) svn-id: r42249
2009-07-07Fixed two mismatched (de)allocations in BArchive and BAFile.Denis Kasak
svn-id: r42247
2009-07-07* Made Game::_variables private and, instead, added ↵Denis Kasak
Game::{get,set}Variable() methods. * Removed obsolete comment about the cyclic field not being used in Game::loadAnimation() svn-id: r42246
2009-07-07Implementend F_Not GPL function.Denis Kasak
svn-id: r42245
2009-07-07* From Game::GameObject removed the following _idxSeq, _numSeq, _animObj, ↵Denis Kasak
_seqTab (not used anymore), added Common::Array<int> _anims. * Handled cylic animations properly * Handled the Z coordinate properly svn-id: r42244
2009-07-07* Added some more animation debug infoDenis Kasak
* Reordered Animation::nextFrame() a bit to make sure the timings are correct (particularly the last frame) * Added checks to AnimationManager::play() and AnimationManager::stop() so it doesn't dereference a null pointer. svn-id: r42243
2009-07-07* Changed Game::_variables to public since the GPL interpreter needs to use ↵Denis Kasak
it and made it int instead of uint16 * Implemented variable accessing by the math evaluator * Fixed bug from previous commit (should have used && when checking for ending instructions, not ||) svn-id: r42242
2009-07-07Made GPL interpreter exit on both gplend and exit instructions.Denis Kasak
svn-id: r42241
2009-07-07Removed testing hack from Game::init() that displayed the dragon in the ↵Denis Kasak
upper left corner. Replaced some more instances of magic numbers with kDragonObject. Made Game::init() a bit more readable. svn-id: r42237