chiark / gitweb /
Cope with new tabbed commodity screen on ships 3.6
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 18 Sep 2009 19:32:34 +0000 (20:32 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 18 Sep 2009 19:32:34 +0000 (20:32 +0100)
yarrg/structure.c

index a49fe0f..46b6853 100644 (file)
@@ -444,11 +444,16 @@ void find_structure(const CanonImage *im,
 }                  
 
 void check_correct_commodities(void) {
-  Rect search= { { 50,39 }, { 130,59 } };
+  Rect search;
 
+  search.tl= s.mr.tl;  search.tl.x +=  34;  search.tl.y -= 44;
+  search.br= s.mr.tl;  search.br.x += 114;  search.br.y -= 23;
+  MUST(search.br.x < cim->w-1 && search.tl.y > 0,
+       MR(search);MI(cim->w);MI(cim->h));
+  
+  debug_rect("commodselr",0, search);
   ADJUST_BOX(search,"_",>=,10, cim->h, MUST, tl,y,+1);
   ADJUST_BOX(search,"_",>=,10, 0,      MUST, br,y,-1);
-
   debug_rect("commodselr",1, search);
 
   static const char *all_small[]= {