GNAP: Improve Error Output When Bitmap Loading Fails

Users are reporting failure, but it is not clear which bitmap resource
is causing this, hence this change.
This commit is contained in:
D G Turner 2020-09-30 20:56:30 +01:00
parent 2d0b4bf9fa
commit f898546f71

View File

@ -396,11 +396,11 @@ void GameSys::drawBitmap(int resourceId) {
Graphics::Surface *bmpSurface = loadBitmap(resourceId);
if (!bmpSurface)
error("GameSys::drawBitmap() Error loading the bitmap");
error("GameSys::drawBitmap(%08X) Error loading the bitmap", resourceId);
if (bmpSurface->format != _backgroundSurface->format
|| bmpSurface->w != _backgroundSurface->w || bmpSurface->h != _backgroundSurface->h)
error("GameSys::drawBitmap() Different bitmap properties than current background");
error("GameSys::drawBitmap(%08X) Different bitmap properties than current background", resourceId);
byte *src = (byte *)bmpSurface->getPixels();
byte *dst = (byte *)_backgroundSurface->getPixels();