[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question about structs and tolua 5
- From: "Vbr. Andre Kloss" <kloss@...>
- Date: Thu, 8 Jan 2004 10:50:43 +0100
Hi there,
> Have you tried the other SDL bridge there is, namely LuaCheia/LuaX one.
No, I have not tried it yet, since last time I could not find a suitable
link to the source. But I'll definetly have a look at it now.
> I'm not sure what kind of problems you might be referring to with
> luaSDL events, since in my opinion there shouldn't be any.
As I wrote in my last email:
- the types of events returned (in event) by SDL.SDL_PollEvent(event)
varies, which inconveniently commits suicide on type checking (e.g.
type checking awaits a SDL_Event, but gets a SDL_Keyboard_Event).
- In C unions I can access the subtypes of the union with access keys,
for example if event is an SDL_Event whose type is SDL_KEYDOWN_EVENT,
I can access the SDL_Keyboard_Event on event.key in C - in lua, on
some ocassions I will get the SDL_Event, on others the
SDL_Keyboard_Event. Sure, I can work around by asking if event.key ==
nil, but this is ugly and only masks the problem.
> These both SDL bindings have been implemented independent from each o
> ther, and therefore might have differing strengths and/or weaknesses.
True. But improving tolua will hurt neither of them ;)
> yours, -ak
yours, too
Andre
--
Tolerance rulez, everything else sux! -- Andre Kloss