[Scummvm-git-logs] scummvm master -> f56d15875114e087141ad984081f06defdfeea66
neuromancer
noreply at scummvm.org
Thu Sep 5 11:20:43 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:
b3fbcce56f FREESCAPE: fix a corner case in checkCollisionRay
3beb8adce3 FREESCAPE: use depth clamping to avoid clipping issues in OpenGL
6e796faaab FREESCAPE: missing entrance from global area in castle for dos
f56d158751 FREESCAPE: scale default stipple pattern
Commit: b3fbcce56f58860a76b7b43300e4f5a68a1886ab
https://github.com/scummvm/scummvm/commit/b3fbcce56f58860a76b7b43300e4f5a68a1886ab
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-09-05T13:21:44+02:00
Commit Message:
FREESCAPE: fix a corner case in checkCollisionRay
Changed paths:
engines/freescape/area.cpp
diff --git a/engines/freescape/area.cpp b/engines/freescape/area.cpp
index 1c318c2b5f8..49c0e8a9fd5 100644
--- a/engines/freescape/area.cpp
+++ b/engines/freescape/area.cpp
@@ -398,6 +398,9 @@ Object *Area::checkCollisionRay(const Math::Ray &ray, int raySize) {
if (collidedDistance >= 1.0)
continue;
+ if (collidedDistance == 0.0 && signbit(collidedDistance))
+ continue;
+
if (collidedDistance < distance || (ABS(collidedDistance - distance) <= 0.05 && gobj->getSize().length() < size)) {
collided = obj;
size = gobj->getSize().length();
Commit: 3beb8adce34ef595b4325a55f4cd7e394243a710
https://github.com/scummvm/scummvm/commit/3beb8adce34ef595b4325a55f4cd7e394243a710
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-09-05T13:21:44+02:00
Commit Message:
FREESCAPE: use depth clamping to avoid clipping issues in OpenGL
Changed paths:
engines/freescape/gfx_opengl.cpp
diff --git a/engines/freescape/gfx_opengl.cpp b/engines/freescape/gfx_opengl.cpp
index 97d285db066..c8a9c23a693 100644
--- a/engines/freescape/gfx_opengl.cpp
+++ b/engines/freescape/gfx_opengl.cpp
@@ -80,6 +80,7 @@ void OpenGLRenderer::init() {
glEnable(GL_DEPTH_TEST);
glEnable(GL_SCISSOR_TEST);
setViewport(_viewport);
+ glEnable(GL_DEPTH_CLAMP);
}
void OpenGLRenderer::setViewport(const Common::Rect &rect) {
Commit: 6e796faaabd3083267840663e1eb98754a4b4a66
https://github.com/scummvm/scummvm/commit/6e796faaabd3083267840663e1eb98754a4b4a66
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-09-05T13:21:44+02:00
Commit Message:
FREESCAPE: missing entrance from global area in castle for dos
Changed paths:
engines/freescape/games/castle/castle.cpp
diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 695471a3f34..1e24809e89e 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -450,6 +450,7 @@ void CastleEngine::loadAssets() {
for (auto &it : _areaMap) {
it._value->addStructure(_areaMap[255]);
it._value->addObjectFromArea(229, _areaMap[255]);
+ it._value->addObjectFromArea(242, _areaMap[255]);
}
_areaMap[1]->addFloor();
Commit: f56d15875114e087141ad984081f06defdfeea66
https://github.com/scummvm/scummvm/commit/f56d15875114e087141ad984081f06defdfeea66
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-09-05T13:21:45+02:00
Commit Message:
FREESCAPE: scale default stipple pattern
Changed paths:
engines/freescape/gfx.cpp
engines/freescape/gfx.h
engines/freescape/gfx_opengl.cpp
diff --git a/engines/freescape/gfx.cpp b/engines/freescape/gfx.cpp
index 3121fddb66e..0c45df0580c 100644
--- a/engines/freescape/gfx.cpp
+++ b/engines/freescape/gfx.cpp
@@ -187,7 +187,7 @@ uint16 duplicate_bits(uint8 byte) {
}
-void scaleStipplePattern(byte originalPattern[128], byte newPattern[128]) {
+void Renderer::scaleStipplePattern(byte originalPattern[128], byte newPattern[128]) {
// Initialize the new pattern to all 0
memset(newPattern, 0, 128);
diff --git a/engines/freescape/gfx.h b/engines/freescape/gfx.h
index 8c08b4cf615..a5d1faf1e55 100644
--- a/engines/freescape/gfx.h
+++ b/engines/freescape/gfx.h
@@ -128,6 +128,8 @@ public:
virtual void setStippleData(byte *data) {};
virtual void useStipple(bool enabled) {};
+ void scaleStipplePattern(byte originalPattern[128], byte newPattern[128]);
+
byte *_palette;
void setColorMap(ColorMap *colorMap_);
ColorMap *_colorMap;
diff --git a/engines/freescape/gfx_opengl.cpp b/engines/freescape/gfx_opengl.cpp
index c8a9c23a693..1e81b0b8c3d 100644
--- a/engines/freescape/gfx_opengl.cpp
+++ b/engines/freescape/gfx_opengl.cpp
@@ -81,6 +81,9 @@ void OpenGLRenderer::init() {
glEnable(GL_SCISSOR_TEST);
setViewport(_viewport);
glEnable(GL_DEPTH_CLAMP);
+
+ scaleStipplePattern(_defaultStippleArray, _stipples[15]);
+ memcpy(_defaultStippleArray, _stipples[15], 128);
}
void OpenGLRenderer::setViewport(const Common::Rect &rect) {
More information about the Scummvm-git-logs
mailing list