aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.h
AgeCommit message (Collapse)Author
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-12Enabled some more rooms in the demo and disabled loading the former ↵Denis Kasak
distributor logo. svn-id: r42426
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-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* 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-07Added enum constant for the dragon object (kDragonObject) and made ↵Denis Kasak
Script::start() a bit more readable. svn-id: r42236
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-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-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* 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-03Enabled loading room number 1 as a test.Denis Kasak
svn-id: r42071
2009-07-02Added Game::changeRoom() method and Game::_currentRoom.Denis Kasak
svn-id: r42036
2009-07-02Fixed typo.Denis Kasak
svn-id: r42034
2009-07-02Added struct Room.Denis Kasak
svn-id: r42033
2009-07-02Merged the info available from _objectStatus with the GameObject struct. ↵Denis Kasak
Made Game keep a list of all the game's objects. Added Game::getObject() method for fetching a pointer to a particular object. Changed Game::loadObject() to not accept a pointer to a GameObject struct anymore. svn-id: r42026
2009-06-29Changed some data members in Draci::GameInfo from uint32 to uint16 ↵Denis Kasak
(previously I thought that the 'word' type in the original engine was 32 bits). Removed a FIXME concerning struct size mismatch (matches when the previous sentence is taken into account). GameInfo::_numDialogBlocks is now calculated, not read in (it wasn't stored in the data files at all). svn-id: r41966
2009-06-28Changed Script::run() to accept a GPL2Program struct instead of a byte ↵Denis Kasak
pointer and a length. Also, Script::run() now executes the GPL program until a gplend instruction rather than to the end of the whole program. Modified GameObject according to the new changes. svn-id: r41927
2009-06-28Added struct GameObject (such structs are stored in OBJEKTY.DFW and used for ↵Denis Kasak
in-game objects' info). Added Game::loadObject() for loading such objects into memory. Made Game's constructor load the object for the main hero. svn-id: r41925
2009-06-27Extended Game to load all info from INIT.DFW (general game info, dialog ↵Denis Kasak
offsets, variables, item status, object status). svn-id: r41908
2009-06-27Added Game's constructor. Added the Person struct and made Game constructor ↵Denis Kasak
read in the list of persons from INIT.DFW. Added Game instance to DraciEngine. svn-id: r41907
2009-06-26Added empty Game class.Denis Kasak
svn-id: r41906