Re: [AD] GUI screen

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Evert Glebbeek wrote:
Revised patch attached.

Hmm.. it appears there's still some places that do multiple calls to get_gui_bitmap (although I can't be 100% sure, nor could I tell you which functions because it doesn't show the function names).

Here's one:

    /* initialise the dialog */
-   set_clip_rect(screen, 0, 0, SCREEN_W-1, SCREEN_H-1);
-   set_clip_state(screen, TRUE);
+   set_clip_rect(get_gui_bitmap(), 0, 0, SCREEN_W-1, SCREEN_H-1);
+   set_clip_state(get_gui_bitmap(), TRUE);
    player->res |= dialog_message(dialog, MSG_START, 0, &player->obj);

And this section leads me to believe another, though the @@ breaks don't lend well to saying if they're in the same function or not...

@@ -1470,7 +1488,7 @@
 	 x1 = x+4;
/* the initial blank bit */
-	 rectfill(screen, x+2, y1, x1-1, y1+text_height(font), deselect);
+	 rectfill(get_gui_bitmap(), x+2, y1, x1-1, y1+text_height(font), deselect);
/* print up to the marked character */
 	 while (printed != scanned) {
@@ -1486,7 +1504,7 @@
 	       case '\t':
 		  for (i=0; i<tabsize; i++) {
 		     usetc(s+usetc(s, ' '), 0);
-		     textout_ex(screen, font, s, x1, y1, fg, deselect);
+		     textout_ex(get_gui_bitmap(), font, s, x1, y1, fg, deselect);
 		     x1 += text_length(font, s);
 		  }
 		  break;
@@ -1495,7 +1513,7 @@
 	       default:
 		  if (printed != ignore) {
 		     usetc(s+usetc(s, ugetc(printed)), 0);
-		     textout_ex(screen, font, s, x1, y1, fg, deselect);
+		     textout_ex(get_gui_bitmap(), font, s, x1, y1, fg, deselect);
 		     x1 += text_length(font, s);
 		  }
 	    }
@@ -1505,7 +1523,7 @@
 	 }
 	 /* the last blank bit */
if (x1 <= x+w-3) - rectfill(screen, x1, y1, x+w-3, y1+text_height(font)-1, deselect);
+	    rectfill(get_gui_bitmap(), x1, y1, x+w-3, y1+text_height(font)-1, deselect);
/* print the line end */
 	 y1 += text_height(font);
@@ -1519,7 +1537,7 @@
       if (!ugetc(printed)) {
 	 /* the under blank bit */
 	 if (draw)
-	    rectfill(screen, x+1, y1, x+w-3, y+h-1, deselect);
+	    rectfill(get_gui_bitmap(), x+1, y1, x+w-3, y+h-1, deselect);
/* tell how many lines we found */
 	 *listsize = line;




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/