Paul, DonArt is having an issue where the following code is causing a crash in the AppGameKit Player on iOS. Looks like the player and AppGameKit are both up to date:
function createBackgroundWall(width#, height#, xpos#, ypos#, imageName$, phyType, imagenum)
rem get the file
Tfile$=left(imageName$,len(imageName$)-3)+"shp" //Tfile$=left(bg1.png,len(imageName$)-3)+"shp"
rem load the image
if imagenum<=0
imagenum = loadImage(imageName$)
else
loadImage(imagenum,imageName$)
endif
rem create the sprite
scaleX# = width# / getImageWidth(imagenum)
scaleY# = height# / getImageHeight(imagenum)
spr = createSprite(imagenum)
setSpriteSize(spr,width#,height#)
setSpriteOffset(spr,width#*0.5,height#*0.5)
setSpritePosition(spr,xpos#,ypos#)
setSpritePhysicsOn(spr,phyType)
setSpriteShape(spr,0)
SetSpriteDepth(spr,11)
rem read the contents and create the shape
filenum = openToRead(Tfile$)
nul$ = readLine(filenum)
shapes = val(readLine(filenum))
for i=1 to shapes
nul$ = readLine(filenum)
nul$ = readLine(filenum)
totalnum = val(readLine(filenum))
for x=1 to totalnum
nul$ = readLine(filenum)
pntx# = FloatVal(readLine(filenum))
pnty# = FloatVal(readLine(filenum))
addSpriteShapePolygon(spr,totalnum,x-1,pntx#*scaleX#,pnty#*scaleY#)
next
next
closeFile(filenum)
endfunction spr
function FloatVal(s$)
s1$=""
s2$=""
l = len(s$)
for c=1 to l
letter$=mid(s$,c,1)
if letter$="."
s2$=mid(s$,c+1,l-c)
exit
else
s1$=s1$+letter$
endif
next
v1=val(s1$)
v2#=val(s2$)
n=len(s2$)
if n>6
n=6
s2$=mid(s2$,1,6)
v2#=val(s2$)
endif
for i=1 to n
v2#=v2#*0.1
next
v#=v1+v2#
endfunction v#
Original postUsing AppGameKit V2 Tier 1