diff --git a/SConstruct b/SConstruct index 05fe74ca8..61f8a88c4 100644 --- a/SConstruct +++ b/SConstruct @@ -3953,7 +3953,6 @@ class DXXArchive(DXXCommon): 'misc/vgrphys.cpp', 'misc/vgwphys.cpp', 'texmap/ntmap.cpp', -'texmap/scanline.cpp' ] ]), \ __get_objects_use_sdl1=DXXCommon.create_lazy_object_getter([os.path.join(srcdir, f) for f in [ @@ -3994,6 +3993,7 @@ class DXXArchive(DXXCommon): # for non-ogl get_objects_arch_sdl = DXXCommon.create_lazy_object_getter([os.path.join(srcdir, f) for f in [ '3d/clipper.cpp', +'texmap/scanline.cpp', 'texmap/tmapflat.cpp' ] ]) diff --git a/common/include/args.h b/common/include/args.h index ea093d73e..8eb6099ae 100644 --- a/common/include/args.h +++ b/common/include/args.h @@ -128,7 +128,9 @@ struct CArg : prohibit_void_ptr std::string SysRecordDemoNameTemplate; std::string MplUdpHostAddr; std::string DbgAltTex; +#if !DXX_USE_OGL std::string DbgTexMap; +#endif }; extern CArg CGameArg; } diff --git a/common/texmap/scanline.cpp b/common/texmap/scanline.cpp index d393d9ff1..47f917a5c 100644 --- a/common/texmap/scanline.cpp +++ b/common/texmap/scanline.cpp @@ -42,7 +42,6 @@ namespace dcx { tmap_scanline_function_table tmap_scanline_functions; -#if !DXX_USE_OGL void c_tmap_scanline_flat() { uint8_t *dest; @@ -56,7 +55,6 @@ void c_tmap_scanline_flat() } // memset(dest,tmap_flat_color,fx_xright-fx_xleft+1); } -#endif void c_tmap_scanline_shaded() { @@ -107,8 +105,6 @@ void c_tmap_scanline_lin_nolight() } } - -#if 1 void c_tmap_scanline_lin() { uint c; @@ -213,7 +209,6 @@ void c_tmap_scanline_lin() } } } -#endif // This texture mapper uses floating point extensively and writes 8 pixels at once, so it likely works // best on 64 bit RISC processors. @@ -488,7 +483,6 @@ static void c_fp_tmap_scanline_per() } } -#if 1 // note the unrolling loop is broken. It is never called, and uses big endian. -- FH static void c_tmap_scanline_per() { @@ -602,7 +596,6 @@ static void c_tmap_scanline_per() } } } -#endif static void c_tmap_scanline_quad() { diff --git a/common/texmap/scanline.h b/common/texmap/scanline.h index 533af94fd..2b318cb85 100644 --- a/common/texmap/scanline.h +++ b/common/texmap/scanline.h @@ -27,7 +27,9 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifdef __cplusplus #include +#include "dxxsconf.h" +#if !DXX_USE_OGL namespace dcx { extern void c_tmap_scanline_lin(); extern void c_tmap_scanline_lin_nolight(); @@ -49,5 +51,6 @@ struct tmap_scanline_function_table extern tmap_scanline_function_table tmap_scanline_functions; void select_tmap(const std::string &type); } +#endif #endif diff --git a/d2x-rebirth/RELEASE-NOTES.txt b/d2x-rebirth/RELEASE-NOTES.txt index ec66ba4cb..517f96aec 100644 --- a/d2x-rebirth/RELEASE-NOTES.txt +++ b/d2x-rebirth/RELEASE-NOTES.txt @@ -60,6 +60,7 @@ What's new in 0.60 * Hoard mode no longer borrows the Proximity Bomb slot for counting player orbs; Proximity Bomb powerups can now be found and used correctly in Hoard mode. * Fixed some Multiplayer scoring oddities. * New SP (Options->Gameplay) / MP (Host Game -> Game Setup -> Advanced) options to remove the thief during level load and to restore the thief energy weapon bug. +* Command line option `-tmap` was specific to SDL-only builds and had no effect in OpenGL-enabled builds. It is no longer accepted by OpenGL builds. * ... and many, many more bugfixes and improvements. diff --git a/similar/main/inferno.cpp b/similar/main/inferno.cpp index d7afa0201..8783492d6 100644 --- a/similar/main/inferno.cpp +++ b/similar/main/inferno.cpp @@ -90,7 +90,9 @@ char copyright[] = "DESCENT II COPYRIGHT (C) 1994-1996 PARALLAX SOFTWARE CORPOR #include "collide.h" #include "newdemo.h" #include "joy.h" +#if !DXX_USE_OGL #include "../texmap/scanline.h" //for select_tmap -MM +#endif #include "event.h" #include "rbaudio.h" #ifndef __linux__ @@ -500,7 +502,9 @@ static int main(int argc, char *argv[]) arch_init(); +#if !DXX_USE_OGL select_tmap(CGameArg.DbgTexMap); +#endif #if defined(DXX_BUILD_DESCENT_II) Lighting_on = 1; diff --git a/similar/misc/args.cpp b/similar/misc/args.cpp index e0e4722fc..2e13c0fab 100644 --- a/similar/misc/args.cpp +++ b/similar/misc/args.cpp @@ -363,8 +363,6 @@ static void ReadCmdArgs(Inilist &ini, Arglist &Args) CGameArg.DbgRenderStats = true; else if (!d_stricmp(p, "-text")) CGameArg.DbgAltTex = arg_string(pp, end); - else if (!d_stricmp(p, "-tmap")) - CGameArg.DbgTexMap = arg_string(pp, end); else if (!d_stricmp(p, "-showmeminfo")) CGameArg.DbgShowMemInfo = 1; else if (!d_stricmp(p, "-nodoublebuffer")) @@ -388,6 +386,8 @@ static void ReadCmdArgs(Inilist &ini, Arglist &Args) else if (!d_stricmp(p, "-gl_gettexlevelparam_ok")) CGameArg.DbgGlGetTexLevelParamOk = arg_integer(pp, end); #else + else if (!d_stricmp(p, "-tmap")) + CGameArg.DbgTexMap = arg_string(pp, end); else if (!d_stricmp(p, "-hwsurface")) CGameArg.DbgSdlHWSurface = true; else if (!d_stricmp(p, "-asyncblit"))