From f50b284fdafb9662a79ab3c3a5b742eb5f7eace9 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 24 May 2006 15:31:21 +0000 Subject: [PATCH] SVN r142 (trunk) --- docs/rh-log.txt | 6 + src/v_draw.cpp | 10 +- src/v_text.cpp | 22 +- src/v_video.h | 16 +- zdoom.sln | 12 +- zdoom.vcproj | 1289 ++++++++++++++++++++++++----------------------- 6 files changed, 684 insertions(+), 671 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 7104d0dc6..4a44feace 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,9 @@ +May 24, 2006 +- Disabled RTTI generation and enabled function-level linking in the VC 2005 + zdoom project. +- Fixed: TAG_MORE now uses __va_copy to copy the taglist when building with + GCC, so that should let it build under x86-64 and any other GCC targets. + May 24, 2006 (Changes by Graf Zahl) - Fixed: A_SpawnItem performed an integer multiplication with fixed point values to calculate the spawn position. diff --git a/src/v_draw.cpp b/src/v_draw.cpp index e3851ae2f..f945ab9d8 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -103,7 +103,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_ while (tag != TAG_DONE) { - TagMoreData *more_p; + va_list *more_p; DWORD data; switch (tag) @@ -114,9 +114,13 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_ break; case TAG_MORE: - more_p = va_arg (tags, TagMoreData*); + more_p = va_arg (tags, va_list *); va_end (tags); - tags = more_p->tagdata; +#ifdef __GNUC__ + __va_copy (tags, *more_p); +#else + tags = *more_p; +#endif break; case DTA_DestWidth: diff --git a/src/v_text.cpp b/src/v_text.cpp index fd932e6cc..1b8c8cbb4 100644 --- a/src/v_text.cpp +++ b/src/v_text.cpp @@ -71,10 +71,10 @@ void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, byte character if (NULL != (pic = Font->GetChar (character, &dummy))) { const BYTE *range = Font->GetColorTranslation ((EColorRange)normalcolor); - TagMoreData taglist; - va_start (taglist.tagdata, character); + va_list taglist; + va_start (taglist, character); DrawTexture (pic, x, y, DTA_Translation, range, TAG_MORE, &taglist); - va_end (taglist.tagdata); + va_end (taglist); } } @@ -125,7 +125,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st while (tag != TAG_DONE) { - TagMoreData * more_p; + va_list *more_p; DWORD data; void *ptrval; @@ -137,9 +137,13 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st break; case TAG_MORE: - more_p = va_arg (tags, TagMoreData*); + more_p = va_arg (tags, va_list*); va_end (tags); - tags = more_p->tagdata; +#ifdef __GNUC__ + __va_copy (tags, *more_p); +#else + tags = *more_p; +#endif break; case DTA_DestWidth: @@ -226,10 +230,10 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st if (NULL != (pic = Font->GetChar (c, &w))) { - TagMoreData taglist; - va_start (taglist.tagdata, string); + va_list taglist; + va_start (taglist, string); DrawTexture (pic, cx, cy, DTA_Translation, range, TAG_MORE, &taglist); - va_end (taglist.tagdata); + va_end (taglist); } cx += (w + kerning) * scalex; } diff --git a/src/v_video.h b/src/v_video.h index 6de44d866..f564c827a 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -61,19 +61,13 @@ class FTexture; // DWORD ti_Data; // }; -#define TAG_DONE (0L) /* Used to indicate the end of the Tag list */ -#define TAG_END (0L) /* Ditto */ -#define TAG_IGNORE (1L) /* Ignore this Tag */ -#define TAG_MORE (2L) /* Ends this list and continues with the */ +#define TAG_DONE (0) /* Used to indicate the end of the Tag list */ +#define TAG_END (0) /* Ditto */ +#define TAG_IGNORE (1) /* Ignore this Tag */ +#define TAG_MORE (2) /* Ends this list and continues with the */ /* list pointed to in ti_Data */ -struct TagMoreData -{ - va_list tagdata; -}; -//#define TAG_SKIP (3L) /* Skip this and the next ti_Data Tags */ - -#define TAG_USER ((DWORD)(1L<<31)) +#define TAG_USER ((DWORD)(1u<<31)) enum { diff --git a/zdoom.sln b/zdoom.sln index 035a7a9e8..d2c7e8f71 100644 --- a/zdoom.sln +++ b/zdoom.sln @@ -2,9 +2,9 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = " zdoom", "zdoom.vcproj", "{8049475B-5C87-46F9-9358-635218A4EF18}" ProjectSection(ProjectDependencies) = postProject - {1D179D4B-F008-431B-8C72-111F8372584F} = {1D179D4B-F008-431B-8C72-111F8372584F} - {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63} = {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63} {873F2EEA-24DF-454C-B245-CB9738BA993E} = {873F2EEA-24DF-454C-B245-CB9738BA993E} + {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63} = {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63} + {1D179D4B-F008-431B-8C72-111F8372584F} = {1D179D4B-F008-431B-8C72-111F8372584F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcproj", "{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}" @@ -17,9 +17,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2c", "tools\re2c\re2c.vcp EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wadsrc", "wadsrc\wadsrc.vcproj", "{1D179D4B-F008-431B-8C72-111F8372584F}" ProjectSection(ProjectDependencies) = postProject - {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3} = {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3} - {AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8} = {AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8} {3FFA68B3-9449-4B03-ADEE-194C3638623B} = {3FFA68B3-9449-4B03-ADEE-194C3638623B} + {AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8} = {AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8} + {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3} = {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makewad", "tools\makewad\makewad.vcproj", "{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}" @@ -30,6 +30,10 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xlatcc", "tools\xlatcc\xlatcc.vcproj", "{3FFA68B3-9449-4B03-ADEE-194C3638623B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dehsupp", "tools\dehsupp\dehsupp.vcproj", "{AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8}" + ProjectSection(ProjectDependencies) = postProject + {0F80ACBF-460E-44F0-B28E-B3272D1774A7} = {0F80ACBF-460E-44F0-B28E-B3272D1774A7} + {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E} = {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/zdoom.vcproj b/zdoom.vcproj index c85e2c6fc..d23a32bc5 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -58,8 +58,9 @@ PreprocessorDefinitions="NDEBUG,WIN32,_WIN32,_WINDOWS,USEASM,HAVE_STRUPR,HAVE_FILELENGTH" StringPooling="true" RuntimeLibrary="0" - EnableFunctionLevelLinking="false" + EnableFunctionLevelLinking="true" ForceConformanceInForLoopScope="true" + RuntimeTypeInfo="false" UsePrecompiledHeader="0" PrecompiledHeaderFile="" AssemblerOutput="0" @@ -132,110 +133,6 @@ Name="VCPostBuildEventTool" /> - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2682,14 +2691,6 @@ GeneratePreprocessedFile="0" /> - - - @@ -2712,7 +2713,7 @@ /> - - - @@ -4727,6 +4718,16 @@ Outputs="$(IntDir)/$(InputName).obj" /> + + + @@ -4747,17 +4748,7 @@ - - - @@ -4771,6 +4762,16 @@ Outputs="$(IntDir)/$(InputName).obj" /> + + + @@ -4791,17 +4792,7 @@ - - - @@ -4815,6 +4806,16 @@ Outputs="$(IntDir)\$(InputName).obj" /> + + + @@ -4835,17 +4836,7 @@ - - - @@ -4859,6 +4850,16 @@ Outputs="$(IntDir)\$(InputName).obj" /> + + + @@ -4879,17 +4880,7 @@ - - - @@ -4903,6 +4894,16 @@ Outputs="$(IntDir)\$(InputName).obj" /> + + + @@ -4974,7 +4975,7 @@ /> - - - @@ -5547,6 +5540,14 @@ GeneratePreprocessedFile="0" /> + + + @@ -5568,7 +5569,7 @@ />