• R/O
  • SSH

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG), Euroboros (EB), and Down Under Doomers (DUD).


Commit MetaInfo

Révisionfc27382e9d3e6b41bdc8a8e02024cb448a418a39 (tree)
l'heure2008-03-25 18:43:50
AuteurChristoph Oelckers <coelckers@zdoo...>
CommiterChristoph Oelckers

Message de Log

- Fixed: ANIMATED allowed animations between different texture types.
- Added a debuganimated CCMD that can be used to output some information

if a WAD shows broken animations.

- Fixed: The handling for enum values in Xlat was incorrect. The rule with

value assignment must set the counter one higher than the current value.

- Fixed: The definition of enums in the Xlat grammar was right-recursive

which could create stack overflows in the parser. Made it left-recursive as
recommended in Lemon's docs.

SVN r850 (trunk)

Change Summary

Modification

diff -r 37ea3def188d -r fc27382e9d3e docs/rh-log.txt
--- a/docs/rh-log.txt Tue Mar 25 04:42:26 2008 +0000
+++ b/docs/rh-log.txt Tue Mar 25 09:43:50 2008 +0000
@@ -1,3 +1,8 @@
1+March 25, 2008 (Changes by Graf Zahl)
2+- Fixed: ANIMATED allowed animations between different texture types.
3+- Added a debuganimated CCMD that can be used to output some information
4+ if a WAD shows broken animations.
5+
16 March 24, 2008
27 - Removed xlat_parser.h from the repository. Lemon was always being run on
38 xlat_parser.y because both files had the same time stamp after an update,
@@ -10,6 +15,11 @@
1015 - Restored the sound limiting.
1116
1217 March 24, 2008 (Changes by Graf Zahl)
18+- Fixed: THe handling for enum values in Xlat was incorrect. The rule with
19+ value assignment must set the counter one higher than the current value.
20+- Fixed: The definition of enums in the Xlat grammar was right-recursive
21+ which could create stack overflows in the parser. Made it left-recursive as
22+ recommended in Lemon's docs.
1323 - Added Thomas's submissions for decal assignment to puffs and NOINFIGHTING flag.
1424 - Reverted changes of r715 in v_collection.cpp because they broke loading
1525 of status bar face graphics belonging to skins.
diff -r 37ea3def188d -r fc27382e9d3e src/r_anim.cpp
--- a/src/r_anim.cpp Tue Mar 25 04:42:26 2008 +0000
+++ b/src/r_anim.cpp Tue Mar 25 09:43:50 2008 +0000
@@ -135,9 +135,14 @@
135135 //
136136 //==========================================================================
137137
138+CVAR(Bool, debuganimated, false, 0)
139+
138140 void R_InitPicAnims (void)
139141 {
140- const BITFIELD texflags = FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_TryAny;
142+ const BITFIELD texflags = FTextureManager::TEXMAN_Overridable;
143+ // I think better not! This is only for old ANIMATED definition that
144+ // don't know about ZDoom's more flexible texture system.
145+ // | FTextureManager::TEXMAN_TryAny;
141146
142147 if (Wads.CheckNumForName ("ANIMATED") != -1)
143148 {
@@ -175,6 +180,35 @@
175180 Printf ("Animation %s in ANIMATED has only one frame", anim_p + 10);
176181 continue;
177182 }
183+
184+ FTexture *tex1 = TexMan[pic1];
185+ FTexture *tex2 = TexMan[pic1];
186+
187+ if (tex1->UseType != tex2->UseType)
188+ {
189+ // not the same type -
190+ continue;
191+ }
192+
193+ if (debuganimated)
194+ {
195+ Printf("Defining animation '%s' (texture %d, lump %d, file %d) to '%s' (texture %d, lump %d, file %d)\n",
196+ tex1->Name, tex1->GetSourceLump(), Wads.GetLumpFile(tex1->GetSourceLump()),
197+ tex2->Name, tex2->GetSourceLump(), Wads.GetLumpFile(tex2->GetSourceLump()));
198+ }
199+
200+ /* FIXME: doesn't work with hires texture replacements.
201+ int l1 = tex1->GetSourceLump();
202+ int l2 = tex2->GetSourceLump();
203+
204+ if (tex1->UseType == FTexture::TEX_Wall && l1 != l2)
205+ {
206+ // Animated walls must be in the same definition lumo
207+ continue;
208+ }
209+ */
210+
211+
178212 // [RH] Allow for backward animations as well as forward.
179213 if (pic1 > pic2)
180214 {
diff -r 37ea3def188d -r fc27382e9d3e src/r_data.h
--- a/src/r_data.h Tue Mar 25 04:42:26 2008 +0000
+++ b/src/r_data.h Tue Mar 25 09:43:50 2008 +0000
@@ -82,7 +82,7 @@
8282 class FMultiPatchTexture : public FTexture
8383 {
8484 public:
85- FMultiPatchTexture (const void *texdef, FPatchLookup *patchlookup, int maxpatchnum, bool strife);
85+ FMultiPatchTexture (const void *texdef, FPatchLookup *patchlookup, int maxpatchnum, bool strife, int deflump);
8686 ~FMultiPatchTexture ();
8787
8888 const BYTE *GetColumn (unsigned int column, const Span **spans_out);
@@ -92,10 +92,12 @@
9292 virtual void SetFrontSkyLayer ();
9393
9494 int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y);
95+ int GetSourceLump() { return DefinitionLump; }
9596
9697 protected:
9798 BYTE *Pixels;
9899 Span **Spans;
100+ int DefinitionLump;
99101
100102 struct TexPart
101103 {
diff -r 37ea3def188d -r fc27382e9d3e src/r_defs.h
--- a/src/r_defs.h Tue Mar 25 04:42:26 2008 +0000
+++ b/src/r_defs.h Tue Mar 25 09:43:50 2008 +0000
@@ -929,7 +929,7 @@
929929 void WriteTexture (FArchive &arc, int picnum);
930930 int ReadTexture (FArchive &arc);
931931
932- void AddTexturesLump (const void *lumpdata, int lumpsize, int patcheslump, int firstdup=0, bool texture1=false);
932+ void AddTexturesLump (const void *lumpdata, int lumpsize, int deflumpnum, int patcheslump, int firstdup=0, bool texture1=false);
933933 void AddTexturesLumps (int lump1, int lump2, int patcheslump);
934934 void AddGroup(int wadnum, const char * startlump, const char * endlump, int ns, int usetype);
935935 void AddPatches (int lumpnum);
diff -r 37ea3def188d -r fc27382e9d3e src/textures/multipatchtexture.cpp
--- a/src/textures/multipatchtexture.cpp Tue Mar 25 04:42:26 2008 +0000
+++ b/src/textures/multipatchtexture.cpp Tue Mar 25 09:43:50 2008 +0000
@@ -59,7 +59,7 @@
5959 //
6060 //==========================================================================
6161
62-FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchlookup, int maxpatchnum, bool strife)
62+FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchlookup, int maxpatchnum, bool strife, int deflumpnum)
6363 : Pixels (0), Spans(0), Parts(0), bRedirect(false)
6464 {
6565 union
@@ -159,6 +159,7 @@
159159 bRedirect = true;
160160 }
161161 }
162+ DefinitionLump = deflumpnum;
162163 }
163164
164165 //==========================================================================
@@ -467,7 +468,7 @@
467468 //
468469 //==========================================================================
469470
470-void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int patcheslump, int firstdup, bool texture1)
471+void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int deflumpnum, int patcheslump, int firstdup, bool texture1)
471472 {
472473 FPatchLookup *patchlookup;
473474 int i, j;
@@ -596,7 +597,7 @@
596597 }
597598 if (j + 1 == firstdup)
598599 {
599- FTexture *tex = new FMultiPatchTexture ((const BYTE *)maptex + offset, patchlookup, numpatches, isStrife);
600+ FMultiPatchTexture *tex = new FMultiPatchTexture ((const BYTE *)maptex + offset, patchlookup, numpatches, isStrife, deflumpnum);
600601 if (i == 1 && texture1)
601602 {
602603 tex->UseType = FTexture::TEX_Null;
@@ -621,12 +622,12 @@
621622 if (lump1 >= 0)
622623 {
623624 FMemLump texdir = Wads.ReadLump (lump1);
624- AddTexturesLump (texdir.GetMem(), Wads.LumpLength (lump1), patcheslump, firstdup, true);
625+ AddTexturesLump (texdir.GetMem(), Wads.LumpLength (lump1), lump1, patcheslump, firstdup, true);
625626 }
626627 if (lump2 >= 0)
627628 {
628629 FMemLump texdir = Wads.ReadLump (lump2);
629- AddTexturesLump (texdir.GetMem(), Wads.LumpLength (lump2), patcheslump, firstdup, false);
630+ AddTexturesLump (texdir.GetMem(), Wads.LumpLength (lump2), lump2, patcheslump, firstdup, false);
630631 }
631632 }
632633
diff -r 37ea3def188d -r fc27382e9d3e src/xlat/xlat_parser.y
--- a/src/xlat/xlat_parser.y Tue Mar 25 04:42:26 2008 +0000
+++ b/src/xlat/xlat_parser.y Tue Mar 25 09:43:50 2008 +0000
@@ -67,7 +67,7 @@
6767
6868 enum_list ::= . /* empty */
6969 enum_list ::= single_enum.
70-enum_list ::= single_enum COMMA enum_list.
70+enum_list ::= enum_list COMMA single_enum.
7171
7272 single_enum ::= SYM(A).
7373 {
@@ -76,7 +76,8 @@
7676
7777 single_enum ::= SYM(A) EQUALS exp(B).
7878 {
79- context->AddSym (A.sym, context->EnumVal = B);
79+ context->AddSym (A.sym, B);
80+ context->EnumVal = B+1;
8081 }
8182
8283 //==========================================================================
diff -r 37ea3def188d -r fc27382e9d3e wadsrc/xlat/defines.i
--- a/wadsrc/xlat/defines.i Tue Mar 25 04:42:26 2008 +0000
+++ b/wadsrc/xlat/defines.i Tue Mar 25 09:43:50 2008 +0000
@@ -141,11 +141,8 @@
141141 sDamage_Hellslime = 105,
142142 Damage_InstantDeath = 115,
143143 sDamage_SuperHellslime = 116,
144- Scroll_StrifeCurrent = 118
145-}
144+ Scroll_StrifeCurrent = 118,
146145
147-enum
148-{
149146 // Caverns of Darkness healing sector
150147 Sector_Heal = 196,
151148
diff -r 37ea3def188d -r fc27382e9d3e zdoom.vcproj
--- a/zdoom.vcproj Tue Mar 25 04:42:26 2008 +0000
+++ b/zdoom.vcproj Tue Mar 25 09:43:50 2008 +0000
@@ -3540,7 +3540,7 @@
35403540 Name="VCCustomBuildTool"
35413541 Description="Generating xlat_parser.c and xlat_parser.h..."
35423542 CommandLine="tools\lemon\lemon.exe &quot;$(InputPath)&quot;&#x0D;&#x0A;"
3543- Outputs="$(InputDir)xlat_parser.c:$(InputDir)xlat_parser.h"
3543+ Outputs="$(InputDir)xlat_parser.c;$(InputDir)xlat_parser.h"
35443544 />
35453545 </FileConfiguration>
35463546 </File>