[Scummvm-cvs-logs] CVS: scummvm costume.cpp,1.44,1.45 script_v1.cpp,1.140,1.141 script_v2.cpp,1.85,1.86 gfx.cpp,1.110,1.111 scumm.h,1.207,1.208 scummvm.cpp,1.208,1.209
Max Horn
fingolfin at users.sourceforge.net
Mon Aug 19 10:22:01 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv9389
Modified Files:
costume.cpp script_v1.cpp script_v2.cpp gfx.cpp scumm.h
scummvm.cpp
Log Message:
added lights support to the costume renderer; begun work on flashlight support (no real code yet :-)
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/costume.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- costume.cpp 14 Aug 2002 20:43:54 -0000 1.44
+++ costume.cpp 19 Aug 2002 17:20:52 -0000 1.45
@@ -1349,9 +1349,13 @@
byte color;
for (i = 0; i < _loaded._numColors; i++) {
- color = palette[i];
- if (color == 255)
- color = _loaded._ptr[8 + i];
+ if (_vm->_vars[_vm->VAR_CURRENT_LIGHTS] & LIGHTMODE_actor_color) {
+ color = palette[i];
+ if (color == 255)
+ color = _loaded._ptr[8 + i];
+ } else {
+ color = (i == 12) ? 0 : 8;
+ }
_palette[i] = color;
}
}
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- script_v1.cpp 15 Aug 2002 20:18:47 -0000 1.140
+++ script_v1.cpp 19 Aug 2002 17:20:53 -0000 1.141
@@ -1547,11 +1547,11 @@
warning("o5_lights(%d,%d,%d): lights not implemented", a, b, c);
- if (c==0)
+ if (c == 0)
_vars[VAR_CURRENT_LIGHTS] = a;
- else if (c==1) {
- //LightDx = a;
- //LightDy = b;
+ else if (c == 1) {
+ _lightDx = a;
+ _lightDy = b;
}
_fullRedraw = 1;
}
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- script_v2.cpp 15 Aug 2002 20:12:15 -0000 1.85
+++ script_v2.cpp 19 Aug 2002 17:20:54 -0000 1.86
@@ -2726,10 +2726,10 @@
setCursorImg(args[1], (uint) - 1, args[2]);
break;
case 13:
- derefActorSafe(args[1], "o6_miscOps:14")->remapActor(args[2], args[3], args[4], -1);
+ derefActorSafe(args[1], "o6_miscOps:14")->remapActorPalette(args[2], args[3], args[4], -1);
break;
case 14:
- derefActorSafe(args[1], "o6_miscOps:14")->remapActor(args[2], args[3], args[4], args[5]);
+ derefActorSafe(args[1], "o6_miscOps:14")->remapActorPalette(args[2], args[3], args[4], args[5]);
break;
case 15:
_insaneFlag = args[1];
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- gfx.cpp 18 Aug 2002 13:00:15 -0000 1.110
+++ gfx.cpp 19 Aug 2002 17:20:54 -0000 1.111
@@ -581,6 +581,10 @@
}
}
+void Scumm::drawFlashlight()
+{
+}
+
void Scumm::fadeIn(int effect)
{
switch (effect) {
@@ -2602,11 +2606,11 @@
if (ar == r && ag == g && ab == b)
return i;
- j = abs(ar - r);
+ j = ar - r;
sum = j * j * 3;
- j = abs(ag - g);
+ j = ag - g;
sum += j * j * 6;
- j = abs(ab - b);
+ j = ab - b;
sum += j * j * 2;
if (sum < bestsum) {
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -d -r1.207 -r1.208
--- scumm.h 18 Aug 2002 22:47:10 -0000 1.207
+++ scumm.h 19 Aug 2002 17:20:55 -0000 1.208
@@ -754,6 +754,8 @@
byte _newEffect, _switchRoomEffect2, _switchRoomEffect;
bool _doEffect;
+
+ uint16 _lightDx, _lightDy;
void getGraphicsPerformance();
void initScreens(int a, int b, int w, int h);
@@ -818,10 +820,13 @@
void updateDirtyScreen(int slot);
VirtScreen *findVirtScreen(int y);
- void fadeOut(int a);
static void setVirtscreenDirty(VirtScreen *vs, int left, int top, int right, int bottom);
+ void drawFlashlight();
+
void fadeIn(int effect);
+ void fadeOut(int effect);
+
void unkScreenEffect1();
void unkScreenEffect2();
void unkScreenEffect3();
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -d -r1.208 -r1.209
--- scummvm.cpp 18 Aug 2002 22:47:10 -0000 1.208
+++ scummvm.cpp 19 Aug 2002 17:20:56 -0000 1.209
@@ -442,6 +442,8 @@
if (!(_vars[VAR_CURRENT_LIGHTS] & LIGHTMODE_screen) &&
_vars[VAR_CURRENT_LIGHTS] & LIGHTMODE_flashlight) {
warning("Flashlight not implemented in this version");
+ drawFlashlight();
+ setActorRedrawFlags();
}
processActors();
More information about the Scummvm-git-logs
mailing list