Age | Commit message (Collapse) | Author |
|
1. a room need to be reloaded by force when the loaded game is in the same
room as the game before the load
2. objects from the last room and their animations must be deallocated
before I change the room number
svn-id: r44638
|
|
Immediate exit needed when loading a savegame hurts waiting in an inner
(strange) loop inside a GPL program, because animations don't progress at
all. Reverted to the previous behavior and kept the immediate exit as a
hack for loading the game.
svn-id: r44590
|
|
This solution is quite hacky, but so is the rest of the code, before a
future refactoring done one day.
svn-id: r44588
|
|
Fixed many bugs in the boilerplate. Saving (only) things that really need to
be saved. Loading seems to work modulo dialogs and (possibly) inventory.
svn-id: r44586
|
|
Completely changed the interface, removing unused methods and attributes,
renaming other ones to reflect what they do, and moving some methods into the
private section. Code changing the location, originally scattered over many
pieces of code, has been unified into one place. Remember the previous room
when entering the map so that one can return there.
Also, the event handler processes one event at a time, preventing lost clicks
on touchpads.
svn-id: r44508
|
|
svn-id: r44493
|
|
- 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
|
|
svn-id: r44474
|
|
svn-id: r44456
|
|
* 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
|
|
Game::getHeroY() and implemented correct positioning of all dragon animations. Fixed exiting the inventory by right-clicking outside it.
svn-id: r44453
|
|
svn-id: r44422
|
|
svn-id: r44362
|
|
svn-id: r44331
|
|
getters/setters.
svn-id: r43492
|
|
previously called "icons" as in the original player. This commit also renamed every such instance to the proper "item".
svn-id: r43487
|
|
svn-id: r43424
|
|
svn-id: r43392
|
|
* 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
|
|
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
|
|
svn-id: r43253
|
|
* 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
|
|
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
|
|
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
|
|
* Added proper colouring of the title animation fonts
* Added Game::getEscRoom().
svn-id: r43063
|
|
bytes and font colour as int16; it should be the other way around.
* Handled the kStatusTalk loop substatus properly inside Game::loop().
* Made Game::walkHero() set the person coordinates for the dragon after it warps him to a new location
* Added Game::getPerson() method (used by Script::talk())
* Added Game::setSpeechTick() method (set by Script::talk() and used inside the loop to determine when to switch to new text).
svn-id: r42994
|
|
* Set loop substatus to Ordinary when changing rooms
svn-id: r42971
|
|
* Added a separate mechanism to Game to keep track both of the current room number and the next room/gate. Periodically, I check whether the new room differs from the old one and, if it does, I do the change. Doing it any other would is nearly impossible because of the way the original scripts were written.
* Added GPL command Script::newRoom(). Rooms can now be traversed by clicking on their exits. Also, the intro animation partly works. Some parts go by far too soon. I assume this is because the engine still lacks a dialogue GPL command.
* Fixed bug where the gates array of a room was not cleared between uses.
* Save old jump value when we enter Script::run() and restore it in the end (mimicking the original engine).
* Fixed small bug where the gate was supposed to be stored as the first in-game variable and not the room number.
svn-id: r42957
|
|
implementation.
* Set the first two game variables to the gate and room number in Game::init()
* Fixed compilation
svn-id: r42916
|
|
* Added getters and setters for current room and gate numbers
svn-id: r42915
|
|
svn-id: r42906
|
|
Game::_shouldExitLoop variable is set.
* Added mechanisms for signalling whether the main game loop should exit or not (Game::setExitLoop() and Game::shouldExitLoop())
svn-id: r42899
|
|
* Added Game::start() method which is called from DraciEngine::go()
* Made Game::loop() suitable for calling from other places (like GPL scripts) by handling events, redrawing the screen, etc from inside. This way it doesn't freeze the game if it doesn't return immediately.
* Added Game::shouldQuit() and Game::setQuit() which can be used to signal the engine to quit.
* Fixed race condition related to mouse buttons not getting released.
* Instead of deleting frames for the title animation and adding a new one, reset the text for its frame.
svn-id: r42875
|
|
animation with a certain ID
* Made GameObjects track their titles as Strings rather than byte *
* Made the engine display the title of the object under the cursor (added a special animation ID for that, kTitleText)
svn-id: r42839
|
|
* Implemented WalkOn GPL command.
* Temporarily remaped StayOn and WalkOnPlay to WalkOn (for testing).
svn-id: r42735
|
|
svn-id: r42734
|
|
because Game uses pointers from the init archive which should outlive it (but didn't previously).
* Added support for setting loop status to Game.
* Made some GPL commands check whether we are in the correct loop status before executing.
svn-id: r42731
|
|
* Removed temporary hack I accidentally committed
svn-id: r42730
|
|
order in which they were loaded). This is needed by some GPL commands.
* Added Game::getNumObjects() which returns the number of objects in the game
* Fixed segfault (accessing a null Animation *)
* Added some docs to various things
svn-id: r42683
|
|
* Made the dragon scale when it is in different parts of the room
* Added getters for relative coordinates (Animation::getRelativeX() and Animation::getRelativeY())
* Commented Game::loop() and Sprite::draw*() methods in more detail
svn-id: r42627
|
|
* Moved static declaration of real_to_double() to game.cpp
svn-id: r42616
|
|
Game::loadRoom() read in pers0 and persStep correctly.
svn-id: r42612
|
|
(right arrow switches to the next room, left to the previous.
svn-id: r42577
|
|
* Modified the engine to leverage BArchive's memory management capabilities by using its pointers to data directly instead of copying
* Removed GameObject destructor (not needed because of the above change)
* Changed some more data members from uint16 to uint
svn-id: r42555
|
|
* Fixed unsigned to signed comparison.
svn-id: r42549
|
|
* Added WalkingMap::isWalkable()
* Renamed remaining _priority identifiers to _z which were left by mistake in the previous commit
svn-id: r42546
|
|
svn-id: r42542
|
|
* Added DraciEngine::walkingMapsArchive
* Made Game::loadRoom() read in the current walking map
svn-id: r42541
|
|
to int
* Modified Game::loadRoom to load gates and execute their scripts
* The first room loaded is now Game::_info._startRoom instead of 0
* Fixed reading of _pers0 and _persStep from the data files (they are 6 instead of 12 bytes)
* Added more debug info to Script and Game
svn-id: r42515
|
|
svn-id: r42465
|