changeset 2337:d04017f3d2fa

LightsStack_StationaryLight_::AddLight moved to LightStack.cpp
author Grumpy7
date Sat, 05 Apr 2014 20:14:15 +0200
parents d6887ee81068
children 1e865e8690ba
files GammaControl.h LOD.h Lights.h LightsStack.cpp mm7_2.cpp mm7_3.cpp
diffstat 6 files changed, 28 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/GammaControl.h	Wed Apr 02 23:21:34 2014 +0200
+++ b/GammaControl.h	Sat Apr 05 20:14:15 2014 +0200
@@ -1,6 +1,5 @@
 #pragma once
 #include "lib\legacy_dx\d3d.h"
-#include "OSAPI.h"
 
 #pragma pack(push, 1)
 class GammaController
--- a/LOD.h	Wed Apr 02 23:21:34 2014 +0200
+++ b/LOD.h	Sat Apr 05 20:14:15 2014 +0200
@@ -2,7 +2,6 @@
 #include <stdio.h>
 #include <memory.h>
 
-#include "Log.h"
 #include "Texture.h"
 
 class Sprite;
--- a/Lights.h	Wed Apr 02 23:21:34 2014 +0200
+++ b/Lights.h	Sat Apr 05 20:14:15 2014 +0200
@@ -1,5 +1,4 @@
 #pragma once
-#include "OSAPI.h" // messagebox
 
 #include "VectorTypes.h"
 
@@ -72,29 +71,7 @@
   }
 
   //----- (004AD3C8) --------------------------------------------------------
-  inline bool AddLight(__int16 x, __int16 y, __int16 z, __int16 a5, unsigned char r, unsigned char g, unsigned char b, char uLightType)
-  {
-    unsigned int v9; // eax@1
-    std::string v11; // [sp-18h] [bp-18h]@3
-
-    v9 = this->uNumLightsActive;
-    if ( (signed int)v9 >= 400 )
-    {
-      MessageBoxW(nullptr, L"Too many stationary lights!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\StationaryLightStack.cpp:45", 0);
-      return false;
-    }
-
-      StationaryLight* pLight = &pLights[uNumLightsActive++];
-      pLight->vPosition.x = x;
-      pLight->vPosition.y = y;
-      pLight->vPosition.z = z;
-      pLight->uRadius = a5;
-      pLight->uLightColorR = (unsigned __int8)r;
-      pLight->uLightColorG = g;
-      pLight->uLightColorB = b;
-      pLight->uLightType = uLightType;
-      return true;
-  }
+  bool AddLight(__int16 x, __int16 y, __int16 z, __int16 a5, unsigned char r, unsigned char g, unsigned char b, char uLightType);
 
 
 
--- a/LightsStack.cpp	Wed Apr 02 23:21:34 2014 +0200
+++ b/LightsStack.cpp	Sat Apr 05 20:14:15 2014 +0200
@@ -1,6 +1,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #include <string>
 #include "Lights.h"
+#include "OSAPI.h"
 
 
 //----- (00467D88) --------------------------------------------------------
@@ -26,3 +27,27 @@
 
   return true;
 }
+
+bool LightsStack_StationaryLight_::AddLight( __int16 x, __int16 y, __int16 z, __int16 a5, unsigned char r, unsigned char g, unsigned char b, char uLightType )
+{
+  unsigned int v9; // eax@1
+  std::string v11; // [sp-18h] [bp-18h]@3
+
+  v9 = this->uNumLightsActive;
+  if ( (signed int)v9 >= 400 )
+  {
+    MessageBoxW(nullptr, L"Too many stationary lights!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\StationaryLightStack.cpp:45", 0);
+    return false;
+  }
+
+  StationaryLight* pLight = &pLights[uNumLightsActive++];
+  pLight->vPosition.x = x;
+  pLight->vPosition.y = y;
+  pLight->vPosition.z = z;
+  pLight->uRadius = a5;
+  pLight->uLightColorR = (unsigned __int8)r;
+  pLight->uLightColorG = g;
+  pLight->uLightColorB = b;
+  pLight->uLightType = uLightType;
+  return true;
+}
--- a/mm7_2.cpp	Wed Apr 02 23:21:34 2014 +0200
+++ b/mm7_2.cpp	Sat Apr 05 20:14:15 2014 +0200
@@ -28,6 +28,7 @@
 #include "Overlays.h"
 #include "Arcomage.h"
 #include "LOD.h"
+#include "Log.h"
 #include "Actor.h"
 #include "Events.h"
 #include "Viewport.h"
--- a/mm7_3.cpp	Wed Apr 02 23:21:34 2014 +0200
+++ b/mm7_3.cpp	Sat Apr 05 20:14:15 2014 +0200
@@ -14,6 +14,7 @@
 #include "Outdoor_stuff.h"
 #include "Overlays.h"
 #include "LOD.h"
+#include "Log.h"
 #include "Actor.h"
 #include "Events.h"
 #include "Viewport.h"