diff options
Diffstat (limited to 'sword2/build_display.cpp')
-rw-r--r-- | sword2/build_display.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sword2/build_display.cpp b/sword2/build_display.cpp index 1072960708..9f424b9bce 100644 --- a/sword2/build_display.cpp +++ b/sword2/build_display.cpp @@ -282,10 +282,12 @@ void Sword2Engine::processLayer(byte *file, uint32 layer_number) { uint32 current_layer_area = layer_head->width * layer_head->height; if (current_layer_area > _largestLayerArea) { + byte buf[NAME_LEN]; + _largestLayerArea = current_layer_area; sprintf(_largestLayerInfo, "largest layer: %s layer(%d) is %dx%d", - fetchObjectName(_thisScreen.background_layer_id), + fetchObjectName(_thisScreen.background_layer_id, buf), layer_number, layer_head->width, layer_head->height); } @@ -366,10 +368,12 @@ void Sword2Engine::processImage(BuildUnit *build_unit) { uint32 current_sprite_area = frame_head->width * frame_head->height; if (current_sprite_area > _largestSpriteArea) { + byte buf[NAME_LEN]; + _largestSpriteArea = current_sprite_area; sprintf(_largestSpriteInfo, "largest sprite: %s frame(%d) is %dx%d", - fetchObjectName(build_unit->anim_resource), + fetchObjectName(build_unit->anim_resource, buf), build_unit->anim_pc, frame_head->width, frame_head->height); @@ -398,10 +402,13 @@ void Sword2Engine::processImage(BuildUnit *build_unit) { } uint32 rv = _graphics->drawSprite(&spriteInfo); - if (rv) + if (rv) { + byte buf[NAME_LEN]; + error("Driver Error %.8x with sprite %s (%d) in processImage", - rv, fetchObjectName(build_unit->anim_resource), + rv, fetchObjectName(build_unit->anim_resource, buf), build_unit->anim_resource); + } // release the anim resource _resman->closeResource(build_unit->anim_resource); |