├── README.md ├── LICENSE ├── replicate-file.sh ├── godot.sh └── strip-to-frames.pl /README.md: -------------------------------------------------------------------------------- 1 | Godot Engine stuff I done 2 | ========================= 3 | 4 | * godot.sh - script for Linux that will automatically download and run the latest version at launch. 5 | * replicate-file.sh - script for Linux that will replicate changes from one file to all others with the same name in a certain directory (useful for updating one module across multiple projects). 6 | * strip-to-frames.pl - perl script that will convert a strip or grid of animation frames into individual frame image files. 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Shine Upon Thee 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /replicate-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PROJECTPATH=~/Projects 4 | 5 | ################################################################################################################## 6 | # replicate-file.sh 7 | # 8 | # DESCRIPTION: 9 | # 10 | # This is a script that will update all copies of a reusable file 11 | # from one master file, specified on the command line. 12 | # The primary use case is for updating one module into many projects. 13 | # 14 | # USAGE: 15 | # 16 | # To replicate to all copies found in the projects directory: 17 | # ./replicate-file.sh 18 | # 19 | # CONFIG: 20 | # 21 | # An optional config file can be created as ~/.getgodot.conf. This 22 | # file is shared with Shine Upon Thee's godot.sh (Get Godot) script. 23 | # Set the project path to search for replicants with this: 24 | # PROJECTPATH=/path/to/projects 25 | # 26 | # NOTES: 27 | # 28 | # This script is written and maintained by Dana Olson of Shine Upon Thee 29 | # http://www.shineuponthee.com/ 30 | # 31 | # https://github.com/adolson/godot-stuff/blob/master/replicate-file.sh 32 | # https://raw.githubusercontent.com/adolson/godot-stuff/master/replicate-file.sh 33 | # 34 | # It is licensed under the X11/Expat/"MIT" terms (whatever the Godot Engine uses) 35 | # 36 | # CHANGELOG: 37 | # 38 | # 1.0 - initial release 39 | # 1.1 - verbiage fixes 40 | # 1.2 - link fix, renamed script 41 | # 42 | ################################################################################################################## 43 | 44 | # allow sync of the project path with the getgodot script config file 45 | if [[ -r ~/.getgodot.conf ]] 46 | then 47 | source ~/.getgodot.conf 48 | fi 49 | 50 | 51 | echo 52 | echo 53 | 54 | # ensure the master file exists 55 | if [[ ! -f $1 || ! -r $1 ]] 56 | then 57 | echo "No master file specified." 58 | echo "Usage:" 59 | echo " ./replicate-file.sh " 60 | echo 61 | exit 62 | fi 63 | 64 | MASTER=`readlink -m $1` 65 | if [[ ! -f $MASTER || ! -r $MASTER ]] 66 | then 67 | echo "Specified master file could not be read." 68 | echo "Usage:" 69 | echo " ./replicate-file.sh " 70 | echo 71 | exit 72 | fi 73 | 74 | if [[ ! -d $PROJECTPATH || ! -x $PROJECTPATH || ! -r $PROJECTPATH ]] 75 | then 76 | echo "Problem reading $PROJECTPATH. Check your configuration." 77 | echo 78 | exit 79 | fi 80 | 81 | MODULE=`basename $MASTER` 82 | INSTALLED=`find $PROJECTPATH -name "$MODULE" ! -path $MASTER` 83 | if [[ $INSTALLED == "" ]] 84 | then 85 | echo "No copies of $MODULE to update in $PROJECTPATH." 86 | echo 87 | exit 88 | fi 89 | 90 | echo "Update files:" 91 | echo 92 | find $PROJECTPATH -name "$MODULE" ! -path $MASTER -exec echo " * {}" \; 93 | 94 | echo 95 | echo "With master: $MASTER" 96 | echo -n "Proceed? (y/N) " 97 | read -n 1 KEY 98 | echo 99 | 100 | if [[ $KEY = y || $KEY = Y ]] 101 | then 102 | echo -n "Updating: " 103 | find $PROJECTPATH -name "$MODULE" ! -path $MASTER -exec cp "$MASTER" {} \; -exec echo -n "*" \; 104 | echo " Done!" 105 | else 106 | echo "Canceled." 107 | fi 108 | echo 109 | exit 110 | -------------------------------------------------------------------------------- /godot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | ################################################################################################################## 5 | # godot.sh - aka: GET GODOT 6 | # 7 | # DESCRIPTION: 8 | # 9 | # This script will check out and build the source for Godot Engine. 10 | # After downloading, the compiled Linux binary will launch. 11 | # 12 | # USAGE: 13 | # 14 | # To update and build and launch the default branch: 15 | # ./godot.sh 16 | # To update and build but NOT launch the default branch: 17 | # ./godot.sh build 18 | # To launch the latest installed build of the default branch: 19 | # ./godot.sh launch 20 | # 21 | # CONFIG: 22 | # 23 | # An optional config file can be created as ~/.gitgodot.conf. 24 | # Setting the following option will change the default engine branch (default is master): 25 | # BRANCH=master 26 | # Setting the following option will change where the engine code is stored: 27 | # ENGINEPATH=/path/to/godot/code 28 | # Setting the following option will enable downloading the demos: 29 | # GETDEMOS=1 30 | # Setting the following option will change the default demos branch (default is master): 31 | # DEMOBRANCH=master 32 | # Setting the following option will change where the demo projects are stored: 33 | # DEMOPATH=/path/to/godot/demos 34 | # Setting the following option will change where we download the temporary copy of the latest version of this script: 35 | # TMPDIR=/tmp 36 | # Setting the following option will allow multi-job compiling for the git option. Set to number of CPU cores to use: 37 | # CORES=4 38 | # 39 | # NOTES: 40 | # 41 | # This script is written and maintained by Dana Olson of ShineUponThee 42 | # http://www.shineuponthee.com/ 43 | # 44 | # As of version 2.3, the script will check for newer versions. However, you can always find 45 | # the latest version yourself on Github here: 46 | # 47 | # https://github.com/adolson/godot-stuff/blob/master/godot.sh 48 | # https://raw.githubusercontent.com/adolson/godot-stuff/master/godot.sh 49 | # 50 | # It is licensed under the X11/Expat/"MIT" terms (whatever the Godot Engine uses) 51 | # 52 | # CHANGELOG: 53 | # 54 | # 4.0 - new release that focuses solely on building from source 55 | # - config file changed so as to not conflict with old versions 56 | # 4.1 - added text about adding execute bit when new script version is available 57 | # 4.2 - remove old downloaded script from temp directory if it exists 58 | # 4.3 - added demo repo and options to enable automatically downloading them 59 | # 4.4 - bugfixes 60 | # 61 | # As of version 4.0, this script has been changed such that most of the old changelog is no 62 | # longer relevant. You can check out older commits if you wish to adopt it and modify it 63 | # such that it functions with the changes made in the years since it was last updated. 64 | # 65 | ################################################################################################################## 66 | 67 | #------------------------VARS------------------------ 68 | 69 | # where to keep the Godot Engine code 70 | ENGINEPATH=~/.bin/GodotEngine/engine 71 | 72 | # temporary directory, used for fetching latest script for comparison purposes 73 | TMPDIR=/tmp/getgodot 74 | 75 | # branch to track - default is "master" 76 | BRANCH=master 77 | 78 | # should we also checkout the demos? 79 | GETDEMOS=0 80 | 81 | # where to keep the demos 82 | DEMOPATH=~/.bin/GodotEngine/demos 83 | 84 | # branch for demos - default is "master" 85 | DEMOBRANCH=master 86 | 87 | # check if we should launch 64-bit or 32-bit 88 | ARCH=`uname -m` 89 | 90 | # support multiple jobs if the cpu is multicore 91 | CORES=1 92 | 93 | # override any of the above vars in a user config file 94 | if [[ -r ~/.gitgodot.conf ]] 95 | then 96 | if [[ -t 0 ]] 97 | then 98 | echo "Loading user config file." 99 | fi 100 | source ~/.gitgodot.conf 101 | fi 102 | 103 | 104 | ############################################################################################################# 105 | # start of checking for newer versions of this script 106 | 107 | ZENITY=`which zenity` 108 | 109 | SELFSCR=`readlink -f $0` 110 | SELFSUM=`md5sum $SELFSCR | cut -d" " -f1` 111 | 112 | mkdir -p $TMPDIR 113 | rm -f $TMPDIR/godot.sh 114 | wget -q https://raw.githubusercontent.com/adolson/godot-stuff/master/godot.sh -O $TMPDIR/godot.sh 115 | LATESTSUM=`md5sum $TMPDIR/godot.sh | cut -d" " -f1` 116 | 117 | # make sure the downloaded file is reasonably long (should always be longer than at least 1000 characters) 118 | LATESTCOUNT=`wc -c $TMPDIR/godot.sh | cut -d" " -f1` 119 | if [[ $LATESTCOUNT < 1000 ]] 120 | then 121 | LATESTSUM=$SELFSUM 122 | fi 123 | 124 | # md5sums don't match, print a notice to the user 125 | if [[ $SELFSUM != $LATESTSUM ]] 126 | then 127 | if [[ -t 0 ]] 128 | then 129 | echo 130 | echo "[NEW SCRIPT RELEASE]" 131 | echo "It looks like there is a newer version of this script available!" 132 | echo "This was determined due to an MD5 checksum mismatch between the latest version of the script" 133 | echo "and the copy currently running. Note that if you modified this script yourself (instead of" 134 | echo "using a config file, for example), then this notice will also be triggered." 135 | echo 136 | echo "You can update it right now by following these steps:" 137 | echo " * Press Ctrl+C to quit this script" 138 | echo " * Check the changes yourself (optional): diff -u $TMPDIR/godot.sh $SELFSCR" 139 | echo " * Copy the new version: mv $TMPDIR/godot.sh $SELFSCR" 140 | echo " * Make it executable: chmod +x $SELFSCR" 141 | echo " * Run the script again." 142 | echo "Press Enter to continue with the current version of the script." 143 | read 144 | elif [[ -x $ZENITY ]] 145 | then 146 | $ZENITY --notification --text="A new version of the Get Godot script is available. Run in a terminal for more information." & 147 | fi 148 | fi 149 | 150 | # end of checking for newer version of this script 151 | ############################################################################################################# 152 | 153 | 154 | # make and change to engine directory 155 | mkdir -p $ENGINEPATH 156 | cd $ENGINEPATH 157 | 158 | # make sure we're on the desired branch, if there is a repo here 159 | if [[ -d .git ]] 160 | then 161 | git checkout $BRANCH 162 | fi 163 | 164 | # user just wants to launch pre-existing binary 165 | if [[ $@ == "launch" ]] 166 | then 167 | 168 | if [[ $ARCH == 'x86_64' ]] 169 | then 170 | if [[ -x $ENGINEPATH/bin/godot.x11.tools.64 ]] 171 | then 172 | $ENGINEPATH/bin/godot.x11.tools.64 173 | else 174 | echo "Unable to find executable. Try building first!" 175 | fi 176 | else 177 | if [[ -x $ENGINEPATH/bin/godot.x11.tools.32 ]] 178 | then 179 | $ENGINEPATH/bin/godot.x11.tools.32 180 | else 181 | echo "Unable to find executable. Try building first!" 182 | fi 183 | fi 184 | # user wants to checkout latest code and build it 185 | else 186 | 187 | # first grab the demos, if user wants them 188 | if [[ $GETDEMOS != 0 ]] 189 | then 190 | if [[ -t 0 ]] 191 | then 192 | echo "Will stash and pull the current demos from github." 193 | fi 194 | 195 | if [[ ! -d $DEMOPATH/.git ]] 196 | then 197 | git clone https://github.com/godotengine/godot-demo-projects.git $DEMOPATH 198 | fi 199 | 200 | cd $DEMOPATH 201 | 202 | git checkout $DEMOBRANCH 203 | git stash 204 | git pull 205 | fi 206 | 207 | # now do the engine build 208 | if [[ -t 0 ]] 209 | then 210 | echo "Will pull and build the current Godot Engine code from github." 211 | fi 212 | 213 | if [[ ! -d $ENGINEPATH/.git ]] 214 | then 215 | git clone https://github.com/okamstudio/godot.git $ENGINEPATH 216 | fi 217 | 218 | cd $ENGINEPATH 219 | 220 | git checkout $BRANCH 221 | git stash 222 | git pull 223 | 224 | scons -j $CORES platform=x11 builtin_openssl=yes 225 | 226 | if [[ -t 0 ]] 227 | then 228 | echo "All done. If this failed, make sure you have all the necessary tools and" 229 | echo "libraries installed and try again." 230 | fi 231 | 232 | # launch it, unless user only wants to build 233 | if [[ $@ != 'build' ]] 234 | then 235 | if [[ $ARCH == 'x86_64' ]] 236 | then 237 | bin/godot.x11.tools.64 238 | else 239 | bin/godot.x11.tools.32 240 | fi 241 | fi 242 | fi 243 | 244 | # end of building the latest version 245 | ############################################################################################################# 246 | -------------------------------------------------------------------------------- /strip-to-frames.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # this script will take an image file that has any number of rows of sprites and 4 | # convert it to numbered image frame files. 5 | # will automatically number and zero-pad based on total frame count. 6 | # can also ensure there is a custom size transparent border around each frame. 7 | # can also ensure dimensions are even numbers (better mipmapping) 8 | 9 | # resulting frames can be merged back into a sprite sheet using imagemagick: 10 | # montage -background transparent -mode Concatenate sprites-f* spritesheet.png 11 | # if resulting sheet is too wide or tall for Godot (>2048px), try changing 12 | # the number of vertical or horizontal tiles 13 | # montage -tiles 5x -background transparent -mode Concatenate sprites-f* spritesheet.png 14 | # montage -tiles x5 -background transparent -mode Concatenate sprites-f* spritesheet.png 15 | 16 | use strict; 17 | use warnings; 18 | use Image::Magick; 19 | 20 | my $TESTANIMATION=1; # test the result immediately 21 | 22 | my $SOURCE = $ARGV[0]; 23 | my $COLS = $ARGV[1] ||= 20; 24 | my $ROWS = $ARGV[2] ||= 1; 25 | my $PREFIX = $ARGV[3]; 26 | if (!$PREFIX) { 27 | $PREFIX = $SOURCE; 28 | $PREFIX =~ s{\.[^.]+$}{}; # strip file extension 29 | $PREFIX .= '-f'; # append -f (for frame). may help avoid overwriting non-frames? I dunno. maybe not needed. 30 | } 31 | my $BORDER = $ARGV[4] ||= 0; 32 | my $ALLOWODD = $ARGV[5] ||= 0; # force width and height to be a power of 2 33 | my $TRANSBG = $ARGV[6] ||= 'magenta'; # background color to make transparent 34 | 35 | my $SPRITECOUNT = $COLS * $ROWS; # number of sprites 36 | my $DIGITS = "%0" . length($SPRITECOUNT) . "d"; # automatic format for sprite numbering 37 | 38 | if (!$SOURCE) { 39 | print "\nERROR:\n\tYou must specify a source sprite sheet."; 40 | print "\n\nSYNTAX:"; 41 | print "\n\tstrip-to-frames.pl source [cols=20] [rows=1] [prefix] [border] [oddsize] [transbg]"; 42 | print "\n\nOPTIONS:"; 43 | print "\n\tsource\t- source image file"; 44 | print "\n\tcols\t- number of sprite columns (default=20)"; 45 | print "\n\trows\t- number of sprite rows (default=1)"; 46 | print "\n\tprefix\t- sprite frame image prefix (default=source-f)"; 47 | print "\n\tborder\t- size, in px, of transparent border padding to add to image (default=0)"; 48 | print "\n\toddsize\t- set to allow odd-numbered width and height dimensions (default=0)"; 49 | print "\n\ttransbg\t- which color of the background to change to transparent (default=magenta)"; 50 | print "\n\n"; 51 | exit; 52 | } 53 | 54 | my $image = new Image::Magick; 55 | 56 | # get x and y resolution of source 57 | my ($xsize, $ysize, $filesize, $fileformat) = $image->Ping($SOURCE); 58 | 59 | 60 | # calc sprite x and y size 61 | my $xsprite = $xsize / $COLS; 62 | my $ysprite = $ysize / $ROWS; 63 | 64 | print "\nExtracting $SPRITECOUNT sprites ($xsprite x $ysprite) from source strip ($xsize x $ysize)...\n"; 65 | 66 | #TODO maybe print a warning / prompt if image size is not an exact multiple of calculated width or height 67 | 68 | my $row; 69 | my $col; 70 | my $num; 71 | my $geometry; 72 | foreach (1..$ROWS) { 73 | $row = $_; 74 | foreach (1..$COLS) { 75 | $col = $_; 76 | # calc which sprite number we're on 77 | $num = sprintf($DIGITS,($col + (($row - 1) * $COLS))); 78 | # find the sprite in the image 79 | $geometry = $xsprite . "x" . $ysprite . "+" . ($xsprite*($col-1)) . "+" . ($ysprite*($row-1)); 80 | # ensure the variable is empty 81 | @$image = (); 82 | # now read the source image before processing the next sprite 83 | $image->Read($SOURCE); 84 | # crop it 85 | $image->Crop(geometry=>$geometry); 86 | # set magenta to transparent 87 | #FIXME this should maybe be automatic - pull color from first pixel? 88 | #FIXME maybe only if there is no alpha channel already? 89 | $image->Set('alpha'=>'set'); 90 | $image->Transparent($TRANSBG); 91 | # repage 92 | $image->Set('page'=>'0x0+0+0'); 93 | # write to file 94 | $image->Write(filename=>"$PREFIX$num.png", compression=>'None'); 95 | } 96 | } 97 | 98 | 99 | 100 | print "Sprite extraction complete. Optimizing sprite size...\n"; 101 | 102 | 103 | 104 | # shrink from south-east corner 105 | 106 | my ($xmax, $ymax); 107 | foreach (1..$SPRITECOUNT) { 108 | $num = sprintf($DIGITS,$_); 109 | # ensure the variable is empty 110 | @$image = (); 111 | # read the sprite 112 | $image->Read("$PREFIX$num.png"); 113 | $image->Set(magick=>'RGBA'); 114 | # store the north-west corner pixel value 115 | my @corner = my @corner2 = $image->GetPixel(x=>0, y=>0, channel=>'RGBA', normalize=>'true'); 116 | $corner2[0] = 0; 117 | $corner2[1] = 1; 118 | $corner2[2] = 1; 119 | $corner2[3] = 0; 120 | $image->SetPixel(x=>0,y=>0,channel=>'RGBA',normalize=>'true',color=>\@corner2); 121 | # trim the south-east edges 122 | $image->Trim(); 123 | # restore the pixel we overwrote 124 | $image->SetPixel(x=>0,y=>0,channel=>'RGBA',normalize=>'true',color=>\@corner); 125 | # repage 126 | $image->Set('page'=>'0x0+0+0'); 127 | # find the biggest height and width so far 128 | my ($xtmp, $ytmp) = $image->Get('width','height'); 129 | $xmax ||= $xtmp; 130 | $xmax = $xtmp if ($xtmp > $xmax); 131 | $ymax ||= $ytmp; 132 | $ymax = $ytmp if ($ytmp > $ymax); 133 | # write the image 134 | $image->Write("$PREFIX$num.png"); 135 | } 136 | 137 | # optional transparent border padding 138 | $xmax += $BORDER; 139 | $ymax += $BORDER; 140 | 141 | # now loop through and scale the canvas to the max size found in the previous loop 142 | foreach (1..$SPRITECOUNT) { 143 | $num = sprintf($DIGITS,$_); 144 | @$image = (); 145 | $image->Read("$PREFIX$num.png"); 146 | $image->Set(magick=>'RGBA'); 147 | my $geometry = $xmax . "x" . $ymax; 148 | # increase canvas size 149 | $image->Extent(geometry=>$geometry,background=>'transparent',gravity=>'NorthWest'); 150 | # repage 151 | $image->Set('page'=>'0x0+0+0'); 152 | # write the image 153 | $image->Write("$PREFIX$num.png"); 154 | } 155 | 156 | 157 | 158 | # now we repeat the above two loops in the opposite direction 159 | 160 | 161 | my ($xmax2, $ymax2); 162 | foreach (1..($SPRITECOUNT)) { 163 | $num = sprintf($DIGITS,$_); 164 | # ensure the variable is empty 165 | @$image = (); 166 | # read the sprite 167 | $image->Read("$PREFIX$num.png"); 168 | $image->Set(magick=>'RGBA'); 169 | # store the south-east corner pixel value 170 | my @corner = my @corner2 = $image->GetPixel(x=>$xmax-1, y=>$ymax-1, channel=>'RGBA', normalize=>'true'); 171 | #FIXME figure out a better color to use here and in the first loop 172 | $corner2[0] = 0; 173 | $corner2[1] = 1; 174 | $corner2[2] = 1; 175 | $corner2[3] = 0; 176 | $image->SetPixel(x=>$xmax-1,y=>$ymax-1,channel=>'RGBA',normalize=>'true',color=>\@corner2); 177 | # trim the north-west edges 178 | $image->Trim(); 179 | # repage 180 | $image->Set('page'=>'0x0+0+0'); 181 | # find the biggest height and width so far 182 | my ($xtmp, $ytmp) = $image->Get('width','height'); 183 | $xmax2 ||= $xtmp; 184 | $xmax2 = $xtmp if ($xtmp > $xmax2); 185 | $ymax2 ||= $ytmp; 186 | $ymax2 = $ytmp if ($ytmp > $ymax2); 187 | # restore the pixel we overwrote 188 | $image->SetPixel(x=>$xtmp-1,y=>$ytmp-1,channel=>'RGBA',normalize=>'true',color=>\@corner); 189 | # write the image 190 | $image->Write("$PREFIX$num.png"); 191 | } 192 | 193 | # optional transparent border padding 194 | $xmax2 += $BORDER; 195 | $ymax2 += $BORDER; 196 | 197 | # make sure dimensions are even numbers unless this is disabled 198 | $xmax2 +=1 if ($xmax2 % 2) and !$ALLOWODD; 199 | $ymax2 +=1 if ($ymax2 % 2) and !$ALLOWODD; 200 | 201 | # now loop through and scale the canvas north-east to the max size found in the previous loop 202 | foreach (1..$SPRITECOUNT) { 203 | $num = sprintf($DIGITS,$_); 204 | @$image = (); 205 | $image->Read("$PREFIX$num.png"); 206 | $image->Set(magick=>'RGBA'); 207 | my $geometry = $xmax2 . "x" . $ymax2; 208 | # increase canvas size with gravity towards south-east 209 | $image->Extent(geometry=>$geometry,background=>'transparent',gravity=>'SouthEast'); 210 | # repage 211 | $image->Set('page'=>'0x0+0+0'); 212 | # write the image 213 | $image->Write("$PREFIX$num.png"); 214 | } 215 | 216 | print "Optimization of sprites ($xmax2 x $ymax2) complete. All done!\n\n"; 217 | my $cmd = "animate -dispose 3 -delay 10 $PREFIX*"; 218 | print "Test using this:\n\t$cmd\n\n"; 219 | 220 | #TODO prompt asking if we should test 221 | if ($TESTANIMATION) { 222 | system($cmd); 223 | #FIXME the below stuff works, but I can't figure out how to get it to render on a checkerboard and 224 | #FIXME to dispose of the previous frame, so we'll use the system() call for now. 225 | #@$image = (); 226 | #$image->Read("$PREFIX*.png"); 227 | #$image->Animate(delay=>10,dispose=>'Previous',background=>'white',server=>':0'); #FIXME X server should be pulled from env 228 | } 229 | 230 | exit; 231 | --------------------------------------------------------------------------------