Hi, I try to use the setscissor command, but I can't get it to work on android. Works fine on windows. I'm using AppGameKit 1076 and the beta of the android player on GT 10.1
// 1st atempt on tilegame...
setvirtualresolution(768,1024)
sprite=0
for x=1 to 32
for y=1 to 32
inc sprite
createsprite(sprite,0)
setspritecolor(sprite,random(100,255),random(100,255),random(100,255),255)
setspritesize(sprite,64,64)
setspritescissor(sprite,0,0,768,768)
next y
next x
xmap=0
ymap=0
xstart=0
ystart=0
xoffset=0
yoffset=0
setprintsize(20)
do
// Print diag data
for p=1 to 40
print("")
next p
print("X: "+str(xmap))
print("Y: "+str(ymap))
print("Xstart: "+str(xstart))
print("Ystart: "+str(ystart))
print("Xoffset: "+str(xoffset))
print("Yoffset: "+str(yoffset))
print("FPS: "+str(screenfps()))
// Check for user moving the map
if getpointerpressed()=1
xstart=getpointerx()
ystart=getpointery()
endif
if getpointerstate()=1
xoffset=getpointerx()-xstart
yoffset=getpointery()-ystart
endif
if getpointerreleased()=1
xmap=xmap+xoffset
ymap=ymap+yoffset
xoffset=0
yoffset=0
endif
// Autoadjust map if offscreen, coarce
if xmap>16 then dec xmap,8
if xmap<-1296 then inc xmap,8
if ymap>16 then dec ymap,8
if ymap<-1296 then inc ymap,8
// Autoadjust map if offscreen, fine
if xmap>0 then dec xmap
if xmap<-1280 then inc xmap
if ymap>0 then dec ymap
if ymap<-1280 then inc ymap
// Draw world
sprite=0
for x=1 to 32
for y=1 to 32
inc sprite
setspriteposition(sprite,(x*64)+xmap-64+xoffset,(y*64)+ymap-64+yoffset)
next y
next x
sync()
loop
Can anyone confirm that this is a problem?
----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.