chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP upload setisland
[ypp-sc-tools.main.git]
/
pctb
/
convert.c
diff --git
a/pctb/convert.c
b/pctb/convert.c
index 433b043a3dadd5a043f7f9087733c21262e12160..3ef5018fb1d3ca4167d2260113b68c993770447b 100644
(file)
--- a/
pctb/convert.c
+++ b/
pctb/convert.c
@@
-226,8
+226,14
@@
int main(int argc, char **argv) {
/* Consequential changes to options */
if (o_mode & mf_analyse) {
/* Consequential changes to options */
if (o_mode & mf_analyse) {
- if (!o_outmode_kind)
- o_outmode_kind= (o_flags & ff_printisland) ? omk_none : omk_str;
+ if (!o_outmode_kind) {
+ if (o_flags & ff_printisland) {
+ o_outmode_kind= omk_none;
+ o_flags |= ff_singlepage;
+ } else {
+ o_outmode_kind= omk_upload;
+ }
+ }
if (o_outmode_kind==omk_upload) {
o_flags |= ffs_upload;
if (o_outmode_kind==omk_upload) {
o_flags |= ffs_upload;
@@
-264,12
+270,12
@@
int main(int argc, char **argv) {
if (!ocean) ocean= o_ocean;
if (!pirate) pirate= o_pirate;
if (!ocean) ocean= o_ocean;
if (!pirate) pirate= o_pirate;
- if (o_flags & ff_needisland)
{
+ if (o_flags & ff_needisland)
if (!ocean)
badusage("need --ocean option when replaying images"
" (consider supplying --pirate too)");
if (!ocean)
badusage("need --ocean option when replaying images"
" (consider supplying --pirate too)");
+ if (ocean)
sysassert(! setenv("YPPSC_OCEAN",ocean,1) );
sysassert(! setenv("YPPSC_OCEAN",ocean,1) );
- }
if (pirate && (o_flags & ff_dict_pirate))
sysassert(! setenv("YPPSC_PIRATE",pirate,1) );
if (pirate && (o_flags & ff_dict_pirate))
sysassert(! setenv("YPPSC_PIRATE",pirate,1) );
@@
-277,6
+283,7
@@
int main(int argc, char **argv) {
open_screenshot_file("w");
if (o_flags & ff_singlepage) take_one_screenshot();
else take_screenshots();
open_screenshot_file("w");
if (o_flags & ff_singlepage) take_one_screenshot();
else take_screenshots();
+ progress_log("OK for you to move the mouse now.");
}
if (o_mode & mf_readscreenshot) {
open_screenshot_file("r");
}
if (o_mode & mf_readscreenshot) {
open_screenshot_file("r");
@@
-285,9
+292,10
@@
int main(int argc, char **argv) {
}
if (o_mode & mf_analyse) {
if (o_flags & ff_needisland) {
}
if (o_mode & mf_analyse) {
if (o_flags & ff_needisland) {
- find_islandname();
+ find_islandname(
page0_rgbimage
);
if (o_flags & ff_printisland)
printf("%s, %s\n", archipelago, island);
if (o_flags & ff_printisland)
printf("%s, %s\n", archipelago, island);
+ sysassert(! setenv("YPPSC_ISLAND",island,1) );
}
switch (o_outmode_kind) {
case omk_upload: case omk_str: run_analysis(); break;
}
switch (o_outmode_kind) {
case omk_upload: case omk_str: run_analysis(); break;