# HG changeset patch # User Grumpy7 # Date 1396721655 -7200 # Node ID d04017f3d2fa5548fa231a3a8b08e332a56675cd # Parent d6887ee81068af56e78f21f137208111b4cc18c1 LightsStack_StationaryLight_::AddLight moved to LightStack.cpp diff -r d6887ee81068 -r d04017f3d2fa GammaControl.h --- 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 diff -r d6887ee81068 -r d04017f3d2fa LOD.h --- 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 #include -#include "Log.h" #include "Texture.h" class Sprite; diff -r d6887ee81068 -r d04017f3d2fa Lights.h --- 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); diff -r d6887ee81068 -r d04017f3d2fa LightsStack.cpp --- 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 #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; +} diff -r d6887ee81068 -r d04017f3d2fa mm7_2.cpp --- 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" diff -r d6887ee81068 -r d04017f3d2fa mm7_3.cpp --- 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"