aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
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