diff options
author | cflip <cflip@cflip.net> | 2022-03-26 11:50:51 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2022-03-26 11:50:51 -0600 |
commit | 8e2fd5758b00036da965effbefdc76c1d373cd23 (patch) | |
tree | 3fe911af9e4ef648de856c3942b8fd6ba3cd91ff /src/train.h | |
parent | 42397536e79fdf68fb194de86bbeb3f1ed098eed (diff) |
Implement sprite depth sorting
This algorithm draws the level in two passes; the ground and rail tiles
are drawn first, then the train cars and walls. This method isn't
perfect, but it'll do for now.
Diffstat (limited to 'src/train.h')
-rw-r--r-- | src/train.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/train.h b/src/train.h index d47818e..c496db8 100644 --- a/src/train.h +++ b/src/train.h @@ -14,6 +14,7 @@ public: void draw(Bitmap&, int, int); void setPosition(int x, int y); + Point2D getSpritePosition() const; void setSpeed(float speed) { m_speed = speed; }; // Add a vehicle to the end of this train void addVehicle(Train*); |