-
Notifications
You must be signed in to change notification settings - Fork 3
/
test.php
executable file
·51 lines (43 loc) · 1.28 KB
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/php
<?php
namespace Trojal\PhpRo;
include('DataReader.php');
include('Sprite.php');
include('SpriteFrame.php');
include('Palette.php');
include('Grf.php');
include('Action.php');
include('ActionMovement.php');
include('ActionFrame.php');
include('ActionLayer.php');
include('GIFEncoder.php');
include('SpriteTools.php');
/*$elderSprite = new Sprite(
new DataReader('ro-files/elder.spr')
);
file_put_contents('ro-files/test.gif', $elderSprite->getImage(13));*/
$elderSprite = new Sprite(
new DataReader('ro-files/vocal.spr')
);
$elderAction = new Action(
new DataReader('ro-files/vocal.act')
);
$elderAction->setSprite($elderSprite);
file_put_contents('ro-files/test.gif', $elderAction->getAnimation(32));
/*$troGrf = new Grf(
new DataReader('/var/www/ro/tro1.grf')
);
var_dump($troGrf->getFilesArray());*/
/*$troGrf = new Grf(
new DataReader('/var/www/ro/uv-ro1.grf')
);
var_dump($troGrf->getFile('data\sprite\¾ÆÀÌÅÛ\Æйи®¸ðÀÚ.spr'));*/
/*$uvroGrf = new Grf(
new DataReader('ro-files/uv-ro1.grf')
);
$sprFile = $uvroGrf->getFile('data\sprite\¾ÆÀÌÅÛ\Æйи®¸ðÀÚ.spr');
$someSprite = new Sprite(
new DataReader($sprFile, PHPRO_DATA_STRING)
);
file_put_contents('/Users/mhittinger/test.gif', $someSprite->getImage(0));*/
echo 'Check OK!';