Quote:
Originally Posted by Unknown Rabbit
Oh, hey, DJazz! Did you ever figure out how layer speeds worked? I feel I'm really close to finding the right equation but I have a sign wrong somewhere or something like that.
|
I think so... here is some code from saving levels in WebJCS:
PHP Code:
$LayerXSpeed = array(3.375, 2.25, 1, 1, 1, 0.25, 0.125, 0);
$LayerYSpeed = array(3.375, 2.25, 1, 1, 1, 0.25, 0.125, 0);
$LayerAutoXSpeed = array(0, 0, 0, 0, 0, 0, 0, 0);
$LayerAutoYSpeed = array(0, 0, 0, 0, 0, 0, 0, 0);
foreach($LayerXSpeed as $v) $Stream0.= pack("V", $v*65536);
foreach($LayerYSpeed as $v) $Stream0.= pack("V", $v*65536);
foreach($LayerAutoXSpeed as $v) $Stream0.= pack("V", $v*65536);
foreach($LayerAutoYSpeed as $v) $Stream0.= pack("V", $v*65536);
When loading use the same method but reverse (unpack and divide with 65536).
|