aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2009-08-09Multiply itemID by two before using it as an index into the item image ↵Denis Kasak
archive because every item has a highlighted and a non-highlighted version. svn-id: r43185
2009-08-09Implemented GPL function Script::funcObjStat().Denis Kasak
svn-id: r43176
2009-08-09Moved cursor state setting (when entering a new room) from Game::loadRoom() ↵Denis Kasak
to Game::start() (just after running the gate program). This fixes a black cursor bug when the game starts (the cursor should not be even displayed then). svn-id: r43162
2009-08-09* Implemented GPL functions Script::funcActIco() and Script::funcIsIcoAct().Denis Kasak
* Implemented GPL commands Script::loadMap() and Script::roomMap(). * Added temporary HACK to change some speech texts to use the small font because some strings overflow the screen (as stored in the data files). svn-id: r43161
2009-08-09* Implemented Game::loadWalkingMap().Denis Kasak
* Extracted title updating from the main loop to a new method, Game::updateTitle(). * Added Game::updateCursor(). * Restructured the main loop to fix many subtle bugs and enable some new functionality concerning object scripts (like support for room-global use scripts). * Added support for tracking currently selected icons (items, probably should be renamed). * Changed walkDir, lookDir and useDir members of GameObject to int and adjusted them for zero-based indexing. * Added Game::getCurrentIcon(). * Return from WalkingMap::findNearestWalkable immediately if the starting point is walkable. svn-id: r43160
2009-08-09Added Text::setFont().Denis Kasak
svn-id: r43159
2009-08-09Added Mouse::loadItemCursor(). Removed hotspot FIXME as all cursors seem to ↵Denis Kasak
use the same hotspot (the center of the sprite). svn-id: r43158
2009-08-08* Test whether an object can be used by evaluating its canUse script ↵Denis Kasak
(warning: this will break many things currently working until I implement IsIcoAct in my next few commits). * Removed old HACK note because look / use scripts are now more properly implemented. svn-id: r43130
2009-08-08Implemented Script::testExpression().Denis Kasak
svn-id: r43129
2009-08-08Removed TODO concerning the nearest walkable point feature and reworded some ↵Denis Kasak
obsolete documentation. svn-id: r43128
2009-08-08* Implemented WalkingMap::findNearestWalkable() which mimics a heuristic ↵Denis Kasak
from the original game that attempts to find walkable spots near the given point * Implemented moving to the right place when looking / using objects. svn-id: r43125
2009-08-08Implemented Surface::getRect().Denis Kasak
svn-id: r43109
2009-08-06Fixed the 'ESC room' feature to work as intended.Denis Kasak
svn-id: r43087
2009-08-06Added ability to end the currently executing GPL program before it finishes ↵Denis Kasak
via Script::endCurrentProgram(). svn-id: r43086
2009-08-06Enabled skipping the current line of text if a mouse click occurs.Denis Kasak
svn-id: r43085
2009-08-06Moved walkHero() (in the main loop) to the appropriate place (in ↵Denis Kasak
anticipation of a smart finding a walkable point) and disabled walking during script execution / inventory. svn-id: r43084
2009-08-06Turn off mouse cursor and disable titles when running look / use scripts.Denis Kasak
svn-id: r43083
2009-08-06Added method Mouse::isCursorOn().Denis Kasak
svn-id: r43082
2009-08-06Made the game behave properly and safe when clicking on objects multiple ↵Denis Kasak
times during talking or executing look/use scripts. Previously, the loop could be called nested arbitrarily many times. svn-id: r43081
2009-08-05* Made some type changes to struct/class members in game.cpp (uint -> int ↵Denis Kasak
and uint16 -> uint) * Added enum constant kNoEscRoom for rooms that have no escape room defined * Fixed crash when ESC is pressed in rooms which have no escape room defined * Renamed kNotFound (used as a return value for Game::getObjectWithAnimation) to kObjectNotFound for clarity. svn-id: r43072
2009-08-05* Implemented the "escape room" feature of the original engine which lets a ↵Denis Kasak
user switch to another location (or skip the intro) by pressing ESC (the escRoom for every location is stored in the data files). * Reworked the left and right arrow key commands so they don't call changeRoom() themselves but instead schedule the room change via Game::setRoomNum(). In this way, changing rooms like that is still a hack but a bit more "natural", since the loop doesn't get skipped, the gate scripts get run, etc. svn-id: r43065
2009-08-05* Added kTitleColour = 255 enum constant used in the following item.Denis Kasak
* Added proper colouring of the title animation fonts * Added Game::getEscRoom(). svn-id: r43063
2009-08-05* Changed title text to use the small instead of the big fontDenis Kasak
* Handled title positioning * Cleaned up the main loop a bit (comments, stylistic changes, shortened some lines, etc) * Fixed setting the dragon's feet position (the x coordinate should be at the midpoint of the animation) svn-id: r43059
2009-08-05Fixed second call to Surface::centerOnX() (should have been centerOnY()).Denis Kasak
svn-id: r43058
2009-08-04* Added Font::getLineWidth()Denis Kasak
* Changed Font::getStringWidth() and Font::getStringHeight() to return uint instead of int. * Made the Font::drawString() overload which accepts a Common::String the "default" one. The overload accepting a (byte *) now calls that one (it was the other way around before). * Added proper line centering to the Font::drawString() routine. svn-id: r43053
2009-08-04Refactored Script::talk() to use the new centering methods.Denis Kasak
svn-id: r43052
2009-08-04Added Surface methods centerOnX() and centerOnY().Denis Kasak
svn-id: r43051
2009-08-04* Reverted change that subtracts 1 from font colour indexes for various ↵Denis Kasak
speaking characters; they are 0-based after all. * Fixed font blitting algorithm to allow for both white fonts and transparency. svn-id: r43044
2009-08-03* Fixed bug which made characters talk with the wrong colour; the colour ↵Denis Kasak
indexes are indexed from 1 in the data files so we need to subtract 1. * Turned on font transparency again. svn-id: r43022