GRIM: Hide the zbuffer bitmap if it doesn't have the wanted image. Fix #296
This commit is contained in:
parent
2d9b1240ce
commit
075c1cae7d
3 changed files with 16 additions and 3 deletions
|
@ -296,6 +296,14 @@ void Bitmap::draw() const {
|
|||
g_driver->drawBitmap(this);
|
||||
}
|
||||
|
||||
void Bitmap::setNumber(int n) {
|
||||
if ((n - 1) >= _data->_numImages) {
|
||||
warning("Bitmap::setNumber: no anim image: %d. (%s)", n, _data->_fname.c_str());
|
||||
} else {
|
||||
_currImage = n;
|
||||
}
|
||||
}
|
||||
|
||||
Bitmap::~Bitmap() {
|
||||
--_data->_refCount;
|
||||
if (_data->_refCount < 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue