diff mm7_3.cpp @ 1165:29a8defbad9e

temporary _CRT_SECURE_NO_WARNINGS to remove some warnings removed double LOBYTE, LOWORD etd macro definitions swprintf called with string size parameter ErrD3D with too many params fix 1 or 2 other minor fixes
author Grumpy7
date Tue, 04 Jun 2013 03:21:21 +0200
parents 502b8b2e36b4
children 15ad868d972f
line wrap: on
line diff
--- a/mm7_3.cpp	Tue Jun 04 02:03:43 2013 +0200
+++ b/mm7_3.cpp	Tue Jun 04 03:21:21 2013 +0200
@@ -1,3 +1,7 @@
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
 #include <assert.h>
 
 
@@ -5584,9 +5588,9 @@
   wchar_t xn_filename[1024], xp_filename[1024],
           yn_filename[1024], yp_filename[1024],
           zn_filename[1024], zp_filename[1024];
-  swprintf(xn_filename, L"%s_xn.tga", skybox_name); swprintf(xp_filename, L"%s_xp.tga", skybox_name);
-  swprintf(yn_filename, L"%s_yn.tga", skybox_name); swprintf(yp_filename, L"%s_yp.tga", skybox_name);
-  swprintf(zn_filename, L"%s_zn.tga", skybox_name); swprintf(zp_filename, L"%s_zp.tga", skybox_name);
+  swprintf(xn_filename, wcslen(L"%s_xn.tga"), L"%s_xn.tga", skybox_name); swprintf(xp_filename, wcslen(L"%s_xp.tga"), L"%s_xp.tga", skybox_name);
+  swprintf(yn_filename, wcslen(L"%s_yn.tga"), L"%s_yn.tga", skybox_name); swprintf(yp_filename, wcslen(L"%s_yp.tga"), L"%s_yp.tga", skybox_name);
+  swprintf(zn_filename, wcslen(L"%s_zn.tga"), L"%s_zn.tga", skybox_name); swprintf(zp_filename, wcslen(L"%s_zp.tga"), L"%s_zp.tga", skybox_name);
 
   int xn_width, xn_height;
   skybox_xn = LoadTgaTexture(xn_filename, &xn_width, &xn_height);