diff Game.cpp @ 638:ccf8b4815a1f

GetActorTintColor fixed Outdoor sunlight works on terrain & bmodels (not sure about billboards though)
author Nomad
date Mon, 11 Mar 2013 21:43:26 +0200
parents 86ee21956082
children ecfb1b3c9a39
line wrap: on
line diff
--- a/Game.cpp	Mon Mar 11 17:07:51 2013 +0200
+++ b/Game.cpp	Mon Mar 11 21:43:26 2013 +0200
@@ -659,9 +659,10 @@
 
 
 //----- (0044EDE4) --------------------------------------------------------
-bool Game::AlterGamma(BLVFace *pFace, unsigned int *pColor)
+bool Game::AlterGamma_BLV(BLVFace *pFace, unsigned int *pColor)
 {
-  if (pGame->uFlags2 & 2 && pFace->uAttributes & 2)
+  if (uFlags2 & GAME_FLAGS_2_SATURATE_LIGHTMAPS &&
+      pFace->uAttributes & FACE_CAN_SATURATE_COLOR)
   {
     *pColor = ReplaceHSV(*pColor, 1.0, fSaturation, -1.0);
     return true;
@@ -671,11 +672,12 @@
 }
 
 //----- (0044EE30) --------------------------------------------------------
-bool Game::_44EE30(ODMFace *a2, int a3)
+bool Game::AlterGamma_ODM(ODMFace *pFace, unsigned int *pColor)
 {
-  if (uFlags2 & 0x2 && a2->uAttributes & 0x02)
+  if (uFlags2 & GAME_FLAGS_2_SATURATE_LIGHTMAPS &&
+      pFace->uAttributes & FACE_CAN_SATURATE_COLOR)
   {
-    *(int *)a3 = ReplaceHSV(*(int *)a3, 1.0, fSaturation, -1.0);
+    *pColor = ReplaceHSV(*pColor, 1.0, fSaturation, -1.0);
     return true;
   }
   else