Jump to content

[solved] Strife TEXTURE1/2 format?


Scet

Recommended Posts

I'm having problems loading the TEXTURE1 and TEXTURE2 lumps in my program and several WAD viewers also crash when trying to access them, although Doom Builder seems to work.

I've found numerous posts saying they're different from the Doom format, but with no real explanation. Does anyone know what their format is?

Share this post


Link to post

Strife removed a few unused fields from the data to shorten the lumps.

Here's the definitions from ZDoom's headers:

typedef struct
{
	SWORD	originx;
	SWORD	originy;
	SWORD	patch;
} strifemappatch_t;

//
// A wall texture is a list of patches which are to be combined in a
// predefined order.
//
typedef struct
{
	BYTE		name[8];
	DWORD		unused;	
	SWORD		width;
	SWORD		height;
	SWORD		patchcount;
	strifemappatch_t	patches[1];
} strifemaptexture_t;

Share this post


Link to post

"strifemappatch_t patches[1];" does this mean that patchcount is always 1?

Seems strange to allocate an array 1 element is size.

Share this post


Link to post
Scet said:

"strifemappatch_t patches[1];" does this mean that patchcount is always 1?

Seems strange to allocate an array 1 element is size.



No. That's just so that the C structures can use it as an array of variable length.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...