Dark Byte Site Admin Reputation: 458 Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sat May 18, 2019 1:12 pm Post subject: |
|
|
here's my example
Code: |
int=getInternet()
img=int.getURL('https://forum.cheatengine.org/files/1_227.png')
ss=createStringStream(img)
offscreen=createPicture()
offscreen.loadFromStream(ss)
f=createForm()
f.borderstyle='bsSizeable'
img=createImage(f)
img.align='alClient'
img.stretch=true
f.show()
local imgwidth=offscreen.PNG.Width
local imgheight=offscreen.PNG.Height
local charwidth=imgwidth // 4
local charheight=imgheight // 4
img.Picture.Bitmap.Width=charwidth
img.Picture.Bitmap.Height=charheight
--print(string.format("charwidth=%d charheight=%x",charwidth,charheight))
local index=0
t=createTimer(nil)
t.Interval=250
t.OnTimer=function(tmr)
--convert index to x,y coordinates
local x=(index % 4)*charwidth
local y=((index // 4) % 4)*charheight
--print(string.format("x=%d y=%d",x,y))
img.picture.Bitmap.Canvas.clear()
img.picture.Bitmap.Canvas.copyRect(0,0,charwidth-1,charheight-1,offscreen.PNG.Canvas,x,y,x+charwidth,y+charheight)
index=index+1
end
t.Enabled=true
f.OnDestroy=function(frm)
t.destroy()
f=nil
end
|
also in .Ct format with the image source as invisible on the form _________________ Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
|
|