View Single Post
djazz djazz's Avatar

JCF Member

Joined: Feb 2009

Posts: 257

djazz is OFF DA CHARTdjazz is OFF DA CHARTdjazz is OFF DA CHART

May 31, 2009, 10:47 AM
djazz is offline
Reply With Quote
Wow, fantastic Stijn

I haven't tried it out yet, but I will!
Your code looks much better than mine too.

You maybe should add an example showing how to use?

GJ!


________
Edit:

I got some errors that's listed below:
PHP Code:
Notice:  Undefined index:  tiles in C:\wamp\www\Daniels_Server\content\jj2related\JJ2_formats\j2l\class.Tileset.php on line 265

Warning
:  imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in C:\wamp\www\Daniels_Server\content\jj2related\JJ2_formats\j2l\class.Tileset.php on line 265

Warning
:  imagecolorallocate(): supplied argument is not a valid Image resource in C:\wamp\www\Daniels_Server\content\jj2related\JJ2_formats\j2l\class.Tileset.php on line 266

Warning
:  imagefill(): supplied argument is not a valid Image resource in C:\wamp\www\Daniels_Server\content\jj2related\JJ2_formats\j2l\class.Tileset.php on line 266

Warning
:  imagecopy(): supplied argument is not a valid Image resource in C:\wamp\www\Daniels_Server\content\jj2related\JJ2_formats\j2l\class.Level.php on line 638 
On line 265: $iImag e = imagecreatetruecolor(320,(($this->aOffsets['tiles']/10)*32));

Do you know how to fix this? I have tried with multiple j2l files.

my code for the classes:
PHP Code:
<?php
require_once("class.Level.php");
$Level = new Level("test.j2l");
//header("Content-type: image/png");
imagepng($Level->getRealPreview());
?>
__________________
WebJCS 2 (new and in progress)
WebJCS 1 (old but complete)
SGIP Simple Games in Progress list
Level Packer v2 - With a GUI!
PHP Tileset Compiler

Last edited by djazz; May 31, 2009 at 11:08 AM. Reason: New..