summary refs log tree commit diff stats
path: root/src/system.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-13 20:50:21 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-13 20:50:21 -0500
commit470b1d43fb6f8e17624ee90f87270de5bd6ff77e (patch)
tree966f1e18d496f12c3273684be299573e4bf443ec /src/system.h
parented933607765a6e010689aaaf85184053ff6e8a2b (diff)
downloadtanetane-470b1d43fb6f8e17624ee90f87270de5bd6ff77e.tar.gz
tanetane-470b1d43fb6f8e17624ee90f87270de5bd6ff77e.tar.bz2
tanetane-470b1d43fb6f8e17624ee90f87270de5bd6ff77e.zip
Added lightning sprite to mailbox event
Sprites can be destroyed now, which really just means that their index is removed from the list of active sprites. The actual memory is not freed until all sprites are deleted on map change.

Sprite layers are introduced. All sprites by default are on layer 0 (Normal) which renders them in between the lower and upper map layers. There is also a layer 1 (Above) that renders above the upper map layer, and the sprite for the lightning strike uses this layer in order to not be hidden by the trees.

Fixed a bug where waiting for the end of a non-looping animation would trip the flag immediately upon the final frame activating, instead of waiting the length of the last frame.
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h index 93b903e..3e84537 100644 --- a/src/system.h +++ b/src/system.h
@@ -16,6 +16,8 @@ public:
16 16
17 virtual void tick(double dt) {} 17 virtual void tick(double dt) {}
18 18
19 virtual void destroySprite(int spriteId) {}
20
19 virtual void clearSpriteCache() {} 21 virtual void clearSpriteCache() {}
20}; 22};
21 23