Age | Commit message (Collapse) | Author |
|
|
|
|
|
svn-id: r48936
|
|
The previous bugfix just hid the problem by removing an assert, but it might demonstrate
itself in another way later. This is a proper bugfix.
svn-id: r48460
|
|
svn-id: r46320
|
|
With the previous code, the position of the animation was doubled (due to
counting the position twice, the second time being a relative shift), which
put it mostly outside the screen. This is because one-time hero animations
are actually stored using absolute coordinates.
svn-id: r46057
|
|
Replaced IDs of objects by pointers, which saves many lookups, each of which
is horribly ineffective. Moved a lot of code into methods of structs now
turned into objects.
Tested the new code a lot and seems to work as well as the old code.
svn-id: r45799
|
|
Pressing Q during the game enables/disables faster walking; all animation
phases are flipped after one refresh instead of after given delay.
svn-id: r45748
|
|
To implement proper walking, I have to respect the relative shifts defined
by the sprites as opposed to apply some constant velocity.
svn-id: r45714
|
|
In these animations, each sprite can specify a relative shift with respect
to the previous sprite. Moving animations (such as walking of the dragon)
are easily described in this framework. I have sort of hacked their support
and it seems to work.
The current walking code does not interact with the new code yet, but it will
be easy to do.
svn-id: r45712
|
|
First shot, not debugged yet, but seems to work (even though a bit hairy)!
svn-id: r45688
|
|
svn-id: r45604
|
|
svn-id: r45597
|
|
svn-id: r45524
|
|
They usually just add unnecessary confusion and this is definitely such
an example. Removal will clarify the code.
svn-id: r45512
|
|
Also, add comments to the last commit.
svn-id: r45511
|
|
Dubbing is not yet played.
svn-id: r45000
|
|
The sounds are not played yet, but the infrastructure is getting ready.
svn-id: r44957
|
|
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
|
|
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
|
|
parameter.
svn-id: r44413
|
|
svn-id: r44362
|
|
svn-id: r44331
|
|
* Added AnimationManager::addItem() for adding inventory items animations.
svn-id: r43486
|
|
svn-id: r42988
|
|
* Moved rewinding the animation to the beginning from Animation::nextFrame() to AnimationManager::stop() (fixes the owl animation)
svn-id: r42913
|
|
(doNothing, exitGameLoop, stopAnimation).
svn-id: r42901
|
|
* Renamed Animation::getFramesNum() to Animation::getFrameCount() for clarity.
svn-id: r42873
|
|
* Added AnimationManager::getTopAnimationID(x, y) which returns the ID of the top layer animation located on a point
* Added Animation::getScale{X,Y}()
* Fixed a few bugs related to animations sometimes having no frames
svn-id: r42836
|
|
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
|
|
decided to go for a mixed approach (where Animation has a global scaling factor for the whole animation which is separate from Drawable's scaled width and height) so the animation can be scaled more naturally when the scale often changes (like with perspective when the dragon is walking). Previously, one had to alter the sizes of each frame of the dragon's animation whenever the dragon moved which was unclean.
svn-id: r42680
|
|
* Instead, Animation::nextFrame() marks both the old and the new frame dirty. This makes it possible to only update the real screen when the animation changes and results in a pretty big speedup.
* Added utility method Animation::markDirtyRect() which takes a (Surface *) and marks a dirty rect on it for the current frame.
* Fixed artifacts when moving the dragon.
svn-id: r42652
|
|
* Now each Sprite (and hence frame in an animation) can have a separate zoom (which is needed for some animations in the game)
* Scale factors are not stored any more; instead, we only store scaled dimensions (since these are stored in the data files) and calculate the factors from those.
svn-id: r42647
|
|
svn-id: r42628
|
|
* 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
|
|
* Added support for sorting animations when Z is changed later on (AnimationManager::sortAnimations())
* Added support for relative coordinates (Animation::setRelative())
* Fixed bug where AnimationManager::deleteOverlays() deleted all animations
svn-id: r42579
|
|
animation can have a different delay.
svn-id: r42427
|
|
* Fixed bug in AnimationManager::deleteAnimation() that could result in accessing the Common::List::end() sentinel value.
svn-id: r42223
|
|
the new API change.
svn-id: r42133
|
|
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
|
|
svn-id: r42075
|
|
frames when deleteAll() or deleteAnimation() are called.
svn-id: r42073
|
|
svn-id: r42068
|
|
svn-id: r42000
|