@@ -1,24 +1,24 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | function DeArchive($data) { |
| 3 | - if(is_string($data)) { |
|
| 4 | - if(substr($data,0,55) == "Creatures Evolution Engine - Archived information file.") { |
|
| 5 | - $data = substr($data,strpos($data,chr(0x1A).chr(0x04))+2); |
|
| 6 | - $data = gzuncompress($data); |
|
| 7 | - return $data; |
|
| 8 | - } |
|
| 9 | - die('Couldn\'t dearchive -- Probably invalid file'); |
|
| 10 | - return false; |
|
| 11 | - } else if(is_resource($data)) { |
|
| 12 | - return false; //coming soon |
|
| 13 | - } |
|
| 3 | + if(is_string($data)) { |
|
| 4 | + if(substr($data,0,55) == "Creatures Evolution Engine - Archived information file.") { |
|
| 5 | + $data = substr($data,strpos($data,chr(0x1A).chr(0x04))+2); |
|
| 6 | + $data = gzuncompress($data); |
|
| 7 | + return $data; |
|
| 8 | + } |
|
| 9 | + die('Couldn\'t dearchive -- Probably invalid file'); |
|
| 10 | + return false; |
|
| 11 | + } else if(is_resource($data)) { |
|
| 12 | + return false; //coming soon |
|
| 13 | + } |
|
| 14 | 14 | } |
| 15 | 15 | function Archive($data,$filehandle=null) { |
| 16 | - if(is_resource($filehandle)) { |
|
| 17 | - return false; |
|
| 18 | - } |
|
| 19 | - $data = gzcompress($data); |
|
| 20 | - $data = "Creatures Evolution Engine - Archived information file. zLib 1.13 compressed.".chr(0x1A).chr(0x04).$data; |
|
| 21 | - return $data; |
|
| 16 | + if(is_resource($filehandle)) { |
|
| 17 | + return false; |
|
| 18 | + } |
|
| 19 | + $data = gzcompress($data); |
|
| 20 | + $data = "Creatures Evolution Engine - Archived information file. zLib 1.13 compressed.".chr(0x1A).chr(0x04).$data; |
|
| 21 | + return $data; |
|
| 22 | 22 | |
| 23 | 23 | } |
| 24 | 24 | ?> |
| 25 | 25 | \ No newline at end of file |
@@ -4,16 +4,16 @@ |
||
| 4 | 4 | class PRAYFileTest extends c2ephpAbstractTestCase { |
| 5 | 5 | |
| 6 | 6 | /** |
| 7 | - * @dataProvider createAgentFiles |
|
| 8 | - */ |
|
| 7 | + * @dataProvider createAgentFiles |
|
| 8 | + */ |
|
| 9 | 9 | public function testCreatePRAYFile(PRAYFile $prayfile) { |
| 10 | 10 | $this->assertInstanceOf('PRAYFile',$prayfile); |
| 11 | 11 | $this->assertNotNull($prayfile); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | - * @dataProvider createAgentFiles |
|
| 16 | - */ |
|
| 15 | + * @dataProvider createAgentFiles |
|
| 16 | + */ |
|
| 17 | 17 | public function testNumberOfBlocks(PRAYFile $prayfile,$fixtureInfo) { |
| 18 | 18 | $this->assertNotNull($prayfile); |
| 19 | 19 | $this->assertEquals($fixtureInfo['block count'],sizeof($prayfile->GetBlocks())); |
@@ -15,31 +15,31 @@ |
||
| 15 | 15 | * Reads in the IReader and creates SPRFrames as required. |
| 16 | 16 | * @param $reader An IReader to read from. |
| 17 | 17 | */ |
| 18 | - public function SPRFile(IReader $reader) { |
|
| 19 | - parent::SpriteFile('SPR'); |
|
| 20 | - $frameCount = $reader->ReadInt(2); |
|
| 18 | + public function SPRFile(IReader $reader) { |
|
| 19 | + parent::SpriteFile('SPR'); |
|
| 20 | + $frameCount = $reader->ReadInt(2); |
|
| 21 | 21 | |
| 22 | - for($i=0;$i<$frameCount;$i++) { |
|
| 23 | - $offset = $reader->ReadInt(4); |
|
| 24 | - $width = $reader->ReadInt(2); |
|
| 25 | - $height = $reader->ReadInt(2); |
|
| 26 | - $this->AddFrame(new SPRFrame($reader,$width,$height,$offset)); |
|
| 27 | - } |
|
| 28 | - } |
|
| 22 | + for($i=0;$i<$frameCount;$i++) { |
|
| 23 | + $offset = $reader->ReadInt(4); |
|
| 24 | + $width = $reader->ReadInt(2); |
|
| 25 | + $height = $reader->ReadInt(2); |
|
| 26 | + $this->AddFrame(new SPRFrame($reader,$width,$height,$offset)); |
|
| 27 | + } |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | 30 | /// @brief Compiles the SPR file into a binary string |
| 31 | - public function Compile() { |
|
| 32 | - $data = pack('v',$this->GetFrameCount()); |
|
| 33 | - $offset = 2+(8*$this->GetFrameCount()); |
|
| 34 | - foreach($this->GetFrames() as $frame) { |
|
| 35 | - $data .= pack('V',$offset); |
|
| 36 | - $data .= pack('vv',$frame->GetWidth(),$frame->GetHeight()); |
|
| 37 | - $offset += $frame->GetWidth()*$frame->GetHeight(); |
|
| 38 | - } |
|
| 39 | - foreach($this->GetFrames() as $frame) { |
|
| 40 | - $data .= $frame->Encode(); |
|
| 41 | - } |
|
| 42 | - return $data; |
|
| 43 | - } |
|
| 31 | + public function Compile() { |
|
| 32 | + $data = pack('v',$this->GetFrameCount()); |
|
| 33 | + $offset = 2+(8*$this->GetFrameCount()); |
|
| 34 | + foreach($this->GetFrames() as $frame) { |
|
| 35 | + $data .= pack('V',$offset); |
|
| 36 | + $data .= pack('vv',$frame->GetWidth(),$frame->GetHeight()); |
|
| 37 | + $offset += $frame->GetWidth()*$frame->GetHeight(); |
|
| 38 | + } |
|
| 39 | + foreach($this->GetFrames() as $frame) { |
|
| 40 | + $data .= $frame->Encode(); |
|
| 41 | + } |
|
| 42 | + return $data; |
|
| 43 | + } |
|
| 44 | 44 | } |
| 45 | 45 | ?> |
@@ -3,110 +3,110 @@ |
||
| 3 | 3 | /// @brief Superclass for all SpriteFile types |
| 4 | 4 | abstract class SpriteFile { |
| 5 | 5 | |
| 6 | - /// @cond INTERNAL_DOCS |
|
| 6 | + /// @cond INTERNAL_DOCS |
|
| 7 | 7 | |
| 8 | - private $frames = array(); |
|
| 9 | - private $spritefiletype; |
|
| 10 | - /// @endcond |
|
| 8 | + private $frames = array(); |
|
| 9 | + private $spritefiletype; |
|
| 10 | + /// @endcond |
|
| 11 | 11 | |
| 12 | - /// @cond INTERNAL_DOCS |
|
| 12 | + /// @cond INTERNAL_DOCS |
|
| 13 | 13 | |
| 14 | - public function SpriteFile($filetype) { |
|
| 14 | + public function SpriteFile($filetype) { |
|
| 15 | 15 | $this->spritefiletype = $filetype; |
| 16 | - } |
|
| 17 | - /// @endcond |
|
| 16 | + } |
|
| 17 | + /// @endcond |
|
| 18 | 18 | |
| 19 | - /// @brief Gets a SpriteFrame from the SpriteFile. |
|
| 20 | - /** |
|
| 21 | - * @param $frame The 0-based index of the frame to get. |
|
| 22 | - * @return A SpriteFrame |
|
| 23 | - */ |
|
| 24 | - public function GetFrame($frame) { |
|
| 25 | - return $this->frames[$frame]; |
|
| 26 | - } |
|
| 27 | - /// @brief Gets the entire frame array. |
|
| 28 | - /** |
|
| 29 | - * @return An array of SpriteFrames |
|
| 30 | - */ |
|
| 31 | - public function GetFrames() { |
|
| 32 | - return $this->frames; |
|
| 33 | - } |
|
| 19 | + /// @brief Gets a SpriteFrame from the SpriteFile. |
|
| 20 | + /** |
|
| 21 | + * @param $frame The 0-based index of the frame to get. |
|
| 22 | + * @return A SpriteFrame |
|
| 23 | + */ |
|
| 24 | + public function GetFrame($frame) { |
|
| 25 | + return $this->frames[$frame]; |
|
| 26 | + } |
|
| 27 | + /// @brief Gets the entire frame array. |
|
| 28 | + /** |
|
| 29 | + * @return An array of SpriteFrames |
|
| 30 | + */ |
|
| 31 | + public function GetFrames() { |
|
| 32 | + return $this->frames; |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /// @brief Compiles the SpriteFile into a binary string |
|
| 36 | - /** |
|
| 37 | - * @return A binary string containing the SpriteFile's data and frames. |
|
| 38 | - */ |
|
| 39 | - public abstract function Compile(); |
|
| 35 | + /// @brief Compiles the SpriteFile into a binary string |
|
| 36 | + /** |
|
| 37 | + * @return A binary string containing the SpriteFile's data and frames. |
|
| 38 | + */ |
|
| 39 | + public abstract function Compile(); |
|
| 40 | 40 | |
| 41 | - /// @brief Adds a SpriteFrame to the SpriteFile |
|
| 42 | - /** |
|
| 43 | - * If necessary, this function converts the SpriteFrame to the |
|
| 44 | - * correct format. |
|
| 45 | - * At the moment, this can only add a SpriteFrame to the end of the |
|
| 46 | - * SpriteFile. TODO: I aim to fix this by the CCSF 2011. |
|
| 47 | - * @internal |
|
| 48 | - * This process uses some magic which require all types of |
|
| 49 | - * SpriteFile and SpriteFrame to use 3-character identifiers. |
|
| 50 | - * This means that if you want to make your own sprite formats |
|
| 51 | - * you'll need to override this function and provide all our magic |
|
| 52 | - * plus your own. |
|
| 53 | - * @endinternal |
|
| 54 | - * @param $frame A SpriteFrame |
|
| 55 | - * @param $position Where to put the frame. Currently un-used. |
|
| 56 | - */ |
|
| 57 | - public function AddFrame(SpriteFrame $frame, $position=false) { |
|
| 58 | - /* |
|
| 41 | + /// @brief Adds a SpriteFrame to the SpriteFile |
|
| 42 | + /** |
|
| 43 | + * If necessary, this function converts the SpriteFrame to the |
|
| 44 | + * correct format. |
|
| 45 | + * At the moment, this can only add a SpriteFrame to the end of the |
|
| 46 | + * SpriteFile. TODO: I aim to fix this by the CCSF 2011. |
|
| 47 | + * @internal |
|
| 48 | + * This process uses some magic which require all types of |
|
| 49 | + * SpriteFile and SpriteFrame to use 3-character identifiers. |
|
| 50 | + * This means that if you want to make your own sprite formats |
|
| 51 | + * you'll need to override this function and provide all our magic |
|
| 52 | + * plus your own. |
|
| 53 | + * @endinternal |
|
| 54 | + * @param $frame A SpriteFrame |
|
| 55 | + * @param $position Where to put the frame. Currently un-used. |
|
| 56 | + */ |
|
| 57 | + public function AddFrame(SpriteFrame $frame, $position=false) { |
|
| 58 | + /* |
|
| 59 | 59 | if($position === false) { |
| 60 | 60 | $position = sizeof($this->frames); |
| 61 | 61 | } else if($position < 0) { |
| 62 | 62 | $position = sizeof($this->frames) - $position; |
| 63 | 63 | } |
| 64 | 64 | */ |
| 65 | - if($this->spritefiletype == substr(get_class($frame),0,3)) { |
|
| 66 | - //$this->frames[$position] = $frame; |
|
| 67 | - $this->frames[] = $frame; |
|
| 68 | - } else { |
|
| 69 | - //$this->frames[$position] = $frame->ToSpriteFrame($this->spritefiletype); |
|
| 70 | - $this->frames[] = $frame->ToSpriteFrame($this->spritefiletype); |
|
| 71 | - } |
|
| 72 | - } |
|
| 73 | - /// @brief Replaces a frame in the SpriteFile |
|
| 74 | - /** |
|
| 75 | - * Replaces the frame in the given position |
|
| 76 | - * Uses the same magic as AddFrame |
|
| 77 | - * @param $frame A SpriteFrame of any type. |
|
| 78 | - * @param $position Which frame to replace. If negative, counts |
|
| 79 | - * backwards from the end of the frames array. |
|
| 80 | - */ |
|
| 81 | - public function ReplaceFrame(SpriteFrame $frame, $position) { |
|
| 82 | - if($position < 0) { |
|
| 83 | - $position = sizeof($this->frames) - $position; |
|
| 84 | - } |
|
| 85 | - $this->frames[$position] = $frame->ToSpriteFrame($this->spritefiletype); |
|
| 86 | - } |
|
| 87 | - /// @brief Gets the number of frames currently stored in this SpriteFile. |
|
| 88 | - /** |
|
| 89 | - * @return The number of frames |
|
| 90 | - */ |
|
| 91 | - public function GetFrameCount() { |
|
| 92 | - return sizeof($this->frames); |
|
| 93 | - } |
|
| 94 | - /// @brief Deletes the frame in the given position. |
|
| 95 | - /** |
|
| 96 | - * @param $frame The 0-based index of the frame to delete. |
|
| 97 | - */ |
|
| 98 | - public function DeleteFrame($frame) { |
|
| 99 | - unset($this->frames[$frame]); |
|
| 100 | - } |
|
| 101 | - /// @brief Converts the given frame to PNG. <strong>Deprecated.</strong> |
|
| 102 | - /** |
|
| 103 | - * May be removed in a future release. |
|
| 104 | - * Use GetFrame($frame)->ToPNG() instead. |
|
| 105 | - * @param $frame The 0-based index of the frame to delete. |
|
| 106 | - * @return A binary string containing a PNG. |
|
| 107 | - */ |
|
| 108 | - public function ToPNG($frame) { |
|
| 109 | - return $this->frames[$frame]->ToPNG(); |
|
| 110 | - } |
|
| 65 | + if($this->spritefiletype == substr(get_class($frame),0,3)) { |
|
| 66 | + //$this->frames[$position] = $frame; |
|
| 67 | + $this->frames[] = $frame; |
|
| 68 | + } else { |
|
| 69 | + //$this->frames[$position] = $frame->ToSpriteFrame($this->spritefiletype); |
|
| 70 | + $this->frames[] = $frame->ToSpriteFrame($this->spritefiletype); |
|
| 71 | + } |
|
| 72 | + } |
|
| 73 | + /// @brief Replaces a frame in the SpriteFile |
|
| 74 | + /** |
|
| 75 | + * Replaces the frame in the given position |
|
| 76 | + * Uses the same magic as AddFrame |
|
| 77 | + * @param $frame A SpriteFrame of any type. |
|
| 78 | + * @param $position Which frame to replace. If negative, counts |
|
| 79 | + * backwards from the end of the frames array. |
|
| 80 | + */ |
|
| 81 | + public function ReplaceFrame(SpriteFrame $frame, $position) { |
|
| 82 | + if($position < 0) { |
|
| 83 | + $position = sizeof($this->frames) - $position; |
|
| 84 | + } |
|
| 85 | + $this->frames[$position] = $frame->ToSpriteFrame($this->spritefiletype); |
|
| 86 | + } |
|
| 87 | + /// @brief Gets the number of frames currently stored in this SpriteFile. |
|
| 88 | + /** |
|
| 89 | + * @return The number of frames |
|
| 90 | + */ |
|
| 91 | + public function GetFrameCount() { |
|
| 92 | + return sizeof($this->frames); |
|
| 93 | + } |
|
| 94 | + /// @brief Deletes the frame in the given position. |
|
| 95 | + /** |
|
| 96 | + * @param $frame The 0-based index of the frame to delete. |
|
| 97 | + */ |
|
| 98 | + public function DeleteFrame($frame) { |
|
| 99 | + unset($this->frames[$frame]); |
|
| 100 | + } |
|
| 101 | + /// @brief Converts the given frame to PNG. <strong>Deprecated.</strong> |
|
| 102 | + /** |
|
| 103 | + * May be removed in a future release. |
|
| 104 | + * Use GetFrame($frame)->ToPNG() instead. |
|
| 105 | + * @param $frame The 0-based index of the frame to delete. |
|
| 106 | + * @return A binary string containing a PNG. |
|
| 107 | + */ |
|
| 108 | + public function ToPNG($frame) { |
|
| 109 | + return $this->frames[$frame]->ToPNG(); |
|
| 110 | + } |
|
| 111 | 111 | } |
| 112 | 112 | ?> |
@@ -443,9 +443,9 @@ |
||
| 443 | 443 | case 'untl': |
| 444 | 444 | case 'next': |
| 445 | 445 | case 'ever': |
| 446 | - case 'repe'; |
|
| 447 | - $this->currentIndent--; |
|
| 448 | - break; |
|
| 446 | + case 'repe'; |
|
| 447 | + $this->currentIndent--; |
|
| 448 | + break; |
|
| 449 | 449 | } |
| 450 | 450 | } |
| 451 | 451 | |
@@ -5,93 +5,93 @@ |
||
| 5 | 5 | /// @brief DS CAOS dictionary of tokens that can act like commands or variables |
| 6 | 6 | class DSCAOSCommandVariables { |
| 7 | 7 | /// @brief Returns an array of tokens. |
| 8 | - public static function GetTokens() { |
|
| 9 | - return array( |
|
| 10 | - 'attr', |
|
| 11 | - 'base', |
|
| 12 | - 'bhvr', |
|
| 13 | - 'clik', //I have no experience using this, but I think this is right. |
|
| 14 | - 'gall', |
|
| 15 | - 'hand', |
|
| 16 | - 'mira', |
|
| 17 | - 'paus', |
|
| 18 | - 'plne', |
|
| 19 | - 'pose', |
|
| 20 | - 'rnge', |
|
| 21 | - 'targ', |
|
| 22 | - 'tick', |
|
| 8 | + public static function GetTokens() { |
|
| 9 | + return array( |
|
| 10 | + 'attr', |
|
| 11 | + 'base', |
|
| 12 | + 'bhvr', |
|
| 13 | + 'clik', //I have no experience using this, but I think this is right. |
|
| 14 | + 'gall', |
|
| 15 | + 'hand', |
|
| 16 | + 'mira', |
|
| 17 | + 'paus', |
|
| 18 | + 'plne', |
|
| 19 | + 'pose', |
|
| 20 | + 'rnge', |
|
| 21 | + 'targ', |
|
| 22 | + 'tick', |
|
| 23 | 23 | |
| 24 | - //camera |
|
| 25 | - 'meta', |
|
| 26 | - 'trck', |
|
| 27 | - 'wdow', |
|
| 24 | + //camera |
|
| 25 | + 'meta', |
|
| 26 | + 'trck', |
|
| 27 | + 'wdow', |
|
| 28 | 28 | |
| 29 | - //compound |
|
| 30 | - 'page', |
|
| 31 | - 'ptxt', |
|
| 29 | + //compound |
|
| 30 | + 'page', |
|
| 31 | + 'ptxt', |
|
| 32 | 32 | |
| 33 | - //creatures |
|
| 34 | - 'aslp', |
|
| 35 | - 'dead', |
|
| 36 | - 'dirn', |
|
| 37 | - 'drea', |
|
| 38 | - 'face', |
|
| 39 | - 'ins#', |
|
| 40 | - 'mind', |
|
| 41 | - 'motr', |
|
| 42 | - 'norn', |
|
| 43 | - 'uncs', |
|
| 44 | - 'zomb', |
|
| 33 | + //creatures |
|
| 34 | + 'aslp', |
|
| 35 | + 'dead', |
|
| 36 | + 'dirn', |
|
| 37 | + 'drea', |
|
| 38 | + 'face', |
|
| 39 | + 'ins#', |
|
| 40 | + 'mind', |
|
| 41 | + 'motr', |
|
| 42 | + 'norn', |
|
| 43 | + 'uncs', |
|
| 44 | + 'zomb', |
|
| 45 | 45 | |
| 46 | - //files |
|
| 46 | + //files |
|
| 47 | 47 | |
| 48 | - //input |
|
| 49 | - 'pure', |
|
| 48 | + //input |
|
| 49 | + 'pure', |
|
| 50 | 50 | |
| 51 | - //map |
|
| 52 | - 'perm', |
|
| 51 | + //map |
|
| 52 | + 'perm', |
|
| 53 | 53 | |
| 54 | - //motion |
|
| 55 | - 'accg', |
|
| 56 | - 'admp', |
|
| 57 | - 'aero', |
|
| 58 | - 'avel', |
|
| 59 | - 'elas', |
|
| 60 | - 'fdmp', |
|
| 61 | - 'fric', |
|
| 62 | - 'fvel', |
|
| 63 | - 'sdmp', |
|
| 64 | - 'spin', |
|
| 65 | - 'svel', |
|
| 66 | - 'varc', |
|
| 54 | + //motion |
|
| 55 | + 'accg', |
|
| 56 | + 'admp', |
|
| 57 | + 'aero', |
|
| 58 | + 'avel', |
|
| 59 | + 'elas', |
|
| 60 | + 'fdmp', |
|
| 61 | + 'fric', |
|
| 62 | + 'fvel', |
|
| 63 | + 'sdmp', |
|
| 64 | + 'spin', |
|
| 65 | + 'svel', |
|
| 66 | + 'varc', |
|
| 67 | 67 | |
| 68 | - //ports |
|
| 68 | + //ports |
|
| 69 | 69 | |
| 70 | - //resources |
|
| 70 | + //resources |
|
| 71 | 71 | |
| 72 | - //caos |
|
| 72 | + //caos |
|
| 73 | 73 | |
| 74 | - //sounds |
|
| 75 | - 'vois', |
|
| 74 | + //sounds |
|
| 75 | + 'vois', |
|
| 76 | 76 | |
| 77 | - //time |
|
| 78 | - 'buzz', |
|
| 79 | - 'wpau', |
|
| 80 | - 'targ', |
|
| 77 | + //time |
|
| 78 | + 'buzz', |
|
| 79 | + 'wpau', |
|
| 80 | + 'targ', |
|
| 81 | 81 | |
| 82 | - //vehicles |
|
| 83 | - 'cabp', |
|
| 84 | - 'cabv', |
|
| 82 | + //vehicles |
|
| 83 | + 'cabp', |
|
| 84 | + 'cabv', |
|
| 85 | 85 | |
| 86 | - //world |
|
| 87 | - 'delw', |
|
| 88 | - 'load', |
|
| 86 | + //world |
|
| 87 | + 'delw', |
|
| 88 | + 'load', |
|
| 89 | 89 | |
| 90 | - //net |
|
| 91 | - 'net: line', |
|
| 92 | - 'net: pass' |
|
| 93 | - ); |
|
| 94 | - } |
|
| 90 | + //net |
|
| 91 | + 'net: line', |
|
| 92 | + 'net: pass' |
|
| 93 | + ); |
|
| 94 | + } |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /// @endcond |
@@ -4,22 +4,22 @@ |
||
| 4 | 4 | /// @brief Valid operators for DS CAOS */ |
| 5 | 5 | class DSCAOSOperators { |
| 6 | 6 | /// @brief Returns an array of tokens. |
| 7 | - public static function GetTokens() { |
|
| 8 | - return array( |
|
| 9 | - '=', |
|
| 10 | - '<>', |
|
| 11 | - '<', |
|
| 12 | - '<=', |
|
| 13 | - '>', |
|
| 14 | - '>=', |
|
| 15 | - 'eq', |
|
| 16 | - 'gt', |
|
| 17 | - 'lt', |
|
| 18 | - 'ne', |
|
| 19 | - 'and', |
|
| 20 | - 'or' |
|
| 21 | - ); |
|
| 22 | - } |
|
| 7 | + public static function GetTokens() { |
|
| 8 | + return array( |
|
| 9 | + '=', |
|
| 10 | + '<>', |
|
| 11 | + '<', |
|
| 12 | + '<=', |
|
| 13 | + '>', |
|
| 14 | + '>=', |
|
| 15 | + 'eq', |
|
| 16 | + 'gt', |
|
| 17 | + 'lt', |
|
| 18 | + 'ne', |
|
| 19 | + 'and', |
|
| 20 | + 'or' |
|
| 21 | + ); |
|
| 22 | + } |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /// @endcond |
@@ -5,36 +5,36 @@ |
||
| 5 | 5 | /// @brief DS CAOS flow control (doif, else, loop, etc) dictionary |
| 6 | 6 | class DSCAOSFlowControls { |
| 7 | 7 | /// @brief Returns an array of tokens. |
| 8 | - public static function GetTokens() { |
|
| 9 | - return array( |
|
| 10 | - 'doif', |
|
| 11 | - 'econ', |
|
| 12 | - 'elif', |
|
| 13 | - 'else', |
|
| 14 | - 'enum', |
|
| 15 | - 'endi', |
|
| 16 | - 'endm', |
|
| 17 | - 'epas', |
|
| 18 | - 'esee', |
|
| 19 | - 'etch', |
|
| 20 | - 'ever', |
|
| 21 | - 'goto', |
|
| 22 | - 'gsub', |
|
| 23 | - 'inst', |
|
| 24 | - 'iscr', |
|
| 25 | - 'loop', |
|
| 26 | - 'next', |
|
| 27 | - 'over', //wait until current agent anim is over...sounds like a flow control to me. |
|
| 28 | - 'repe', |
|
| 29 | - 'reps', |
|
| 30 | - 'retn', |
|
| 31 | - 'rscr', |
|
| 32 | - 'scrp', |
|
| 33 | - 'slow', |
|
| 34 | - 'subr', |
|
| 35 | - 'untl', |
|
| 36 | - ); |
|
| 37 | - } |
|
| 8 | + public static function GetTokens() { |
|
| 9 | + return array( |
|
| 10 | + 'doif', |
|
| 11 | + 'econ', |
|
| 12 | + 'elif', |
|
| 13 | + 'else', |
|
| 14 | + 'enum', |
|
| 15 | + 'endi', |
|
| 16 | + 'endm', |
|
| 17 | + 'epas', |
|
| 18 | + 'esee', |
|
| 19 | + 'etch', |
|
| 20 | + 'ever', |
|
| 21 | + 'goto', |
|
| 22 | + 'gsub', |
|
| 23 | + 'inst', |
|
| 24 | + 'iscr', |
|
| 25 | + 'loop', |
|
| 26 | + 'next', |
|
| 27 | + 'over', //wait until current agent anim is over...sounds like a flow control to me. |
|
| 28 | + 'repe', |
|
| 29 | + 'reps', |
|
| 30 | + 'retn', |
|
| 31 | + 'rscr', |
|
| 32 | + 'scrp', |
|
| 33 | + 'slow', |
|
| 34 | + 'subr', |
|
| 35 | + 'untl', |
|
| 36 | + ); |
|
| 37 | + } |
|
| 38 | 38 | } |
| 39 | 39 | /// @endcond |
| 40 | 40 | ?> |
@@ -7,165 +7,165 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | class DSCAOSVariables { |
| 9 | 9 | /// @brief Returns an array of tokens. |
| 10 | - public static function GetTokens() { |
|
| 11 | - return array( |
|
| 12 | - //agents |
|
| 13 | - 'abba', |
|
| 14 | - 'carr', |
|
| 15 | - 'cata', |
|
| 16 | - 'clac', |
|
| 17 | - 'fltx', |
|
| 18 | - 'flty', |
|
| 19 | - 'fmly', |
|
| 20 | - 'from', |
|
| 21 | - 'gnus', |
|
| 22 | - 'held', |
|
| 23 | - 'hght', |
|
| 24 | - 'iitt', |
|
| 25 | - 'imsk', |
|
| 26 | - 'mows', |
|
| 27 | - 'mthx', |
|
| 28 | - 'mthy', |
|
| 29 | - 'null', |
|
| 30 | - 'ownr', |
|
| 31 | - 'pnts', |
|
| 32 | - 'posb', |
|
| 33 | - 'posl', |
|
| 34 | - 'posr', |
|
| 35 | - 'post', |
|
| 36 | - 'posx', |
|
| 37 | - 'posy', |
|
| 38 | - 'spcs', |
|
| 39 | - 'wdth', |
|
| 40 | - '_it_', |
|
| 10 | + public static function GetTokens() { |
|
| 11 | + return array( |
|
| 12 | + //agents |
|
| 13 | + 'abba', |
|
| 14 | + 'carr', |
|
| 15 | + 'cata', |
|
| 16 | + 'clac', |
|
| 17 | + 'fltx', |
|
| 18 | + 'flty', |
|
| 19 | + 'fmly', |
|
| 20 | + 'from', |
|
| 21 | + 'gnus', |
|
| 22 | + 'held', |
|
| 23 | + 'hght', |
|
| 24 | + 'iitt', |
|
| 25 | + 'imsk', |
|
| 26 | + 'mows', |
|
| 27 | + 'mthx', |
|
| 28 | + 'mthy', |
|
| 29 | + 'null', |
|
| 30 | + 'ownr', |
|
| 31 | + 'pnts', |
|
| 32 | + 'posb', |
|
| 33 | + 'posl', |
|
| 34 | + 'posr', |
|
| 35 | + 'post', |
|
| 36 | + 'posx', |
|
| 37 | + 'posy', |
|
| 38 | + 'spcs', |
|
| 39 | + 'wdth', |
|
| 40 | + '_it_', |
|
| 41 | 41 | |
| 42 | - //camera |
|
| 43 | - 'cmrx', |
|
| 44 | - 'cmry', |
|
| 45 | - 'wndb', |
|
| 46 | - 'wndh', |
|
| 47 | - 'wndl', |
|
| 48 | - 'wndr', |
|
| 49 | - 'wndt', |
|
| 50 | - 'wndw', |
|
| 42 | + //camera |
|
| 43 | + 'cmrx', |
|
| 44 | + 'cmry', |
|
| 45 | + 'wndb', |
|
| 46 | + 'wndh', |
|
| 47 | + 'wndl', |
|
| 48 | + 'wndr', |
|
| 49 | + 'wndt', |
|
| 50 | + 'wndw', |
|
| 51 | 51 | |
| 52 | - //cd player |
|
| 53 | - '_cd_ frqh', |
|
| 54 | - '_cd_ frql', |
|
| 55 | - '_cd_ frqm', |
|
| 52 | + //cd player |
|
| 53 | + '_cd_ frqh', |
|
| 54 | + '_cd_ frql', |
|
| 55 | + '_cd_ frqm', |
|
| 56 | 56 | |
| 57 | - //compound |
|
| 58 | - 'npgs', |
|
| 57 | + //compound |
|
| 58 | + 'npgs', |
|
| 59 | 59 | |
| 60 | - //creatures |
|
| 61 | - 'attn', |
|
| 62 | - 'bvar', |
|
| 63 | - 'byit', |
|
| 64 | - 'cage', |
|
| 65 | - 'decn', |
|
| 66 | - 'dftx', |
|
| 67 | - 'dfty', |
|
| 68 | - 'drv!', |
|
| 69 | - 'expr', |
|
| 70 | - 'hhld', |
|
| 71 | - 'orgn', |
|
| 72 | - 'tage', |
|
| 73 | - 'uftx', |
|
| 74 | - 'ufty', |
|
| 60 | + //creatures |
|
| 61 | + 'attn', |
|
| 62 | + 'bvar', |
|
| 63 | + 'byit', |
|
| 64 | + 'cage', |
|
| 65 | + 'decn', |
|
| 66 | + 'dftx', |
|
| 67 | + 'dfty', |
|
| 68 | + 'drv!', |
|
| 69 | + 'expr', |
|
| 70 | + 'hhld', |
|
| 71 | + 'orgn', |
|
| 72 | + 'tage', |
|
| 73 | + 'uftx', |
|
| 74 | + 'ufty', |
|
| 75 | 75 | |
| 76 | - //debug |
|
| 77 | - 'code', |
|
| 78 | - 'codf', |
|
| 79 | - 'codg', |
|
| 80 | - 'codp', |
|
| 81 | - 'cods', |
|
| 82 | - 'paws', |
|
| 83 | - 'tack', |
|
| 84 | - 'unid', |
|
| 76 | + //debug |
|
| 77 | + 'code', |
|
| 78 | + 'codf', |
|
| 79 | + 'codg', |
|
| 80 | + 'codp', |
|
| 81 | + 'cods', |
|
| 82 | + 'paws', |
|
| 83 | + 'tack', |
|
| 84 | + 'unid', |
|
| 85 | 85 | |
| 86 | - //files |
|
| 87 | - 'innf', |
|
| 88 | - 'inni', |
|
| 89 | - 'innl', |
|
| 90 | - 'inok', |
|
| 86 | + //files |
|
| 87 | + 'innf', |
|
| 88 | + 'inni', |
|
| 89 | + 'innl', |
|
| 90 | + 'inok', |
|
| 91 | 91 | |
| 92 | - //input |
|
| 93 | - 'hotp', |
|
| 94 | - 'hots', |
|
| 95 | - 'mopx', |
|
| 96 | - 'mopy', |
|
| 97 | - 'movx', |
|
| 98 | - 'movy', |
|
| 99 | - 'down', |
|
| 100 | - 'emid', |
|
| 101 | - 'left', |
|
| 102 | - 'maph', |
|
| 103 | - 'mapw', |
|
| 104 | - 'mloc', |
|
| 105 | - 'rght', |
|
| 106 | - '_up_', |
|
| 92 | + //input |
|
| 93 | + 'hotp', |
|
| 94 | + 'hots', |
|
| 95 | + 'mopx', |
|
| 96 | + 'mopy', |
|
| 97 | + 'movx', |
|
| 98 | + 'movy', |
|
| 99 | + 'down', |
|
| 100 | + 'emid', |
|
| 101 | + 'left', |
|
| 102 | + 'maph', |
|
| 103 | + 'mapw', |
|
| 104 | + 'mloc', |
|
| 105 | + 'rght', |
|
| 106 | + '_up_', |
|
| 107 | 107 | |
| 108 | - //motion |
|
| 109 | - 'fall', |
|
| 110 | - 'movs', |
|
| 111 | - 'velx', |
|
| 112 | - 'vely', |
|
| 113 | - 'wall', |
|
| 108 | + //motion |
|
| 109 | + 'fall', |
|
| 110 | + 'movs', |
|
| 111 | + 'velx', |
|
| 112 | + 'vely', |
|
| 113 | + 'wall', |
|
| 114 | 114 | |
| 115 | - //ports |
|
| 116 | - 'prt: itot', |
|
| 117 | - 'prt: otot', |
|
| 115 | + //ports |
|
| 116 | + 'prt: itot', |
|
| 117 | + 'prt: otot', |
|
| 118 | 118 | |
| 119 | - //resources |
|
| 119 | + //resources |
|
| 120 | 120 | |
| 121 | - //scripts |
|
| 121 | + //scripts |
|
| 122 | 122 | |
| 123 | - //time |
|
| 124 | - 'date', |
|
| 125 | - 'dayt', |
|
| 126 | - 'etik', |
|
| 127 | - 'mont', |
|
| 128 | - 'msec', |
|
| 129 | - 'pace', |
|
| 130 | - 'race', |
|
| 131 | - 'rtim', |
|
| 132 | - 'sean', |
|
| 133 | - 'time', |
|
| 134 | - 'wtik', |
|
| 135 | - 'year', |
|
| 123 | + //time |
|
| 124 | + 'date', |
|
| 125 | + 'dayt', |
|
| 126 | + 'etik', |
|
| 127 | + 'mont', |
|
| 128 | + 'msec', |
|
| 129 | + 'pace', |
|
| 130 | + 'race', |
|
| 131 | + 'rtim', |
|
| 132 | + 'sean', |
|
| 133 | + 'time', |
|
| 134 | + 'wtik', |
|
| 135 | + 'year', |
|
| 136 | 136 | |
| 137 | - //variables |
|
| 138 | - 'gnam', |
|
| 139 | - 'modu', |
|
| 140 | - 'eame', |
|
| 141 | - 'name', |
|
| 142 | - 'game', |
|
| 143 | - 'ufos', |
|
| 144 | - 'vmjr', |
|
| 145 | - 'vmnr', |
|
| 146 | - '_p1_', |
|
| 147 | - '_p2_', |
|
| 148 | - 'null', |
|
| 137 | + //variables |
|
| 138 | + 'gnam', |
|
| 139 | + 'modu', |
|
| 140 | + 'eame', |
|
| 141 | + 'name', |
|
| 142 | + 'game', |
|
| 143 | + 'ufos', |
|
| 144 | + 'vmjr', |
|
| 145 | + 'vmnr', |
|
| 146 | + '_p1_', |
|
| 147 | + '_p2_', |
|
| 148 | + 'null', |
|
| 149 | 149 | |
| 150 | - //vehicles |
|
| 151 | - 'cabb', |
|
| 152 | - 'cabl', |
|
| 153 | - 'cabr', |
|
| 154 | - 'cabt', |
|
| 150 | + //vehicles |
|
| 151 | + 'cabb', |
|
| 152 | + 'cabl', |
|
| 153 | + 'cabr', |
|
| 154 | + 'cabt', |
|
| 155 | 155 | |
| 156 | - //world |
|
| 157 | - 'nwld', |
|
| 158 | - 'wnam', |
|
| 159 | - 'wuid', |
|
| 156 | + //world |
|
| 157 | + 'nwld', |
|
| 158 | + 'wnam', |
|
| 159 | + 'wuid', |
|
| 160 | 160 | |
| 161 | - //net |
|
| 162 | - 'net: erra', |
|
| 163 | - 'net: host', |
|
| 164 | - 'net: rawe', |
|
| 165 | - 'net: user', |
|
| 166 | - 'net: what' |
|
| 167 | - ); |
|
| 168 | - } |
|
| 161 | + //net |
|
| 162 | + 'net: erra', |
|
| 163 | + 'net: host', |
|
| 164 | + 'net: rawe', |
|
| 165 | + 'net: user', |
|
| 166 | + 'net: what' |
|
| 167 | + ); |
|
| 168 | + } |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /// @endcond |