Age | Commit message (Collapse) | Author |
|
svn-id: r46320
|
|
It was caused by forever re-starting the same sample when the animation was
stopped and the same frame got displayed over and over, each time triggering
playing the same sample.
svn-id: r46168
|
|
svn-id: r46142
|
|
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
|
|
It does not return kTitleText and others. This caused flickering of speech
texts on/off when the title got displayed under the mouse.
svn-id: r46056
|
|
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
|
|
This makes the hero's walk even smoother.
svn-id: r45763
|
|
an || expression.
svn-id: r45752
|
|
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
|
|
Also, optimize play() and stop()
svn-id: r45746
|
|
Adjusting to the edge is done such that it respects slight sideways movements of the dragon.
Fixed rounding issues in the whole game. Improved debug messages. Made sure that the dragon
does not turn like crazy around when clicking on the same pixel: the final point is always the
clicked one although the middle points made by shifted to make the animations smooth, and
preserve the dragons direction if he has not walked.
There is a bug with running turning animations as they seem to disappear for 1 frame and have
incorrect Z coordinate. Will investigate it next.
svn-id: r45742
|
|
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
|
|
When debugging another issue, I preloaded all animations, and horrible things
happened that I debugged for a few hours.
svn-id: r45695
|
|
First shot, not debugged yet, but seems to work (even though a bit hairy)!
svn-id: r45688
|
|
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
|
|
anything, but modifying a data structure while traversing it can be a bit
tricky...
svn-id: r44469
|
|
svn-id: r44454
|
|
and added some animation debug info.
svn-id: r44452
|
|
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
|
|
svn-id: r44414
|
|
parameter.
svn-id: r44413
|
|
svn-id: r44362
|
|
svn-id: r44331
|
|
* Added AnimationManager::addItem() for adding inventory items animations.
svn-id: r43486
|
|
has only one frame because such animations may need to have callbacks called too. Fixes intro freeze during mother's lecture.
svn-id: r43313
|
|
svn-id: r42914
|
|
* 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
|
|
svn-id: r42838
|
|
* 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
|
|
* Fixed bug in Animation::nextFrame() which caused non-looping animations to linger on forever
* Stopped setting looping to false explicitly in AnimationManager::addAnimation() since the Animation constructor already does that
svn-id: r42657
|
|
* 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
|
|
* 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
|
|
for short periods of time when moved to a new location.
svn-id: r42586
|
|
engine was busier than usual (like when redrawing the whole screen when returning from minimized state).
svn-id: r42585
|
|
immediately when they are created.
svn-id: r42580
|
|
* 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
|
|
drawn after it's stopped
* Fixed debugging info when starting and stopping animations
svn-id: r42485
|