Quote: | |
File: lvl2img.php
Creator: CypherJF (ssCypherJF@yahoo.com) URL: http://cypherjf.sscentral.com Version: 1.1 Source: Released. * This PHP (www.php.net) script will take a Subspace LVL mapfile and create a PNG, or JPG output. * This source-code was originally designed to be closed-source and therefore includes a Copyright notice on all image outputs. If you must remove it, so be it - but keep the header of this document in-tact. * This script was -never- meant to be the most efficient PHP script known to man, but it completed the task I needed to accomplish. See the usage notes below, Enjoy.
Final Note: If you see a message that states 'Invalid Map Data. Checksum != 0.' This means that the map, or LVL, file that you tried to use appears to be corrupted and can not be deconverted. Changes Version 1.1 - DEFAULT_MAP arguement logic fixed by MMaverick. - Changed a lot of " to '. - Verified script w/ E_ALL. . Only 1 issue left "Warning: imagecolorsforindex(): Color index # out of range in <file>" - Added comments. Version 1.0 - Initial. |
Quote: |
Missing Default Map: omega1.lvl |
Code: Show/Hide $map_name = $_GET["file"].".lvl";
if (!file_exists(DEFAULT_MAPNAME)) die("Missing Default Map: <i>".DEFAULT_MAPNAME."</i>"); if (!file_exists($map_name)) $map_name = DEFAULT_MAPNAME; |
Code: Show/Hide $map_name = $_GET["file"].".lvl";
if (!file_exists($map_name)) { $map_name = DEFAULT_MAPNAME; if (!file_exists(DEFAULT_MAPNAME)) die("Missing Default Map: <i>".DEFAULT_MAPNAME."</i>"); } |