DRS Subsystem



The DRS system is used to speed up the refreshing and drawing of dialog procedures. If a procedure does not update anything, then that portion will not be redrawn, only those procs that redraw and call invalidate_rect or add_dirty will modify the screen contents.

void add_dirty(int x, int y, int w, int h);
Simply adds a dirty rectangle to the list to update the screen. Returns 1 if everything went OK, 0 otherwise.

void invalidate_rect(int x, int y, int w, int h);
Invalidates an area of the screen, similar to add_dirty() but this function guarantees that no two rectangles overlap, though it takes more time to compute than add_dirty(), invalidate_rect() will be much faster to redraw the screen with.

void free_dirty();
Frees all dirty rectangles currently in the list, useful for freeing up all used memory before exiting, called automatically by nas_exit().


Back to Contents