If I store 640 in a short var wdth, and 480 to a short var height (screen dimensions), and then ask to allocate, the bugger fails.
If I ask to allocate a 640*480 buffer, it continues.
However, the first case works if the dimensions are smaller (but I'm not going to work with a 100*100 screen, people).
Here's some abridged code
Code: Select all
DIM AS main something = main (640,480)
'blah blah blah
CONSTRUCTOR main (wdth_ AS SHORT, height_ AS SHORT)
wdth = wdth_ 'both are SHORT
height = height_
SCREENRES wdth, height
'buffer
buffer = ALLOCATE (wdth * height * SIZEOF (INTEGER))
END CONSTRUCTOR
This one did work:
Code: Select all
DIM AS main something = main
'blah blah blah
CONSTRUCTOR main
SCREENRES 640, 480
'buffer
buffer = ALLOCATE (640 * 480 * SIZEOF (INTEGER))
END CONSTRUCTOR