Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Filling the screen with boxes Date: Mon, 28 Dec 1998 08:30:53 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 28 Message-ID: <368741BC.84356107@hinge.mistral.co.uk> References: <762se1$2296@chuka.playstation.co.uk> NNTP-Posting-Host: d3-s11-167-telehouse.mistral.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en // Shiney New Code Segment does it the right way..... #define BOX_WH 4 void boxes(void) { GsBOXF box; // One box & re-use it (make it local as well to save more memory) // setup bit's that are constant outside the loop box.r = box.g = .b = 255; // colour = white box.w = box.h = BOX_WH; // size of BOX_WH x BOX_WH // Generate the display by re-using the single GsBOXF structure for (box.y = 0; box.y< 240; box.y+=BOX_WH) { for (box.x = 0; box.x < 320; box.x+=BOX_WH) GsSortBoxFill(&box, &WorldOT[acvtiveBuffer],0); } } > > Rad. Craig.