[Scummvm-git-logs] scummvm master -> 548c4de4277635d0f17780b689588aa377bcc2fb

sev- noreply at scummvm.org
Thu Sep 12 23:20:06 UTC 2024


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
faeea40b2c QDENGINE: Normalized debug graphics output on debug levels 2 and 3
8400c08d53 QDENGINE: Added debug output to low-level sprite drawing
10101d7e15 QDENGINE: Added more debug to animation rendering
548c4de427 QDENGINE: Stop being resource hog


Commit: faeea40b2ce9a607dfe38290dbb0bdde6f4ad94b
    https://github.com/scummvm/scummvm/commit/faeea40b2ce9a607dfe38290dbb0bdde6f4ad94b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-09-13T01:19:47+02:00

Commit Message:
QDENGINE: Normalized debug graphics output on debug levels 2 and 3

Changed paths:
    engines/qdengine/qdcore/qd_animation.cpp
    engines/qdengine/qdcore/qd_sprite.cpp
    engines/qdengine/system/graphics/gr_tile_animation.cpp


diff --git a/engines/qdengine/qdcore/qd_animation.cpp b/engines/qdengine/qdcore/qd_animation.cpp
index 6a731df78b0..73d71d274f9 100644
--- a/engines/qdengine/qdcore/qd_animation.cpp
+++ b/engines/qdengine/qdcore/qd_animation.cpp
@@ -138,6 +138,8 @@ void qdAnimation::quant(float dt) {
 }
 
 void qdAnimation::redraw(int x, int y, int z, int mode) const {
+	debugC(2, kDebugGraphics, "qdAnimation::redraw([%d, %d, %d], mode: %d), file: '%s'", x, y, z, mode, transCyrillic(qda_file().toString()));
+
 	if (check_flag(QD_ANIMATION_FLAG_FLIP_HORIZONTAL))
 		mode |= GR_FLIP_HORIZONTAL;
 
@@ -154,6 +156,8 @@ void qdAnimation::redraw(int x, int y, int z, int mode) const {
 }
 
 void qdAnimation::redraw(int x, int y, int z, float scale, int mode) const {
+	debugC(2, kDebugGraphics, "qdAnimation::redraw([%d, %d, %d], scale: %f, mode: %d), file: '%s'", x, y, z, scale, mode, transCyrillic(qda_file().toString()));
+
 	if (fabs(scale - 1.0f) < 0.01f) {
 		redraw(x, y, z, mode);
 		return;
@@ -185,6 +189,8 @@ void qdAnimation::redraw(int x, int y, int z, float scale, int mode) const {
 }
 
 void qdAnimation::redraw_rot(int x, int y, int z, float angle, int mode) const {
+	debugC(2, kDebugGraphics, "qdAnimation::redraw_rot([%d, %d, %d], angle: %f, mode: %d), file: '%s'", x, y, z, angle, mode, transCyrillic(qda_file().toString()));
+
 	if (check_flag(QD_ANIMATION_FLAG_FLIP_HORIZONTAL))
 		mode |= GR_FLIP_HORIZONTAL;
 
@@ -198,6 +204,8 @@ void qdAnimation::redraw_rot(int x, int y, int z, float angle, int mode) const {
 }
 
 void qdAnimation::redraw_rot(int x, int y, int z, float angle, const Vect2f &scale, int mode) const {
+	debugC(2, kDebugGraphics, "qdAnimation::redraw_rot([%d, %d, %d], angle: %f, scale: [%f, %f], mode: %d), file: '%s'", x, y, z, angle, scale.x, scale.y, mode, transCyrillic(qda_file().toString()));
+
 	if (fabs(scale.x - 1.0f) < 0.01f && fabs(scale.y - 1.0f) < 0.01f) {
 		redraw_rot(x, y, z, angle, mode);
 		return;
diff --git a/engines/qdengine/qdcore/qd_sprite.cpp b/engines/qdengine/qdcore/qd_sprite.cpp
index 9c9c0d84d59..43a05561c61 100644
--- a/engines/qdengine/qdcore/qd_sprite.cpp
+++ b/engines/qdengine/qdcore/qd_sprite.cpp
@@ -608,7 +608,7 @@ bool qdSprite::uncompress() {
 }
 
 void qdSprite::redraw(int x, int y, int z, int mode) const {
-	debugC(2, kDebugGraphics, "qdSprite::redraw(%d, %d, z=%d, mode=%d)", x, y, z, mode);
+	debugC(3, kDebugGraphics, "qdSprite::redraw([%d, %d, %d], mode: %d)", x, y, z, mode);
 
 	int xx = x - size_x() / 2;
 	int yy = y - size_y() / 2;
@@ -648,6 +648,8 @@ void qdSprite::redraw(int x, int y, int z, int mode) const {
 }
 
 void qdSprite::redraw_rot(int x, int y, int z, float angle, int mode) const {
+	debugC(3, kDebugGraphics, "qdSprite::redraw_rot([%d, %d, %d], angle: %f, mode: %d)", x, y, z, angle, mode);
+
 	int xx = x;
 	int yy = y;
 
@@ -674,6 +676,8 @@ void qdSprite::redraw_rot(int x, int y, int z, float angle, int mode) const {
 }
 
 void qdSprite::redraw_rot(int x, int y, int z, float angle, const Vect2f &scale, int mode) const {
+	debugC(3, kDebugGraphics, "qdSprite::redraw_rot([%d, %d, %d], angle: %f, scale: [%f, %f], mode: %d)", x, y, z, angle, scale.x, scale.y, mode);
+
 	int xx = x;
 	int yy = y;
 
@@ -703,6 +707,8 @@ void qdSprite::redraw_rot(int x, int y, int z, float angle, const Vect2f &scale,
 }
 
 void qdSprite::redraw(int x, int y, int z, float scale, int mode) const {
+	debugC(3, kDebugGraphics, "qdSprite::redraw([%d, %d, %d], scale: %f, mode: %d)", x, y, z, scale, mode);
+
 	int xx = x - round(float(size_x()) * scale) / 2;
 	int yy = y - round(float(size_y()) * scale) / 2;
 
diff --git a/engines/qdengine/system/graphics/gr_tile_animation.cpp b/engines/qdengine/system/graphics/gr_tile_animation.cpp
index bc8fea2fc67..f893c8c75c1 100644
--- a/engines/qdengine/system/graphics/gr_tile_animation.cpp
+++ b/engines/qdengine/system/graphics/gr_tile_animation.cpp
@@ -298,6 +298,8 @@ bool grTileAnimation::load(Common::SeekableReadStream *fh, int version) {
 }
 
 void grTileAnimation::drawFrame(const Vect2i &position, int32 frame_index, int32 mode, int closest_scale) const {
+	debugC(3, kDebugGraphics, "grTileAnimation::drawFrame([%d, %d], frame: %d, mode=%d, scale_idx: %d)", position.x, position.y, frame_index, mode, closest_scale);
+
 	Vect2i frameSize = _frameSize;
 	Vect2i frameTileSize = _frameTileSize;
 	int frameStart = 0;
@@ -340,6 +342,8 @@ void grTileAnimation::drawFrame(const Vect2i &position, int32 frame_index, int32
 }
 
 void grTileAnimation::drawFrame(const Vect2i &position, int frame_index, float angle, int mode) const {
+	debugC(3, kDebugGraphics, "grTileAnimation::drawFrame([%d, %d], frame: %d, angle=%f, scake: %d)", position.x, position.y, frame_index, angle, mode);
+
 	byte *buf = decode_frame_data(frame_index, -1);
 	Vect2i pos = position - _frameSize / 2;
 
@@ -347,6 +351,8 @@ void grTileAnimation::drawFrame(const Vect2i &position, int frame_index, float a
 }
 
 void grTileAnimation::drawFrame(const Vect2i &position, int frame_index, float angle, const Vect2f &scale, int mode) const {
+	debugC(3, kDebugGraphics, "grTileAnimation::drawFrame([%d, %d], frame: %d, angle: %f, scale: [%f, %f], mode: %d)", position.x, position.y, frame_index, angle, scale.x, scale.y, mode);
+
 	byte *buf = decode_frame_data(frame_index, -1);
 	Vect2i pos = position - _frameSize / 2;
 
@@ -374,6 +380,8 @@ bool grTileAnimation::hit(int frame_number, Vect2i &pos) const {
 }
 
 void grTileAnimation::drawFrame_scale(const Vect2i &position, int frame_index, float scale, int mode) const {
+	debugC(3, kDebugGraphics, "grTileAnimation::drawFrame_scale([%d, %d], frame: %d, scale: %f, mode: %d)", position.x, position.y, frame_index, scale, mode);
+
 	int closest_scale = find_closest_scale(&scale);
 
 	if (wasFrameSizeChanged(frame_index, closest_scale, scale)) {


Commit: 8400c08d53a4a6aab529f38df07d6d32a3d1f48f
    https://github.com/scummvm/scummvm/commit/8400c08d53a4a6aab529f38df07d6d32a3d1f48f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-09-13T01:19:54+02:00

Commit Message:
QDENGINE: Added debug output to low-level sprite drawing

Changed paths:
    engines/qdengine/system/graphics/gr_draw_sprite.cpp
    engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
    engines/qdengine/system/graphics/gr_draw_sprite_rle_z.cpp
    engines/qdengine/system/graphics/gr_draw_sprite_z.cpp


diff --git a/engines/qdengine/system/graphics/gr_draw_sprite.cpp b/engines/qdengine/system/graphics/gr_draw_sprite.cpp
index e1410f0f918..9a368e19228 100644
--- a/engines/qdengine/system/graphics/gr_draw_sprite.cpp
+++ b/engines/qdengine/system/graphics/gr_draw_sprite.cpp
@@ -29,7 +29,7 @@
 namespace QDEngine {
 
 void grDispatcher::putSpr_a(int x, int y, int sx, int sy, const byte *p, int mode, float scale) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSpr_a(%d, %d, %d, %d, scale=%f)", x, y, sx, sy, scale);
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_a([%d, %d], [%d, %d], mode: %d, scale: %f)", x, y, sx, sy, mode, scale);
 
 	int i, j, sx_dest, sy_dest;
 
@@ -88,7 +88,7 @@ void grDispatcher::putSpr_a(int x, int y, int sx, int sy, const byte *p, int mod
 }
 
 void grDispatcher::putSpr(int x, int y, int sx, int sy, const byte *p, int mode, int spriteFormat, float scale) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSpr(%d, %d, %d, %d, scale=%f)", x, y, sx, sy, scale);
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr([%d, %d], [%d, %d], mode: %d, format: %d, scale: %f)", x, y, sx, sy, mode, spriteFormat, scale);
 
 	int sx_dest = round(float(sx) * scale);
 	int sy_dest = round(float(sy) * scale);
@@ -138,7 +138,7 @@ void grDispatcher::putSpr(int x, int y, int sx, int sy, const byte *p, int mode,
 }
 
 void grDispatcher::putSpr_a(int x, int y, int sx, int sy, const byte *p, int mode) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSpr_a(%d, %d, %d, %d)", x, y, sx, sy);
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_a([%d, %d], [%d, %d], mode: %d)", x, y, sx, sy, mode);
 
 	int px = 0;
 	int py = 0;
@@ -189,6 +189,8 @@ void grDispatcher::putSpr_a(int x, int y, int sx, int sy, const byte *p, int mod
 }
 
 void grDispatcher::putSpr_rot(const Vect2i &pos, const Vect2i &size, const byte *data, bool has_alpha, int mode, float angle) {
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_rot([%d, %d], [%d, %d], alpha: %d, mode: %d, angle: %f)", pos.x, pos.y, size.x, size.y, has_alpha, mode, angle);
+
 	const int F_PREC = 16;
 
 	int xc = pos.x + size.x / 2;
@@ -294,6 +296,8 @@ void grDispatcher::putSpr_rot(const Vect2i &pos, const Vect2i &size, const byte
 }
 
 void grDispatcher::putSpr_rot(const Vect2i &pos, const Vect2i &size, const byte *data, bool has_alpha, int mode, float angle, const Vect2f &scale) {
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_rot([%d, %d], [%d, %d], alpha: %d, mode: %d, angle: %f, scale: [%f, %f])", pos.x, pos.y, size.x, size.y, has_alpha, mode, angle, scale.x, scale.y);
+
 	const int F_PREC = 16;
 
 	int xc = pos.x + round(float(size.x) * scale.x / 2.f);
@@ -590,7 +594,7 @@ void grDispatcher::putSprMask_rot(const Vect2i &pos, const Vect2i &size, const b
 }
 
 void grDispatcher::putSpr(int x, int y, int sx, int sy, const byte *p, int mode, int spriteFormat) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSpr(%d, %d, %d, %d, %d)", x, y, sx, sy, spriteFormat);
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr([%d, %d], [%d, %d], mode: %d, format: %d)", x, y, sx, sy, mode, spriteFormat);
 
 	int px = 0;
 	int py = 0;
diff --git a/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp b/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
index 5546ce344bd..96290baa472 100644
--- a/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
+++ b/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
@@ -31,7 +31,7 @@
 namespace QDEngine {
 
 void grDispatcher::putSpr_rle(int x, int y, int sx, int sy, const class RLEBuffer *p, int mode, bool alpha_flag) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSpr_rle(%d, %d, %d, %d)", x, y, sx, sy);
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_rle([%d, %d], [%d, %d], mode: %d, alpha: %d", x, y, sx, sy, mode, alpha_flag);
 
 	int px = 0;
 	int py = 0;
@@ -155,7 +155,7 @@ void grDispatcher::putSpr_rle(int x, int y, int sx, int sy, const class RLEBuffe
 }
 
 void grDispatcher::putSpr_rle(int x, int y, int sx, int sy, const class RLEBuffer *p, int mode, float scale, bool alpha_flag) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSpr_rle(%d, %d, %d, %d, scale=%f)", x, y, sx, sy, scale);
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_rle([%d, %d], [%d, %d], mode: %d, scale: %f, alpha: %d", x, y, sx, sy, mode, scale, alpha_flag);
 
 	int sx_dest = round(float(sx) * scale);
 	int sy_dest = round(float(sy) * scale);
@@ -235,7 +235,7 @@ void grDispatcher::putSpr_rle(int x, int y, int sx, int sy, const class RLEBuffe
 }
 
 void grDispatcher::putSprMask_rle(int x, int y, int sx, int sy, const RLEBuffer *p, uint32 mask_color, int mask_alpha, int mode, bool alpha_flag) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSprMask_rle(%d, %d, %d, %d)", x, y, sx, sy);
+	debugC(4, kDebugGraphics, "grDispatcher::putSprMask_rle([%d, %d], [%d, %d], ...)", x, y, sx, sy);
 
 	int px = 0;
 	int py = 0;
@@ -386,7 +386,7 @@ void grDispatcher::putSprMask_rle(int x, int y, int sx, int sy, const RLEBuffer
 }
 
 void grDispatcher::putSprMask_rle(int x, int y, int sx, int sy, const RLEBuffer *p, uint32 mask_color, int mask_alpha, int mode, float scale, bool alpha_flag) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSprMask_rle(%d, %d, %d, %d, scale=%f)", x, y, sx, sy, scale);
+	debugC(4, kDebugGraphics, "grDispatcher::putSprMask_rle([%d, %d], [%d, %d], scale: %f, ...)", x, y, sx, sy, scale);
 
 	int sx_dest = round(float(sx) * scale);
 	int sy_dest = round(float(sy) * scale);
@@ -484,6 +484,8 @@ void grDispatcher::putSprMask_rle(int x, int y, int sx, int sy, const RLEBuffer
 }
 
 void grDispatcher::putSpr_rle_rot(const Vect2i &pos, const Vect2i &size, const RLEBuffer *data, bool has_alpha, int mode, float angle) {
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_rle_rot([%d, %d], [%d, %d], alpha: %d, mode: %d, angle: %f", pos.x, pos.y, size.x, size.y, has_alpha, mode, angle);
+
 	byte *buf = (byte *)temp_buffer(size.x * size.y * 4);
 
 	byte *buf_ptr = buf;
@@ -509,6 +511,8 @@ void grDispatcher::putSpr_rle_rot(const Vect2i &pos, const Vect2i &size, const R
 }
 
 void grDispatcher::putSpr_rle_rot(const Vect2i &pos, const Vect2i &size, const RLEBuffer *data, bool has_alpha, int mode, float angle, const Vect2f &scale) {
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_rle_rot([%d, %d], [%d, %d], alpha: %d, mode: %d, angle: %f, scale: [%f, %f]", pos.x, pos.y, size.x, size.y, has_alpha, mode, angle, scale.x, scale.y);
+
 	byte *buf = (byte *)temp_buffer(size.x * size.y * 4);
 
 	byte *buf_ptr = buf;
diff --git a/engines/qdengine/system/graphics/gr_draw_sprite_rle_z.cpp b/engines/qdengine/system/graphics/gr_draw_sprite_rle_z.cpp
index fb2de547ba0..d0cddfc786e 100644
--- a/engines/qdengine/system/graphics/gr_draw_sprite_rle_z.cpp
+++ b/engines/qdengine/system/graphics/gr_draw_sprite_rle_z.cpp
@@ -28,7 +28,7 @@ namespace QDEngine {
 
 #ifdef _GR_ENABLE_ZBUFFER
 void grDispatcher::putSpr_rle_z(int x, int y, int z, int sx, int sy, const class RLEBuffer *p, int mode, bool alpha_flag) {
-	debugC(2, kDebugGraphics, "grDispatcher::putSpr_rle_z(%d, %d, %d, %d, %d)", x, y, z, sx, sy);
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_rle_z([%d, %d], [%d, %d], mode: %d, alpha: %d", x, y, sx, sy, mode, alpha_flag);
 
 	int px = 0;
 	int py = 0;
@@ -442,6 +442,8 @@ void grDispatcher::putSpr_rle_z(int x, int y, int z, int sx, int sy, const class
 }
 
 void grDispatcher::putSpr_rle_z(int x, int y, int z, int sx, int sy, const class RLEBuffer *p, int mode, float scale, bool alpha_flag) {
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_rle_z([%d, %d], [%d, %d], mode: %d, scale: %f, alpha: %d", x, y, sx, sy, mode, scale, alpha_flag);
+
 	int sx_dest = round(float(sx) * scale);
 	int sy_dest = round(float(sy) * scale);
 
diff --git a/engines/qdengine/system/graphics/gr_draw_sprite_z.cpp b/engines/qdengine/system/graphics/gr_draw_sprite_z.cpp
index c12b4c635c5..78a6034ab99 100644
--- a/engines/qdengine/system/graphics/gr_draw_sprite_z.cpp
+++ b/engines/qdengine/system/graphics/gr_draw_sprite_z.cpp
@@ -27,6 +27,8 @@ namespace QDEngine {
 
 #ifdef _GR_ENABLE_ZBUFFER
 void grDispatcher::putSpr_a_z(int x, int y, int z, int sx, int sy, const byte *p, int mode, float scale) {
+	debugC(4, kDebugGraphics, "grDispatcher::a_z([%d, %d], [%d, %d], mode: %d, scale: %f)", pos.x, pos.y, size.x, size.y, mode, scale);
+
 	int i, j, sx_dest, sy_dest;
 
 	sx_dest = round(float(sx) * scale);
@@ -133,6 +135,8 @@ void grDispatcher::putSpr_a_z(int x, int y, int z, int sx, int sy, const byte *p
 }
 
 void grDispatcher::putSpr_z(int x, int y, int z, int sx, int sy, const byte *p, int mode, float scale) {
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_z([%d, %d], [%d, %d], mode: %d, scale: %f)", pos.x, pos.y, size.x, size.y, mode, scale);
+
 	int sx_dest = round(float(sx) * scale);
 	int sy_dest = round(float(sy) * scale);
 
@@ -233,6 +237,8 @@ void grDispatcher::putSpr_z(int x, int y, int z, int sx, int sy, const byte *p,
 }
 
 void grDispatcher::putSpr_a_z(int x, int y, int z, int sx, int sy, const byte *p, int mode) {
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_a_z([%d, %d], [%d, %d], mode: %d)", pos.x, pos.y, size.x, size.y, mode);
+
 	int px = 0;
 	int py = 0;
 
@@ -413,6 +419,8 @@ void grDispatcher::putSpr_a_z(int x, int y, int z, int sx, int sy, const byte *p
 }
 
 void grDispatcher::putSpr_z(int x, int y, int z, int sx, int sy, const byte *p, int mode) {
+	debugC(4, kDebugGraphics, "grDispatcher::putSpr_z([%d, %d], [%d, %d], mode: %d", pos.x, pos.y, size.x, size.y, mode);
+
 	int px = 0;
 	int py = 0;
 


Commit: 10101d7e158df3617af3e44ae8af895369747627
    https://github.com/scummvm/scummvm/commit/10101d7e158df3617af3e44ae8af895369747627
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-09-13T01:19:54+02:00

Commit Message:
QDENGINE: Added more debug to animation rendering

Changed paths:
    engines/qdengine/qdcore/qd_animation.cpp
    engines/qdengine/qdcore/qd_game_dispatcher.cpp


diff --git a/engines/qdengine/qdcore/qd_animation.cpp b/engines/qdengine/qdcore/qd_animation.cpp
index 73d71d274f9..8dffa790512 100644
--- a/engines/qdengine/qdcore/qd_animation.cpp
+++ b/engines/qdengine/qdcore/qd_animation.cpp
@@ -138,7 +138,7 @@ void qdAnimation::quant(float dt) {
 }
 
 void qdAnimation::redraw(int x, int y, int z, int mode) const {
-	debugC(2, kDebugGraphics, "qdAnimation::redraw([%d, %d, %d], mode: %d), file: '%s'", x, y, z, mode, transCyrillic(qda_file().toString()));
+	debugC(2, kDebugGraphics, "qdAnimation::redraw([%d, %d, %d], mode: %d), file: '%s', name: '%s'", x, y, z, mode, transCyrillic(qda_file().toString()), name());
 
 	if (check_flag(QD_ANIMATION_FLAG_FLIP_HORIZONTAL))
 		mode |= GR_FLIP_HORIZONTAL;
@@ -156,7 +156,7 @@ void qdAnimation::redraw(int x, int y, int z, int mode) const {
 }
 
 void qdAnimation::redraw(int x, int y, int z, float scale, int mode) const {
-	debugC(2, kDebugGraphics, "qdAnimation::redraw([%d, %d, %d], scale: %f, mode: %d), file: '%s'", x, y, z, scale, mode, transCyrillic(qda_file().toString()));
+	debugC(2, kDebugGraphics, "qdAnimation::redraw([%d, %d, %d], scale: %f, mode: %d), file: '%s', name: '%s'", x, y, z, scale, mode, transCyrillic(qda_file().toString()), name());
 
 	if (fabs(scale - 1.0f) < 0.01f) {
 		redraw(x, y, z, mode);
@@ -189,7 +189,7 @@ void qdAnimation::redraw(int x, int y, int z, float scale, int mode) const {
 }
 
 void qdAnimation::redraw_rot(int x, int y, int z, float angle, int mode) const {
-	debugC(2, kDebugGraphics, "qdAnimation::redraw_rot([%d, %d, %d], angle: %f, mode: %d), file: '%s'", x, y, z, angle, mode, transCyrillic(qda_file().toString()));
+	debugC(2, kDebugGraphics, "qdAnimation::redraw_rot([%d, %d, %d], angle: %f, mode: %d), file: '%s', name: '%s'", x, y, z, angle, mode, transCyrillic(qda_file().toString()), name());
 
 	if (check_flag(QD_ANIMATION_FLAG_FLIP_HORIZONTAL))
 		mode |= GR_FLIP_HORIZONTAL;
@@ -204,7 +204,7 @@ void qdAnimation::redraw_rot(int x, int y, int z, float angle, int mode) const {
 }
 
 void qdAnimation::redraw_rot(int x, int y, int z, float angle, const Vect2f &scale, int mode) const {
-	debugC(2, kDebugGraphics, "qdAnimation::redraw_rot([%d, %d, %d], angle: %f, scale: [%f, %f], mode: %d), file: '%s'", x, y, z, angle, scale.x, scale.y, mode, transCyrillic(qda_file().toString()));
+	debugC(2, kDebugGraphics, "qdAnimation::redraw_rot([%d, %d, %d], angle: %f, scale: [%f, %f], mode: %d), file: '%s', name: '%s'", x, y, z, angle, scale.x, scale.y, mode, transCyrillic(qda_file().toString()), name());
 
 	if (fabs(scale.x - 1.0f) < 0.01f && fabs(scale.y - 1.0f) < 0.01f) {
 		redraw_rot(x, y, z, angle, mode);
diff --git a/engines/qdengine/qdcore/qd_game_dispatcher.cpp b/engines/qdengine/qdcore/qd_game_dispatcher.cpp
index f6279b36cfb..854805a2ef3 100644
--- a/engines/qdengine/qdcore/qd_game_dispatcher.cpp
+++ b/engines/qdengine/qdcore/qd_game_dispatcher.cpp
@@ -731,6 +731,8 @@ void qdGameDispatcher::redraw() {
 
 	if (!check_flag(SKIP_REDRAW_FLAG)) {
 		if (!is_video_playing()) {
+			debugC(1, kDebugGraphics, "qdGameDispatcher::redraw(): =========== FRAME START");
+
 			pre_redraw();
 #ifndef _GD_REDRAW_REGIONS_CHECK_
 			for (grDispatcher::region_iterator it = grDispatcher::instance()->changed_regions().begin(); it != grDispatcher::instance()->changed_regions().end(); ++it) {
@@ -747,6 +749,7 @@ void qdGameDispatcher::redraw() {
 
 			grDispatcher::instance()->flush();
 #endif
+			debugC(1, kDebugGraphics, "qdGameDispatcher::redraw(): =========== FRAME END\n");
 		}
 		if (!g_engine->_forceFullRedraw)
 			drop_flag(FULLSCREEN_REDRAW_FLAG);


Commit: 548c4de4277635d0f17780b689588aa377bcc2fb
    https://github.com/scummvm/scummvm/commit/548c4de4277635d0f17780b689588aa377bcc2fb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-09-13T01:19:54+02:00

Commit Message:
QDENGINE: Stop being resource hog

Changed paths:
    engines/qdengine/qdengine.cpp


diff --git a/engines/qdengine/qdengine.cpp b/engines/qdengine/qdengine.cpp
index e9bf5183689..dd477184ec7 100644
--- a/engines/qdengine/qdengine.cpp
+++ b/engines/qdengine/qdengine.cpp
@@ -297,7 +297,6 @@ Common::Error QDEngineEngine::run() {
 			}
 			resD.quant();
 			_gameD->redraw();
-
 		} else {
 			was_inactive = true;
 			g_system->delayMillis(100);
@@ -305,6 +304,7 @@ Common::Error QDEngineEngine::run() {
 		}
 
 		g_system->updateScreen();
+		g_system->delayMillis(10);
 	}
 
 	delete _gameD;




More information about the Scummvm-git-logs mailing list