Bind Variables?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bind Variables?


I am new to Embedding Lua to my C App.
I understand that you can Embed your Functions you coded in Pure C by: luaL_reg(lua_State, "the character name of the function exposed to lua", the function in C)
But, how can you Glue Variables like that?
So I can put my config in Lua.
And link it easily to:
struct config {
  int keyUp;
  int keyLeft;
  int keyRight;
  int keyDown;

  int volumeEffect;
  int volumeMusic;

  char playerName[9];
} *cfg;