Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mn = $argv[1];
- $file1 = array();
- $file2 = array();
- $file1 = file($mn . '.ide');
- $file2 = file($mn . '.opl');
- if (!$file1) return false;
- if (!$file2) return false;
- list($a1, $b1, $c1, $d1, $e1, $f1, $g1, $h1, $i1, $j1, $k1, $l1, $m1, $n1, $o1, $p1, $q1, $r1, $s1, $t1, $u1, $v1, $w1, $x1, $y1, $z1) = explode(', ', trim($file1[0], ', '));
- list($a2, $b2, $c2, $d2, $e2, $f2, $g2, $h2, $i2, $j2, $k2, $l2, $m2, $n2, $o2, $p2, $q2, $r2, $s2, $t2, $u2, $v2, $w2, $x2, $y2, $z2) = explode(', ', trim($file2[0], ', '));
- $t = '';
- $g = '$schema';
- $t .= <<<TXT
- {
- "aabbMin": [
- {$f1},
- {$g1},
- {$h1}
- ],
- "aabbMax": [
- {$i1},
- {$j1},
- {$k1}
- ],
- "centroid": [
- {$l1},
- {$m1},
- {$n1}
- ],
- "radius": {$o1},
- "archetypeName": "{$a1}",
- "txdName": "{$b1}"
- },
- TXT;
- $m = <<<TXT
- {$t}
- {
- "position": [
- {$a2},
- {$b2},
- {$c2}
- ],
- "rotation": [
- {$d2},
- {$e2},
- {$f2},
- {$g2}
- ],
- "guid": "0",
- "archetypeName": "{$h2}"
- },
- TXT;
- file_put_contents($mn . '.json', $m);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement