prog-title = "The Amazing Rules Of TAROT -- Rendering";
long-opts;
gnu-usage; /* GNU style preferred to default */
config-header = "config.h";
argument = "[FILES...]";
main = {
main-type = for-each;
handler-proc = "tarot_run";
};
flag = {
name = as-player;
value = p;
descrip = "View the game as this player";
disable = not;
doc = "Set the player from which we view the cards. If not present or disabled, then use the player that were dealt cards in the game. If the game has a deal for all players, then you have to set this option.";
res = tarot_run_render (input, OPT_ARG (WIDTH), OPT_ARG (HEIGHT), &output, &i_output_len);
output_len = i_output_len;
break;
}
write_output (output);
write_output (output, output_len);
free (input);
tarot_card_array_free (cards);
tarot_player_array_free (players);
...
...
@@ -491,6 +521,15 @@ flag = {
doc = 'In this mode, the next player plays a card.';
};
flag = {
name = render;
no-preset;
equivalence = new-game;
descrip = "Render a game to a PNG file";
doc = 'This mode will read a game from standard input and represent it as PNG. You @strong{should} pass an @command{--output} parameter, otherwise your shell will try to print the binary contents. You can also specify the @command{--width} and @command{--height} of the resulting file. For instance, the example game renders as:
@image{tarot-figures/example,10cm}';
};
flag = {
name = status;
no-preset;
...
...
@@ -551,9 +590,7 @@ flag = {
value = o;
descrip = "Output file to write";
arg-type = file;
open-file = "yes";
file-mode = "w";
doc = 'When @command{tarot-cli} generates a game, it will be saved to disk instead of printed to the standard output.';
doc = 'When @command{tarot-cli} generates a game, it will be saved to disk instead of printed to the standard output. @command{--render} also needs an output file, which should be a png file.';
};
flag = {
...
...
@@ -566,4 +603,22 @@ flag = {
open-file = "yes";
file-mode = "r";
doc = 'When @command{tarot-cli} expects to read a game, it will be read from disk instead of the standard input.';