

Very nice explanation, this is exactly what I was after.

ZDoom already does this, I believe, by using the Hexen map format. That is to say, a larger number of bytes would be needed to store the number. To increase the limit further, you would have to change the wad format to be able to store a number larger than 65535. To handle the "no sidedef" case, you check for 65535, which is what -1 looks like if you interpret it as an unsigned number. It is easy to double the largest sidedef number by interpreting the signed quantity as an unsigned quantity, therefore you get sidedefs numbered 0 to 65535. Sidedef numbers are stored in the linedefs lump in your wad file as signed 2-byte numbers, that means you can have sidedefs numbered -32768 to 32767, with -1 meaning "no sidedef" Yes, exactly, there is some limit in a table in the file structure.
Prboom hexen download code#
And I'm not much of a programmer (albeit not dumb either) so go easy on the code lingo. Why does everyone double the limit as opposed to making it infinite, or something absurd like 512k? I understand that there might be a limit in some table in the file structure or whatever, but I'd like to have it explained to me.
