[Scummvm-cvs-logs] SF.net SVN: scummvm: [32926] residual/trunk/engine/backend/sdl/ driver_tinygl.cpp

aquadran at users.sourceforge.net aquadran at users.sourceforge.net
Sun Jul 6 16:19:52 CEST 2008


Revision: 32926
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32926&view=rev
Author:   aquadran
Date:     2008-07-06 07:19:52 -0700 (Sun, 06 Jul 2008)

Log Message:
-----------
changed ways pass params for tglShadowProjection

Modified Paths:
--------------
    residual/trunk/engine/backend/sdl/driver_tinygl.cpp

Modified: residual/trunk/engine/backend/sdl/driver_tinygl.cpp
===================================================================
--- residual/trunk/engine/backend/sdl/driver_tinygl.cpp	2008-07-06 14:13:38 UTC (rev 32925)
+++ residual/trunk/engine/backend/sdl/driver_tinygl.cpp	2008-07-06 14:19:52 UTC (rev 32926)
@@ -185,7 +185,7 @@
 	return false;
 }
 
-void tglShadowProjection(Vector3d *light, Vector3d *plane, Vector3d *normal) {
+void tglShadowProjection(Vector3d light, Vector3d plane, Vector3d normal) {
 	// Based on GPL shadow projection example by
 	// (c) 2002-2003 Phaetos <phaetos at gaffga.de>
 	float d, c;
@@ -193,15 +193,15 @@
 	float nx, ny, nz, lx, ly, lz, px, py, pz;
 
 	// for some unknown for me reason normal need negation
-	nx = -normal->x();
-	ny = -normal->y();
-	nz = -normal->z();
-	lx = light->x();
-	ly = light->y();
-	lz = light->z();
-	px = plane->x();
-	py = plane->y();
-	pz = plane->z();
+	nx = -normal.x();
+	ny = -normal.y();
+	nz = -normal.z();
+	lx = light.x();
+	ly = light.y();
+	lz = light.z();
+	px = plane.x();
+	py = plane.y();
+	pz = plane.z();
 
 	d = nx * lx + ny * ly + nz * lz;
 	c = px * nx + py * ny + pz * nz - d;
@@ -239,7 +239,7 @@
 		tglSetShadowMaskBuf(_currentShadowArray->shadowMask);
 		SectorListType::iterator i = _currentShadowArray->planeList.begin();
 		Sector *shadowSector = *i;
-		tglShadowProjection(&_currentShadowArray->pos, &shadowSector->getVertices()[0], &shadowSector->getNormal());
+		tglShadowProjection(_currentShadowArray->pos, shadowSector->getVertices()[0], shadowSector->getNormal());
 	}
 	tglTranslatef(pos.x(), pos.y(), pos.z());
 	tglRotatef(yaw, 0, 0, 1);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list