Skip to content

Instantly share code, notes, and snippets.

@Xymph
Xymph / textmapExtra.php
Last active February 16, 2022 22:22
Process an extracted TEXTMAP lump (from a Doom UDMF map) with regular expressions and some code to collect monster and equipment counts for single-player and cooperative modes, and lists those where the counts differ, for DoomWiki.org
#!/usr/bin/php
<?php
// TEXTMAP extra monsters & equipment script for DoomWiki.org, by Frans P. de Vries (Xymph)
$usage = "Usage: {$argv[0]} TEXTMAP-file\n";
// check input parameter
if ($argc != 2) {
echo $usage;
exit(1);
}
@Xymph
Xymph / textmapSector.php
Last active February 16, 2022 22:22
Searches an extracted TEXTMAP lump (from a Doom UDMF map) for the vertices belonging to a specified sector number and computes its approximate center position, allowing to hover to that coordinate in the layout in an editor supporting UDMF (which DeePsea doesn't)
#!/usr/bin/php
<?php
// TEXTMAP sector position script for DoomWiki.org, by Frans P. de Vries (Xymph)
$usage = "Usage: {$argv[0]} [-v] TEXTMAP-file sector-id\n";
// check input parameters
$verbose = false;
if (isset($argv[1]) && $argv[1] == '-v') {
$verbose = true;
unset($argv[1]);
@Xymph
Xymph / textmapStats.php
Last active May 22, 2021 14:39
Process an extracted TEXTMAP lump (from a Doom UDMF map) with regular expressions and a little code to generate statistics in Template:Mapdata format, along with formatted lists of secret sector numbers and deathmatch spawn points (if any), for DoomWiki.org
#!/usr/bin/php
<?php
// TEXTMAP stats script for DoomWiki.org, by Frans P. de Vries (Xymph)
$usage = "Usage: {$argv[0]} TEXTMAP-file\n";
// check input parameter
if ($argc != 2) {
echo $usage;
exit(1);