git.shiar.nl
/
perl
/
schtarr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
XXX: scmap: restore metadata marking (era-dependant styling)
[perl/schtarr.git]
/
screp
diff --git
a/screp
b/screp
index dc24f05259d103026a968787d00f6ff0c21dcedc..29b7e0b1acb437dfb6e6a1d703a8ae3eb9400bd4 100755
(executable)
--- a/
screp
+++ b/
screp
@@
-174,7
+174,7
@@
if ($ACTGIF) {
binmode $imgfile;
select $imgfile;
binmode $imgfile;
select $imgfile;
-
us
e GD;
+
requir
e GD;
my $ani = GD::Image->new($head->{width}, $head->{height});
my $bg = $ani->colorAllocate(0, 0, 0);
my @plot = (
my $ani = GD::Image->new($head->{width}, $head->{height});
my $bg = $ani->colorAllocate(0, 0, 0);
my @plot = (
@@
-216,9
+216,12
@@
if ($ACTGIF) {
select STDOUT;
}
select STDOUT;
}
-use Games::StarCraft::DB;
+if ($DBGAME or $DBNAME) {
+
+require Games::StarCraft::DB;
my $Db = Games::StarCraft::DB->connect({RaiseError => 1})
or die "No database: $DBI::errstr\n";
my $Db = Games::StarCraft::DB->connect({RaiseError => 1})
or die "No database: $DBI::errstr\n";
+
sub findaccount ($) {
my ($name) = @_;
my $query = $Db->query(q{
sub findaccount ($) {
my ($name) = @_;
my $query = $Db->query(q{
@@
-306,6
+309,8
@@
if ($DBNAME) {
$Db->commit;
}
$Db->commit;
}
+}
+
if ($APMSVG) {
my @seq; # player => time (s) => actions
$seq[$_->[1]][$_->[0] * .042]++ for @$map;
if ($APMSVG) {
my @seq; # player => time (s) => actions
$seq[$_->[1]][$_->[0] * .042]++ for @$map;
@@
-324,7
+329,7
@@
if ($APMSVG) {
}
BEGIN { unshift @INC, '.' }
}
BEGIN { unshift @INC, '.' }
-
us
e SVG::TT::Graph::TimeSeries;
+
requir
e SVG::TT::Graph::TimeSeries;
my $graph = SVG::TT::Graph::TimeSeries->new({
height => 1200,
width => 1600,
my $graph = SVG::TT::Graph::TimeSeries->new({
height => 1200,
width => 1600,