sirjuddington / SLADE

It's a Doom editor
https://slade.mancubus.net
GNU General Public License v2.0
700 stars 111 forks source link

Support PSX map format in viewer and map image generator #246

Open haleyjd opened 9 years ago

haleyjd commented 9 years ago

The PlayStation port's map format is pretty simple. It only differs from the PC and other console ports in two respects as far as IO goes: VERTEXES are 8 bytes, consisting of two little-endian 32-bit fixed_t x,y coords rather than the two shorts in vanilla. Then there's the SECTORS record:

int16_t floorheight;
int16_t ceilingheight;
char floorpic[8];
char ceilingpic[8];
byte lightlevel;
byte color; // this is an index into the LIGHTS lump.
int16_t special;
int16_t tag;
int16_t unknown; // it is possible this is two separate byte fields; best conjecture: related to reverb.

Now, how to tell if a map is PSX format from the directory layout? Very simple: if BLOCKMAP is followed by "LEAFS", and LEAFS is not followed by "LIGHTS", then it is a PSX format map (if LIGHTS and MACROS are present, it is a Doom 64 map instead, which while that would also be nice, is not part of this request).

Gaerzi commented 9 years ago

"Raw" Doom 64 maps would probably not be supported because it'd conflict with the existing support for Doom64 EX support.

PSX map support is certainly possible. Especially if, in a first time at least, it's limited to preview (which only use vertices, linedefs, and things).

Danfun64 commented 9 years ago

Why just the psx map format? What about the other pre xbox console versions of doom (Jaguar, 32x, GBA, Saturn and 3DO)?

haleyjd commented 9 years ago

Because none of those use a different map format.

Except Saturn, because it uses the same format as PSX.