Denis Kasak
82e6bcea2f
* Added AnimationManager::deleteOverlays().
...
* Fixed bug in AnimationManager::deleteAnimation() that could result in accessing the Common::List::end() sentinel value.
svn-id: r42223
2009-07-07 14:52:36 +00:00
Denis Kasak
79c42abf08
* Fixed extracting visibility and location of object from its status byte
...
* 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-06 19:50:59 +00:00
Denis Kasak
3b75b8003d
Removed two variables that were committed by mistake.
...
svn-id: r42193
2009-07-06 19:43:21 +00:00
Denis Kasak
61fa4d27d5
Cache the transparent colour instead of calling a function for every pixel.
...
svn-id: r42192
2009-07-06 19:41:13 +00:00
Denis Kasak
b2c24dd640
Implemented Script::funcRandom (GPL function).
...
svn-id: r42191
2009-07-06 19:26:53 +00:00
Denis Kasak
218a15d890
Made _rnd member of DraciEngine public.
...
svn-id: r42190
2009-07-06 19:22:13 +00:00
Denis Kasak
edaaca97f9
Set up GPL functions properly (the math evaluator now calls the handler if its implemented).
...
svn-id: r42188
2009-07-06 18:49:51 +00:00
Denis Kasak
237707dd6e
Fixed bug where the GPL interpreter left parameters from previous commands on the stack.
...
svn-id: r42185
2009-07-06 17:29:44 +00:00
Denis Kasak
4e15262e74
Implemented Script::play() GPL opcode.
...
svn-id: r42184
2009-07-06 17:27:12 +00:00
Denis Kasak
f4ba64d2e4
Implemented GPL operators.
...
svn-id: r42183
2009-07-06 17:25:34 +00:00
Denis Kasak
8e341ee968
Renaming Animation -> AnimationManager and AnimObj -> Animation in light of the new API change.
...
svn-id: r42133
2009-07-05 11:52:17 +00:00
Denis Kasak
6c3e9f5151
* API change for Animation and AnimObj; AnimObj is now a proper class and 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-05 03:24:46 +00:00
Denis Kasak
960740fe83
Rewrote Sprite::draw() to draw overflowing sprites correctly. Stopped playing animations as soon as they're loaded from Game::loadAnimation().
...
svn-id: r42111
2009-07-04 23:05:13 +00:00
Denis Kasak
fdf9eb84d6
Implemented handler for the Load instruction. Removed Script::dummy().
...
svn-id: r42102
2009-07-04 18:36:45 +00:00
Denis Kasak
b96b434446
* Added Game::init() and moved some functionality from Game::Game to it (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 18:35:08 +00:00
Denis Kasak
a06509f3c2
* Removed tracking of Z coordinates in Drawable since it's not used
...
* 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 18:29:01 +00:00
Denis Kasak
0888e8a6da
* Split code from Game::changeRoom() into Game::loadRoom() and 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-04 15:21:12 +00:00
Denis Kasak
b1d6377aa1
Added _animationsArchive member to DraciEngine.
...
svn-id: r42091
2009-07-04 14:54:22 +00:00
Denis Kasak
885ce59ce8
Restructured Script so I can start adding callbacks to GPL commands (added 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-04 14:48:36 +00:00
Denis Kasak
a4e6464a63
Added support for playing and stopping animations.
...
svn-id: r42075
2009-07-03 19:05:58 +00:00
Denis Kasak
63d0fdea68
Added Sprite::getRect() and Text::getRect().
...
svn-id: r42074
2009-07-03 19:02:08 +00:00
Denis Kasak
4465ecf123
Added deconstructor for Animation. Made Animation objects delete their frames when deleteAll() or deleteAnimation() are called.
...
svn-id: r42073
2009-07-03 18:19:51 +00:00
Denis Kasak
c651d1c2e2
Made Game::changeRoom() clear the overlaysArchive cache when it's done loading overlays.
...
svn-id: r42072
2009-07-03 18:17:05 +00:00
Denis Kasak
1853d594b8
Enabled loading room number 1 as a test.
...
svn-id: r42071
2009-07-03 17:55:28 +00:00
Denis Kasak
4ba1ea8adf
Added support for loading room overlays to Game::changeRoom().
...
svn-id: r42070
2009-07-03 17:54:13 +00:00
Denis Kasak
22cfdf01ee
Made the animation engine compile.
...
svn-id: r42069
2009-07-03 17:53:05 +00:00
Denis Kasak
c178409b56
Implemented beginning of the animation engine.
...
svn-id: r42068
2009-07-03 17:50:22 +00:00
Denis Kasak
90e6ff9d8a
Added support for mirrored sprites.
...
svn-id: r42067
2009-07-03 17:39:13 +00:00
Denis Kasak
8e9771d15c
Added bool parameter markDirty to Sprite::draw() and Text::draw() to specify 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-03 16:41:11 +00:00
Denis Kasak
52642e2dc9
Added two more debug levels (logic and animation).
...
svn-id: r42065
2009-07-03 16:35:04 +00:00
Denis Kasak
b232202b33
Removed demo code so I can start working on the real intro.
...
svn-id: r42063
2009-07-03 16:29:56 +00:00
Denis Kasak
8bba3e6f10
Added Game::changeRoom() method and Game::_currentRoom.
...
svn-id: r42036
2009-07-02 20:29:14 +00:00
Denis Kasak
cac39d8295
Added rooms and overlays archives.
...
svn-id: r42035
2009-07-02 19:57:09 +00:00
Denis Kasak
4a4aab83d0
Fixed typo.
...
svn-id: r42034
2009-07-02 19:54:18 +00:00
Denis Kasak
b0334e102f
Added struct Room.
...
svn-id: r42033
2009-07-02 19:47:25 +00:00
Denis Kasak
be3c0461d6
DraciEngine now opens and stores pointers to essential archives. Changed code that used those archives to use that instead of opening them manually. Replaced BArchive::operator[] functionality with BArchive::getFile() to prevent ugliness when accessing archives via pointers.
...
svn-id: r42031
2009-07-02 16:15:32 +00:00
Denis Kasak
936e5f4c5e
Merged the info available from _objectStatus with the GameObject struct. 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-07-02 15:08:42 +00:00
Denis Kasak
35a677fb08
Added BArchive::clearCache() method for clearing the data cache of opened files.
...
svn-id: r42019
2009-07-02 10:39:51 +00:00
Denis Kasak
fed2281125
Make the meta engine pass the pointer to the detected version and not the whole ADGameDescription table.
...
svn-id: r42018
2009-07-02 10:31:56 +00:00
Denis Kasak
d47ab6ae98
Added empty animation.cpp and animation.h files.
...
svn-id: r42000
2009-07-01 16:20:47 +00:00
Denis Kasak
58c1591ae0
Added Text::setSpacing() method.
...
svn-id: r41999
2009-07-01 16:15:06 +00:00
Denis Kasak
1373eeea12
Made Text objects calculate their widths and heights properly.
...
svn-id: r41998
2009-07-01 16:14:04 +00:00
Denis Kasak
1402a3f5fe
Removed declaration of Screen::drawSprite() which is now obsolete.
...
svn-id: r41997
2009-07-01 16:01:07 +00:00
Denis Kasak
cfadb6cc3d
Made coordinate specification mandatory when constructing objects of type Sprite and Class. Made transforming from columnwise a default (since it was done most of the time anyway). Changed coordinates to use uint instead of uint16.
...
svn-id: r41996
2009-07-01 16:00:27 +00:00
Denis Kasak
f0fcd7fd8e
Modified Sprite, Text and Drawable to handle data hiding properly since they're no longer just C-like struct containers. Implemented getters/setters accordingly and changed existing code that used those classes.
...
svn-id: r41995
2009-07-01 15:22:36 +00:00
Denis Kasak
4895993588
Added Text::setText() and Text::setColour() methods. Changed demo animation to use them.
...
svn-id: r41984
2009-07-01 01:43:20 +00:00
Denis Kasak
4c86646db6
Changed intro animation to render text via the new Text class.
...
svn-id: r41983
2009-07-01 01:25:48 +00:00
Denis Kasak
d7f8cbf170
Added text position specification to Text constructor.
...
svn-id: r41982
2009-07-01 01:18:22 +00:00
Denis Kasak
78d5b96f51
Added Text as a subclass of Drawable. Fixed syntax error in font.cpp
...
svn-id: r41981
2009-07-01 01:11:48 +00:00
Denis Kasak
49e1a07f27
Added Font::drawString overload that takes in a pointer to a byte buffer and a length instead of a Common::String. Changed the former drawString to be a wrapper for the new one.
...
svn-id: r41980
2009-07-01 01:02:48 +00:00