comparison chipsetsw/drivers/drv_app/r2d/lcds/D_Sample/Demo/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
7 for($i=0;$i<$nb;$i++)
8 {
9 $t=sprintf "%02d",($i+1);
10 $filename=$name.$t.".tga";
11 rename "D:\\J2ME\\Drivers\\Common\\R2D\\LCDs\\D_Sample\\Demo\\Pictures\\"."$filename","Pictures\\$filename";
12 print "tor2d.pl Pictures/$filename image$t\n";
13 system("tor2d.pl Pictures/$filename image$t");
14 }
15
16 open(OUT,">r2d_anim.c") or die "Cannot create anim file :$!\n";
17
18 for($i=0;$i<$nb;$i++)
19 {
20 $t=sprintf "%02d",($i+1);
21 print OUT "#include \"image$t.c\"\n";
22 }
23
24 print OUT "\n";
25 print OUT "#define NB_PIC $nb\n\n";
26 print OUT "#define r2d_create_anim_context() \\\n";
27 for($i=0;$i<$nb;$i++)
28 {
29 $t=sprintf "%02d",($i+1);
30 if ($i == ($nb-1))
31 {
32 print OUT "picgc[$i]=r2d_new_picture_context((UINT32*)image$t,R2D_FULL_KIND); \n";
33 }
34 else
35 {
36 print OUT "picgc[$i]=r2d_new_picture_context((UINT32*)image$t,R2D_FULL_KIND); \\\n";
37 }
38
39 }
40 close(OUT);