chiark / gitweb /
WIP island determination; rename rawimage etc. to rgbimage
[ypp-sc-tools.web-live.git] / pctb / structure.c
index ce24da971f0157dd2b8d15dc302fffb2ac614265..9b4c0b98cd15da21e49d6a8cafcda7438602fd70 100644 (file)
@@ -54,6 +54,7 @@ const CanonColourInfo canoncolourinfos[]= {
   { 0x2C5F7A, '*' }, /* edge just under box heading shadow */
   { 0xC5C7AE, '*' }, /* blank area of partial commodities list */
   { 0x6B828C, '*' }, /* background of ship status meter area */
+  { 0x934405, '*' }, /* border of ship meter area */
   { 0x7D9094, '+' }, /* interbox */
 
   { 0xBDC5BF, ' ' }, /* background - pale  Sugar cane, etc. */
@@ -487,7 +488,7 @@ void analyse(FILE *tsv_output) {
 
 static Rect islandnamer;
 
-void find_structure_islandname(CanonImage *im, RawImage *ri) {
+void find_structure_islandname(CanonImage *im, RgbImage *ri) {
   Rect sunshiner;
 
   sunshiner.tl.x= cim->w - 1034 +  885;
@@ -495,9 +496,20 @@ void find_structure_islandname(CanonImage *im, RawImage *ri) {
   sunshiner.tl.y= 227;
   sunshiner.br.y= 227;
 
-  ADJUST_BOX(sunshiner,"o",30, 100,MUST, tl,y,-1);
-  ADJUST_BOX(sunshiner,"o",30, 100,MUST, tl,y,-1);
-     
+  ADJUST_BOX(sunshiner,"o*",30, 100,MUST, tl,y,-1);
+  ADJUST_BOX(sunshiner,"o*",30, 100,MUST, tl,y,-1);
+  debug_rect("sunshiner",0, sunshiner);
+
+  MUST(sunshiner.br.y - sunshiner.tl.y > 20);
+  sunshiner.tl.y++;
+  sunshiner.br.y--;
+
+  ADJUST_BOX(sunshiner,"o",20, (cim->w - 1034 + 700), MUST, tl,x,-1);
+  ADJUST_BOX(sunshiner,"o",20,  cim->w,               MUST, tl,x,+1);
+  debug_rect("sunshiner",1, sunshiner);
+
+  lookup_rect();
+  
 
   islandnamer.tl.x= cim->w - 1034 +  885;
   islandnamer.br.x= cim->w - 1034 + 1020;