GUI screen pack pure MMBasic


Author Message
yock1960
Senior Member

Joined: 18/08/2020
Location: United States
Posts: 167
Posted: 12:44am 08 Apr 2021      

  TassyJim said  I went with:
SUB GUI_bitmap x AS INTEGER, y AS INTEGER, o AS INTEGER
 IF CMM2 THEN
   LOCAL INTEGER dx,dy
   LOCAL cbin$=BIN$(o,64)
   GUI CURSOR HIDE
   FOR dy=0 TO 7
     FOR dx=0 TO 7
       IF VAL(MID$(cbin$,dy*8+dx+1,1)) THEN
         PIXEL x+dx,y+7-dy
       ELSE
         PIXEL x+dx,y+7-dy,CGy
       ENDIF
   NEXT dx,dy
   GUI CURSOR SHOW
 ELSE
   GUI BITMAP x,y,o
 ENDIF
END SUB


Trying to cater for both results in inflated code so there has to be an easy way to remove the CMM2 sections.
While the compatibility functions are minimal and grouped together, that is quick to do.

Jim


Works for me! I've incorporated it into my bastard.  

Steve