aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-29Account for endianess properly when reading in game variables.Denis Kasak
svn-id: r41965
2009-06-28Added an offset parameter to Script::run() so we can specify where to start ↵Denis Kasak
the GPL program execution. Also, the init script for the dragon object is now run inside Game::Game(). svn-id: r41928
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-28Removed disassembling of the GPL script for the first game location from ↵Denis Kasak
Draci::init(). svn-id: r41926
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-27Added Script instance to DraciEngine. Restored disassembling of a demo ↵Denis Kasak
script on engine startup (previously via gpldisasm(), now via _script->run()). svn-id: r41921
2009-06-27Renamed Script::gpldisasm() to Script::run().Denis Kasak
svn-id: r41920
2009-06-27Put all GPL interpreter related routines inside a Script class.Denis Kasak
svn-id: r41919
2009-06-27Renamed gpldisasm.* to script.* in anticipation of using it as a script ↵Denis Kasak
intepreter. svn-id: r41918
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
2009-06-25Oops, really fixed typo.Denis Kasak
svn-id: r41874
2009-06-25Fixed typo.Denis Kasak
svn-id: r41873
2009-06-25Made the DraciEngine destructor free _font and _mouse.Denis Kasak
svn-id: r41872
2009-06-25Renamed *cursorNum identifiers in Mouse to *cursorType for consistency.Denis Kasak
svn-id: r41866
2009-06-25Added transformToRows() static method to Sprite. Modified Sprite ↵Denis Kasak
constructors to use it. svn-id: r41865
2009-06-25Implemented some more methods in Mouse so all mouse-related events are ↵Denis Kasak
handled through it. svn-id: r41861
2009-06-24Started work on the Mouse class.Denis Kasak
svn-id: r41840
2009-06-22Changed Font::fillScreen() to accept a uint8 instead of a uint16.Denis Kasak
svn-id: r41780
2009-06-22* Expanded docs for the Sprite classDenis Kasak
* Added Surface and Screen docs * Small documentation fixes svn-id: r41779
2009-06-22Documentation fix for the Font class.Denis Kasak
svn-id: r41776
2009-06-22Replaced return values with Common::k*Error constants.Denis Kasak
svn-id: r41775
2009-06-19Updated the demo animation to use the new Surface features (transparency, ↵Denis Kasak
dirty rects). Changed background to light grey. A transparent string is now drawn over the dragon sprite. svn-id: r41658
2009-06-19* Made the Screen class use the new Surface class.Denis Kasak
* Added Screen::drawRect() method. * Added support for updating dirty rectangles. svn-id: r41657
2009-06-19Added support for the new Surface class to Font (transparency, marking dirty ↵Denis Kasak
rectangles). svn-id: r41656
2009-06-19Made the Surface class compile.Denis Kasak
svn-id: r41655
2009-06-19Added Sprite::draw() method for drawing sprites to a Surface.Denis Kasak
svn-id: r41654
2009-06-18Added Surface class.Denis Kasak
svn-id: r41653
2009-06-18Turned constants into enum in order to remove need of prototypes.Eugene Sandulenko
svn-id: r41623
2009-06-18Changed _screenWidth and _screenHeight from member variables to constants ↵Denis Kasak
because the screen size doesn't change. svn-id: r41620
2009-06-17Added kNumColours constant and replaced magic numbers with it.Denis Kasak
svn-id: r41617
2009-06-17Added default parameter to Screen::setPaletteEmpty() so it clears all ↵Denis Kasak
colours by default. svn-id: r41614
2009-06-17Changed the _font DraciEngine member from a Font instance to a pointer to an ↵Denis Kasak
instance. This way the default constructor is invoked in DraciEngine::init() and can properly initialize the fonts because the game data paths are set. svn-id: r41612
2009-06-17Fixed typo.Denis Kasak
svn-id: r41608
2009-06-17Added prefices to safeguard defines in order to minimize risk of name clash.Eugene Sandulenko
svn-id: r41605
2009-06-17Began work on the Screen class. Modified the demo animation to use the it.Denis Kasak
svn-id: r41604
2009-06-17Added include guards.Denis Kasak
svn-id: r41600
2009-06-15Changing font colour constants to an enum.Denis Kasak
svn-id: r41553
2009-06-15Submitting changes to DraciEngine::go() mentioned in the last commit but ↵Denis Kasak
omitted by accident. Removed superfluous BArchive::closeArchive() calls. svn-id: r41552
2009-06-15Added BArchive::isOpen() method. Modified DraciEngine::go() to use it. ↵Denis Kasak
Updated BArchive docs. svn-id: r41550
2009-06-15Fixed a memory leak in BArchive::openArchive(). A buffer wasn't being freed.Denis Kasak
svn-id: r41535
2009-06-15Close a file after we're done using it.Denis Kasak
svn-id: r41534
2009-06-15Added support for DFW format archives. Rewrote some BArchive methods to be ↵Denis Kasak
able to seamlessly handle both BAR and DFW archives. Modified the BAFile struct to support both types of files. Tested it by enabling the mouse in the event loop (the cursor was stored in a DFW file). Added and rewrote docs to reflect the changes. svn-id: r41533
2009-06-15Added const to reference parameters of Font::drawString() and ↵Denis Kasak
Font::getStringWidth(). svn-id: r41530
2009-06-15Converted default font colours from static members of Font to constants. ↵Denis Kasak
Moved the initializer list of the Font constructor to the constructor body (for readability). svn-id: r41529
2009-06-14Removed superfluous return from the Sprite constructor.Denis Kasak
svn-id: r41525
2009-06-14Added a Font _font variable to the engine instance. Fixed font colour ↵Denis Kasak
handling by replacing the appropriate colours before drawing. Added Font::setColour() method for changing the current font colour. Added include guards to draci/font.h. Moved kFontBig and kFontSmall constants to draci/font.cpp to prevent redefinition errors. svn-id: r41524
2009-06-14Renamed DraciFont class to Font to be more consistent with the rest of the ↵Denis Kasak
classes and other engines. svn-id: r41523