aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
AgeCommit message (Collapse)Author
2009-09-30- Adapt parts of the Draci code to match our code formatting guidelinesJohannes Schickel
- Remove use of tabs for formatting, now in nearly all cases tabs are only used for indentation - Use "uint" instead of "unsigned int" in the whole engine for consistency's sake - Strip some trailing tabs and leading whitespaces svn-id: r44478
2009-09-30Implemented the map room, entered when 'm' is pressed.Robert Špalek
svn-id: r44474
2009-09-29Fixed Valgrind warnings about invalid memory access. Hopefully without breakingTorbjörn Andersson
anything, but modifying a data structure while traversing it can be a bit tricky... svn-id: r44469
2009-09-29Rewrite from scratch drawReScaled() and cropping now works well.Robert Špalek
I left draw() as is for now, although it could also be similarly simplified. Also, one could easily completely get rid of columnIndices[], but I was too tired for the time being. svn-id: r44457
2009-09-29Clean up and unify positioning dragon's animationsRobert Špalek
svn-id: r44456
2009-09-29draci:Denis Kasak
* Added const to some methods of Game. * Removed some code cruft from Game::walkHero() (duplicate calculations and variables). * Fixed small bug which prevented talking text from being centered above the dragon. svn-id: r44455
2009-09-28draci: Inverted a logical check to make it more obvious.Denis Kasak
svn-id: r44454
2009-09-28draci: Added methods Game::positionAnimAsHero(), Game::getHeroX() and ↵Denis Kasak
Game::getHeroY() and implemented correct positioning of all dragon animations. Fixed exiting the inventory by right-clicking outside it. svn-id: r44453
2009-09-28Made AnimationManager::sortAnimations() do multiple passes, if necessary, ↵Denis Kasak
and added some animation debug info. svn-id: r44452
2009-09-28Fix a memory leakRobert Špalek
svn-id: r44447
2009-09-28Added const's to getPalette() and several uses of getObject()Robert Špalek
svn-id: r44434
2009-09-28Make getFile() return a const pointer and clean-up all uses of it.Robert Špalek
svn-id: r44433
2009-09-28get rid of static Common::String'sRobert Špalek
svn-id: r44432
2009-09-28get rid of static Common::String'sRobert Špalek
svn-id: r44431
2009-09-27Fix rounding coordinates at the edge of the screen.Robert Špalek
svn-id: r44430
2009-09-27Reduce code duplication when cleaning animationsRobert Špalek
svn-id: r44422
2009-09-27Improved the interface of Sprite and Animation concerning relative ↵Robert Špalek
coordinates and scaling. It is no longer needed to modify the underlying animations when drawing them on the screen or testing pixels in them. Read access is enough, because the displacement of the object is passed as a parameter. Added some more const's where they logically belong. svn-id: r44419
2009-09-27Fix renumbering of animation indexesRobert Špalek
svn-id: r44414
2009-09-27Remove memory leak in animation manager. Get rid of 1 non-const reference ↵Robert Špalek
parameter. svn-id: r44413
2009-09-26draci: Fixed bug in Surface::centerOn{X,Y}() which made it return a negative ↵Denis Kasak
coordinate for strings that are too long. Resolves the crash caused by the English data files containing strings which are improperly line-breaked. Ideally, the engine should do the line-breaking itself when the string does not fit. svn-id: r44376
2009-09-25Added some more const's to the interface of Dragon HistoryRobert Špalek
svn-id: r44362
2009-09-25Created a macro for lround(), for non-C99 compilers, and used that in places ↵Filippos Karapetis
where lround() is used svn-id: r44337
2009-09-25Add const's to many interfaces of engines/draci/Robert Špalek
svn-id: r44331
2009-09-25Silenced some warningsFilippos Karapetis
svn-id: r44329
2009-09-25Replaced the C99 lround() with floor(), to get draci to compile under ↵Filippos Karapetis
non-C99 compilers (e.g. VS) svn-id: r44328
2009-09-25Make engines/draci/ compilable after merging from a branchRobert Špalek
svn-id: r44327
2009-08-17Removed public data variables of Game concerning dialogues and added ↵Denis Kasak
getters/setters. svn-id: r43492
2009-08-17Enabled hotkey 'i' for accessing or exiting the inventory.Denis Kasak
svn-id: r43488
2009-08-17Added inventory and item handling support (monster patch, sorry). Items were ↵Denis Kasak
previously called "icons" as in the original player. This commit also renamed every such instance to the proper "item". svn-id: r43487
2009-08-17* Added pause support for animations.Denis Kasak
* Added AnimationManager::addItem() for adding inventory items animations. svn-id: r43486
2009-08-17* Set the _x and _y position for the mouse only when an EVENT_MOUSEMOVE happens.Denis Kasak
* Stop calling Mouse::setPosition() on EVENT_MOUSEMOVE since it's not needed (the engine warps the mouse automatically; I still left the method for situations when we want to warp the mouse explicitly). svn-id: r43484
2009-08-16Added struct GameItem.Denis Kasak
svn-id: r43424
2009-08-15Removed _roomChange hack since it's no longer needed.Denis Kasak
svn-id: r43392
2009-08-15* Implemented LoadPalette, SetPalette and BlackPalette GPL commands.Denis Kasak
* Used a more natural condition (whether the scheduled room number is different from the current room number) instead of the _roomChange hack. svn-id: r43391
2009-08-14Sped up the game during dialogues by not updating every drawn char ↵Denis Kasak
separately but the whole string at once. Also removed the markDirty parameter from Font::drawChar() since it's not needed anymore. svn-id: r43368
2009-08-14Fixed bug which made the dragon's spoken line in a dialogue end too quickly.Denis Kasak
svn-id: r43365
2009-08-12Stopped returning from Animation::nextFrame() early even if the animation ↵Denis Kasak
has only one frame because such animations may need to have callbacks called too. Fixes intro freeze during mother's lecture. svn-id: r43313
2009-08-12Fixed dialogues logic (some indexes were calculated erroneously +/- 1).Denis Kasak
svn-id: r43312
2009-08-12Moved setting inactive dialogue option colour to an else branch.Denis Kasak
svn-id: r43311
2009-08-12Removed unnecessary else branch in the part of the loop handling substatus Talk.Denis Kasak
svn-id: r43310
2009-08-12Fixed erroneous comment mentioning gates in Game::runDialogueProg().Denis Kasak
svn-id: r43309
2009-08-12* When setting the first two game variables (room and gate), first convert ↵Denis Kasak
them back to 1-based indexing so they play well with the rest of the scripts. This fixes a number of bugs, e.g. the dragon now appears automatically when the game starts and the question mark animation in the intro is played / stopped at an appropriate time. * Removed hack from Script::start() which loaded animation 657 before playing it to stop a crash. The fix above seems to fix this bug as well. svn-id: r43308
2009-08-12Whenever we enter the top-level loop, disable exiting by default (fixes the ↵Denis Kasak
high-five scene between Bert and Eveline which ended too fast). svn-id: r43306
2009-08-12* Split loop status and substatus into two different enums since they are ↵Denis Kasak
two separate concepts * Fixed slight glitch where object titles (which normally disappear when objects are used/looked at) reappeared for a moment after the script has finished svn-id: r43305
2009-08-12Fixed Script::walkOnPlay() (was setting loop status whereas it was substatus ↵Denis Kasak
that needed to be set). svn-id: r43297
2009-08-12Added some debug info for loop statuses and dialogues.Denis Kasak
svn-id: r43295
2009-08-11Added dialogue selection colouring.Denis Kasak
svn-id: r43256
2009-08-11Implemented GPL command WalkOnPlay.Denis Kasak
svn-id: r43255
2009-08-11Fix intro crash because of bug in the data files.Denis Kasak
svn-id: r43254
2009-08-11Added dialogue support.Denis Kasak
svn-id: r43253