05-01-2016, 04:40 PM
Version 10077:
This could be something I am missing but I am trying to fill the screen with trees using grobs. On the calculator the program works fine but the emulator shows a blank screen.
Anyone know what I am missing? Using FREEZE instead of WAIT gives the same results.
This could be something I am missing but I am trying to fill the screen with trees using grobs. On the calculator the program works fine but the emulator shows a blank screen.
Code:
EXPORT IMGforest()
BEGIN
// draw a forest
// EWS 2016-04-25
// clear the screen
RECT_P();
RECT_P(G1);
// colors
LOCAL gr:=#009E60h,br:=#964B00h;
// draw a tree on G1
// use pixels (0,0) to (15,15)
// stump
FILLPOLY_P(G1,{(5,6),(5,15),
(9,15),(9,6)},br);
// tree
FILLPOLY_P(G1,
{(0,4),(7,0),(15,4),(9,3),
(15,6),(9,5),(15,12),(7,9),
(0,12),(5,5),(0,9),(5,3)},gr);
// plant the forest
LOCAL I,J;
FOR J FROM 0 TO 208 STEP 16 DO
FOR I FROM 0 TO 304 STEP 16 DO
BLIT_P(G0,I,J,I+15,J+15,
G1,0,0,15,15);
END; END;
WAIT;
END;
Anyone know what I am missing? Using FREEZE instead of WAIT gives the same results.