lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I would have saved SO much time if I had found that page before.
Thanks, Mr. Smith!

Wesley Smith wrote:
You'll want to make a userdata for your Sprite struct.  There are many
ways to do this.  Some examples can be found here: .


On 7/24/07, L-28C <> wrote:
Hello everyone!

I have this:

struct Sprite
        BITMAP *sheet, *img;
        int pos, xdir, ydir, anim, walking,
                x, y, sheetX, sheetY;

struct Sprite *loadSprite(const char*);

How would I pass the Sprite struct over to Lua so that it can call

I can't have all of my sprites hardcoded on C because, well, there are many.

Thanks in advance, everyone!