#
# ZX Next NXI exporter 256/320
# A Multipaint internal script
#
# Export bitmap, without palette
#

XREM "bitmap"

# detect 32 or 40 size

H=PEEK 5

IF H=32
    FOR Y=0 TO 191
	    FOR X=0 TO 255
		    P=GETPOINT X,Y
		    XBYTE P
	    NEXT X
    NEXT Y
ENDIF
IF H=40
	FOR X=0 TO 319
        FOR Y=0 TO 255
		    P=GETPOINT X,Y
		    XBYTE P
        NEXT Y
	NEXT X
ENDIF

# Write to file (bytes)

SAVE
