[NEW] extended palette functions

[DEL] old palette functions
[MODIF] mouse function names
[MODIF] map function params now are ints
[NEW] ascii function
[NEW] strlen function
This commit is contained in:
2022-09-11 22:50:44 +02:00
parent 50090e8a17
commit 1f5acd2bfa
9 changed files with 152 additions and 105 deletions

View File

@@ -1,38 +1,12 @@
x = 0
x=0
function text(str, x, y, color)
palt(0, false)
print(str, x-1, y-1, 0)
print(str, x , y-1, 0)
print(str, x+1, y-1, 0)
print(str, x-1, y , 0)
print(str, x+1, y , 0)
print(str, x-1, y+1, 0)
print(str, x , y+1, 0)
print(str, x+1, y+1, 0)
palt()
print(str, x, y, color)
function _init()
text="HOLA MINI"
end
function _update()
cls(1)
camera(x, 0)
if btn(KEY_LEFT) then x = x + 1 end
if btn(KEY_RIGHT) then x = x - 1 end
map(0, 0, 0, 0, 16, 16)
rectfill(10, 10, 114, 40, 12)
palt(0, false) palt(9, true)
rect(10, 10, 114, 40, 0)
spr(16, 18, 40, 1, 1, true)
sspr(24, 0, 16, 16, 10, 50, 16, 16, false, false)
palt()
text("HOLA, ESTA ES LA PRIMERA", 14, 15, 5)
text("DEMO DEL NOU E INCREIBLE", 14, 23, 5)
text("JAIL'S ADVENTURE 2!", 14, 31, 5)
circfill(64, 64, 20)
sset(9, 9, 6)
--ovalfill(30,10,100,100,8)
tline(10, 50, 10, 91, 1.125, 1, 0.0, 1.0/32.0)
line(10, 101, 41, 101, 9)
cls(20)
print(text,x,60)
x=x+1
if x>160 then x=-strlen(text)*4 end
end