|
From: | Tacvek |
Subject: | Re: [Enigma-devel] Re: network 2-player game |
Date: | Wed, 22 Mar 2006 18:44:47 -0500 |
----- Original Message ----- From: "Daniel Heck" <address@hidden>
To: "Tacvek" <address@hidden> Sent: Wednesday, March 22, 2006 5:06 PM Subject: Re: [Enigma-devel] Re: network 2-player game
Anyway, My port of enigma to 5.1 is currently working,Great!
Well it is working except for the fact that the scripts use the old upvalue style.
All code in lua.cc has been updated to be able to compile, So i think everything in it should be working. The potential tag problems come in from when tolua hands a pointer to one of the wrapped c functions.So I'll explain my concern about userdata: In Lua 5, userdata can hold arbitrary data. However, I only had a pointer. So I stored the pointer asthe data. The problem is that the functions to retrive the userdata will nowreturn a pointer pointing to my pointer, which then points to the object. The existing code *might*only be dereferncing one pointer, although the existing code may be fine due to the changes found in tolua 5 (on which tolua++ is based).Since this would probably break all non-trivial levels, I think it's relatively easy to fix. At the most we would have to go through all functions in lua.cc and check whether they are still correct, but even that is a managable task.
Actually, I'm now less sure about the tag related stuff. My more recent messages should show this. Perhaps I will just release my code as-is. It might even be fine as it is. Or it might not. Somebody more familar with lua and Enigma should be able to slap it into shape.
Actually that was a bug in the *.pkg file. you had something like "func(int i, char *name[i]);" and it wanted: "func(int i, char **name)". Both are identical to g++, however tolua generates slightly different code for both, one of which g++ did not like.Fair enough; I stopped using tolua 4 because the wrapper code produces by it wouldn't compile with more recent g++ version (something like char* instead of const char*) and I was too lazy to patch it or update it.
[Prev in Thread] | Current Thread | [Next in Thread] |