[Scummvm-cvs-logs] CVS: scummvm-new/scumm gfx.cpp,1.1.1.1,1.2
Max Horn
fingolfin at users.sourceforge.net
Fri Aug 23 16:17:04 CEST 2002
Update of /cvsroot/scummvm/scummvm-new/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv17783/scumm
Modified Files:
gfx.cpp
Log Message:
modified version of patch #598622: Round corners for flashlight
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/scumm/gfx.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- gfx.cpp 21 Aug 2002 16:07:29 -0000 1.1.1.1
+++ gfx.cpp 23 Aug 2002 23:16:39 -0000 1.2
@@ -643,8 +643,24 @@
blit(flashBuffer, bgbak, flashW*8, flashH);
- // TODO - flashlight should have round corners
+ // Round the corners. To do so, we simply hard-code a set of nicely
+ // rounded corners.
+ int corner_data[] = { 8, 6, 4, 3, 2, 2, 1, 1 };
+ int minrow = 0;
+ int maxcol = flashW * 8 - 1;
+ int maxrow = (flashH - 1) * 320;
+
+ for (i = 0; i < 8; i++, minrow += 320, maxrow -= 320) {
+ int d = corner_data[i];
+ for (j = 0; j < d; j++) {
+ flashBuffer[minrow + j] = 0;
+ flashBuffer[minrow + maxcol - j] = 0;
+ flashBuffer[maxrow + j] = 0;
+ flashBuffer[maxrow + maxcol - j] = 0;
+ }
+ }
+
_flashlightIsDrawn = true;
}
More information about the Scummvm-git-logs
mailing list