Skip to content

Commit

Permalink
[luadefs-cleanup] Clean up Object
Browse files Browse the repository at this point in the history
  • Loading branch information
qaisjp committed Sep 9, 2015
1 parent c499aa0 commit edc1944
Show file tree
Hide file tree
Showing 10 changed files with 319 additions and 302 deletions.
2 changes: 1 addition & 1 deletion MTA10_Server/mods/deathmatch/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ LOGIC = \
./logic/lua/CLuaFunctionDefs.Database.cpp \
./logic/lua/CLuaFunctionDefs.Event.cpp \
./logic/lua/CLuaFunctionDefs.Misc.cpp \
./logic/lua/CLuaFunctionDefs.Object.cpp \
./logic/lua/CLuaFunctionDefs.PREG.cpp \
./logic/lua/CLuaFunctionDefs.RadarArea.cpp \
./logic/lua/CLuaFunctionDefs.Server.cpp \
Expand Down Expand Up @@ -232,6 +231,7 @@ LOGIC = \
./logic/luadefs/CLuaHTTPDefs.cpp \
./logic/luadefs/CLuaMatrixDefs.cpp \
./logic/luadefs/CLuaMarkerDefs.cpp \
./logic/luadefs/CLuaObjectDefs.cpp \
./logic/luadefs/CLuaPedDefs.cpp \
./logic/luadefs/CLuaPickupDefs.cpp \
./logic/luadefs/CLuaPlayerDefs.cpp \
Expand Down
1 change: 1 addition & 0 deletions MTA10_Server/mods/deathmatch/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ struct SAclRequest;
#include "luadefs/CLuaHTTPDefs.h"
#include "luadefs/CLuaHandlingDefs.h"
#include "luadefs/CLuaMarkerDefs.h"
#include "luadefs/CLuaObjectDefs.h"
#include "luadefs/CLuaPedDefs.h"
#include "luadefs/CLuaPickupDefs.h"
#include "luadefs/CLuaPlayerDefs.h"
Expand Down
3 changes: 2 additions & 1 deletion MTA10_Server/mods/deathmatch/_ServerDeathmatch 2008.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@
<ClCompile Include="logic\luadefs\CLuaBlipDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaMarkerDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaMatrixDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaObjectDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaPedDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaPlayerDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaTeamDefs.cpp" />
Expand All @@ -470,7 +471,6 @@
<ClCompile Include="logic\lua\CLuaFunctionDefs.Database.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.Event.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.Misc.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.Object.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.PREG.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.RadarArea.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.Server.cpp" />
Expand Down Expand Up @@ -883,6 +883,7 @@
<ClInclude Include="logic\luadefs\CLuaBlipDefs.h" />
<ClInclude Include="logic\luadefs\CLuaMarkerDefs.h" />
<ClInclude Include="logic\luadefs\CLuaMatrixDefs.h" />
<ClInclude Include="logic\luadefs\CLuaObjectDefs.h" />
<ClInclude Include="logic\luadefs\CLuaPedDefs.h" />
<ClInclude Include="logic\luadefs\CLuaPlayerDefs.h" />
<ClInclude Include="logic\luadefs\CLuaTeamDefs.h" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,6 @@
<ClCompile Include="logic\lua\CLuaFunctionDefs.Weapon.cpp">
<Filter>Source Files\logic\lua</Filter>
</ClCompile>
<ClCompile Include="logic\lua\CLuaFunctionDefs.Object.cpp">
<Filter>Source Files\logic\lua</Filter>
</ClCompile>
<ClCompile Include="logic\lua\CLuaFunctionDefs.RadarArea.cpp">
<Filter>Source Files\logic\lua</Filter>
</ClCompile>
Expand Down Expand Up @@ -993,6 +990,9 @@
<ClCompile Include="logic\luadefs\CLuaTimerDefs.cpp">
<Filter>Source Files\logic\luadefs</Filter>
</ClCompile>
<ClCompile Include="logic\luadefs\CLuaObjectDefs.cpp">
<Filter>Source Files\logic\luadefs</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="logic\CLightsyncManager.h">
Expand Down Expand Up @@ -1880,6 +1880,9 @@
<ClInclude Include="logic\luadefs\CLuaTimerDefs.h">
<Filter>Header Files\logic\luadefs</Filter>
</ClInclude>
<ClInclude Include="logic\luadefs\CLuaObjectDefs.h">
<Filter>Header Files\logic\luadefs</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Xml Include="acl.xml">
Expand Down
15 changes: 0 additions & 15 deletions MTA10_Server/mods/deathmatch/logic/lua/CLuaFunctionDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,6 @@ class CLuaFunctionDefs
LUA_DECLARE ( AddDebugHook );
LUA_DECLARE ( RemoveDebugHook );

// Object create/destroy functions
LUA_DECLARE ( CreateObject );

// Object get functions
LUA_DECLARE ( GetObjectName );
LUA_DECLARE ( GetObjectRotation );
LUA_DECLARE ( GetObjectScale );

// Object set functions
LUA_DECLARE ( SetObjectName );
LUA_DECLARE ( SetObjectRotation );
LUA_DECLARE ( SetObjectScale );
LUA_DECLARE ( MoveObject );
LUA_DECLARE ( StopObject );

// Radar area create/destroy funcs
LUA_DECLARE ( CreateRadarArea );

Expand Down
18 changes: 1 addition & 17 deletions MTA10_Server/mods/deathmatch/logic/lua/CLuaMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,22 +249,6 @@ void CLuaMain::AddColShapeClass ( lua_State* luaVM )
}


void CLuaMain::AddObjectClass ( lua_State* luaVM )
{
lua_newclass ( luaVM );

lua_classfunction ( luaVM, "create", "createObject" );
lua_classfunction ( luaVM, "move", "moveObject" );
lua_classfunction ( luaVM, "stop", "stopObject" );

lua_classfunction ( luaVM, "getScale", "getObjectScale" );
lua_classfunction ( luaVM, "setScale", "setObjectScale" );

lua_classvariable ( luaVM, "scale", "setObjectScale", "getObjectScale" );

lua_registerclass ( luaVM, "Object", "Element" );
}

void CLuaMain::AddRadarAreaClass ( lua_State* luaVM )
{
lua_newclass ( luaVM );
Expand Down Expand Up @@ -339,6 +323,7 @@ void CLuaMain::InitClasses ( lua_State* luaVM )
CLuaACLDefs ::AddClasses ( luaVM );
CLuaVehicleDefs ::AddClass ( luaVM );
CLuaMarkerDefs ::AddClass ( luaVM );
CLuaObjectDefs ::AddClass ( luaVM );
CLuaPedDefs ::AddClass ( luaVM );
CLuaPlayerDefs ::AddClass ( luaVM );
CLuaResourceDefs ::AddClass ( luaVM );
Expand All @@ -349,7 +334,6 @@ void CLuaMain::InitClasses ( lua_State* luaVM )
AddAccountClass ( luaVM );
AddBanClass ( luaVM );
AddColShapeClass ( luaVM );
AddObjectClass ( luaVM );
AddRadarAreaClass ( luaVM );
AddConnectionClass ( luaVM );
AddQueryHandleClass ( luaVM );
Expand Down
1 change: 0 additions & 1 deletion MTA10_Server/mods/deathmatch/logic/lua/CLuaMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ class CLuaMain //: public CClient
void AddAccountClass ( lua_State* luaVM );
void AddBanClass ( lua_State* luaVM );
void AddColShapeClass ( lua_State* luaVM );
void AddObjectClass ( lua_State* luaVM );
void AddRadarAreaClass ( lua_State* luaVM );
void AddConnectionClass ( lua_State* luaVM );
void AddQueryHandleClass ( lua_State* luaVM );
Expand Down
14 changes: 1 addition & 13 deletions MTA10_Server/mods/deathmatch/logic/lua/CLuaManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,6 @@ void CLuaManager::LoadCFunctions ( void )
CLuaCFunctions::AddFunction ( "cancelLatentEvent", CLuaFunctionDefs::CancelLatentEvent );
CLuaCFunctions::AddFunction ( "addDebugHook", CLuaFunctionDefs::AddDebugHook );
CLuaCFunctions::AddFunction ( "removeDebugHook", CLuaFunctionDefs::RemoveDebugHook );

// Object create/destroy funcs
CLuaCFunctions::AddFunction ( "createObject", CLuaFunctionDefs::CreateObject );

// Object get funcs
CLuaCFunctions::AddFunction ( "getObjectRotation", CLuaFunctionDefs::GetObjectRotation );
CLuaCFunctions::AddFunction ( "getObjectScale", CLuaFunctionDefs::GetObjectScale );

// Object set funcs
CLuaCFunctions::AddFunction ( "setObjectRotation", CLuaFunctionDefs::SetObjectRotation );
CLuaCFunctions::AddFunction ( "setObjectScale", CLuaFunctionDefs::SetObjectScale );
CLuaCFunctions::AddFunction ( "moveObject", CLuaFunctionDefs::MoveObject );
CLuaCFunctions::AddFunction ( "stopObject", CLuaFunctionDefs::StopObject );

// Radar area create/destroy funcs
CLuaCFunctions::AddFunction ( "createRadarArea", CLuaFunctionDefs::CreateRadarArea );
Expand Down Expand Up @@ -336,6 +323,7 @@ void CLuaManager::LoadCFunctions ( void )
CLuaVoiceDefs::LoadFunctions ();
CLuaXMLDefs::LoadFunctions ();
CLuaMarkerDefs::LoadFunctions ();
CLuaObjectDefs::LoadFunctions ();
CLuaPedDefs::LoadFunctions ();
CLuaPlayerDefs::LoadFunctions ();
CLuaBlipDefs::LoadFunctions ();
Expand Down

0 comments on commit edc1944

Please sign in to comment.