#!/usr/bin/env perl

use strict;
use warnings;
use v5.18;

use MIME::Base64;

local $/;
print <<EOS;
// +build js sdl

// font used for letters: source code pro

package main

func init() {
        TileImgs = map[string][]byte{}
EOS
while (my $text = <>) {
    my $file = $ARGV;
    $file =~ s/\.png$//;
    print "TileImgs[\"$file\"] = []byte(`";
    print encode_base64($text);
    print "`)\n";
}

print <<EOS;
}
EOS
