' y: G$ F1 K+ b' k6 e& h) mfp1=fopen("pick.txt", "rt"); ) H& f& K6 n( H . j7 Z: h* m N+ P
if (fp1==NULL) ::AfxMessageBox("Can not open the file!!!");8 ]6 I. Z4 `; o
7 n5 r, ^! Z- a- ]( O
fp2=fopen("place.txt","wt");9 n. E. j! e) b) v: q% V3 A
0 r0 U0 T* t6 K4 W: V# eif (fp2==NULL) ::AfxMessageBox("Can not create the file!!!");! K# G% M, i n" }8 s
& W% I8 f0 P/ C& p: m- e6 gchar refdes[5], Pattern[5];, d* u( _7 I& y; X3 |
/ U* V# }2 t, `" W$ V
float midx,midy,refx,refy,padx,pady,rotation;, K( Q; a9 [4 [: k
& f# A) t9 R" Y& V2 v* y. ~. _
char tb[1];9 F: f( p* E4 K; x3 z v3 }* q' q) i4 z
( X. P B! C- |, s* o
char tmp='"'; $ L! V3 S( m2 ]6 N \" [ 5 B" c& U2 E& b8 ?9 X. P4 Wfprintf(fp2,"%sn", "# Allegro script");6 h1 ^6 \7 Z1 R$ f, u! \; [
0 P! l# U D! P
fprintf(fp2,"%sn", "version 13.6");2 d2 Z' c5 ~" x7 }
7 D: Q4 Y, z% rfprintf(fp2,"%sn", "place refdes"); ^1 H5 H V4 T$ S4 _: X , Q2 e6 _/ P' L+ I
while (!feof(fp1)) {- }' ]# t, T B7 d+ n, V" a) g
/ k* |( U8 S, e- ^fscanf(fp1,"%s", refdes); : G, z. G/ j9 i 1 G# | I9 ?; ]' B* F& N
fscanf(fp1,"%s", Pattern); ; b2 [& J3 r0 l1 h( e4 h" L( O 4 k) e* q! g) L1 e
fscanf(fp1,"%f", &midx);7 n( T' h+ o3 Z1 V2 W5 e3 w7 A, T
+ `0 ]7 L' G p+ j9 v
fscanf(fp1,"%f", &midy); . M- B9 ]+ Y) u6 e: L$ f! k4 p / @ B) P0 y6 m
fscanf(fp1,"%f", &refx);$ Z0 O: n3 k0 ?+ S8 S# X. ^2 X' W, X
' U O- [& `( O* A
fscanf(fp1,"%f", &refy);! V' t$ |) @+ `) h7 j% m
4 h& w+ u- z1 _' w+ W. zfscanf(fp1,"%f", &padx);' V* A' a1 |) [4 M" |
& Y. F) A8 S* G3 m( s# [/ r7 Xfscanf(fp1,"%f", &pady);& }* B8 u' z- s8 |0 O