This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG), Euroboros (EB), and Down Under Doomers (DUD).
Révision | fc27382e9d3e6b41bdc8a8e02024cb448a418a39 (tree) |
---|---|
l'heure | 2008-03-25 18:43:50 |
Auteur | Christoph Oelckers <coelckers@zdoo...> |
Commiter | Christoph Oelckers |
- Fixed: ANIMATED allowed animations between different texture types.
- Added a debuganimated CCMD that can be used to output some information
- Fixed: The handling for enum values in Xlat was incorrect. The rule with
- Fixed: The definition of enums in the Xlat grammar was right-recursive
SVN r850 (trunk)
@@ -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 | + | |
1 | 6 | March 24, 2008 |
2 | 7 | - Removed xlat_parser.h from the repository. Lemon was always being run on |
3 | 8 | xlat_parser.y because both files had the same time stamp after an update, |
@@ -10,6 +15,11 @@ | ||
10 | 15 | - Restored the sound limiting. |
11 | 16 | |
12 | 17 | 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. | |
13 | 23 | - Added Thomas's submissions for decal assignment to puffs and NOINFIGHTING flag. |
14 | 24 | - Reverted changes of r715 in v_collection.cpp because they broke loading |
15 | 25 | of status bar face graphics belonging to skins. |
@@ -135,9 +135,14 @@ | ||
135 | 135 | // |
136 | 136 | //========================================================================== |
137 | 137 | |
138 | +CVAR(Bool, debuganimated, false, 0) | |
139 | + | |
138 | 140 | void R_InitPicAnims (void) |
139 | 141 | { |
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; | |
141 | 146 | |
142 | 147 | if (Wads.CheckNumForName ("ANIMATED") != -1) |
143 | 148 | { |
@@ -175,6 +180,35 @@ | ||
175 | 180 | Printf ("Animation %s in ANIMATED has only one frame", anim_p + 10); |
176 | 181 | continue; |
177 | 182 | } |
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 | + | |
178 | 212 | // [RH] Allow for backward animations as well as forward. |
179 | 213 | if (pic1 > pic2) |
180 | 214 | { |
@@ -82,7 +82,7 @@ | ||
82 | 82 | class FMultiPatchTexture : public FTexture |
83 | 83 | { |
84 | 84 | 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); | |
86 | 86 | ~FMultiPatchTexture (); |
87 | 87 | |
88 | 88 | const BYTE *GetColumn (unsigned int column, const Span **spans_out); |
@@ -92,10 +92,12 @@ | ||
92 | 92 | virtual void SetFrontSkyLayer (); |
93 | 93 | |
94 | 94 | int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y); |
95 | + int GetSourceLump() { return DefinitionLump; } | |
95 | 96 | |
96 | 97 | protected: |
97 | 98 | BYTE *Pixels; |
98 | 99 | Span **Spans; |
100 | + int DefinitionLump; | |
99 | 101 | |
100 | 102 | struct TexPart |
101 | 103 | { |
@@ -929,7 +929,7 @@ | ||
929 | 929 | void WriteTexture (FArchive &arc, int picnum); |
930 | 930 | int ReadTexture (FArchive &arc); |
931 | 931 | |
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); | |
933 | 933 | void AddTexturesLumps (int lump1, int lump2, int patcheslump); |
934 | 934 | void AddGroup(int wadnum, const char * startlump, const char * endlump, int ns, int usetype); |
935 | 935 | void AddPatches (int lumpnum); |
@@ -59,7 +59,7 @@ | ||
59 | 59 | // |
60 | 60 | //========================================================================== |
61 | 61 | |
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) | |
63 | 63 | : Pixels (0), Spans(0), Parts(0), bRedirect(false) |
64 | 64 | { |
65 | 65 | union |
@@ -159,6 +159,7 @@ | ||
159 | 159 | bRedirect = true; |
160 | 160 | } |
161 | 161 | } |
162 | + DefinitionLump = deflumpnum; | |
162 | 163 | } |
163 | 164 | |
164 | 165 | //========================================================================== |
@@ -467,7 +468,7 @@ | ||
467 | 468 | // |
468 | 469 | //========================================================================== |
469 | 470 | |
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) | |
471 | 472 | { |
472 | 473 | FPatchLookup *patchlookup; |
473 | 474 | int i, j; |
@@ -596,7 +597,7 @@ | ||
596 | 597 | } |
597 | 598 | if (j + 1 == firstdup) |
598 | 599 | { |
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); | |
600 | 601 | if (i == 1 && texture1) |
601 | 602 | { |
602 | 603 | tex->UseType = FTexture::TEX_Null; |
@@ -621,12 +622,12 @@ | ||
621 | 622 | if (lump1 >= 0) |
622 | 623 | { |
623 | 624 | 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); | |
625 | 626 | } |
626 | 627 | if (lump2 >= 0) |
627 | 628 | { |
628 | 629 | 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); | |
630 | 631 | } |
631 | 632 | } |
632 | 633 |
@@ -67,7 +67,7 @@ | ||
67 | 67 | |
68 | 68 | enum_list ::= . /* empty */ |
69 | 69 | enum_list ::= single_enum. |
70 | -enum_list ::= single_enum COMMA enum_list. | |
70 | +enum_list ::= enum_list COMMA single_enum. | |
71 | 71 | |
72 | 72 | single_enum ::= SYM(A). |
73 | 73 | { |
@@ -76,7 +76,8 @@ | ||
76 | 76 | |
77 | 77 | single_enum ::= SYM(A) EQUALS exp(B). |
78 | 78 | { |
79 | - context->AddSym (A.sym, context->EnumVal = B); | |
79 | + context->AddSym (A.sym, B); | |
80 | + context->EnumVal = B+1; | |
80 | 81 | } |
81 | 82 | |
82 | 83 | //========================================================================== |
@@ -141,11 +141,8 @@ | ||
141 | 141 | sDamage_Hellslime = 105, |
142 | 142 | Damage_InstantDeath = 115, |
143 | 143 | sDamage_SuperHellslime = 116, |
144 | - Scroll_StrifeCurrent = 118 | |
145 | -} | |
144 | + Scroll_StrifeCurrent = 118, | |
146 | 145 | |
147 | -enum | |
148 | -{ | |
149 | 146 | // Caverns of Darkness healing sector |
150 | 147 | Sector_Heal = 196, |
151 | 148 |
@@ -3540,7 +3540,7 @@ | ||
3540 | 3540 | Name="VCCustomBuildTool" |
3541 | 3541 | Description="Generating xlat_parser.c and xlat_parser.h..." |
3542 | 3542 | CommandLine="tools\lemon\lemon.exe "$(InputPath)"
" |
3543 | - Outputs="$(InputDir)xlat_parser.c:$(InputDir)xlat_parser.h" | |
3543 | + Outputs="$(InputDir)xlat_parser.c;$(InputDir)xlat_parser.h" | |
3544 | 3544 | /> |
3545 | 3545 | </FileConfiguration> |
3546 | 3546 | </File> |