chiark / gitweb /
WIP island determination; before work on lookup_rgbrect
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 14 Jun 2009 18:16:46 +0000 (19:16 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 14 Jun 2009 18:16:46 +0000 (19:16 +0100)
pctb/structure.c

index ce24da971f0157dd2b8d15dc302fffb2ac614265..bab3520dae05a4b7b0ff34c2081dd955c638884d 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. */
@@ -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;