... (default: wads/*.wad)\n"); exit(1); } foreach ($paths as $path) { $base = preg_replace('~\.0$~', '', $path); $wad = new App\Dm\WadFile($base); echo str_repeat('=', 72), "\n", basename($base), "\n"; if (!$wad->isWad()) { echo " not a WAD file\n"; continue; } $a = $wad->analyse(); printf(" %s, %.1f MB, %d lumps\n", $wad->type === 'IWAD' ? 'IWAD (a whole game)' : 'PWAD (a mod)', $wad->size() / 1048576, count($wad->lumps)); printf(" maps (%d, %s): %s\n", count($a['maps']), $a['commercial'] ? 'MAPxx format' : 'ExMy format', implode(' ', $a['maps']) ?: '-'); printf(" things: %d sprites: %d flats: %d own textures: %s songs: %d sounds: %d DEHACKED: %s\n", $a['things'], $a['sprites'], $a['flats'], $a['textures'] ? 'yes' : 'no', $a['music'], $a['sounds'], $a['dehacked'] ? 'yes' : 'no'); if ($wad->type === 'PWAD') { echo ' played over: ', $a['commercial'] ? 'Freedoom Phase 2 (MAPxx maps)' : 'Freedoom Phase 1 (ExMy maps)', "\n"; } if ($a['problems'] === []) { echo " support: everything this WAD uses is in the engine\n"; } else { echo " not supported:\n"; foreach ($a['problems'] as $p) { echo " - $p\n"; } } }