diff --git a/doomclassic/doom/d_main.cpp b/doomclassic/doom/d_main.cpp index b872a20a..44358da7 100644 --- a/doomclassic/doom/d_main.cpp +++ b/doomclassic/doom/d_main.cpp @@ -845,9 +845,9 @@ bool D_DoomMainPoll(void) if (p && p < ::g->myargc-1) { if (M_CheckParm("-cdrom")) - sprintf(file, "c:\\doomdata\\"SAVEGAMENAME"%c.dsg",::g->myargv[p+1][0]); + sprintf(file, "c:\\doomdata\\" SAVEGAMENAME "%c.dsg",::g->myargv[p+1][0]); else - sprintf(file, SAVEGAMENAME"%c.dsg",::g->myargv[p+1][0]); + sprintf(file, SAVEGAMENAME "%c.dsg",::g->myargv[p+1][0]); G_LoadGame (file); } diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 91c93be6..880d3c49 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -27,6 +27,9 @@ option(ONATIVE option(WINRT "Build for Windows RT" OFF) +option(WINDOWS10 + "Build for Windows 10" OFF) + option(USE_SYSTEM_ZLIB "Use the system zlib instead of the bundled one" OFF) @@ -193,12 +196,12 @@ elseif(MSVC) #-DUSE_OPENAL -DUSE_EXCEPTIONS) ## Check for Version ## - if( WINRT ) # Windows RT - add_definitions(-DUSE_WINRT) + if( WINRT OR WINDOWS10 ) # Windows RT + add_definitions(-DUSE_WINRT) endif() if (USE_INTRINSICS) - add_definitions(-DUSE_INTRINSICS) + add_definitions(-DUSE_INTRINSICS) endif() if(NOT CMAKE_CL_64) @@ -1268,9 +1271,20 @@ if(MSVC) # endif() # else() + + if(WINDOWS10) + set(DirectX_LIBRARIES + dinput8 + dsound + dxguid + #dxerr + Xinput + xaudio2.lib + ) + else() find_package(DirectX REQUIRED) include_directories(${DirectX_INCLUDE_DIR}) - #endif() + endif() if(OPENAL) add_definitions(-DUSE_OPENAL) @@ -1431,7 +1445,7 @@ if(MSVC) ${PNG_LIBRARY} ${JPEG_LIBRARY} ${GLEW_LIBRARY} - ${CMAKE_DL_LIBS} + ${CMAKE_DL_LIBS} ) #CMAKE_BINARY_DIR diff --git a/neo/cmake-vs2015-32bit-windows10.bat b/neo/cmake-vs2015-32bit-windows10.bat new file mode 100644 index 00000000..e38c4347 --- /dev/null +++ b/neo/cmake-vs2015-32bit-windows10.bat @@ -0,0 +1,6 @@ +cd .. +del /s /q build +mkdir build +cd build +cmake -G "Visual Studio 14" -DCMAKE_INSTALL_PREFIX=../bin/windows10-32 -DWINDOWS10=ON ../neo +pause \ No newline at end of file diff --git a/neo/cmake-vs2015-32bit.bat b/neo/cmake-vs2015-32bit.bat new file mode 100644 index 00000000..a880653b --- /dev/null +++ b/neo/cmake-vs2015-32bit.bat @@ -0,0 +1,6 @@ +cd .. +del /s /q build +mkdir build +cd build +cmake -G "Visual Studio 14" -DCMAKE_INSTALL_PREFIX=../bin/windows7-32 -DWINDOWS10=OFF ../neo +pause \ No newline at end of file diff --git a/neo/cmake-vs2015-64bit-windows10.bat b/neo/cmake-vs2015-64bit-windows10.bat new file mode 100644 index 00000000..7325d008 --- /dev/null +++ b/neo/cmake-vs2015-64bit-windows10.bat @@ -0,0 +1,6 @@ +cd .. +del /s /q build +mkdir build +cd build +cmake -G "Visual Studio 14 Win64" -DCMAKE_INSTALL_PREFIX=../bin/windows10-64 -DWINDOWS10=ON ../neo +pause \ No newline at end of file diff --git a/neo/cmake-vs2015-64bit.bat b/neo/cmake-vs2015-64bit.bat new file mode 100644 index 00000000..4decb623 --- /dev/null +++ b/neo/cmake-vs2015-64bit.bat @@ -0,0 +1,6 @@ +cd .. +del /s /q build +mkdir build +cd build +cmake -G "Visual Studio 14 Win64" -DCMAKE_INSTALL_PREFIX=../bin/windows7-64 ../neo +pause \ No newline at end of file diff --git a/neo/d3xp/gamesys/SysCmds.cpp b/neo/d3xp/gamesys/SysCmds.cpp index 6f00fd73..d5117f83 100644 --- a/neo/d3xp/gamesys/SysCmds.cpp +++ b/neo/d3xp/gamesys/SysCmds.cpp @@ -141,7 +141,7 @@ void Cmd_ListSpawnArgs_f( const idCmdArgs& args ) for( i = 0; i < ent->spawnArgs.GetNumKeyVals(); i++ ) { const idKeyValue* kv = ent->spawnArgs.GetKeyVal( i ); - gameLocal.Printf( "\"%s\" "S_COLOR_WHITE"\"%s\"\n", kv->GetKey().c_str(), kv->GetValue().c_str() ); + gameLocal.Printf( "\"%s\" " S_COLOR_WHITE "\"%s\"\n", kv->GetKey().c_str(), kv->GetValue().c_str() ); } } diff --git a/neo/idlib/sys/sys_defines.h b/neo/idlib/sys/sys_defines.h index 03dce5bb..01520fca 100644 --- a/neo/idlib/sys/sys_defines.h +++ b/neo/idlib/sys/sys_defines.h @@ -215,12 +215,13 @@ bulk of the codebase, so it is the best place for analyze pragmas. // win32 needs this, but 360 doesn't #pragma warning( disable: 6540 ) // warning C6540: The use of attribute annotations on this function will invalidate all of its existing __declspec annotations [D:\tech5\engine\engine-10.vcxproj] - +#if !defined(VERIFY_FORMAT_STRING) // checking format strings catches a LOT of errors #include #define VERIFY_FORMAT_STRING [SA_FormatString(Style="printf")] // DG: alternative for GCC with attribute (NOOP for MSVC) #define ID_STATIC_ATTRIBUTE_PRINTF(STRIDX, FIRSTARGIDX) +#endif #else #define VERIFY_FORMAT_STRING diff --git a/neo/libs/zlib/trees.c b/neo/libs/zlib/trees.c index 1cbe076c..ff22388a 100644 --- a/neo/libs/zlib/trees.c +++ b/neo/libs/zlib/trees.c @@ -35,6 +35,9 @@ /* #define GEN_TREES_H */ #include "deflate.h" + +// RB: avoid problems with SourceAnnotations.h +#define VERIFY_FORMAT_STRING #include "idlib/sys/sys_defines.h" #ifdef DEBUG diff --git a/neo/renderer/tr_backend_draw.cpp b/neo/renderer/tr_backend_draw.cpp index 5e015778..b12b148e 100644 --- a/neo/renderer/tr_backend_draw.cpp +++ b/neo/renderer/tr_backend_draw.cpp @@ -1878,7 +1878,7 @@ static void RB_AmbientPass( const drawSurf_t* const* drawSurfs, int numDrawSurfs continue; } - bool isWorldModel = ( drawSurf->space->entityDef->parms.origin == vec3_origin ); + //bool isWorldModel = ( drawSurf->space->entityDef->parms.origin == vec3_origin ); //if( isWorldModel ) //{ @@ -1926,15 +1926,15 @@ static void RB_AmbientPass( const drawSurf_t* const* drawSurfs, int numDrawSurfs R_GlobalPointToLocal( drawSurf->space->modelMatrix, backEnd.viewDef->renderView.vieworg, localViewOrigin.ToVec3() ); SetVertexParm( RENDERPARM_LOCALVIEWORIGIN, localViewOrigin.ToFloatPtr() ); - if( !isWorldModel ) - { - // tranform the light direction into model local space - idVec3 globalLightDirection( 0.0f, 0.0f, -1.0f ); // HACK - idVec4 localLightDirection( 0.0f ); - R_GlobalVectorToLocal( drawSurf->space->modelMatrix, globalLightDirection, localLightDirection.ToVec3() ); - - SetVertexParm( RENDERPARM_LOCALLIGHTORIGIN, localLightDirection.ToFloatPtr() ); - } + //if( !isWorldModel ) + //{ + // // tranform the light direction into model local space + // idVec3 globalLightDirection( 0.0f, 0.0f, -1.0f ); // HACK + // idVec4 localLightDirection( 0.0f ); + // R_GlobalVectorToLocal( drawSurf->space->modelMatrix, globalLightDirection, localLightDirection.ToVec3() ); + // + // SetVertexParm( RENDERPARM_LOCALLIGHTORIGIN, localLightDirection.ToFloatPtr() ); + //} // RB: if we want to store the normals in world space so we need the model -> world matrix idRenderMatrix modelMatrix;