[Scummvm-git-logs] scummvm master -> fab024d6d11702ee67f457fc52c95e23d2e5b651
somaen
noreply at scummvm.org
Sat Dec 5 23:00:10 UTC 2026
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
34b36ad500 WATCHMAKER: Visit every face when assigning LightMaps
e8989cda1e WATCHMAKER: Implement flickering lights
fab024d6d1 WATCHMAKER: Set room visibility properly again
Commit: 34b36ad500f1cefd2a3b1ec9c5989882b2e0307b
https://github.com/scummvm/scummvm/commit/34b36ad500f1cefd2a3b1ec9c5989882b2e0307b
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-05T23:59:59+01:00
Commit Message:
WATCHMAKER: Visit every face when assigning LightMaps
Made a mistake here when changing pointers to references,
which meant that we never moved past the first element.
Additionally removed the checkVertices check, as that
was checking the wrong thing, and now that lightmaps get
assigned the faces are indexing the sub materials for
their lightmaps, and not the base material.
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/watchmaker/3d/geometry.cpp
engines/watchmaker/3d/t3d_body.cpp
engines/watchmaker/3d/t3d_face.h
diff --git a/engines/watchmaker/3d/geometry.cpp b/engines/watchmaker/3d/geometry.cpp
index d8ae4767666..ee039379953 100644
--- a/engines/watchmaker/3d/geometry.cpp
+++ b/engines/watchmaker/3d/geometry.cpp
@@ -2311,7 +2311,6 @@ void t3dSetFaceVisibility(t3dMESH *mesh, t3dCAMERA *cam) {
if (!f.getMaterial() || !(f.flags & T3D_FACE_VISIBLE))
continue;
- f.checkVertices();
MaterialPtr Material = f.getMaterial();
T1 = Material->Texture->ID;
diff --git a/engines/watchmaker/3d/t3d_body.cpp b/engines/watchmaker/3d/t3d_body.cpp
index d6b60da9b27..a26da0b543f 100644
--- a/engines/watchmaker/3d/t3d_body.cpp
+++ b/engines/watchmaker/3d/t3d_body.cpp
@@ -361,10 +361,9 @@ void LoadLightmaps(WGame &game, t3dBODY *b) {
//f continue;
m.VBptr = m.VertexBuffer;
gv = m.VBptr;
-
if (m.Flags & T3D_MESH_NOLIGHTMAP) {
- t3dFACE &f = m.FList[0];
for (uint32 j = 0; j < m.NumFaces(); j++) {
+ t3dFACE &f = m.FList[j];
if (f.n == b->NList[i]) {
f.lightmap = nullptr;
}
@@ -372,8 +371,8 @@ void LoadLightmaps(WGame &game, t3dBODY *b) {
m.VBptr = nullptr;
continue;
}
- t3dFACE &f = m.FList[0];
for (uint32 j = 0; j < m.NumFaces(); j++) {
+ t3dFACE &f = m.FList[j];
// gMaterial *newmat;
if (f.n == b->NList[i]) {
// f->mat->Texture=f->mat->Lightmap;
@@ -417,8 +416,8 @@ void LoadLightmaps(WGame &game, t3dBODY *b) {
//f continue;
if (m.Flags & T3D_MESH_NOLIGHTMAP) {
- t3dFACE &f = m.FList[0];
for (uint32 j = 0; j < m.NumFaces(); j++) {
+ t3dFACE &f = m.FList[j];
if (f.n == b->NList[i]) {
f.lightmap = nullptr;
}
@@ -427,9 +426,9 @@ void LoadLightmaps(WGame &game, t3dBODY *b) {
continue;
}
- t3dFACE &f = m.FList[0];
for (uint32 j = 0; j < m.NumFaces(); j++) {
// t3dU32 nr,ng,nb;
+ t3dFACE &f = m.FList[j];
if (f.n == b->NList[i]) {
f.lightmap = nullptr;
// if (Map==-1)
diff --git a/engines/watchmaker/3d/t3d_face.h b/engines/watchmaker/3d/t3d_face.h
index f070128b5fe..07a75502555 100644
--- a/engines/watchmaker/3d/t3d_face.h
+++ b/engines/watchmaker/3d/t3d_face.h
@@ -64,12 +64,6 @@ public:
getMaterial();
}
- void checkVertices() {
- for (int i = 0; i < 3; i++) {
- assert((int)getMaterial()->VertsList.size() > MatVertexIndex[i]);
- }
- }
-
bool isVisible() const;
};
Commit: e8989cda1edc23959f97908c4db4dc0fee2651e4
https://github.com/scummvm/scummvm/commit/e8989cda1edc23959f97908c4db4dc0fee2651e4
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-05T23:59:59+01:00
Commit Message:
WATCHMAKER: Implement flickering lights
Testable in r22.
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/watchmaker/3d/geometry.cpp
diff --git a/engines/watchmaker/3d/geometry.cpp b/engines/watchmaker/3d/geometry.cpp
index ee039379953..7b5354bd3b1 100644
--- a/engines/watchmaker/3d/geometry.cpp
+++ b/engines/watchmaker/3d/geometry.cpp
@@ -27,6 +27,7 @@
#include "watchmaker/3d/t3d_face.h"
#include "watchmaker/3d/t3d_body.h"
#include "watchmaker/3d/t3d_mesh.h"
+#include "watchmaker/game.h"
#include "watchmaker/globvar.h"
#include "watchmaker/ll/ll_system.h"
#include "watchmaker/render.h"
@@ -34,6 +35,7 @@
#include "watchmaker/t3d.h"
#include "watchmaker/utils.h"
#include "watchmaker/windows_hacks.h"
+#include "common/random.h"
#define SKY_SPEED 0.00005f
#define EXPRESSION_SET_LEN 14
@@ -2737,11 +2739,9 @@ void t3dAnimLights(t3dBODY *b) {
if (l.Type & T3D_LIGHT_CANDLESMOKE)
t3dRaiseSmoke(&l.Source, l.Particle.get());
else if (l.Type & T3D_LIGHT_PULSE) {
- error("TODO: Pulsing lights");
-#if 0
- bProcessLights = 1;
- l.LightRandomizer = -rand() % ((int32)(l.Color.x + l.Color.y + l.Color.z) / 12);
-#endif
+ bProcessLights = 1;
+ int32 range = ((int32)(l.Color.x + l.Color.y + l.Color.z) / 12);
+ l.LightRandomizer = (range > 0) ? -(int32)_vm->_rnd->getRandomNumber(range - 1) : 0;
}
light++;
}
Commit: fab024d6d11702ee67f457fc52c95e23d2e5b651
https://github.com/scummvm/scummvm/commit/fab024d6d11702ee67f457fc52c95e23d2e5b651
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-06T00:00:00+01:00
Commit Message:
WATCHMAKER: Set room visibility properly again
The refactor here flipped the checks on cr, which means
that Victoria won't be visible if you skip the intro,
among a lot of other things.
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/watchmaker/ll/ll_util.cpp
diff --git a/engines/watchmaker/ll/ll_util.cpp b/engines/watchmaker/ll/ll_util.cpp
index 73750f76e1d..30d3f46abea 100644
--- a/engines/watchmaker/ll/ll_util.cpp
+++ b/engines/watchmaker/ll/ll_util.cpp
@@ -308,7 +308,7 @@ void UpdateRoomVisibility(WGame &game) {
// Aggiunge room attuale
cr = (uint8)getRoomFromStr(init, t3dCurRoom->name);
- if (!cr) {
+ if (cr) {
init.Room[cr].flags |= ROOM_VISIBLE;
}
@@ -350,14 +350,14 @@ void UpdateRoomVisibility(WGame &game) {
continue;
cr = (uint8)getRoomFromStr(init, pr->name);
- if (!cr) {
+ if (cr) {
init.Room[cr].flags |= ROOM_VISIBLE;
}
for (j = 0; j < pr->NumMeshes(); j++) {
if ((pr->MeshTable[j].PortalList) && !(pr->MeshTable[j].Flags & T3D_MESH_NOPORTALCHECK)) {
cr = (uint8)getRoomFromStr(init, pr->MeshTable[j].PortalList->name);
- if (!cr) {
+ if (cr) {
init.Room[cr].flags |= ROOM_VISIBLE;
}
}
More information about the Scummvm-git-logs
mailing list