Log In  

Is there any way to print a character at a larger size? For example if you want to use one of the glyphs in a level but you need to make it 4x bigger?

P#37714 2017-02-22 17:26 ( Edited 2017-02-23 17:01)

It's a little roundabout, but you can copy the text into sprite memory and then use sspr():

function spritify(letter)
 cls()
 print(letter,0,0,7)
 for i=0,4 do
  memcpy(i*64,0x6000+i*64,3)
 end
end
function _draw()
 local letters="abcdefghijklmnopqrstuvwxyz"
 local i=(flr(time())%#letters)+1
 spritify(sub(letters,i,i))
 cls()
 local width=16*(2+cos(time()))
 local height=16*(2+sin(time()))
 sspr(0,0,3,5,64-width/2,64-height/2,width,height)
end
P#37732 2017-02-22 22:35 ( Edited 2017-02-23 03:35)

thanks @ianh that's exactly what I was trying to do. Will give it a shot.

edit: wow that's a wild effect haha

P#37751 2017-02-23 12:01 ( Edited 2017-02-27 02:40)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 14:20:04 | 0.011s | Q:13