[Scummvm-git-logs] scummvm master -> b49263c0f8bce8b38ee2c108484877a46e0296d9
sev-
noreply at scummvm.org
Mon Sep 23 21:56:53 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ef10e8688b QDENGINE: Added more graphics debug output
b49263c0f8 QDENGINE: Remove yet another multiplication leftover
Commit: ef10e8688b01841d60253a0303aa5be5350db388
https://github.com/scummvm/scummvm/commit/ef10e8688b01841d60253a0303aa5be5350db388
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-09-23T23:56:41+02:00
Commit Message:
QDENGINE: Added more graphics debug output
Changed paths:
engines/qdengine/system/graphics/gr_draw_sprite.cpp
engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
diff --git a/engines/qdengine/system/graphics/gr_draw_sprite.cpp b/engines/qdengine/system/graphics/gr_draw_sprite.cpp
index 09371eb8dfa..a3cfaefcd49 100644
--- a/engines/qdengine/system/graphics/gr_draw_sprite.cpp
+++ b/engines/qdengine/system/graphics/gr_draw_sprite.cpp
@@ -388,6 +388,8 @@ void grDispatcher::putSpr_rot(const Vect2i &pos, const Vect2i &size, const byte
void grDispatcher::putSprMask_rot(const Vect2i &pos, const Vect2i &size, const byte *data, bool has_alpha, uint32 mask_color, int mask_alpha, int mode, float angle) {
const int F_PREC = 16;
+ debugC(4, kDebugGraphics, "grDispatcher::putSprMask_rot([%d, %d], [%d, %d], alpha: %d, mask: %d, mask_alpha: %d, mode: %d, angle: %f)", pos.x, pos.y, size.x, size.y, has_alpha, mask_color, mask_alpha, mode, angle);
+
int xc = pos.x + size.x / 2;
int yc = pos.y + size.y / 2;
@@ -493,6 +495,8 @@ void grDispatcher::putSprMask_rot(const Vect2i &pos, const Vect2i &size, const b
void grDispatcher::putSprMask_rot(const Vect2i &pos, const Vect2i &size, const byte *data, bool has_alpha, uint32 mask_color, int mask_alpha, int mode, float angle, const Vect2f &scale) {
const int F_PREC = 16;
+ debugC(4, kDebugGraphics, "grDispatcher::putSprMask_rot([%d, %d], [%d, %d], alpha: %d, mask: %d, mask_alpha: %d, mode: %d, angle: %f, scale: [%f, %f])", pos.x, pos.y, size.x, size.y, has_alpha, mask_color, mask_alpha, mode, angle, scale.x, scale.y);
+
int xc = pos.x + round(float(size.x) * scale.x / 2.f);
int yc = pos.y + round(float(size.y) * scale.y / 2.f);
@@ -663,6 +667,8 @@ void grDispatcher::putSpr(int x, int y, int sx, int sy, const byte *p, int mode,
}
void grDispatcher::drawSprContour_a(int x, int y, int sx, int sy, const byte *p, int contour_color, int mode) {
+ debugC(4, kDebugGraphics, "grDispatcher::drawSprContour_a([%d, %d], [%d, %d], contour: %d, mode: %d)", x, y, sx, sy, contour_color, mode);
+
int px = 0;
int py = 0;
@@ -730,6 +736,8 @@ void grDispatcher::drawSprContour_a(int x, int y, int sx, int sy, const byte *p,
}
void grDispatcher::drawSprContour(int x, int y, int sx, int sy, const byte *p, int contour_color, int mode) {
+ debugC(4, kDebugGraphics, "grDispatcher::drawSprContour([%d, %d], [%d, %d], contour: %d, mode: %d)", x, y, sx, sy, contour_color, mode);
+
int px = 0;
int py = 0;
@@ -797,6 +805,8 @@ void grDispatcher::drawSprContour(int x, int y, int sx, int sy, const byte *p, i
}
void grDispatcher::drawSprContour(int x, int y, int sx, int sy, const byte *p, int contour_color, int mode, float scale) {
+ debugC(4, kDebugGraphics, "grDispatcher::drawSprContour([%d, %d], [%d, %d], contour: %d, mode: %d, scale: %f)", x, y, sx, sy, contour_color, mode, scale);
+
int sx_dest = round(float(sx) * scale);
int sy_dest = round(float(sy) * scale);
@@ -878,6 +888,8 @@ void grDispatcher::drawSprContour(int x, int y, int sx, int sy, const byte *p, i
}
void grDispatcher::drawSprContour_a(int x, int y, int sx, int sy, const byte *p, int contour_color, int mode, float scale) {
+ debugC(4, kDebugGraphics, "grDispatcher::drawSprContour_a([%d, %d], [%d, %d], contour: %d, mode: %d, scale: %f)", x, y, sx, sy, contour_color, mode, scale);
+
int sx_dest = round(float(sx) * scale);
int sy_dest = round(float(sy) * scale);
@@ -999,6 +1011,8 @@ void grDispatcher::putChar(int x, int y, uint32 color, int font_sx, int font_sy,
}
void grDispatcher::putSprMask(int x, int y, int sx, int sy, const byte *p, uint32 mask_color, int mask_alpha, int mode) {
+ debugC(4, kDebugGraphics, "grDispatcher::putSprMask([%d, %d], [%d, %d], mask: %d, alpha: %d, mode: %d)", x, y, sx, sy, mask_color, mask_alpha, mode);
+
int px = 0;
int py = 0;
@@ -1053,6 +1067,8 @@ void grDispatcher::putSprMask(int x, int y, int sx, int sy, const byte *p, uint3
}
void grDispatcher::putSprMask(int x, int y, int sx, int sy, const byte *p, uint32 mask_color, int mask_alpha, int mode, float scale) {
+ debugC(4, kDebugGraphics, "grDispatcher::putSprMask([%d, %d], [%d, %d], mask: %d, alpha: %d, mode: %d, scale: %f)", x, y, sx, sy, mask_color, mask_alpha, mode, scale);
+
int sx_dest = round(float(sx) * scale);
int sy_dest = round(float(sy) * scale);
@@ -1113,6 +1129,8 @@ void grDispatcher::putSprMask(int x, int y, int sx, int sy, const byte *p, uint3
}
void grDispatcher::putSprMask_a(int x, int y, int sx, int sy, const byte *p, uint32 mask_color, int mask_alpha, int mode) {
+ debugC(4, kDebugGraphics, "grDispatcher::putSprMask_a([%d, %d], [%d, %d], mask: %d, alpha: %d, mode: %d)", x, y, sx, sy, mask_color, mask_alpha, mode);
+
int px = 0;
int py = 0;
@@ -1170,6 +1188,8 @@ void grDispatcher::putSprMask_a(int x, int y, int sx, int sy, const byte *p, uin
}
void grDispatcher::putSprMask_a(int x, int y, int sx, int sy, const byte *p, uint32 mask_color, int mask_alpha, int mode, float scale) {
+ debugC(4, kDebugGraphics, "grDispatcher::putSprMask_a([%d, %d], [%d, %d], mask: %d, alpha: %d, mode: %d, scale: %f)", x, y, sx, sy, mask_color, mask_alpha, mode, scale);
+
int i, j, sx_dest, sy_dest;
sx_dest = round(float(sx) * scale);
diff --git a/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp b/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
index 96290baa472..61feafc87b1 100644
--- a/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
+++ b/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
@@ -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(4, 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], mask: %d, alpha: %d, mode: %d, scale: %f, alpha_flag: %d)", x, y, sx, sy, mask_color, mask_alpha, mode, scale, alpha_flag);
int sx_dest = round(float(sx) * scale);
int sy_dest = round(float(sy) * scale);
@@ -538,6 +538,8 @@ void grDispatcher::putSpr_rle_rot(const Vect2i &pos, const Vect2i &size, const R
}
void grDispatcher::putSprMask_rle_rot(const Vect2i &pos, const Vect2i &size, const RLEBuffer *data, bool has_alpha, uint32 mask_color, int mask_alpha, int mode, float angle) {
+ debugC(4, kDebugGraphics, "grDispatcher::putSpr_rle_rot([%d, %d], [%d, %d], alpha: %d, mask: %d, mask_alpha: %d, mode: %d, angle: %f", pos.x, pos.y, size.x, size.y, has_alpha, mask_color, mask_alpha, mode, angle);
+
byte *buf = (byte *)temp_buffer(size.x * size.y * 4);
byte *buf_ptr = buf;
@@ -563,6 +565,8 @@ void grDispatcher::putSprMask_rle_rot(const Vect2i &pos, const Vect2i &size, con
}
void grDispatcher::putSprMask_rle_rot(const Vect2i &pos, const Vect2i &size, const RLEBuffer *data, bool has_alpha, uint32 mask_color, int mask_alpha, int mode, float angle, const Vect2f &scale) {
+ debugC(4, kDebugGraphics, "grDispatcher::putSpr_rle_rot([%d, %d], [%d, %d], alpha: %d, mask: %d, mask_alpha: %d, mode: %d, angle: %f, scale: [%f, %f]", pos.x, pos.y, size.x, size.y, has_alpha, mask_color, mask_alpha, mode, angle, scale.x, scale.y);
+
byte *buf = (byte *)temp_buffer(size.x * size.y * 4);
byte *buf_ptr = buf;
@@ -595,6 +599,8 @@ inline bool rle_alpha_b16(uint16 pixel) {
}
void grDispatcher::drawSprContour(int x, int y, int sx, int sy, const class RLEBuffer *p, int contour_color, int mode, bool alpha_flag) {
+ debugC(4, kDebugGraphics, "grDispatcher::drawSprContour([%d, %d], [%d, %d], contour_color: %d, mode: %d, alpha_flag: %d)", x, y, sx, sy, contour_color, mode, alpha_flag);
+
int px = 0;
int py = 0;
@@ -703,6 +709,8 @@ void grDispatcher::drawSprContour(int x, int y, int sx, int sy, const class RLEB
}
void grDispatcher::drawSprContour(int x, int y, int sx, int sy, const class RLEBuffer *p, int contour_color, int mode, float scale, bool alpha_flag) {
+ debugC(4, kDebugGraphics, "grDispatcher::drawSprContour([%d, %d], [%d, %d], contour_color: %d, mode: %d, scale: %f, alpha_flag: %d)", x, y, sx, sy, contour_color, mode, scale, alpha_flag);
+
int sx_dest = round(float(sx) * scale);
int sy_dest = round(float(sy) * scale);
Commit: b49263c0f8bce8b38ee2c108484877a46e0296d9
https://github.com/scummvm/scummvm/commit/b49263c0f8bce8b38ee2c108484877a46e0296d9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-09-23T23:56:42+02:00
Commit Message:
QDENGINE: Remove yet another multiplication leftover
Changed paths:
engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
diff --git a/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp b/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
index 61feafc87b1..f3b09fee35f 100644
--- a/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
+++ b/engines/qdengine/system/graphics/gr_draw_sprite_rle.cpp
@@ -611,8 +611,6 @@ void grDispatcher::drawSprContour(int x, int y, int sx, int sy, const class RLEB
int dx = -1;
int dy = -1;
- x *= 2;
-
if (mode & GR_FLIP_HORIZONTAL) {
x += (psx - 1) * 2;
px = sx - px - psx;
More information about the Scummvm-git-logs
mailing list