@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | return $this->eventScripts[$whichScript]; |
| 105 | 105 | } |
| 106 | 106 | /// @brief Gets the thumbnail of this agent as would be shown in the Injector |
| 107 | - /** @return A SpriteFrame of the thumbnail |
|
| 107 | + /** @return SpriteFrame SpriteFrame of the thumbnail |
|
| 108 | 108 | */ |
| 109 | 109 | public function GetThumbnail() { |
| 110 | 110 | return $this->thumbnail; |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | /// @endcond |
| 381 | 381 | |
| 382 | 382 | /// @brief Creates a new COBDependency |
| 383 | - /** @param $type The type of dependency ('sprite' or 'sound'). |
|
| 383 | + /** @param string $type The type of dependency ('sprite' or 'sound'). |
|
| 384 | 384 | * @param $name The name of the dependency (four characters, no file extension) |
| 385 | 385 | */ |
| 386 | 386 | public function COBDependency($type,$name) { |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | /// @brief Constructs a new COBFileBlock |
| 18 | 18 | /** |
| 19 | - * @param $type The file type |
|
| 19 | + * @param string $type The file type |
|
| 20 | 20 | * @param $name The file name (including extension) |
| 21 | 21 | * @param $contents The contents of the file |
| 22 | 22 | */ |
@@ -6,38 +6,38 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | /// @cond INTERNAL_DOCS |
| 8 | 8 | // |
| 9 | - private $fileType; |
|
| 10 | - private $fileName; |
|
| 9 | + private $fileType; |
|
| 10 | + private $fileName; |
|
| 11 | 11 | |
| 12 | - private $reserved; |
|
| 12 | + private $reserved; |
|
| 13 | 13 | private $contents; |
| 14 | 14 | |
| 15 | 15 | /// @endcond |
| 16 | 16 | |
| 17 | - /// @brief Constructs a new COBFileBlock |
|
| 17 | + /// @brief Constructs a new COBFileBlock |
|
| 18 | 18 | /** |
| 19 | 19 | * @param $type The file type |
| 20 | - * @param $name The file name (including extension) |
|
| 21 | - * @param $contents The contents of the file |
|
| 22 | - */ |
|
| 23 | - public function COBFileBlock($type,$name,$contents) { |
|
| 24 | - parent::COBBlock(COB_BLOCK_FILE); |
|
| 25 | - $this->fileType = $type; |
|
| 26 | - $this->fileName = $name; |
|
| 27 | - $this->contents = $contents; |
|
| 20 | + * @param $name The file name (including extension) |
|
| 21 | + * @param $contents The contents of the file |
|
| 22 | + */ |
|
| 23 | + public function COBFileBlock($type,$name,$contents) { |
|
| 24 | + parent::COBBlock(COB_BLOCK_FILE); |
|
| 25 | + $this->fileType = $type; |
|
| 26 | + $this->fileName = $name; |
|
| 27 | + $this->contents = $contents; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - /// @brief Add the reserved data associated with this file block |
|
| 30 | + /// @brief Add the reserved data associated with this file block |
|
| 31 | 31 | /** |
| 32 | 32 | * @param $reserved The reserved data |
| 33 | - */ |
|
| 34 | - public function AddReserved($reserved) { |
|
| 35 | - $this->reserved = $reserved; |
|
| 33 | + */ |
|
| 34 | + public function AddReserved($reserved) { |
|
| 35 | + $this->reserved = $reserved; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /// @brief Get the name of the file |
| 39 | - public function GetName() { |
|
| 40 | - return $this->fileName; |
|
| 39 | + public function GetName() { |
|
| 40 | + return $this->fileName; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /// @brief Get the file's type |
@@ -45,13 +45,13 @@ discard block |
||
| 45 | 45 | * @return 'sprite' or 'sound' - i.e. one of the |
| 46 | 46 | * COB_DEPENDENCY_* constants in COBAgentBlock |
| 47 | 47 | */ |
| 48 | - public function GetFileType() { |
|
| 49 | - return $this->fileType; |
|
| 48 | + public function GetFileType() { |
|
| 49 | + return $this->fileType; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /// @brief Get the contents of the file. |
| 53 | - public function GetContents() { |
|
| 54 | - return $this->contents; |
|
| 53 | + public function GetContents() { |
|
| 54 | + return $this->contents; |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /// @brief Get the reserved data |
@@ -59,8 +59,8 @@ discard block |
||
| 59 | 59 | * Reserved data was never officially used. |
| 60 | 60 | * @return A 4-byte integer. |
| 61 | 61 | */ |
| 62 | - public function GetReserved() { |
|
| 63 | - return $this->reserved; |
|
| 62 | + public function GetReserved() { |
|
| 63 | + return $this->reserved; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /// @cond INTERNAL_DOCS |
@@ -68,16 +68,16 @@ discard block |
||
| 68 | 68 | /// @brief Creates a new COBFileBlock from an IReader |
| 69 | 69 | /** |
| 70 | 70 | * @param $reader The reader the data's coming from |
| 71 | - */ |
|
| 72 | - public static function CreateFromReader(IReader $reader) { |
|
| 73 | - $type = ($reader->ReadInt(2)==0)?'sprite':'sound'; |
|
| 74 | - $reserved = $reader->ReadInt(4); |
|
| 75 | - $size = $reader->ReadInt(4); |
|
| 76 | - $fileName = $reader->ReadCString(); |
|
| 77 | - $contents = $reader->Read($size); |
|
| 78 | - $block = new COBFileBlock($type,$fileName,$contents); |
|
| 79 | - $block->AddReserved($reserved); |
|
| 80 | - return $block; |
|
| 71 | + */ |
|
| 72 | + public static function CreateFromReader(IReader $reader) { |
|
| 73 | + $type = ($reader->ReadInt(2)==0)?'sprite':'sound'; |
|
| 74 | + $reserved = $reader->ReadInt(4); |
|
| 75 | + $size = $reader->ReadInt(4); |
|
| 76 | + $fileName = $reader->ReadCString(); |
|
| 77 | + $contents = $reader->Read($size); |
|
| 78 | + $block = new COBFileBlock($type,$fileName,$contents); |
|
| 79 | + $block->AddReserved($reserved); |
|
| 80 | + return $block; |
|
| 81 | 81 | } |
| 82 | 82 | /// @endcond |
| 83 | 83 | } |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | /// @brief Construct a CreatureHistory object. |
| 45 | 45 | /** |
| 46 | - * @param $moniker The moniker of the creature |
|
| 47 | - * @param $name The creature's name |
|
| 46 | + * @param false|string $moniker The moniker of the creature |
|
| 47 | + * @param false|string $name The creature's name |
|
| 48 | 48 | * @param $gender The creature's gender |
| 49 | 49 | * @param $genus The creature's genus (Grendel, ettin, norn, geat) |
| 50 | 50 | * @param $species The creature's species (unsure of purpose) |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | /// @brief Compiles the CreatureHistory into CreaturesArchive data. |
| 61 | 61 | /** |
| 62 | 62 | * @param $format GLST_FORMAT_C3 or GLST_FORMAT_DS. |
| 63 | - * @return A binary string ready for archiving and putting in a GLST block. |
|
| 63 | + * @return string binary string ready for archiving and putting in a GLST block. |
|
| 64 | 64 | */ |
| 65 | 65 | public function Compile($format=GLST_FORMAT_C3) { |
| 66 | 66 | $data = ''; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | /** |
| 94 | 94 | * This is done by working out whether any DS-specific variables |
| 95 | 95 | * are set. |
| 96 | - * @return GLST_FORMAT_DS or GLST_FORMAT_C3. |
|
| 96 | + * @return integer or GLST_FORMAT_C3. |
|
| 97 | 97 | */ |
| 98 | 98 | public function GuessFormat() { |
| 99 | 99 | return (isset($this->unknown1))?GLST_FORMAT_DS:GLST_FORMAT_C3; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | /** |
| 113 | 113 | * Simply gets the nth event that happened in this history |
| 114 | 114 | * @param $n the event number to get |
| 115 | - * @return the $nth CreatureHistoryEvent |
|
| 115 | + * @return CreatureHistoryEvent $nth CreatureHistoryEvent |
|
| 116 | 116 | */ |
| 117 | 117 | public function GetEvent($n) { |
| 118 | 118 | return $this->events[$n]; |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | |
| 154 | 154 | /// Gets all the events in this history |
| 155 | 155 | /** |
| 156 | - * @return An array of CreatureHistoryEvents |
|
| 156 | + * @return CreatureHistoryEvent[] array of CreatureHistoryEvents |
|
| 157 | 157 | */ |
| 158 | 158 | public function GetEvents() { |
| 159 | 159 | return $this->events; |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | /** |
| 230 | 230 | * This calls SetC3Unknown |
| 231 | 231 | * @param $unknown1 First unknown variable |
| 232 | - * @param $unknown2 Second unknown variable |
|
| 232 | + * @param false|string $unknown2 Second unknown variable |
|
| 233 | 233 | */ |
| 234 | 234 | public function SetDSUnknowns($unknown1,$unknown2) { |
| 235 | 235 | $this->unknown1 = $unknown1; |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | |
| 239 | 239 | /// @brief Sets whether or not the creature is a veteran of the warp (DS only) |
| 240 | 240 | /** |
| 241 | - * @param $warpveteran A boolean (I think!) |
|
| 241 | + * @param integer $warpveteran A boolean (I think!) |
|
| 242 | 242 | */ |
| 243 | 243 | public function SetWarpVeteran($warpveteran) { |
| 244 | 244 | $this->warpveteran = $warpveteran; |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | * @param $n the event number to remove |
| 125 | 125 | */ |
| 126 | 126 | public function RemoveEvent($n) { |
| 127 | - unset($this->events[$n]); |
|
| 127 | + unset($this->events[$n]); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /// @brief Counts the events in the history |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | * This is called automatically by CreatureHistory, most users |
| 159 | 159 | * should have no need to use this function themselves. |
| 160 | 160 | * @param $format Which game to compile it for (a GLST_FORMAT_* constant) |
| 161 | - * @return A binary string containing GLST data ready to be put into a GLST history. |
|
| 161 | + * @return string binary string containing GLST data ready to be put into a GLST history. |
|
| 162 | 162 | */ |
| 163 | 163 | public function Compile($format) { |
| 164 | 164 | $data = pack('VVVVV',$this->eventtype,$this->worldtime,$this->creatureage,$this->timestamp,$this->lifestage); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * Makes a new AGNTBlock. \n |
| 12 | 12 | * If $prayfile is not null, all the data about this AGNTBlock |
| 13 | 13 | * will be read from the PRAYFile. |
| 14 | - * @param $prayfile The PRAYFile associated with this AGNT block. |
|
| 14 | + * @param PRAYFile $prayfile The PRAYFile associated with this AGNT block. |
|
| 15 | 15 | * It is allowed to be null. |
| 16 | 16 | * @param $name The name of this block. |
| 17 | 17 | * @param $content This block's content. |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | return $this->GetTag('Dependency Count'); |
| 76 | 76 | } |
| 77 | 77 | /// @brief Gets the dependency specified |
| 78 | - /** @param $dependency The number of the dependency to get. 1-based. |
|
| 78 | + /** @param integer $dependency The number of the dependency to get. 1-based. |
|
| 79 | 79 | * return A PrayDependency object describing the file the agent depends on |
| 80 | 80 | */ |
| 81 | 81 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | } |
| 29 | 29 | /// @brief Compile the BinaryBlock |
| 30 | 30 | /** |
| 31 | - * @return The compiled BinaryBlock as a binary string. |
|
| 31 | + * @return string compiled BinaryBlock as a binary string. |
|
| 32 | 32 | */ |
| 33 | 33 | public function Compile() { |
| 34 | 34 | return $this->EncodeBlockHeader(strlen($this->binarydata)).$this->binarydata; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | class BinaryBlock extends PrayBlock { |
| 14 | 14 | /// @cond INTERNAL_DOCS |
| 15 | 15 | |
| 16 | - private $binarydata; |
|
| 16 | + private $binarydata; |
|
| 17 | 17 | /// @endcond |
| 18 | 18 | |
| 19 | 19 | /// @brief Instantiate a BinaryBlock |
@@ -22,17 +22,17 @@ discard block |
||
| 22 | 22 | * @param $name The block's name. |
| 23 | 23 | * @param $content The content of the block as a binary string. |
| 24 | 24 | */ |
| 25 | - public function BinaryBlock($type,$name,$content) { |
|
| 26 | - parent::PrayBlock(null,$name,'',0,$type); |
|
| 27 | - $this->binarydata = $content; |
|
| 25 | + public function BinaryBlock($type,$name,$content) { |
|
| 26 | + parent::PrayBlock(null,$name,'',0,$type); |
|
| 27 | + $this->binarydata = $content; |
|
| 28 | 28 | } |
| 29 | 29 | /// @brief Compile the BinaryBlock |
| 30 | 30 | /** |
| 31 | 31 | * @return The compiled BinaryBlock as a binary string. |
| 32 | 32 | */ |
| 33 | - public function Compile() { |
|
| 34 | - return $this->EncodeBlockHeader(strlen($this->binarydata)).$this->binarydata; |
|
| 35 | - } |
|
| 33 | + public function Compile() { |
|
| 34 | + return $this->EncodeBlockHeader(strlen($this->binarydata)).$this->binarydata; |
|
| 35 | + } |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | ?> |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | /** |
| 11 | 11 | * If $prayfile is not null, all the data about this CREABlock |
| 12 | 12 | * will be read from the PRAYFile. |
| 13 | - * @param $prayfile The PRAYFile associated with this CREA block. |
|
| 13 | + * @param PRAYFile $prayfile The PRAYFile associated with this CREA block. |
|
| 14 | 14 | * It is allowed to be null. |
| 15 | 15 | * @param $name The name of this block. |
| 16 | 16 | * @param $content This block's content. |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | * @param $name The name of this block |
| 16 | 16 | * @param $content This block's binary data. |
| 17 | 17 | * @param $flags the flags of this block |
| 18 | - * @param $type This block's type as one of the PRAY_BLOCK_* constants |
|
| 18 | + * @param string $type This block's type as one of the PRAY_BLOCK_* constants |
|
| 19 | 19 | */ |
| 20 | 20 | public function CreaturesArchiveBlock(&$prayfile,$name,$content,$flags,$type) { |
| 21 | 21 | parent::PrayBlock($prayfile,$name,$content,$flags,$type); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | /** |
| 14 | 14 | * If $prayfile is not null, all the data for this block |
| 15 | 15 | * will be read from the PRAYFile. |
| 16 | - * @param $prayfile The PRAYFile that this DFAM block belongs to. |
|
| 16 | + * @param PRAYFile $prayfile The PRAYFile that this DFAM block belongs to. |
|
| 17 | 17 | * @param $name The block's name. |
| 18 | 18 | * @param $content The binary data of this block. May be null. |
| 19 | 19 | * @param $flags The block's flags |
@@ -13,14 +13,14 @@ |
||
| 13 | 13 | /** |
| 14 | 14 | * If $prayfile is not null, all the data for this block |
| 15 | 15 | * will be read from the PRAYFile. |
| 16 | - * @param $prayfile The PRAYFile that this DFAM block belongs to. |
|
| 17 | - * @param $name The block's name. |
|
| 18 | - * @param $content The binary data of this block. May be null. |
|
| 19 | - * @param $flags The block's flags |
|
| 20 | - */ |
|
| 21 | - public function DFAMBlock($prayfile,$name,$content,$flags) { |
|
| 22 | - parent::TagBlock($prayfile,$name,$content,$flags,PRAY_BLOCK_DFAM); |
|
| 16 | + * @param $prayfile The PRAYFile that this DFAM block belongs to. |
|
| 17 | + * @param $name The block's name. |
|
| 18 | + * @param $content The binary data of this block. May be null. |
|
| 19 | + * @param $flags The block's flags |
|
| 20 | + */ |
|
| 21 | + public function DFAMBlock($prayfile,$name,$content,$flags) { |
|
| 22 | + parent::TagBlock($prayfile,$name,$content,$flags,PRAY_BLOCK_DFAM); |
|
| 23 | 23 | |
| 24 | - } |
|
| 24 | + } |
|
| 25 | 25 | } |
| 26 | 26 | ?> |