khanat-code-old/code/ryzom/common/data_common/r2/r2_init.lua
kervala 47ccfe279a Changed: Don't use anymore the current SDK in registry (very unreliable)
Changed: Use the Windows SDK installed with VC++ or the most recent compatible one
2013-09-27 10:52:44 +02:00

35 lines
881 B
Lua

-- main init function
r2.init = function ()
local function protected()
debugInfo("r2.init begin")
profileFunction(r2.registerHighLevel, "r2.registerHighLevel")
profileFunction(r2.registerBasicBricks, "r2.registerBasicBricks")
profileFunction(r2.loadFeatures, "r2.loadFeatures")
profileFunction(r2.loadPalette, "r2.loadPalette")
profileFunction(r2.setupClasses, "r2.setupClasses")
-- tmp
if r2.InClient == true then
--r2:testPropertySheet()
profileMethod(r2, "buildAllPropertySheetsAndForms", "r2:buildAllPropertySheetsAndForms")
end
-- IMPORTANT : should be called after all parameters of classes (displayers ...) have been initialized
r2.TextMgr = r2.newComponent("TextManager")
debugInfo("r2.init end")
end
local ok, errMsg = pcall(protected)
if not ok then
debugInfo("Error while initialization:'".. errMsg.."'")
end
end