-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sprite number replace with .tga files in pak2.pak #9
Comments
Sorry, I missed this request. I will try to get back to you soon. |
I think that the original game executables for the demo, registered version, Spear of Destiny, etc. all had their own identifiers for textures and sprites (and possibly other resources), so that 50 might be a different thing in the demo vs. SoD. I assume that these game executables were all compiled from the same source but with #ifdefs, so that at compile time it would select which texture/sprite/etc. number was used for what purpose. NewWolf[Lives] has just one executable that can be used for all of these different games, so it has its own set of numbers for these resources which covers all of those games. I think it then maps those numbers to the original numbers if it's reading the original game resources, but probably uses the NewWolf numbering if it's reading from a .pak file. I guess that for sprites, sprt_def.h contains an enumeration of all of the sprite numbers. If you're not familiar with C, the enumeration contains a comma-separated list of member names, where the first member will be assigned number 0, the second 1, etc., so given this snippet of that file: enum
{
SPR_DEMO,
SPR_DEATHCAM,
//
// static sprites
//
SPR_STAT_0,SPR_STAT_1,SPR_STAT_2,SPR_STAT_3, SPR_STAT_0 = 2. Further down the file, we see:
It looks like this might be taken from the original iD source code, but the #ifdef is commented out so that those identifiers are always included in the enumeration when building NewWolf[Lives] rather than only being included when building a SoD executable. Note that there are 4 SoD-specific sprites before "GRD" which I assume is the guard, and I'm pretty sure SPR_GRD_S_1 = 54, which matches what you found above. version.c seems to have the tables that map from those enumeration members to the sprite numbers found in the original game files. "spr_wolf" seems to be the mapping table for sprites for Wolfenstein 3-D, as opposed to the SoD table after it:
My reading of this is that entries 0-49 map exactly to the original game files for Wolf3D, then there are 4 entries that don't map at all because they are SoD sprites, and then 54 (SPR_GRD_S_1) maps to number 50 in the original game files. I haven't looked yet to see if there is any documentation you can use to work out which numbers to use in the file names or if you have to look at this code (which isn't all that easy to interpret, who wants to count those numbers?). Let me know if you're still interested in modding NewWolf[Lives] and I can try and generate a more readable table. |
When I was working on my mod of Wolfenstein3d. I want to change the sprite number 50 (or guard 1 to your sight) with sprt0050.tga in the Basewgl\pak2.pak. So it's quite logical that spritenr 50 I will replace with sprt0050.tga. But it doesn't work. When you want to replace spritenr 50 with a .tga file you 'lll yave to rename it sprt0054.tga. That's quite odd. Is this a bug?
The text was updated successfully, but these errors were encountered: