An example of another great contribution, thanks smerf, especially like the idea of no plugins require il give it a thorough checking later
when using mipmaps you may find these two functions useful
as you need powers of 2
function nextPowerof2(n)
if isPowerof2(n+1)=0
exitfunction nextPowerof2(n+1)
endif
endfunction n+1
function isPowerof2(n)
//condition to check whether number is power of two or not
//performing bitwise operation
if(n <> 0) and ((n &&(n - 1)) = 0)
exitfunction 1
else
exitfunction 0
endif
endfunction 1
example of how to use them
if (ispowerof2(i))
if (ispowerof2(i))
print (str(i) + " is power of 2")
else
print(str(nextPowerof2(i)))
//once you have determined width and height the resize image or the creation of images in your program could be used accordingly
endif
I changed line 14 in Command_Camera.agc to "API.gadget[ret].BgImageID= CreateRenderImage(128,128,0,0)"
and changed line 266 in Gadget_Build.agc to "renderer=CreateRenderImage (API.Gadget[ID].wIDth,API.Gadget[ID].Height,0,0)"
which turns off mipmapping but the above functions could be used to check and resize accordingly
fubarpk
https://fubarpk.itch.io/