Changeset 923
- Timestamp:
- 03/16/10 00:50:07 (5 months ago)
- Location:
- trunk/client
- Files:
-
- 2 added
- 4 modified
-
client.vcproj (modified) (3 diffs)
-
Game2/ConfigPeer.cpp (added)
-
Game2/ConfigPeer.h (added)
-
Game2/GameApp.cpp (modified) (2 diffs)
-
Game2/GamePeer.cpp (modified) (3 diffs)
-
Game2/GamePeer.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/client.vcproj
r919 r923 234 234 </File> 235 235 <File 236 RelativePath=".\Game2\ConfigPeer.cpp" 237 > 238 </File> 239 <File 240 RelativePath=".\Game2\ConfigPeer.h" 241 > 242 </File> 243 <File 236 244 RelativePath=".\Game2\Console.cpp" 237 245 > … … 740 748 Name="VCCustomBuildTool" 741 749 Description="$(InputFileName)" 742 CommandLine="copy "$(InputPath)" $(OutDir) "750 CommandLine="copy "$(InputPath)" $(OutDir)
" 743 751 Outputs="$(OutDir)\$(InputFileName)" 744 752 /> … … 751 759 Name="VCCustomBuildTool" 752 760 Description="$(InputFileName)" 753 CommandLine="copy "$(InputPath)" $(OutDir) "761 CommandLine="copy "$(InputPath)" $(OutDir)
" 754 762 Outputs="$(OutDir)\$(InputFileName)" 755 763 /> -
trunk/client/Game2/GameApp.cpp
r918 r923 26 26 #include "GameApp.h" 27 27 #include "AboutDialog.h" 28 #include "ConfigPeer.h" 28 29 #include "FirstChoiceDialog.h" 29 30 #include "FullscreenTest.h" … … 1147 1148 // This allows the script to modify the configuration (e.g. for unit tests). 1148 1149 scripting = new Script::Core(); 1150 ConfigPeer::Register(scripting); 1149 1151 GamePeer::Register(scripting); 1150 1152 gamePeer = new GamePeer(scripting); -
trunk/client/Game2/GamePeer.cpp
r922 r923 23 23 #include "StdAfx.h" 24 24 25 #include <luabind/adopt_policy.hpp> 26 25 27 #include "../../engine/Script/Core.h" 28 #include "ConfigPeer.h" 26 29 27 30 #include "GamePeer.h" … … 58 61 module(L) [ 59 62 class_<GamePeer>("Game") 63 .def("get_config", &LGetConfig, adopt(result)) 60 64 .def("get_on_init", &LGetOnInit) 61 65 .def("on_init", &LOnInit) … … 84 88 // table 85 89 lua_pop(L, 1); 90 } 91 92 ConfigPeer *GamePeer::LGetConfig() 93 { 94 // function get_config() 95 // Returns the game configuration, so it can be modified. 96 return new ConfigPeer(scripting); 86 97 } 87 98 -
trunk/client/Game2/GamePeer.h
r922 r923 27 27 28 28 namespace HoverRace { 29 namespace Client { 30 class ConfigPeer; 31 } 29 32 namespace Script { 30 33 class Core; … … 53 56 54 57 public: 58 ConfigPeer *LGetConfig(); 59 55 60 void LOnInit(const luabind::object &fn); 56 61 void LGetOnInit();
