Esempio n. 1
0
void P_Entity_Construct ()
{
	Light_Construct();

	RenderablePivot::StaticShader::instance() = GlobalShaderCache().capture("$PIVOT");

	GlobalShaderCache().attachRenderable(StaticRenderableConnectionLines::instance());
}
Esempio n. 2
0
void Entity_Construct(EGameType gameType)
{
  g_gameType = gameType;
  if(g_gameType == eGameTypeDoom3)
  {
    g_targetable_nameKey = "name";

    Static<KeyIsName>::instance().m_keyIsName = keyIsNameDoom3;
    Static<KeyIsName>::instance().m_nameKey = "name";
  }
  else
  {
    Static<KeyIsName>::instance().m_keyIsName = keyIsNameQuake3;
    Static<KeyIsName>::instance().m_nameKey = "targetname";
  }

  GlobalPreferenceSystem().registerPreference("SI_ShowNames", BoolImportStringCaller(g_showNames), BoolExportStringCaller(g_showNames));
  GlobalPreferenceSystem().registerPreference("SI_ShowAngles", BoolImportStringCaller(g_showAngles), BoolExportStringCaller(g_showAngles));
  GlobalPreferenceSystem().registerPreference("NewLightStyle", BoolImportStringCaller(g_newLightDraw), BoolExportStringCaller(g_newLightDraw));
  GlobalPreferenceSystem().registerPreference("LightRadiuses", BoolImportStringCaller(g_lightRadii), BoolExportStringCaller(g_lightRadii));

  Entity_InitFilters();
  LightType lightType = LIGHTTYPE_DEFAULT;
  if(g_gameType == eGameTypeRTCW)
  {
    lightType = LIGHTTYPE_RTCW;
  }
  else if(g_gameType == eGameTypeDoom3)
  {
    lightType = LIGHTTYPE_DOOM3;
  }
  Light_Construct(lightType);
  MiscModel_construct();
  Doom3Group_construct();

  RenderablePivot::StaticShader::instance() = GlobalShaderCache().capture("$PIVOT");

  GlobalShaderCache().attachRenderable(StaticRenderableConnectionLines::instance());
}