[Top][All Lists]

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

[Enigma-devel] Port of r99 to Lua 5.1

From: Tacvek
Subject: [Enigma-devel] Port of r99 to Lua 5.1
Date: Wed, 22 Mar 2006 19:03:47 -0500

I'm still confused about the tag related stuff, and the two different (apparent) types of world::Object, but since my code might just magically work, and I'm unlikely to become less confused by studding this more,
I'm going to submit it as is.
In all areas other than the tags and how they will affect world:Object's created by lua.cc,
I'm fairly confident in the code.

Just to rehash some previous, and provide further detail:

[Note that anythhing I said about this patch that I have not repeated in the message
may be assumed to be false].

Enigma runs, but chokes on an old-style '%' upvalue in startup.lua.
This is actually a good thing as it proves my code for error messages is working. (Lua::LastError must be working), altough i originally received proof of this via
a failed "assert()".

The patch lacks changelog entries, and indentation and commenting styles
used may not match the rest of enigma.
(That all should beeasy enough for somebody more familar with Enigma
development to fix).

If Lua scripts want to trap errors they should use pcall. _LASTERROR is still
available, although errors caught by lua scripts will not update it. (And I
don't think the scripts were intended to use it anyway.)

All of the default libraries are loaded into each Lua context. This was far
easier than loading just the ones needed, which is a pain in Lua 5.1.

The Lua scripts must still be updated.

I switched to tolua++ because regular tolua has not been updated for Lua
5.1. tolua++ is a fork of tolua and virtually identical, so the switch was

Information about the changes required by the scripts should be available:
http://www.lua.org/manual/5.0/manual.html#BNF (scroll up a bit)

It appears that one extra warning was added  (although I did not try
compiling optimized). This warning is about a function used by the tolua++
library. Strangely it appears to be a linker warning, rather than a compiler

The global '_ENIGMAOBJECT' is reserved for use by game engine. Do not touch
it in Lua scripts. [This is a metatable used as a tag, No clue if this code is broken though, as
like I said before, the tags have me confused]

Attachment: tolua++-1.0.91.tar.bz2
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]