Skip to content

Commit

Permalink
Initial import of AtmoSwing as developed by P. Horton during his PhD …
Browse files Browse the repository at this point in the history
…work.
  • Loading branch information
pascalhorton committed Feb 14, 2013
0 parents commit e5b6053
Show file tree
Hide file tree
Showing 324 changed files with 83,515 additions and 0 deletions.
2 changes: 2 additions & 0 deletions art/_scripts/commands.txt
@@ -0,0 +1,2 @@
./libexec-png2wx.pl -C bullets.cpp -H bullets.h -M _BULLETS_H_ bullets/*.png
./libexec-png2wx.pl -C toolbar.cpp -H toolbar.h -M _TOOLBAR_H_ toolbar/*.png
134 changes: 134 additions & 0 deletions art/_scripts/libexec-png2wx.pl
@@ -0,0 +1,134 @@
#!/usr/bin/perl
#
# png2wx - embed png in C++
# written by Jan Engelhardt <jengelh [at] medozas de>, 2004 - 2008
# http://jengelh.medozas.de/
# released in the Public Domain
#

use Getopt::Long;
use strict;

exit(main(\@ARGV));

sub main ()
{
my($cpp_file, $hpp_file, $hpp_include, $Marker, $main, $tmp);
Getopt::Long::Configure(qw(bundling));
GetOptions(
"C=s" => \$cpp_file,
"H=s" => \$hpp_file,
"M=s" => \$Marker,
);

if ($cpp_file eq "" || $hpp_file eq "") {
die "You need to specify -C, -H options.\n";
}

$hpp_include = $hpp_file;
$hpp_include =~ s{^.*/}{};
if ($Marker eq "") {
$Marker = uc $hpp_file;
$Marker =~ s{[^a-z]}{_}gi;
print "Using marker $Marker\n";
}

#
# C++ header
#
open(HPP, "> $hpp_file") || warn "Could not open $hpp_file: $!\n";
$tmp = uc $hpp_file;
$tmp =~ s/[^A-Z0-9]/_/g;
print HPP "/* Autogenerated by png2wx.pl on ",
scalar(localtime()), " */\n";
print HPP <<"--EOF";
#ifndef $Marker
#define $Marker 1
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
# include <wx/wx.h>
#endif
extern void initialize_images(void);
--EOF

#
# C++/WX file
#
open(CPP, "> $cpp_file") || warn "Could not open $cpp_file: $!\n";
print CPP "/* Autogenerated by png2wx.pl on ",
scalar(localtime()), " */\n";
print CPP <<"--EOF";
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
# include <wx/wx.h>
#endif
#include <wx/mstream.h>
#include "$hpp_include"
--EOF

#
# Process files from the command line
#
foreach my $file (@ARGV) {
my $base = $file;
$base =~ s{^.*/}{};
$base =~ s{(.*)\.(?:jpg|png)$}{$1}gis;
$base =~ s/[^a-z0-9]/_/gio;

print HPP "extern wxBitmap *_img_$base;\n";
print CPP "wxBitmap *_img_$base;\n";

$main .= " {\n".
" wxMemoryInputStream sm(\"".encoded($file)."\", ".(-s $file).");\n".
" _img_$base = new wxBitmap(wxImage(sm));\n".
" }\n";
}

#
# Fixup C++ header
#
print HPP "\n", "#endif /* $Marker */\n";
close HPP;

print CPP
"\n",
"void initialize_images(void)\n{\n",
$main,
" return;\n",
"}\n";
close CPP;
return 0;
}

sub encoded ()
{
my $file = shift @_;
my $data;
local *FH;

if (!open(FH, "< $file")) {
warn "Could not open $file: $!\n";
return;
}

binmode FH;
$data = join(undef, <FH>);
$data =~ s/\\/\\\\/go;
$data =~ s/([^\x07\x08\x0a\x0d\x20-\x7e])/sprintf "\\%03o", ord $1/egs;
$data =~ s/\x07/\\a/gs;
$data =~ s/\x08/\\b/gs;
$data =~ s/\x09/\\t/gs;
$data =~ s/\x0a/\\n/gs;
$data =~ s/\x0b/\\v/gs;
$data =~ s/\x0c/\\f/gs;
$data =~ s/\x0d/\\r/gs;
$data =~ s/\"/\\"/gs;
# avoid trigraphs:
$data =~ s/\?\?(?=[-\(\)<>=\/\'!])/?\\077/g;
close FH;
return $data;
}
Binary file added art/bullets/arrows_left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/arrows_right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/bullet_error.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/bullet_green.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/bullet_white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/bullet_yellow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/clock_now.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/hidden.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/led_green.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/led_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/led_red.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/led_yellow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/plus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/plus_toggle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions art/bullets/ressources/buttons.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/ressources/clock_now.xcf
Binary file not shown.
Binary file added art/bullets/ressources/clock_now_split.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/ressources/clock_now_split.xcf
Binary file not shown.
Binary file added art/bullets/ressources/close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/bullets/ressources/hidden.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions art/bullets/ressources/led_green_xpm.xpm
@@ -0,0 +1,83 @@
/* XPM */
static const char * led_green_xpm[] = {
"15 15 65 1",
" c None",
". c #0A0A02",
"+ c #42822A",
"@ c #9DDE58",
"# c #6AC22E",
"$ c #163E16",
"% c #969296",
"& c #2C5E26",
"* c #BEBEC6",
"= c #4A9322",
"- c #D2FD88",
"; c #46573E",
"> c #729642",
", c #9EC656",
"' c #A3EE5A",
") c #528642",
"! c #4F6547",
"~ c #559B37",
"{ c #E6E6DE",
"] c #62666A",
"^ c #223E1E",
"/ c #222622",
"( c #859D82",
"_ c #93D054",
": c #B2E66A",
"< c #52A925",
"[ c #7E8487",
"} c #3A7A2A",
"| c #75AE42",
"1 c #BEDE6A",
"2 c #BDF478",
"3 c #9EC262",
"4 c #D6E2CE",
"5 c #C6B2C6",
"6 c #5AA622",
"7 c #7FCF40",
"8 c #424242",
"9 c #C6FA9A",
"0 c #68B334",
"a c #5E6462",
"b c #CBD3CB",
"c c #C4FE7E",
"d c #A6C687",
"e c #577947",
"f c #12360A",
"g c #7A9C6A",
"h c #B6D69E",
"i c #1A5212",
"j c #558835",
"k c #5A5A5A",
"l c #5A9642",
"m c #BEDA9E",
"n c #426A3A",
"o c #7AAA6A",
"p c #7AC040",
"q c #5AAE36",
"r c #253627",
"s c #9E9E9A",
"t c #EEFAE6",
"u c #3B4E3A",
"v c #67A93D",
"w c #52703E",
"x c #878D8A",
"y c #6A7272",
"z c #326A2A",
" k/./k ",
" a8[*b5%ry ",
" y8(b4t{b(u] ",
" s^wgdmdhdon^% ",
" u&=~v>||v~l&u ",
" f+=<00p00~=}$ ",
" f=<qp@7_7#6~f ",
" &q#__@@@@7pqi ",
" &q7@:222:@7vz ",
" ej@@'c99c'@le ",
" g+p29c9cccp)x ",
" wj,c---2_jws ",
" [!w>313>e![ ",
" xauu8;u![ ",
" [yyyx "};

0 comments on commit e5b6053

Please sign in to comment.