summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/clientfiles
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir/clientfiles')
-rwxr-xr-xfacetracknoir/clientfiles/make-csv.pl72
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/README-CREDIT.txt (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/README-CREDIT.txt)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/ft_tester/Makefile.am (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/Makefile.am)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/ft_tester/Makefile.in (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/Makefile.in)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/ft_tester/fttester.rc.in (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/fttester.rc.in)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/ft_tester/main.cpp (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/main.cpp)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/ft_tester/resource.h (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/resource.h)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient.h (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient.h)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient.spec (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient.spec)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient_dll.h (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient_dll.h)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient_main.c (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient_main.c)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/important-stuff/game_data.c (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/game_data.c)7
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/important-stuff/game_data.h (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/game_data.h)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/tester/Makefile.am (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/Makefile.am)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/tester/Makefile.in (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/Makefile.in)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/tester/main.cpp (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/main.cpp)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/tester/npifc.c (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npifc.c)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/tester/npifc.h (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npifc.h)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/tester/npview.rc.in (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npview.rc.in)0
-rw-r--r--facetracknoir/clientfiles/very-important-source-code/tester/resource.h (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/resource.h)0
l---------facetracknoir/clientfiles/very-important-source-code/tester/rest.c (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/rest.c)0
l---------facetracknoir/clientfiles/very-important-source-code/tester/rest.h (renamed from facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/rest.h)0
22 files changed, 76 insertions, 3 deletions
diff --git a/facetracknoir/clientfiles/make-csv.pl b/facetracknoir/clientfiles/make-csv.pl
new file mode 100755
index 00000000..ee60364e
--- /dev/null
+++ b/facetracknoir/clientfiles/make-csv.pl
@@ -0,0 +1,72 @@
+#!/usr/bin/env perl
+
+use strict;
+use List::Util qw'reduce';
+
+sub get_games_1 {
+ my @games;
+
+ open my $fd, "<", $ARGV[1] or die "open: $!";
+ <$fd>;
+
+ while (defined(my $line = <$fd>)) {
+ chomp $line;
+ if ($line !~ /^(\d+)\s+"([^"]+)"(?:\s+\(([0-9A-F]{16})\))?$/) {
+ warn "Broken line";
+ next;
+ }
+ push @games, +{ id => $1, name => $2, key => defined $3 ? (sprintf "%04X", $1) . $3 . '00' : undef};
+ }
+
+ [@games];
+}
+
+sub get_games_2 {
+ open my $fd, "<", $ARGV[0] or die "open: $!";
+ <$fd>;
+ my @games;
+ while (defined(my $line = <$fd>)) {
+ chomp $line;
+ my @line = split/;/, $line;
+ if (@line != 8) {
+ warn "Broken line";
+ next;
+ }
+ my @cols = qw'no name proto since verified by id key';
+ push @games, +{ map { $cols[$_] => $line[$_] } 0..$#cols };
+ }
+ [@games];
+}
+
+sub merge {
+ my ($new_games, $old_games) = @_;
+ my $no = (reduce { $a->{no} > $b->{no} ? $a : $b } +{id=>0}, @$old_games)->{no} + 1;
+ my %game_hash = map { $_->{name} => $_ } @$old_games;
+ my %ids = map { $_->{id} => 1 } @$old_games;
+ for my $g (@$new_games) {
+ if (!exists $game_hash{$g->{name}} && !exists $ids{$g->{id}}) {
+ $game_hash{$g->{name}} = +{
+ no => $no++,
+ name => $g->{name},
+ proto => 'FreeTrack20',
+ since => (defined $g->{key} ? 'V170' : 'V160'),
+ verified => '',
+ by => '',
+ id => $g->{id},
+ key => $g->{key}
+ };
+ }
+ }
+ print "No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID\n";
+ for (sort { lc($a->{name}) cmp lc($b->{name}) } values %game_hash) {
+ my $g = {%$_};
+ if (!defined $g->{key}) {
+ $g->{key} = (sprintf "%04X", $g->{no}) . (join"", map { sprintf "%02X", int rand 256 } 0 .. 7) . '00';
+ }
+ my @cols = qw'no name proto since verified by id key';
+ print join";", map { $g->{$_} } @cols;
+ print "\n";
+ }
+}
+
+merge(get_games_1(), get_games_2());
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/README-CREDIT.txt b/facetracknoir/clientfiles/very-important-source-code/README-CREDIT.txt
index 82214139..82214139 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/README-CREDIT.txt
+++ b/facetracknoir/clientfiles/very-important-source-code/README-CREDIT.txt
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/Makefile.am b/facetracknoir/clientfiles/very-important-source-code/ft_tester/Makefile.am
index 02747edb..02747edb 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/Makefile.am
+++ b/facetracknoir/clientfiles/very-important-source-code/ft_tester/Makefile.am
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/Makefile.in b/facetracknoir/clientfiles/very-important-source-code/ft_tester/Makefile.in
index d1fff34d..d1fff34d 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/Makefile.in
+++ b/facetracknoir/clientfiles/very-important-source-code/ft_tester/Makefile.in
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/fttester.rc.in b/facetracknoir/clientfiles/very-important-source-code/ft_tester/fttester.rc.in
index 332f3c73..332f3c73 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/fttester.rc.in
+++ b/facetracknoir/clientfiles/very-important-source-code/ft_tester/fttester.rc.in
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/main.cpp b/facetracknoir/clientfiles/very-important-source-code/ft_tester/main.cpp
index a737f88f..a737f88f 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/main.cpp
+++ b/facetracknoir/clientfiles/very-important-source-code/ft_tester/main.cpp
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/resource.h b/facetracknoir/clientfiles/very-important-source-code/ft_tester/resource.h
index 8bba17b4..8bba17b4 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/ft_tester/resource.h
+++ b/facetracknoir/clientfiles/very-important-source-code/ft_tester/resource.h
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient.h b/facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient.h
index 770e1c71..770e1c71 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient.h
+++ b/facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient.h
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient.spec b/facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient.spec
index 7fe5f1b4..7fe5f1b4 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient.spec
+++ b/facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient.spec
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient_dll.h b/facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient_dll.h
index b0bab5db..b0bab5db 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient_dll.h
+++ b/facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient_dll.h
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient_main.c b/facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient_main.c
index f892f89e..f892f89e 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/NPClient_main.c
+++ b/facetracknoir/clientfiles/very-important-source-code/important-stuff/NPClient_main.c
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/game_data.c b/facetracknoir/clientfiles/very-important-source-code/important-stuff/game_data.c
index 3197ba37..f80a7d44 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/game_data.c
+++ b/facetracknoir/clientfiles/very-important-source-code/important-stuff/game_data.c
@@ -6,8 +6,6 @@
#include <stdint.h>
#include <sys/stat.h>
#include <string.h>
-#include <utils.h>
-
//First 5 bytes is MD5 hash of "NaturalPoint"
static uint8_t secret_key[] = {0x0e, 0x9a, 0x63, 0x71, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
@@ -114,10 +112,12 @@ static void game_data_close()
free(decoded);
}
+#define ltr_int_log_message(...) fprintf(stderr, __VA_ARGS__)
+
bool get_game_data(const char *input_fname, const char *output_fname, bool from_update)
{
FILE *outfile = NULL;
- if((outfile = fopen(output_fname, "w")) == NULL){
+ if((outfile = (output_fname ? fopen(output_fname, "w") : stdout)) == NULL){
ltr_int_log_message("Can't open the output file '%s'!\n", output_fname);
return false;
}
@@ -147,3 +147,4 @@ bool get_game_data(const char *input_fname, const char *output_fname, bool from_
return true;
}
+int main(int argc, char** argv) { return argc > 1 && get_game_data(argv[1], NULL, false); }
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/game_data.h b/facetracknoir/clientfiles/very-important-source-code/important-stuff/game_data.h
index b71f7a15..b71f7a15 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/important-stuff/game_data.h
+++ b/facetracknoir/clientfiles/very-important-source-code/important-stuff/game_data.h
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/Makefile.am b/facetracknoir/clientfiles/very-important-source-code/tester/Makefile.am
index e025209a..e025209a 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/Makefile.am
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/Makefile.am
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/Makefile.in b/facetracknoir/clientfiles/very-important-source-code/tester/Makefile.in
index cc49d754..cc49d754 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/Makefile.in
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/Makefile.in
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/main.cpp b/facetracknoir/clientfiles/very-important-source-code/tester/main.cpp
index 95ca0d9b..95ca0d9b 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/main.cpp
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/main.cpp
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npifc.c b/facetracknoir/clientfiles/very-important-source-code/tester/npifc.c
index b036464e..b036464e 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npifc.c
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/npifc.c
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npifc.h b/facetracknoir/clientfiles/very-important-source-code/tester/npifc.h
index d580e16d..d580e16d 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npifc.h
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/npifc.h
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npview.rc.in b/facetracknoir/clientfiles/very-important-source-code/tester/npview.rc.in
index 231002f1..231002f1 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/npview.rc.in
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/npview.rc.in
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/resource.h b/facetracknoir/clientfiles/very-important-source-code/tester/resource.h
index 328d9cb7..328d9cb7 100644
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/resource.h
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/resource.h
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/rest.c b/facetracknoir/clientfiles/very-important-source-code/tester/rest.c
index 663c21a9..663c21a9 120000
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/rest.c
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/rest.c
diff --git a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/rest.h b/facetracknoir/clientfiles/very-important-source-code/tester/rest.h
index 6dca182a..6dca182a 120000
--- a/facetracknoir/clientfiles/important-source-code-really-important-really-really/tester/rest.h
+++ b/facetracknoir/clientfiles/very-important-source-code/tester/rest.h