aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
AgeCommit message (Collapse)Author
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
2009-07-07Added enum constant for the dragon object (kDragonObject) and made ↵Denis Kasak
Script::start() a bit more readable. svn-id: r42236
2009-07-07Made AnimationManager::getAnimation() return NULL when an animation is not ↵Denis Kasak
found instead of Common::List<>::end(). svn-id: r42228
2009-07-07Added const keyword to "transparent" local variable in Sprite::draw() and ↵Denis Kasak
removed leading underscore. svn-id: r42227
2009-07-07Shortened AnimationManager::{play,stop}(). Removed some excessive newlines.Denis Kasak
svn-id: r42226
2009-07-07Stopped running the room init scripts twice.Denis Kasak
svn-id: r42225
2009-07-07mplemented changing rooms properly (overlays and objects' animations are ↵Denis Kasak
deleted before a new room is loaded) and set up a quick demonstration (left click advances to the next room, right click goes back). svn-id: r42224
2009-07-07* Added AnimationManager::deleteOverlays().Denis Kasak
* Fixed bug in AnimationManager::deleteAnimation() that could result in accessing the Common::List::end() sentinel value. svn-id: r42223
2009-07-06* Fixed extracting visibility and location of object from its status byteDenis Kasak
* Added Game::getRoomNum() which returns the current room number * Made Game::loadRoom() execute the room's startup script, load the room's objects and run their init scripts as well svn-id: r42194
2009-07-06Removed two variables that were committed by mistake.Denis Kasak
svn-id: r42193
2009-07-06Cache the transparent colour instead of calling a function for every pixel.Denis Kasak
svn-id: r42192
2009-07-06Implemented Script::funcRandom (GPL function).Denis Kasak
svn-id: r42191
2009-07-06Made _rnd member of DraciEngine public.Denis Kasak
svn-id: r42190
2009-07-06Set up GPL functions properly (the math evaluator now calls the handler if ↵Denis Kasak
its implemented). svn-id: r42188
2009-07-06Fixed bug where the GPL interpreter left parameters from previous commands ↵Denis Kasak
on the stack. svn-id: r42185
2009-07-06Implemented Script::play() GPL opcode.Denis Kasak
svn-id: r42184
2009-07-06Implemented GPL operators.Denis Kasak
svn-id: r42183
2009-07-05Renaming Animation -> AnimationManager and AnimObj -> Animation in light of ↵Denis Kasak
the new API change. svn-id: r42133
2009-07-05* API change for Animation and AnimObj; AnimObj is now a proper class and ↵Denis Kasak
each instance handles its own animation. Animation handles adding, fetching and deleting of AnimObjs (probably needs a namechange). * Implemented actual animation (previously only the first frame was display) * Implemented animation starting, stoping, looping * Loaded looping dragon animation as a test svn-id: r42114
2009-07-04Rewrote Sprite::draw() to draw overflowing sprites correctly. Stopped ↵Denis Kasak
playing animations as soon as they're loaded from Game::loadAnimation(). svn-id: r42111
2009-07-04Implemented handler for the Load instruction. Removed Script::dummy().Denis Kasak
svn-id: r42102
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-04* Removed tracking of Z coordinates in Drawable since it's not usedDenis Kasak
* Made columnwise parameter mandatory * Made Sprite coordinates signed (the engine sometimes uses negative coordinates) * Prevented overflow when drawing sprites in some cases svn-id: r42100
2009-07-04* Split code from Game::changeRoom() into Game::loadRoom() and ↵Denis Kasak
game::loadOverlays(). Game::changeRoom() now calls them instead. * Added Game::loadAnimation() * The engine now stores "real" indexes (zero-based) instead of Pascal's because the previous approach was messy. svn-id: r42092
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-03Added support for playing and stopping animations.Denis Kasak
svn-id: r42075
2009-07-03Added Sprite::getRect() and Text::getRect().Denis Kasak
svn-id: r42074
2009-07-03Added deconstructor for Animation. Made Animation objects delete their ↵Denis Kasak
frames when deleteAll() or deleteAnimation() are called. svn-id: r42073
2009-07-03Made Game::changeRoom() clear the overlaysArchive cache when it's done ↵Denis Kasak
loading overlays. svn-id: r42072
2009-07-03Enabled loading room number 1 as a test.Denis Kasak
svn-id: r42071
2009-07-03Added support for loading room overlays to Game::changeRoom().Denis Kasak
svn-id: r42070
2009-07-03Made the animation engine compile.Denis Kasak
svn-id: r42069
2009-07-03Implemented beginning of the animation engine.Denis Kasak
svn-id: r42068
2009-07-03Added support for mirrored sprites.Denis Kasak
svn-id: r42067
2009-07-03Added bool parameter markDirty to Sprite::draw() and Text::draw() to specify ↵Denis Kasak
whether to mark a dirty rect for a particular draw (also added such support to the Font class since it's needed by Text). Made spacing parameters for Text instances mandatory. svn-id: r42066
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
2009-07-02Added Game::changeRoom() method and Game::_currentRoom.Denis Kasak
svn-id: r42036
2009-07-02Added rooms and overlays archives.Denis Kasak
svn-id: r42035
2009-07-02Fixed typo.Denis Kasak
svn-id: r42034