This commit is contained in:
Thai Pangsakulyanont
2012-01-08 13:24:41 +07:00
5 changed files with 50 additions and 4 deletions
+39
View File
@@ -0,0 +1,39 @@
--[[
-- 32 lines of goodness.
-- Links to original source of code and usage documentation:
-- http://love2d.org/wiki/32_lines_of_goodness
-- http://love2d.org/forums/viewtopic.php?f=5&t=3344
--]]
local mt_class = {}
function mt_class:extends(parent)
self.super = parent
setmetatable(mt_class, {__index = parent})
parent.__members__ = parent.__members__ or {}
return self
end
local function define(class, members)
class.__members__ = class.__members__ or {}
for k, v in pairs(members) do
class.__members__[k] = v
end
function class:new(...)
local newvalue = {}
for k, v in pairs(class.__members__) do
newvalue[k] = v
end
setmetatable(newvalue, {__index = class})
if newvalue.__init then
newvalue:__init(...)
end
return newvalue
end
end
function class(name)
local newclass = {}
_G[name] = newclass
return setmetatable(newclass, {__index = mt_class, __call = define})
end
+1 -1
View File
@@ -1675,7 +1675,7 @@ UpdateOnMessage=""
#
NumChoicesOnPage1=100
DefaultChoice="GameStart"
ChoiceNames="GameStart,Options,Edit,Exit"
ChoiceNames="GameStart,Options,Edit,Jukebox,Exit"
ChoiceGameStart="applydefaultoptions;text,Game Start;screen,"..Branch.StartGame()
#ChoiceQuickPlay="applydefaultoptions;text,Quick Play;"
ChoiceOptions="screen,ScreenOptionsService;text,Options"
@@ -1986,7 +1986,6 @@
2BD6E14013D78FAD008443DB /* uncompr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uncompr.c; sourceTree = "<group>"; };
2BD6E14113D78FAD008443DB /* zutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zutil.c; sourceTree = "<group>"; };
2BD6E14213D78FAD008443DB /* zutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zutil.h; sourceTree = "<group>"; };
2BD91A791470DE4C008812C5 /* libjpeg.8.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libjpeg.8.dylib; path = usr/local/lib/libjpeg.8.dylib; sourceTree = SDKROOT; };
2BDB88B2137201F700E6FD3A /* lapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lapi.c; path = "../extern/lua-5.1/src/lapi.c"; sourceTree = SOURCE_ROOT; };
2BDB88B3137201F700E6FD3A /* lapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lapi.h; path = "../extern/lua-5.1/src/lapi.h"; sourceTree = SOURCE_ROOT; };
2BDB88B4137201F700E6FD3A /* lauxlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lauxlib.c; path = "../extern/lua-5.1/src/lauxlib.c"; sourceTree = SOURCE_ROOT; };
@@ -5117,7 +5116,6 @@
AA21E4770A9826CD00684CEA /* libtheora_link.a */,
AA21E4780A9826CD00684CEA /* libvorbis_link.a */,
AA059E2A0B8F0C66006F8139 /* libz_link.a */,
2BD91A791470DE4C008812C5 /* libjpeg.8.dylib */,
);
path = Libraries;
sourceTree = "<group>";
+9
View File
@@ -2401,6 +2401,14 @@ public:
LuaHelpers::CreateTableFromArray( vHP, L );
return 1;
}
static int GetEnabledPlayers(T* p, lua_State *L )
{
vector<PlayerNumber> vEP;
FOREACH_EnabledPlayer( pn )
vEP.push_back( pn );
LuaHelpers::CreateTableFromArray( vEP, L );
return 1;
}
static int GetCurrentStyle( T* p, lua_State *L )
{
Style *pStyle = const_cast<Style *> (p->GetCurrentStyle());
@@ -2554,6 +2562,7 @@ public:
ADD_METHOD( SetPreferredSongGroup );
ADD_METHOD( GetPreferredSongGroup );
ADD_METHOD( GetHumanPlayers );
ADD_METHOD( GetEnabledPlayers );
ADD_METHOD( GetCurrentStyle );
ADD_METHOD( IsAnyHumanPlayerUsingMemoryCard );
ADD_METHOD( GetNumStagesForCurrentSongAndStepsOrCourse );
+1 -1
View File
@@ -39,7 +39,7 @@
#define DEFAULT_INPUT_DRIVER_LIST "X11"
#endif
#define DEFAULT_MOVIE_DRIVER_LIST "Theora,FFMpeg,Null"
#define DEFAULT_SOUND_DRIVER_LIST "pulse,ALSA-sw,OSS,Null"
#define DEFAULT_SOUND_DRIVER_LIST "ALSA-sw,pulse,OSS,Null"
#else
#error Which arch?
#endif