本文整理汇总了C++中CGameSettings类的典型用法代码示例。如果您正苦于以下问题:C++ CGameSettings类的具体用法?C++ CGameSettings怎么用?C++ CGameSettings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CGameSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Vid
void CCommandFuncs::Vid(const char* szParameters)
{
#if 0
// ripped from the renderware sdk
CGameSettings * gameSettings = CCore::GetSingleton ( ).GetGame ( )->GetSettings();
if ( strlen(szParameters) == 0 )
{
VideoMode vidModemInfo;
int vidMode, numVidModes, currentVidMode;
numVidModes = gameSettings->GetNumVideoModes();
currentVidMode = gameSettings->GetCurrentVideoMode();
// Add the available video modes to the dialog
for (vidMode = 0; vidMode < numVidModes; vidMode++)
{
gameSettings->GetVideoModeInfo(&vidModemInfo, vidMode);
SString strMode ( "%d: %lu x %lu x %lu %s %s",
vidMode, vidModemInfo.width, vidModemInfo.height,
vidModemInfo.depth,
vidModemInfo.flags & rwVIDEOMODEEXCLUSIVE ?
"(Fullscreen)" : "",
currentVidMode == vidMode ? "(Current)" : "" );
CCore::GetSingleton ().GetConsole ()->Printf ( strMode );
}
CCore::GetSingleton ().GetConsole ()->Printf( "* Syntax: vid <mode>" );
}
else
{
// Make sure no mod is loaded
if ( !CCore::GetSingleton ().GetModManager ()->IsLoaded () )
{
// Grab the device window and what mode to switch to
int iParameter = atoi ( szParameters );
// Change the video mode
GetVideoModeManager ()->ChangeVideoMode ( iParameter );
// Grab viewport settings
int iViewportX = CCore::GetSingleton ().GetGraphics()->GetViewportWidth ();
int iViewportY = CCore::GetSingleton ().GetGraphics()->GetViewportHeight ();
// Re-create all CGUI windows, for correct absolute sizes that depend on the (new) screen resolution
CCore::GetSingleton ().GetLocalGUI ()->DestroyWindows ();
CCore::GetSingleton ().GetGUI ()->SetResolution ( (float) iViewportX, (float) iViewportY );
CCore::GetSingleton ().GetLocalGUI ()->CreateWindows ();
// Reload console, serverbrowser and chat settings (removed in DestroyWindows)
g_pCore->ApplyConsoleSettings ();
g_pCore->ApplyMenuSettings ();
}
else
{
g_pCore->GetConsole ()->Echo ( "vid: Please disconnect before changing video mode" );
}
}
#endif
}
示例2: CreateHumanDeathFX
void CDeathFX::CreateHumanDeathFX()
{
CSFXMgr* psfxMgr = g_pGameClientShell->GetSFXMgr();
if (!psfxMgr) return;
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (!pSettings || !pSettings->Gore()) return;
GIBCREATESTRUCT gib;
m_pClientDE->AlignRotation(&(gib.rRot), &m_vDir, LTNULL);
LTFLOAT fDamage = VEC_MAG(m_vDir);
VEC_COPY(gib.vPos, m_vPos);
VEC_SET(gib.vMinVel, 50.0f, 100.0f, 50.0f);
VEC_MULSCALAR(gib.vMinVel, gib.vMinVel, fDamage);
VEC_SET(gib.vMaxVel, 100.0f, 200.0f, 100.0f);
VEC_MULSCALAR(gib.vMaxVel, gib.vMaxVel, fDamage);
gib.fLifeTime = 20.0f;
gib.fFadeTime = 7.0f;
gib.nGibFlags = 0;
gib.bRotate = LTTRUE;
gib.nCode = m_eCode;
gib.eModelId = m_eModelId;
gib.eModelStyle = m_eModelStyle;
gib.bSubGibs = LTTRUE;
gib.bBloodSplats = LTTRUE;
SetupGibTypes(gib);
psfxMgr->CreateSFX(SFX_GIB_ID, &gib);
}
示例3: Window
void CCommandFuncs::Window ( const char* szParameters )
{
#if 0
// Make sure no mod is loaded
if ( !CCore::GetSingleton ().GetModManager ()->IsLoaded () )
{
CGameSettings * gameSettings = CCore::GetSingleton ( ).GetGame ( )->GetSettings();
unsigned int currentMode = gameSettings->GetCurrentVideoMode();
if ( currentMode == 0 )
{
GetVideoModeManager ()->ChangeVideoMode ( VIDEO_MODE_FULLSCREEN );
g_pCore->GetLocalGUI()->GetMainMenu ()->RefreshPositions();
}
else
{
// Run "vid 0"
Vid ( "0" );
}
}
else
{
g_pCore->GetConsole ()->Echo ( "window: Please disconnect first" );
}
#endif
}
示例4: CreateLingeringSmoke
void CGibFX::CreateLingeringSmoke(int nIndex)
{
CSFXMgr* psfxMgr = g_pGameClientShell->GetSFXMgr();
if (!psfxMgr) return;
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (!pSettings) return;
uint8 nDetailLevel = pSettings->SpecialFXSetting();
if (nDetailLevel == RS_LOW) return;
SMCREATESTRUCT sm;
char* pTexture = "Sprites\\SmokeTest.spr";
VEC_SET(sm.vColor1, 100.0f, 100.0f, 100.0f);
VEC_SET(sm.vColor2, 125.0f, 125.0f, 125.0f);
VEC_SET(sm.vMinDriftVel, -10.0f, 25.0f, -10.0f);
VEC_SET(sm.vMaxDriftVel, 10.0f, 50.0f, 10.0f);
LTFLOAT fVolumeRadius = 10.0f;
LTFLOAT fLifeTime = GetRandom(m_fLifeTime * 0.75f, m_fLifeTime);
LTFLOAT fRadius = 1500;
LTFLOAT fParticleCreateDelta = 0.1f;
LTFLOAT fMinParticleLife = 1.0f;
LTFLOAT fMaxParticleLife = 5.0f;
uint8 nNumParticles = 3;
LTBOOL bIgnoreWind = LTFALSE;
if (IsLiquid(m_eCode))
{
GetLiquidColorRange(m_eCode, &sm.vColor1, &sm.vColor2);
pTexture = DEFAULT_BUBBLE_TEXTURE;
fRadius = 750.0f;
bIgnoreWind = LTTRUE;
fMinParticleLife = 1.0f;
fMaxParticleLife = 1.5f;
}
sm.vPos = m_Emitters[nIndex].m_vPos;
sm.hServerObj = m_hGib[nIndex];
sm.fVolumeRadius = fVolumeRadius;
sm.fLifeTime = fLifeTime;
sm.fRadius = fRadius;
sm.fParticleCreateDelta = fParticleCreateDelta;
sm.fMinParticleLife = fMinParticleLife;
sm.fMaxParticleLife = fMaxParticleLife;
sm.nNumParticles = nNumParticles;
sm.bIgnoreWind = bIgnoreWind;
sm.hstrTexture = m_pClientDE->CreateString(pTexture);
psfxMgr->CreateSFX(SFX_SMOKE_ID, &sm);
m_pClientDE->FreeString(sm.hstrTexture);
}
示例5: CreateMiniBloodExplosion
void CGibFX::CreateMiniBloodExplosion(int nIndex)
{
// Add a mini blood explosion...
CSFXMgr* psfxMgr = g_pGameClientShell->GetSFXMgr();
if (!psfxMgr) return;
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (!pSettings) return;
uint8 nDetailLevel = pSettings->SpecialFXSetting();
if (nDetailLevel == RS_LOW) return;
char* szBlood[2] = { "SpecialFX\\ParticleTextures\\Blood_1.dtx",
"SpecialFX\\ParticleTextures\\Blood_2.dtx" };
PARTICLESHOWERCREATESTRUCT ps;
ps.vPos = m_Emitters[nIndex].m_vPos;
ps.vPos.y += 30.0f;
ps.vDir.Init(0, 100, 0);
VEC_SET(ps.vColor1, 200.0f, 200.0f, 200.0f);
VEC_SET(ps.vColor2, 255.0f, 255.0f, 255.0f);
ps.pTexture = szBlood[GetRandom(0,1)];;
ps.nParticles = 50;
ps.fDuration = 1.0f;
ps.fEmissionRadius = 0.3f;
ps.fRadius = 800.0f;
ps.fGravity = PSFX_DEFAULT_GRAVITY;
if (IsLiquid(m_eCode))
{
ps.vDir *= 3.0f;
ps.fEmissionRadius = 0.2f;
ps.fRadius = 700.0f;
}
psfxMgr->CreateSFX(SFX_PARTICLESHOWER_ID, &ps);
// Play appropriate sound...
char* pSound = GetGibDieSound();
if (pSound)
{
g_pClientSoundMgr->PlaySoundFromPos(ps.vPos, pSound, 300.0f,
SOUNDPRIORITY_MISC_LOW);
}
}
示例6: OnFocus
void CFolderGame::OnFocus(LTBOOL bFocus)
{
CGameSettings *pSettings = g_pInterfaceMgr->GetSettings();
if (bFocus)
{
m_bGore = pSettings->Gore();
m_nDifficulty = g_pGameClientShell->GetDifficulty();
m_bFadeBodies = g_pGameClientShell->GetFadeBodies();
m_nSubtitles = (int)g_vtSubtitles.GetFloat();
m_bAlwaysRun = pSettings->RunLock();
m_nLayout = (int)g_vtHUDLayout.GetFloat();
m_nHeadBob = (int)(10.0f * GetConsoleFloat("HeadBob",1.0f));
m_nWeaponSway = (int)(10.0f * GetConsoleFloat("WeaponSway",1.0f));
m_nPickupMsgDur = (int)(2.0f * GetConsoleFloat("PickupMessageDuration",5.0f));
m_bObjMessages = ( GetConsoleInt("ObjectiveMessages",1) > 0 );
UpdateData(LTFALSE);
}
else
{
UpdateData();
pSettings->SetBoolVar("Gore",m_bGore);
g_vtSubtitles.WriteFloat((LTFLOAT)m_nSubtitles);
g_vtHUDLayout.WriteFloat((LTFLOAT)m_nLayout);
WriteConsoleInt("Difficulty",m_nDifficulty);
g_pGameClientShell->SetDifficulty((GameDifficulty)m_nDifficulty);
WriteConsoleInt("FadeBodies",(int)m_bFadeBodies);
g_pGameClientShell->SetFadeBodies(m_bFadeBodies);
pSettings->SetBoolVar("RunLock",m_bAlwaysRun);
WriteConsoleFloat("HeadBob",((LTFLOAT)m_nHeadBob / 10.0f));
WriteConsoleFloat("WeaponSway",((LTFLOAT)m_nWeaponSway / 10.0f));
WriteConsoleFloat("PickupMessageDuration",((LTFLOAT)m_nPickupMsgDur / 2.0f));
WriteConsoleInt("ObjectiveMessages",m_bObjMessages);
g_pLTClient->WriteConfigFile("autoexec.cfg");
}
CBaseFolder::OnFocus(bFocus);
}
示例7: UpdateData
// Change in focus
void CFolderControls::OnFocus(LTBOOL bFocus)
{
CGameSettings *pSettings = g_pInterfaceMgr->GetSettings();
if (bFocus)
{
// Load the folder options from the console
m_bUseJoystick=pSettings->UseJoystick();
CFolderJoystick *pJoy = (CFolderJoystick *)m_pFolderMgr->GetFolderFromID(FOLDER_ID_JOYSTICK);
if (!pJoy->IsJoystickConfigured()) m_bUseJoystick = LTFALSE;
m_pJoystickCtrl->Enable(m_bUseJoystick);
UpdateData(LTFALSE);
}
else
{
UpdateData();
CGameSettings *pSettings = g_pInterfaceMgr->GetSettings();
pSettings->SetBoolVar("UseJoystick",m_bUseJoystick);
if (m_bUseJoystick)
{
char strJoystick[128];
memset (strJoystick, 0, 128);
LTRESULT result = g_pLTClient->GetDeviceName (DEVICETYPE_JOYSTICK, strJoystick, 127);
if (result == LT_OK)
{
char strConsole[256];
sprintf (strConsole, "EnableDevice \"%s\"", strJoystick);
g_pLTClient->RunConsoleString (strConsole);
}
else
{
pSettings->SetBoolVar("UseJoystick",LTFALSE);
}
}
// Just to be safe save the config incase anything changed...
g_pLTClient->WriteConfigFile("autoexec.cfg");
}
CBaseFolder::OnFocus(bFocus);
}
示例8: PlaySound3D
CClientSound* CClientSoundManager::PlayGTASFX3D ( eAudioLookupIndex containerIndex, int iBankIndex, int iAudioIndex, const CVector& vecPosition, bool bLoop )
{
if ( !GetSFXStatus ( containerIndex ) )
return NULL;
void* pAudioData;
unsigned int uiAudioLength;
if ( !g_pGame->GetAudioContainer ()->GetAudioData ( containerIndex, iBankIndex, iAudioIndex, pAudioData, uiAudioLength ) )
return NULL;
CClientSound* pSound = PlaySound3D ( pAudioData, uiAudioLength, vecPosition, bLoop );
if ( pSound )
{
CGameSettings * gameSettings = g_pGame->GetSettings ();
pSound->SetVolume ( gameSettings->GetSFXVolume () / 255.0f );
}
return pSound;
}
示例9: GetDynArrayMaxNum
unsigned int CSFXMgr::GetDynArrayMaxNum(uint8 nIndex)
{
if (0 <= nIndex && nIndex < DYN_ARRAY_SIZE)
{
// Use detail setting for bullet holes...
if (nIndex == SFX_MARK_ID)
{
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (pSettings)
{
return int(pSettings->NumBulletHoles() + 1);
}
}
return s_nDynArrayMaxNums[nIndex];
}
return 0;
}
示例10: Output
void CChat::Output(const char* szText, bool bColorCoded)
{
CChatLine* pLine = NULL;
const char* szRemainingText = szText;
CColor color = m_TextColor;
// Allow smooth scroll when text is added if game FX Quality is not low
CGameSettings* gameSettings = CCore::GetSingleton().GetGame()->GetSettings();
if (gameSettings->GetFXQuality() > 0)
m_fSmoothScroll -= 1.0f;
do
{
m_uiMostRecentLine = (m_uiMostRecentLine == 0 ? CHAT_MAX_LINES - 1 : m_uiMostRecentLine - 1);
pLine = &m_Lines[m_uiMostRecentLine];
szRemainingText = pLine->Format(szRemainingText, (m_vecBackgroundSize.fX - (10.0f * m_vecScale.fX)), color, bColorCoded);
pLine->SetActive(true);
pLine->UpdateCreationTime();
} while (szRemainingText);
}
示例11: CreateGibTrail
CSpecialFX* CGibFX::CreateGibTrail(HLOCALOBJ hObj)
{
if (!hObj || !m_pClientDE) return LTNULL;
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (!pSettings) return LTNULL;
uint8 nDetailLevel = pSettings->SpecialFXSetting();
if (nDetailLevel == RS_LOW) return LTNULL;
PTCREATESTRUCT pt;
pt.hServerObj = hObj;
pt.nType = (uint8) (m_eModelType == eModelTypeHuman ? PT_BLOOD : PT_GIBSMOKE);
CSpecialFX* pSFX = debug_new(CParticleTrailFX);
if (!pSFX) return LTNULL;
pSFX->Init(&pt);
pSFX->CreateObject(m_pClientDE);
return pSFX;
}
示例12: CreateObject
LTBOOL CProjectileFX::CreateObject(ILTClient* pClientDE)
{
if (!CSpecialFX::CreateObject(pClientDE) || !m_hServerObject) return LTFALSE;
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (!pSettings) return LTFALSE;
uint8 nDetailLevel = pSettings->SpecialFXSetting();
LTVector vPos;
LTRotation rRot;
g_pLTClient->GetObjectPos(m_hServerObject, &vPos);
g_pLTClient->GetObjectRotation(m_hServerObject, &rRot);
//m_pClientDE->CPrint("Client start pos (%.2f, %.2f, %.2f)", vPos.x, vPos.y, vPos.z);
//m_fStartTime = m_pClientDE->GetTime();
if (nDetailLevel != RS_LOW)
{
if (m_nFX & PFX_SMOKETRAIL)
{
CreateSmokeTrail(vPos, rRot);
}
if (m_nFX & PFX_LIGHT)
{
CreateLight(vPos, rRot);
}
}
if (m_nFX & PFX_FLARE)
{
CreateFlare(vPos, rRot);
}
if (m_nFX & PFX_FLYSOUND)
{
CreateFlyingSound(vPos, rRot);
}
// Do client-side projectiles in multiplayer games...
if ( g_pClientMultiplayerMgr->IsConnectedToRemoteServer( ))
{
// Set the velocity of the "server" object if it is really just a local
// object...
if (m_bLocal)
{
VEC_COPY(m_vFirePos, vPos);
m_fStartTime = m_pClientDE->GetTime();
LTVector vVel, vF;
vF = rRot.Forward();
m_vPath = vF;
// Special case of adjusting the projectile speed...
LTFLOAT fVel = (LTFLOAT) m_pProjectileFX->nVelocity;
if (m_bAltFire)
{
fVel = (LTFLOAT) m_pProjectileFX->nAltVelocity;
}
LTFLOAT fMultiplier = 1.0f;
if (m_pClientDE->GetSConValueFloat("MissileSpeed", fMultiplier) != LT_NOTFOUND)
{
fVel *= fMultiplier;
}
vVel = vF * fVel;
g_pPhysicsLT->SetVelocity(m_hServerObject, &vVel);
}
}
return LTTRUE;
}
示例13: GetDxStatus
////////////////////////////////////////////////////////////////
//
// CRenderItemManager::GetDxStatus
//
//
//
////////////////////////////////////////////////////////////////
void CRenderItemManager::GetDxStatus ( SDxStatus& outStatus )
{
outStatus.testMode = m_TestMode;
// Copy hardware settings
outStatus.videoCard.strName = m_strVideoCardName;
outStatus.videoCard.iInstalledMemoryKB = m_iVideoCardMemoryKBTotal;
outStatus.videoCard.strPSVersion = m_strVideoCardPSVersion;
outStatus.videoCard.depthBufferFormat = m_depthBufferFormat;
outStatus.videoCard.iMaxAnisotropy = g_pDeviceState->AdapterState.MaxAnisotropicSetting;
outStatus.videoCard.iNumSimultaneousRTs = g_pDeviceState->DeviceCaps.NumSimultaneousRTs;
// State
outStatus.state.iNumShadersUsingReadableDepthBuffer = m_ShadersUsingDepthBuffer.size();
// Memory usage
outStatus.videoMemoryKB.iFreeForMTA = m_iMemoryKBFreeForMTA;
outStatus.videoMemoryKB.iUsedByFonts = m_iFontMemoryKBUsed;
outStatus.videoMemoryKB.iUsedByTextures = m_iTextureMemoryKBUsed;
outStatus.videoMemoryKB.iUsedByRenderTargets = m_iRenderTargetMemoryKBUsed;
// Option settings
CGameSettings* gameSettings = CCore::GetSingleton ().GetGame ()->GetSettings ();
outStatus.settings.bWindowed = GetVideoModeManager()->IsDisplayModeWindowed();
outStatus.settings.iFullScreenStyle = GetVideoModeManager()->GetFullScreenStyle();
outStatus.settings.iFXQuality = gameSettings->GetFXQuality(); ;
outStatus.settings.iDrawDistance = ( gameSettings->GetDrawDistance () - 0.925f ) / 0.8749f * 100;
outStatus.settings.iAntiAliasing = gameSettings->GetAntiAliasing() - 1;
outStatus.settings.bVolumetricShadows = false;
outStatus.settings.bAllowScreenUpload = true;
outStatus.settings.iStreamingMemory = 0;
outStatus.settings.bGrassEffect = false;
outStatus.settings.bHeatHaze = false;
outStatus.settings.iAnisotropicFiltering = 0;
outStatus.settings.aspectRatio = gameSettings->GetAspectRatio ();
outStatus.settings.bHUDMatchAspectRatio = true;
outStatus.settings.fFieldOfView = 70;
outStatus.settings.bHighDetailVehicles = false;
CVARS_GET ( "streaming_memory", outStatus.settings.iStreamingMemory );
CVARS_GET ( "volumetric_shadows", outStatus.settings.bVolumetricShadows );
CVARS_GET ( "allow_screen_upload", outStatus.settings.bAllowScreenUpload );
CVARS_GET ( "grass", outStatus.settings.bGrassEffect );
CVARS_GET ( "heat_haze", outStatus.settings.bHeatHaze );
CVARS_GET ( "anisotropic", outStatus.settings.iAnisotropicFiltering );
CVARS_GET ( "hud_match_aspect_ratio", outStatus.settings.bHUDMatchAspectRatio );
CVARS_GET ( "fov", outStatus.settings.fFieldOfView );
CVARS_GET ( "high_detail_vehicles", outStatus.settings.bHighDetailVehicles );
if ( outStatus.settings.iFXQuality == 0 )
{
// These are always off with low fx quality
outStatus.settings.bVolumetricShadows = false;
outStatus.settings.bGrassEffect = false;
}
// Display color depth
D3DFORMAT BackBufferFormat = g_pDeviceState->CreationState.PresentationParameters.BackBufferFormat;
if ( BackBufferFormat >= D3DFMT_R5G6B5 && BackBufferFormat < D3DFMT_A8R3G3B2 )
outStatus.settings.b32BitColor = 0;
else
outStatus.settings.b32BitColor = 1;
// Modify if using test mode
if ( m_TestMode == DX_TEST_MODE_NO_MEM )
outStatus.videoMemoryKB.iFreeForMTA = 0;
if ( m_TestMode == DX_TEST_MODE_LOW_MEM )
outStatus.videoMemoryKB.iFreeForMTA = 1;
if ( m_TestMode == DX_TEST_MODE_NO_SHADER )
outStatus.videoCard.strPSVersion = "0";
}
示例14: CreateTitle
// Build the folder
LTBOOL CFolderGame::Build()
{
CreateTitle(IDS_TITLE_GAME_OPTIONS);
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (g_pLayoutMgr->HasCustomValue(FOLDER_ID_GAME,"ColumnWidth"))
kGap = g_pLayoutMgr->GetFolderCustomInt(FOLDER_ID_GAME,"ColumnWidth");
if (g_pLayoutMgr->HasCustomValue(FOLDER_ID_GAME,"SliderWidth"))
kWidth = g_pLayoutMgr->GetFolderCustomInt(FOLDER_ID_GAME,"SliderWidth");
//crosshair menu
AddTextItem(IDS_CONTROLS_CROSSHAIR, FOLDER_CMD_CROSSHAIR, IDS_HELP_CROSSHAIRMENU);
CCycleCtrl *pCycle = AddCycleItem(IDS_DISPLAY_SUBTITLES,IDS_HELP_SUBTITLES,kGap-25,25,&m_nSubtitles);
pCycle->AddString(IDS_OFF);
pCycle->AddString(IDS_ON);
if (pSettings && pSettings->IsGoreAllowed())
{
CToggleCtrl *pGore = AddToggle(IDS_DISPLAY_GORE,IDS_HELP_GORE,kGap,&m_bGore);
pGore->SetOnString(IDS_ON);
pGore->SetOffString(IDS_OFF);
}
CToggleCtrl *pFadeBodies = AddToggle(IDS_FADEBODIES,IDS_HELP_FADEBODIES,kGap,&m_bFadeBodies);
pFadeBodies->SetOnString(IDS_YES);
pFadeBodies->SetOffString(IDS_NO);
//always run
CToggleCtrl* pToggle = AddToggle(IDS_ADVCONTROLS_RUNLOCK, IDS_HELP_RUNLOCK, kGap, &m_bAlwaysRun );
pToggle->SetOnString(IDS_YES);
pToggle->SetOffString(IDS_NO);
// Add the Difficulty option
m_pDifficultyCtrl = AddCycleItem(IDS_DIFFICULTY,IDS_HELP_DIFFICULTY,kGap-25,25,&m_nDifficulty);
m_pDifficultyCtrl->AddString(IDS_NEW_EASY);
m_pDifficultyCtrl->AddString(IDS_NEW_MEDIUM);
m_pDifficultyCtrl->AddString(IDS_NEW_HARD);
m_pDifficultyCtrl->AddString(IDS_NEW_INSANE);
pCycle = AddCycleItem(IDS_HUDLAYOUT,IDS_HELP_HUDLAYOUT,kGap-25,25,&m_nLayout);
for (int hl = 0; hl < g_pLayoutMgr->GetNumHUDLayouts(); hl++)
{
pCycle->AddString(g_pLayoutMgr->GetLayoutName(hl));
}
CSliderCtrl *pSlider=AddSlider(IDS_HEADBOB, IDS_HELP_HEADBOB, kGap, kWidth, &m_nHeadBob);
pSlider->SetSliderRange(0, 10);
pSlider->SetSliderIncrement(1);
pSlider=AddSlider(IDS_WEAPONSWAY, IDS_HELP_WEAPONSWAY, kGap, kWidth, &m_nWeaponSway);
pSlider->SetSliderRange(0, 10);
pSlider->SetSliderIncrement(1);
pSlider=AddSlider(IDS_PICKUP_MSG_DUR, IDS_HELP_PICKUP_MSG_DUR, kGap, kWidth, &m_nPickupMsgDur);
pSlider->SetSliderRange(0, 10);
pSlider->SetSliderIncrement(1);
pToggle = AddToggle(IDS_OBJECTIVE_MSGS, IDS_HELP_OBJECTIVE_MSGS, kGap, &m_bObjMessages );
pToggle->SetOnString(IDS_YES);
pToggle->SetOffString(IDS_NO);
// Make sure to call the base class
if (! CBaseFolder::Build()) return LTFALSE;
UseBack(LTTRUE,LTTRUE);
return LTTRUE;
}
示例15: CreateSurfaceSpecificFX
void CWeaponFX::CreateSurfaceSpecificFX()
{
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (!pSettings) return;
// Don't do gore fx...
if (m_eSurfaceType == ST_FLESH)
{
if (!pSettings->Gore())
{
return;
}
if (m_pAmmo->eType == VECTOR && m_pAmmo->eInstDamageType == DT_BULLET)
{
CreateBloodSplatFX();
}
}
if ((m_wFireFX & WFX_EXITMARK) && ShowsMark(m_eExitSurface))
{
CreateExitMark();
}
if (m_wFireFX & WFX_EXITDEBRIS)
{
CreateExitDebris();
}
if (!m_pAmmo || !m_pAmmo->pImpactFX) return;
if (!m_pAmmo->pImpactFX->bDoSurfaceFX) return;
// Create the surface specific fx...
int i;
SURFACE* pSurf = g_pSurfaceMgr->GetSurface(m_eSurfaceType);
if (pSurf)
{
if (IsLiquid(m_eCode))
{
// Create underwater fx...
// Create any impact particle shower fx associated with this surface...
for (i=0; i < pSurf->nNumUWImpactPShowerFX; i++)
{
CPShowerFX* pPShowerFX = g_pSurfaceMgr->GetPShowerFX(pSurf->aUWImpactPShowerFXIds[i]);
g_pFXButeMgr->CreatePShowerFX(pPShowerFX, m_vPos, m_vDir, m_vSurfaceNormal);
}
}
else
{
// Create normal fx...
// Create any impact scale fx associated with this surface...
for (i=0; i < pSurf->nNumImpactScaleFX; i++)
{
CScaleFX* pScaleFX = g_pSurfaceMgr->GetScaleFX(pSurf->aImpactScaleFXIds[i]);
g_pFXButeMgr->CreateScaleFX(pScaleFX, m_vPos, m_vDir, &m_vSurfaceNormal, &m_rSurfaceRot);
}
// Create any impact particle shower fx associated with this surface...
for (i=0; i < pSurf->nNumImpactPShowerFX; i++)
{
CPShowerFX* pPShowerFX = g_pSurfaceMgr->GetPShowerFX(pSurf->aImpactPShowerFXIds[i]);
g_pFXButeMgr->CreatePShowerFX(pPShowerFX, m_vPos, m_vDir, m_vSurfaceNormal);
}
// Create any impact poly debris fx associated with this surface...
if (g_vtCreatePolyDebris.GetFloat())
{
for (i=0; i < pSurf->nNumImpactPolyDebrisFX; i++)
{
CPolyDebrisFX* pPolyDebrisFX = g_pSurfaceMgr->GetPolyDebrisFX(pSurf->aImpactPolyDebrisFXIds[i]);
g_pFXButeMgr->CreatePolyDebrisFX(pPolyDebrisFX, m_vPos, m_vDir, m_vSurfaceNormal);
}
}
}
}
}