hello everyone.
I purchased agk2 and am trying to migrate my programs written with darkbasic but I found many differences of command syntax. Please help me.
With darkbasic to import my tileset I perform this simple routine to import individual tile of my map.
set display mode 1280,720,32
SET WINDOW POSITION 0,0
sync on
cls
load image "tilemg.png",1000 // tile map
paste image 1000,0,0
img_num=1
for b=0 to 395 step 36 // tile image from 1 a 99
for a=0 to 323 step 36
get image img_num,a,b,a+36,b+36,1
inc img_num
next a
next b
cls // clear screen
here translated into agk
// Project: prova2
// Created: 2014-12-28
// set window properties
SetWindowTitle( "prova2" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
LoadSprite(1000, "tilemg.png" )
CreateSprite(1000,1000)
SetSpritePosition(1000,0,0)
render()
img_num=1
for b=0 to 395 step 36 //carico immagini da 1 a 99
for a=0 to 323 step 36
getimage( img_num,a,b,36,36)
CreateSprite(img_num,img_num)
inc img_num
next a
next b
ClearScreen() // serching to clear screen
render()
// Now I try to view some sprite that I created.
SetSpritePosition(1,400,150)
SetSpritePosition(2,400,200)
SetSpritePosition(3,400,250)
SetSpritePosition(98,400,300)
SetSpritePosition(99,400,350)
do
sync()
loop
I can not understand why the command ClearScreen () does not work and I still see the tileset "tilemg.png".
Why in the upper left me appears the sprite number 97 ?
Sorry for my bad English, and thanks for the help.