From fd0c5a6db624bb38523ece984c834b4aa5bd8e6e Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 6 May 2006 00:54:41 +0000 Subject: [PATCH] - Changed TAG_MORE to pass a va_list pointer instead of a va_list because it's a non-POD type when targeting several non-ix86 targets with GCC. Hopefully this works. SVN r80 (trunk) --- docs/rh-log.txt | 10 ++++++++++ src/r_data.cpp | 15 ++++++++++++--- src/v_draw.cpp | 6 +++--- src/v_font.cpp | 5 ++++- src/v_text.cpp | 12 ++++++------ wadsrc/decorate/hexen/hexenspecialdecs.txt | 6 +++++- 6 files changed, 40 insertions(+), 14 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 59c287fb3e..f212cccb18 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,13 @@ +May 5, 2006 +- Changed TAG_MORE to pass a va_list pointer instead of a va_list because it's a + non-POD type when targeting several non-ix86 targets with GCC. Hopefully this works. + +May 4, 2006 +- Rewrote FName to use only POD types for its static data so that it can be used + without any explicit constructors being called. +- Fixed: ZTwinedTorchUnlit, ZWallTorchUnlit, ZFireBullUnlit, and ZCauldronUnlit + were missing game filters. + May 4, 2006 (Changes by Graf Zahl) - Converted A_Puzzleitems.cpp and parts of A_HexenSpecialdecs.cpp to DECORATE. - Converted A_Hexendecorations.cpp to DECORATE. diff --git a/src/r_data.cpp b/src/r_data.cpp index 2eca7bff92..7ce35956de 100644 --- a/src/r_data.cpp +++ b/src/r_data.cpp @@ -1746,7 +1746,10 @@ void FIMGZTexture::MakeTexture () } } - if (Spans == NULL) Spans = CreateSpans (Pixels); + if (Spans == NULL) + { + Spans = CreateSpans (Pixels); + } } @@ -1976,7 +1979,10 @@ void FPNGTexture::MakeTexture () delete[] oldpix; } } - if (Spans == NULL) Spans = CreateSpans (Pixels); + if (Spans == NULL) + { + Spans = CreateSpans (Pixels); + } } @@ -2232,7 +2238,10 @@ void FMultiPatchTexture::MakeTexture () Parts[i].OriginX, Parts[i].OriginY); } - if (Spans == NULL) Spans = CreateSpans (Pixels); + if (Spans == NULL) + { + Spans = CreateSpans (Pixels); + } } void FMultiPatchTexture::CheckForHacks () diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 775391a09b..17796e3fe7 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) { - va_list more_p; + va_list *more_p; DWORD data; switch (tag) @@ -114,9 +114,9 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_ break; case TAG_MORE: - more_p = va_arg (tags, va_list); + more_p = va_arg (tags, va_list*); va_end (tags); - tags = more_p; + tags = *more_p; break; case DTA_DestWidth: diff --git a/src/v_font.cpp b/src/v_font.cpp index b025bed185..618c97179e 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -1082,7 +1082,10 @@ void FFontChar2::MakeTexture () I_FatalError ("The font %s is corrupt", name); } - Spans = CreateSpans (Pixels); + if (Spans == NULL) + { + Spans = CreateSpans (Pixels); + } } //=========================================================================== diff --git a/src/v_text.cpp b/src/v_text.cpp index 12664914a3..bde25b81df 100644 --- a/src/v_text.cpp +++ b/src/v_text.cpp @@ -73,7 +73,7 @@ void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, byte character const BYTE *range = Font->GetColorTranslation ((EColorRange)normalcolor); va_list taglist; va_start (taglist, character); - DrawTexture (pic, x, y, DTA_Translation, range, TAG_MORE, taglist); + DrawTexture (pic, x, y, DTA_Translation, range, TAG_MORE, &taglist); 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) { - va_list more_p; + va_list *more_p; DWORD data; void *ptrval; @@ -137,10 +137,10 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st break; case TAG_MORE: - more_p = va_arg (tags, va_list); + more_p = va_arg (tags, va_list*); va_end (tags); - tags = more_p; - break;; + tags = *more_p; + break; case DTA_DestWidth: case DTA_DestHeight: @@ -228,7 +228,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st { va_list taglist; va_start (taglist, string); - DrawTexture (pic, cx, cy, DTA_Translation, range, TAG_MORE, taglist); + DrawTexture (pic, cx, cy, DTA_Translation, range, TAG_MORE, &taglist); va_end (taglist); } cx += (w + kerning) * scalex; diff --git a/wadsrc/decorate/hexen/hexenspecialdecs.txt b/wadsrc/decorate/hexen/hexenspecialdecs.txt index b7dd3be61a..b129a8f6b6 100644 --- a/wadsrc/decorate/hexen/hexenspecialdecs.txt +++ b/wadsrc/decorate/hexen/hexenspecialdecs.txt @@ -98,6 +98,7 @@ ACTOR ZTwinedTorch : SwitchableDecoration 116 ACTOR ZTwinedTorchUnlit : ZTwinedTorch 117 { + Game Hexen States { Spawn: @@ -130,6 +131,7 @@ ACTOR ZWallTorch : SwitchableDecoration 54 ACTOR ZWallTorchUnlit : ZWallTorch 55 { + Game Hexen States { Spawn: @@ -215,6 +217,7 @@ ACTOR ZFireBull : SwitchableDecoration 8042 ACTOR ZFireBullUnlit : ZFireBull 8043 { + Game Hexen States { Spawn: @@ -276,8 +279,9 @@ ACTOR ZCauldron : SwitchableDecoration 8069 } } -ACTOR AZCauldronUnlit : ZCauldron +ACTOR ZCauldronUnlit : ZCauldron { + Game Hexen States { Spawn: