// Tile.cpp : Tile class // // 17.11.1998 / DH - Outsourced // 24.11.1998 / DH - Empty (for future animated tiles) // // Copyright (c) 1998 Daniel Hartmeier. All rights reserved. #include "Tile.hpp" #include // ------------------------------------------------------------------- extern "C++" Image *imageSprites; extern "C++" Image *imageTiles; // ------------------------------------------------------------------- TorchTile::TorchTile() : Tile(imageTiles, 32, 144), step(0) { torch = new Sprite(imageSprites, 16, 16, 144, 64); } TorchTile::~TorchTile() { delete torch; } void TorchTile::draw(GsOT *ot) { step += (rand() % 8) + 1; if (step > 100) step = 0; if (step > 75) torch->change(160, 64); else if (step > 50) torch->change(176, 64); else if (step > 25) torch->change(160, 64); else torch->change(144, 64); torch->move(x(), y()); torch->draw(ot); Tile::draw(ot); return; } // -------------------------------------------------------------------