I removed the comments:
public function readAct($act,$save,$output,$code) {
$this->act = fopen($act, "rb");
$this->aHeader = unpack('H4ident/Sversion/SnumFrames', fread($this->act, 0x06));
$this->aSize = filesize($act);
$this->aAnimations = $this->aHeader['numFrames'];
$this->aActions = ($this->aAnimations / 8);
$this->aVersion = dechex($this->aHeader['version']);
$this->aVersion = (double)preg_replace('{([0-9])(.*?)([0-9])}', '$1.$2', $this->aVersion);
fseek($this->act, 0xA, SEEK_CUR);
$currentAction = 0;
$anim = 0;
$pointerMemoryANIM = array();
$pointerMemoryNF = array();
$pointerMemoryPAT = array();
while($anim < $this->aAnimations) {
$this->aAnimData[$anim] = unpack('lnumFrames', fread($this->act, 0x04));
for($nf = 0; $nf < $this->aAnimData[$anim]['numFrames']; $nf++) {
fseek($this->act, 0x20, SEEK_CUR);
$this->aAnimData[$anim][$nf] = unpack('lnumSubFrames', fread($this->act, 0x04));
for($patNo = 0; $patNo < $this->aAnimData[$anim][$nf]['numSubFrames']; $patNo++) {
$this->aAnimData[$anim][$nf][$patNo] = unpack('lxOffset/lyOffset/lsprNo/lmirrored/Cred/Cgreen/Cblue/Calpha', fread($this->act, 0x14));
if($this->aVersion >= 2.0 && $this->aVersion <= 2.3) $this->aAnimData[$anim][$nf][$patNo] += unpack('fxyScale', fread($this->act, 0x04));
if($this->aVersion >= 2.4) $this->aAnimData[$anim][$nf][$patNo] += unpack('fxScale/fyScale', fread($this->act, 0x08));
$this->aAnimData[$anim][$nf][$patNo] += unpack('lrotation/lsprType', fread($this->act, 0x08));
if($this->aVersion >= 2.5) $this->aAnimData[$anim][$nf][$patNo] += unpack('lsprWidth/lsprHeight', fread($this->act, 0x08));
}
$this->aAnimData[$anim][$nf] += unpack('lExtYOffset/lExtYOffset/lExtXOffset/lExtYOffset/lExtXOffset', fread($this->act, 0x14));
$extrainfo = unpack('lbool', fread($this->act, 0x04));
if($extrainfo['bool'] == 1) fseek($this->act, 0x10, SEEK_CUR);
}
$anim++;
}
$this->aSoundData = unpack('lnumSounds', fread($this->act, 0x04));
if($this->aSoundData['numSounds'] > 0) {
for($nSnd = 0; $nSnd < $this->aSoundData['numSounds']; $nSnd++) {
$this->aSoundData[$nSnd] = unpack('H80file', fread($this->act, 0x28));
}
}
for($intv = 0; $intv < $this->aAnimations; $intv++) {
$this->aAnimData[$intv] += unpack('fanimSpeed', fread($this->act, 0x04));
}
foreach($this->aSoundData as $id=>$string) {
if((string)$id != 'numSounds')
$this->aSoundData[$id] = str_replace(pack('H2','00'),"",(pack('H*', $string['file'])));
}
echo '<pre>';
echo print_r($this->aAnimData, true);
echo print_r($this->aSoundData, true);
echo '</pre>';
fclose($this->act);
}
I'm sorry I really have no knowledge of this. I got a lucky guess that's all -SoundNo got removed tho lol-