c2ephp

agents/PRAY/PHOTBlock.php

Go to the documentation of this file.
00001 <?php
00002 require_once(dirname(__FILE__).'/PrayBlock.php');
00003 require_once(dirname(__FILE__).'/../../sprites/S16File.php');
00004 require_once(dirname(__FILE__).'/../../support/StringReader.php');
00005 
00007 
00013 class PHOTBlock extends PrayBlock {
00014 
00016 
00024     public function PHOTBlock($prayfile,$name,$content,$flags) {
00025         parent::PrayBlock($prayfile,$name,$content,$flags,PRAY_BLOCK_PHOT);
00026     }
00027 
00029 
00030     protected function CompileBlockData() {
00031         return $this->GetData();
00032     }
00033     protected function DecompileBlockData() {
00034         throw new Exception('It\'s impossible to decompile a PHOT.');
00035     }
00036 
00038 
00040 
00043     public function GetS16File() {
00044         return new S16File(new StringReader($this->GetData()));
00045     }
00047 
00050     public function ToPNG() {
00051         return $this->GetS16File()->ToPNG(0);
00052     }
00053 }
00054 ?>
 All Classes Files Functions Variables Enumerations