c2ephp

tests/sprite.php

Go to the documentation of this file.
00001 <?php
00002 require_once(dirname(__FILE__).'/../support/FileReader.php');
00003 require_once(dirname(__FILE__).'/../sprites/S16File.php');
00004 require_once(dirname(__FILE__).'/../sprites/C16File.php');
00005 require_once(dirname(__FILE__).'/../sprites/SPRFile.php');
00006 
00007 $extension = substr(strtolower($argv[1]),-4);
00008 $file;
00009 switch($extension) {
00010   case '.s16':
00011     $file = new S16File(new FileReader($argv[1]));
00012     break;
00013   case '.c16':
00014     $file = new C16File(new FileReader($argv[1]));
00015     break;
00016   case '.spr':
00017     $file = new SPRFile(new FileReader($argv[1]));
00018     break;
00019 }
00020 print_r($file);
00021 ?>
 All Classes Files Functions Variables Enumerations