Commit Graph

23 Commits

Author SHA1 Message Date
Glenn Maynard 4d760bd02d update comment 2006-11-19 18:54:25 +00:00
Steve Checkoway e3e5cf77e5 Don't include Foreach.h in RageUtil.h which does not use it. Instead, include it in the individual files that actually use it. 2006-11-01 11:18:46 +00:00
Glenn Maynard ccfa2f16dd bOptional always true 2006-10-11 23:56:00 +00:00
Glenn Maynard 04b34020fb remove unused "type" 2006-10-06 01:18:23 +00:00
Glenn Maynard 76dea048fc __type 2006-10-06 01:07:53 +00:00
Glenn Maynard d160802fc0 Streamline type checking. Store a list of all base classes
in a heirarchy table, so we don't have to iterate over lots
of tables for every function dispatch.
2006-09-29 21:37:01 +00:00
Glenn Maynard 896e7ce54c cleanup 2006-09-29 21:30:55 +00:00
Glenn Maynard 63cb157197 simplify LuaBinding, move more code out of the template 2006-09-29 05:07:17 +00:00
Glenn Maynard 19e9a7201f simplify: use LuaReference 2006-09-25 08:53:20 +00:00
Glenn Maynard 0d2b1f4fb3 simplify; always create the table if it doesn't exist 2006-09-25 08:51:28 +00:00
Glenn Maynard 12a21ce930 remove old stuff 2006-09-21 01:41:37 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard 2c6e28f46d fix stack imbalances 2006-01-15 00:04:51 +00:00
Chris Danford d507f3fd28 move LuaBinding into namespace 2005-12-27 22:58:30 +00:00
Glenn Maynard 87fff312c3 Fix copied Actors losing functions stored in their table. (also an optimization:
copies quickly, without dynamically compiling anything)
2005-08-29 06:31:48 +00:00
Glenn Maynard b6d428d37c Make Lua type checks optional. They add a lot of overhead to Lua dispatches. 2005-08-25 17:51:00 +00:00
Glenn Maynard 74c83953cc optimize 2005-08-25 02:31:07 +00:00
Glenn Maynard e8f9f382db check() does not currently support negative offsets; it'll give a confusing
error message
2005-07-05 03:16:10 +00:00
Glenn Maynard ea6d806dad Allow associating a table with Lua-bound objects, for storing state in Lua.
Design goals are: minimal overhead (one table); minimal extra code to use
it (two lines in the header, to have a space to store a reference to the
table), same API for classes with and without a table; allow switching to
a table-bound class without derived classes having to know about it; keep
zero per-object overhead for classes that don't need it.
2005-07-04 21:43:27 +00:00
Glenn Maynard 14fd08abc1 __type -> type 2005-06-23 08:47:34 +00:00
Glenn Maynard 36794f6d5f CheckType -> CheckLuaObjectType 2005-06-23 08:46:21 +00:00
Glenn Maynard be8c5d23b5 CreateGlobalTable -> CreateMethodsTable 2005-06-23 08:44:46 +00:00
Glenn Maynard aff28653da Rearrange Lua types. Instead of each class registering all of the functions
of its base classes, set __index in the methods table to point to the base class's
methods table.  This has a few important advantages.  First and most importantly,
types don't need access to the Luna type of their base to derive from it, so these
definitions don't have to be in the headers, and probably don't need to be
templated.  Second, you can say:

function Actor:queue_rotate()
   self:linear(0.5)
   self:rotationz( 180 )
end

OnCommand=x,100;queue_rotate

This partially worked previously, but wasn't inherited; a function defined for
Actor wouldn't work for BitmapText.

(changes that use this in a few minutes)
2005-06-20 03:54:51 +00:00