FreeCalypso > hg > tcs211-l1-reconst
comparison chipsetsw/drivers/drv_app/r2d/convertanim.pl @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 #!perl | |
2 | |
3 $nb=$ARGV[0]; | |
4 $name=$ARGV[1]; | |
5 | |
6 for($i=0;$i<$nb;$i++) | |
7 { | |
8 $t=sprintf "%02d",($i+1); | |
9 $filename=$name.$t.".tga"; | |
10 print "tor2d.pl $filename image$t\n"; | |
11 system("tor2d.pl $filename image$t"); | |
12 } | |
13 | |
14 open(OUT,">E:\\BT\\Drivers\\Common\\R2D\\r2d_anim.c") or die "Cannot create anim file :$!\n"; | |
15 | |
16 for($i=0;$i<$nb;$i++) | |
17 { | |
18 $t=sprintf "%02d",($i+1); | |
19 print OUT "#include \"image$t.c\"\n"; | |
20 } | |
21 | |
22 print OUT "\n"; | |
23 print OUT "#define r2d_create_anim_context() \\\n"; | |
24 for($i=0;$i<$nb;$i++) | |
25 { | |
26 $t=sprintf "%02d",($i+1); | |
27 if ($i == ($nb-1)) | |
28 { | |
29 print OUT "picgc[$i]=r2d_new_picture_context((UINT32*)image$t); \n"; | |
30 } | |
31 else | |
32 { | |
33 print OUT "picgc[$i]=r2d_new_picture_context((UINT32*)image$t); \\\n"; | |
34 } | |
35 | |
36 } | |
37 close(OUT); |