changeset 2038:d4cc4d71d9cf

Log::Warning
author Ritor1
date Fri, 22 Nov 2013 23:28:02 +0600
parents 7a9477135943
children ea8e801fdeab da35dc35d635
files Build/Visual Studio 2012/World of Might and Magic.vcxproj Build/Visual Studio 2012/World of Might and Magic.vcxproj.filters mm7_2.cpp
diffstat 3 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Build/Visual Studio 2012/World of Might and Magic.vcxproj	Fri Nov 22 10:34:22 2013 +0200
+++ b/Build/Visual Studio 2012/World of Might and Magic.vcxproj	Fri Nov 22 23:28:02 2013 +0600
@@ -338,6 +338,7 @@
     <ClInclude Include="..\..\OSAPI.h" />
     <ClInclude Include="..\..\OSInfo.h" />
     <ClInclude Include="..\..\OSWindow.h" />
+    <ClInclude Include="..\..\OurMath.h" />
     <ClInclude Include="..\..\Outdoor.h" />
     <ClInclude Include="..\..\Outdoor_stuff.h" />
     <ClInclude Include="..\..\Overlays.h" />
@@ -384,6 +385,7 @@
       <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">call "../../lib/swig" "%(FileName)" %(RelativeDir) "%(FileName)%(Extension)" "%(FullPath)" "$(SolutionDir)" %(Filename)_wrap.cxx"</Command>
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename)_wrap.cxx</Outputs>
     </CustomBuild>
+    <None Include="..\..\lib\swig.bat" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
--- a/Build/Visual Studio 2012/World of Might and Magic.vcxproj.filters	Fri Nov 22 10:34:22 2013 +0200
+++ b/Build/Visual Studio 2012/World of Might and Magic.vcxproj.filters	Fri Nov 22 23:28:02 2013 +0600
@@ -592,11 +592,15 @@
     <ClInclude Include="..\..\Vis.h" />
     <ClInclude Include="..\..\Weather.h" />
     <ClInclude Include="..\..\TestClass.h" />
+    <ClInclude Include="..\..\OurMath.h" />
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\lib\legacy_dx\d3dvec.inl">
       <Filter>lib\legacy_dx</Filter>
     </None>
+    <None Include="..\..\lib\swig.bat">
+      <Filter>lib</Filter>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\NewUI\Core\UIControlModule.swig">
--- a/mm7_2.cpp	Fri Nov 22 10:34:22 2013 +0200
+++ b/mm7_2.cpp	Fri Nov 22 23:28:02 2013 +0600
@@ -4313,7 +4313,7 @@
 const char *GetScriptFileLocation(const char *script_name)
 {
   static char buf[2048];
-  strcpy(buf, "scripts/");
+  strcpy(buf, "Data/scripts/lua/core/");
   strcat(buf, script_name);
   return buf;
 }
@@ -4333,17 +4333,20 @@
   char test[1024];
   sprintfex(test, "^Pi[%s]: знахар^R[ь;ка;]", "Золтан");
 
+  char dir[256];
+  GetCurrentDirectoryA(256, dir);
+
   lua_State *L = luaL_newstate();
   if ( L == NULL )
-    printf ( "Error creating Lua context.\n" );
+    Log::Warning(L"Error creating Lua context.\n");
   luaL_openlibs(L);
   if ( luaL_dofile(L,GetScriptFileLocation("script.lua")))
-    printf ( "Error opening script.lua\n" );
+    Log::Warning(L"Error opening script.lua\n");
 
   LoadLuaSWIGLibraries(L);
   
   if (luaL_dofile(L,GetScriptFileLocation("UIControl.lua")))
-    printf("unable to load file\n");
+    Log::Warning(L"unable to load UIControl.lua\n");
   //lua_close(l);
 
   bool bNoMargareth = false;