Skip to content

Commit

Permalink
0.5a
Browse files Browse the repository at this point in the history
  • Loading branch information
creaktive committed Jul 19, 2003
1 parent 6aa8ad3 commit d865bab
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion acftools.pl
Expand Up @@ -28,7 +28,7 @@
use File::Spec::Functions;

use vars qw($VERSION);
$VERSION = '0.5';
$VERSION = '0.5a';
use constant DEFS => 'defs';
use constant LIB => 'lib';

Expand Down
2 changes: 1 addition & 1 deletion defs/WPN6_601.def
Expand Up @@ -26,7 +26,7 @@ xflt mis_fin_sweep[4]
xflt mis_fin_conrat[4]
xflt mis_fin_steer[4]
xflt mis_fin_dihed[8]
xchr mis_afl[160]
xchr mis_afl[4][40]
xflt mis_thrust[3]
xflt mis_duration[3]
xflt mis_cone_width
Expand Down
2 changes: 2 additions & 0 deletions docs/ChangeLog.txt
Expand Up @@ -9,3 +9,5 @@ v0.5
- licensed under GPL
- propeller blades in different color now
- added docs/QuickIntro.txt
v0.5a
- fixed a bug in .WPN handling
2 changes: 1 addition & 1 deletion docs/README.txt
@@ -1,5 +1,5 @@
##############################################################################
[ACFTools v0.5] Set of tools to play with ACF files outside of Plane-Maker
[ACFTools v0.5a] Set of tools to play with ACF files outside of Plane-Maker
Perl script and modules coded by Stanislaw Pusep <stanis@linuxmail.org>
Site of this and another X-Plane projects of mine:
<http://www.x-plane.org/users/stas/>
Expand Down
26 changes: 16 additions & 10 deletions lib/XPlane/Convert/ACFgen.pm
Expand Up @@ -54,6 +54,19 @@ sub ACFgen {
my $script = 0;
my $lines = 0;

my $dumpver = sub {
my (@x, @y, @z);
foreach my $ver (@ver) {
push @x, $$ver[0];
push @y, $$ver[1];
push @z, $$ver[2] if @$ver == 3;
}
foreach my $ver (@x, @y, @z) {
$total += &writepacked (\*ACF, 'xflt', $ver, undef);
}
@ver = ();
};

while (<TXT>) {
$lines++;
$script += length $_;
Expand Down Expand Up @@ -82,16 +95,7 @@ sub ACFgen {

if ($oldname && @ver && $oldname ne $name) {
# printf "// %s %s[%d]\n", $vty, $oldname, scalar @ver;
my (@x, @y, @z);
foreach my $ver (@ver) {
push @x, $$ver[0];
push @y, $$ver[1];
push @z, $$ver[2] if @$ver == 3;
}
foreach my $ver (@x, @y, @z) {
$total += &writepacked (\*ACF, 'xflt', $ver, undef);
}
@ver = ();
&$dumpver;
}

$rval =~ s/^\s*=\s*//;
Expand All @@ -117,6 +121,8 @@ sub ACFgen {
$oldname = $name;
}
close TXT;

&$dumpver if @ver;
close ACF;

return $total, $lines;
Expand Down

0 comments on commit d865bab

Please sign in to comment.