LUA Stuff
Displaying 1-2 of 2 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Sargana

I'm wrestling with getting through some of the LUA stuff, since I'll have to learn the syntax in school in a year or so anyway.

Since I don't use the built in verge mapping functions, I need to be able to display images directly to the screen, and cannot for the life of me figure out how to make it work.

In C, I would just loadimage, blit. I can get images to function by just reffing the v3 functions directly, but this doesn't seem to be the elegant way to do this while interacting with the image class in VX.

Any advice?

Posted on 2009-11-19 04:48:28 (last edited on 2009-11-19 04:53:07)

Overkill

No worries, vx.Image has a Blit method! :D

local img = vx.Image('hero.png')
while not vx.key.Enter.pressed do
-- Draws img to the screen.
img:Blit(5, 5)
-- If you prefer to be explicit:
-- img:Blit(5, 5, vx.screen)
vx.ShowPage()
end


(ohbtw, Lua is not an acronym. It is a word, Portuguese for moon. CAPITALIZING THE LETTERS THAT DO NOT NEED IT IS WEIRD WHY DO TONS OF PEOPLE DO IT. And "vx" is lower-case. I'm picky ;_;)

Posted on 2009-11-19 12:02:04 (last edited on 2009-11-19 12:05:44)


Displaying 1-2 of 2 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.