home *** CD-ROM | disk | FTP | other *** search
- #include "DeskLib:WimpSWIs.h"
-
- #include "Shell.Shell.h"
-
- #include "Redraw.h"
- #include "Structs.h"
-
-
-
-
- void HeapRedrawer(
- Shell_convertpoint convert,
- wimp_point rectsize,
- void *reference,
- const wimp_rect *redrawrect
- )
- {
- app_block *app = (app_block *) reference;
- int i, minpos, maxpos;
- int lastymax = 0;
-
-
- minpos = (redrawrect->min.y-2*Shell_PIXELYSIZE) * app->words_per_os + app->min_mem;
- maxpos = (redrawrect->max.y+2*Shell_PIXELYSIZE) * app->words_per_os + app->min_mem;
-
- for ( i=0; i<app->num_blocks; i++) {
- int ymin, ymax;
-
- if ( app->blocks[i].pos > maxpos) break;
- if ( app->blocks[i].pos+app->blocks[i].size < minpos) continue;
-
- ymin = (app->blocks[i].pos-app->min_mem) / app->words_per_os;
- ymax = (app->blocks[i].pos-app->min_mem+app->blocks[i].size) / app->words_per_os;
-
-
- if ( ymin>=lastymax) {
- Wimp_SetColour( colour_BLACK);
- Shell_RectangleFill2( 0, lastymax, rectsize.x, ymin, convert);
- }
-
- /*if ( ymax-ymin>Shell_PIXELYSIZE)*/ {
- Wimp_SetColour( 8 + (app->blocks[i].ref & 7));
- Shell_RectangleFill2( 0, ymin, rectsize.x, ymax, convert);
- }
-
- /*
- Wimp_SetColour( colour_WHITE);
- Shell_Move( 0, ymin, convert);
- GFX_Plot( plot_SOLIDEXFINAL + plot_DRAWRELFORE, rectsize.x, 0);
- Shell_Move( 0, ymax, convert);
- GFX_Plot( plot_SOLIDEXFINAL + plot_DRAWRELFORE, rectsize.x, 0);
- */
-
- lastymax = ymax /*+Shell_PIXELYSIZE*/;
-
- }
-
-
- if ( rectsize.y>lastymax) {
- Wimp_SetColour( colour_BLACK);
- Shell_RectangleFill2( 0, lastymax, rectsize.x, rectsize.y, convert);
- }
-
-
- return;
- }
-
-
-