diff options
-rw-r--r-- | res/car.png | bin | 259 -> 307 bytes | |||
-rw-r--r-- | src/train.cpp | 6 |
2 files changed, 5 insertions, 1 deletions
diff --git a/res/car.png b/res/car.png Binary files differindex ae7c6ff..478cbb1 100644 --- a/res/car.png +++ b/res/car.png diff --git a/src/train.cpp b/src/train.cpp index 06c43b2..98a493f 100644 --- a/src/train.cpp +++ b/src/train.cpp @@ -23,7 +23,11 @@ void Train::draw(Bitmap& bitmap, int xo, int yo) float yi = ((float)y + (float)(m_nextY - y) * m_progress) * TileSize; int xx = (int)((xi - yi) / 2.f - (float)xo); int yy = (int)((xi + yi) / 4.f - (float)yo); - bitmap.blit(m_sprite, xx, yy, 0, 0, TileSize, TileSize); + + int tx = 0; + if (m_dir == East || m_dir == West) tx = 24; + + bitmap.blit(m_sprite, xx, yy, tx, 0, TileSize, TileSize); } void Train::setPosition(int tx, int ty) |