hello
what is the file extension for data.001 i use winrar but it give me error
any one know to edit the game models
what is the file extension for data.001 i use winrar but it give me error
any one know to edit the game models
where the hell do you think you could easily extract the data files with winrar?Quote:
hello
what is the file extension for data.001 i use winrar but it give me error
any one know to edit the game models
<?
//
// written by: Animecreature
//
$filename = "";
$position = 0;
$width = 640;
$height = 480;
if (isset($_POST['Update']))
{
$filename = $_POST['Filename'];
$position = $_POST['Position'];
$width = $_POST['Width'];
$height = $_POST['Height'];
}
if (isset($_POST['Back']))
{
$filename = $_POST['Filename'];
$position = $_POST['Position'] - (($_POST['Width'] * $_POST['Height']) * 4);
$width = $_POST['Width'];
$height = $_POST['Height'];
}
if (isset($_POST['Next']))
{
$filename = $_POST['Filename'];
$position = $_POST['Position'] + (($_POST['Width'] * $_POST['Height']) * 4);
$width = $_POST['Width'];
$height = $_POST['Height'];
}
$command = "image.php?f=$filename&p=$position&w=$width&h=$height";
?>
<form action="control.php" method="POST">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="left" valign="top">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="left" valign="top"><b>Filename:</b></td>
<td align="left" valign="top"><input type="text" name="Filename" value="<?=$filename?>" /></td>
</tr>
<tr>
<td align="left" valign="top"><b>Position:</b></td>
<td align="left" valign="top"><input type="text" name="Position" value="<?=$position?>" /></td>
</tr>
<tr>
<td align="left" valign="top"><b>Width:</b></td>
<td align="left" valign="top"><input type="text" name="Width" value="<?=$width?>" /></td>
</tr>
<tr>
<td align="left" valign="top"><b>Height:</b></td>
<td align="left" valign="top"><input type="text" name="Height" value="<?=$height?>" /></td>
</tr>
<tr>
<td align="left" valign="top"> </td>
<td align="left" valign="top"><input type="submit" name="Update" value="Update" /></td>
</tr>
<tr>
<td align="left" valign="top"> </td>
<td align="left" valign="top"><input type="submit" name="Back" value="Back" /></td>
</tr>
<tr>
<td align="left" valign="top"> </td>
<td align="left" valign="top"><input type="submit" name="Next" value="Next" /></td>
</tr>
</table>
</td>
<td align="left" valign="top">
<img src="<?=$command?>" border="0" alt="" title="">
</td>
</tr>
</table>
</form>
<?
//
// written by: Animecreature
//
$filename = (isset($_GET['f']) ? $_GET['f'] : "");
$position = (isset($_GET['p']) ? $_GET['p'] : 0);
$width = (isset($_GET['w']) ? $_GET['w'] : 640);
$height = (isset($_GET['h']) ? $_GET['h'] : 480);
header('Content-type: image/png');
$image = imagecreatetruecolor($width, $height);
$color = imagecolorallocate($image, 0, 0, 0);
imagefill($image, 0, 0, $color);
imagecolordeallocate($image, $color);
if (file_exists($filename))
{
$handle = fopen($filename, "r");
if ($handle)
{
fseek($handle, $position, SEEK_SET);
for($y = 0; $y < $height; $y++)
{
for($x = 0; $x < $width; $x++)
{
$red = ord(fread($handle, 1));
$green = ord(fread($handle, 1));
$blue = ord(fread($handle, 1));
$alpha = ord(fread($handle, 1));
$color = imagecolorallocate($image, $red, $green, $blue);
imagesetpixel($image, $x, $y, $color);
imagecolordeallocate($image, $color);
}
}
fclose($handle);
}
}
imagepng($image);
imagedestroy($image);
?>