0 Members and 2 Guests are viewing this topic.
arrow_spr='0x1F, 0xFF, 0xF8, 0x3F, 0xFF, 0xFC, 0x40, 0x00, 0x02, 0xC0, 0x00, 0x03, 0xC0, 0x00, 0x03, 0xC7, 0x80, 0x03, 0xC3, 0xC0, 0x03, 0xC1, 0xE0, 0x03, 0xC0, 0xF0, 0x03, 0xC0, 0x78, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x1E, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x78, 0x03, 0xC0, 0xF0, 0x03, 0xC1, 0xE0, 0x03, 0xC3, 0xC0, 0x03, 0xC7, 0x80, 0x03, 0xC0, 0x00, 0x03, 0xC0, 0x00, 0x03, 0xC0, 0x00, 0x03, 0x40, 0x00, 0x02, 0x3F, 0xFF, 0xFC, 0x1F, 0xFF, 0xF8'local line = graydraw.linelocal wait = misc.waitfunction rectangle (x1, y1, x2, y2) -- rectangle is a function of four parameters lua line (x1, y1, x1, y2) -- draws the rectangle line (x1, y1, x1, y2) line (x1, y1, x1, y2) line (x1, y1, x1, y2) endfunction slider (x)rectangle (6, 17, 120, 41) --Draws rectanglespritexy x+6,30,arrow_sprendslider (0)wait(100)
"welcome to the world of computers, where everything seems to be based on random number generators"
foo = { ... le code de ton sprite ... }out = io.open("Prog.lua", "w") -- l'ancien sera effacéfoo2=string.char(unpack (foo)); -- on remplace foo par le nom du spriteout:write(("sprite = %q"):format(foo2));out:close()io.write(string.byte("n"))
Er, yeah, you just mistood into make sprites.I sugger you make one sprite with SPrite maker from Orwell, then "compile them" with a utility i give you the code. You'll need to give to foo the sprite array, and it will make the string version in a file.Code: [Select]foo = { ... le code de ton sprite ... }out = io.open("Prog.lua", "w") -- l'ancien sera effacéfoo2=string.char(unpack (foo)); -- on remplace foo par le nom du spriteout:write(("sprite = %q"):format(foo2));out:close()io.write(string.byte("n"))You'll need Lua on your computerUrl for the file:http://www.planet-casio.com/files/forums/SPrite%20compiler-50456.rar
local wait = misc.wait--Sprite - Name: arrow, Width: 24px, Height: 24pxlocal arrow_spr="ÿø?ÿü@\000À\000À\000Ç€ÃÀÁàÀðÀxÀ<ÀÀ<ÀxÀðÁàÃÀÇ€À\000À\000À\000@\000?ÿüÿø"spritexy 57,41,arrow_sprwait(100)
local line = graydraw.linelocal wait = misc.waitlocal setcolor = graydraw.setcolor--Sprite - Name: arrow, Width: 24px, Height: 24pxlocal arrow_spr="ÿø?ÿü@\000À\000À\000Ç€ÃÀÁàÀðÀxÀ<ÀÀ<ÀxÀðÁàÃÀÇ€À\000À\000À\000@\000?ÿüÿø"setcolor(true)clear nilpushxspr 3drawspr 3,arrow_sprrefreshrepeatwait(3)until key(5)