• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ CONSTLIT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CONSTLIT函数的典型用法代码示例。如果您正苦于以下问题:C++ CONSTLIT函数的具体用法?C++ CONSTLIT怎么用?C++ CONSTLIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CONSTLIT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: strPatternSubst

ALERROR CEventHandler::InitFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc)

//	InitFromXML
//
//	Load all handlers

	{
	int i;

	for (i = 0; i < pDesc->GetContentElementCount(); i++)
		{
		CXMLElement *pHandler = pDesc->GetContentElement(i);
		ICCItem *pCode = g_pUniverse->GetCC().Link(pHandler->GetContentText(0), 0, NULL);
		if (pCode->IsError())
			{
			Ctx.sError = strPatternSubst("<%s> event: %s", pHandler->GetTag(), pCode->GetStringValue());
			return ERR_FAIL;
			}

		//	If this is an old extension, then make sure the code is not using the
		//	gStation variable, because we no longer support it

		if (Ctx.pExtension && Ctx.pExtension->dwVersion < 2)
			{
			if (g_pUniverse->GetCC().HasIdentifier(pCode, CONSTLIT("gStation")))
				{
				Ctx.sError = CONSTLIT("gStation variable has been deprecated--use gSource instead.");
				return ERR_FAIL;
				}
			}

		//	Done

		m_Handlers.Insert(pHandler->GetTag(), pCode);
		}

	return NOERROR;
	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:38,代码来源:CEventHandler.cpp


示例2: if

CString CDamageSource::GetDamageCauseNounPhrase (DWORD dwFlags)

//	GetDamageCauseNounPhrase
//
//	Returns the name of the damage source

	{
	if (m_pSource)
		return m_pSource->GetDamageCauseNounPhrase(dwFlags);
	else if (!m_sSourceName.IsBlank())
		return ::ComposeNounPhrase(m_sSourceName, 1, NULL_STR, m_dwSourceNameFlags, dwFlags);
	else
		return CONSTLIT("damage");
	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:14,代码来源:CDamageSource.cpp


示例3: CONSTLIT

ALERROR CTransmuterController::OnBoot (char *pszCommandLine, SHIOptions *retOptions, CString *retsError)

//	OnBoot
//
//	Controller must initialize all option values

	{
	CString sError;

	//	Set our basic application settings

	retOptions->sAppName = CONSTLIT("Transmuter");
	retOptions->sClassName = CONSTLIT("transmuter_class");
	retOptions->sAppData = CONSTLIT("Kronosaur\\Transmuter");
	retOptions->hIcon = ::LoadIcon(NULL, MAKEINTRESOURCE(IDI_TRANSMUTER));

	//	Set our default directory

	CString sCurDir = pathGetExecutablePath(NULL);
	::SetCurrentDirectory(sCurDir.GetASCIIZPointer());

	return NOERROR;
	}
开发者ID:gmoromisato,项目名称:Transmuter,代码行数:23,代码来源:CTransmuterController.cpp


示例4: LoadDamageAdj

ALERROR CEnhancerClass::CreateFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, CItemType *pType, CDeviceClass **retpDevice)

//	CreateFromXML
//
//	Load device data from XML

	{
	ALERROR error;
	CEnhancerClass *pDevice;

	pDevice = new CEnhancerClass;
	if (pDevice == NULL)
		return ERR_MEMORY;

	if (error = pDevice->InitDeviceFromXML(Ctx, pDesc, pType))
		return error;

	//	The old style is to have an array of damage adj; the new way is to just
	//	have a single damage adj and a criteria

	int iDamageAdjCount;
	LoadDamageAdj(pDesc, DAMAGE_ADJ_ATTRIB, pDevice->m_iDamageAdjArray, &iDamageAdjCount);
	if (iDamageAdjCount)
		pDevice->m_bUseArray = true;
	else
		{
		pDevice->m_iDamageAdj = pDesc->GetAttributeInteger(HP_BONUS_ATTRIB);
		pDevice->m_bUseArray = false;
		}

	pDevice->m_iPowerUse = pDesc->GetAttributeInteger(POWER_USE_ATTRIB);
	pDevice->m_sEnhancementType = pDesc->GetAttribute(ENHANCEMENT_TYPE_ATTRIB);
	pDevice->m_iActivateAdj = pDesc->GetAttributeIntegerBounded(ACTIVATE_ADJ_ATTRIB, 1, -1, 100);
	pDevice->m_iMinActivateDelay = pDesc->GetAttributeIntegerBounded(MIN_ACTIVATE_DELAY_ATTRIB, 0, -1, 0);
	pDevice->m_iMaxActivateDelay = pDesc->GetAttributeIntegerBounded(MAX_ACTIVATE_DELAY_ATTRIB, 0, -1, 0);

	//	Load the item criteria

	CString sCriteria;
	if (!pDesc->FindAttribute(CRITERIA_ATTRIB, &sCriteria))
		sCriteria = CONSTLIT("w");

	CItem::ParseCriteria(sCriteria, &pDevice->m_Criteria);

	//	Done

	*retpDevice = pDevice;

	return NOERROR;
	}
开发者ID:alanhorizon,项目名称:Transcendence,代码行数:50,代码来源:CEnhancerClass.cpp


示例5: AppendReferenceString

CString CDeviceClass::GetReference (CItemCtx &Ctx, int iVariant, DWORD dwFlags)

//	GetReference
//
//	Returns reference string

	{
	CString sReference;
	
	//	For a device we always add power and other properties.
	//	(If iVariant != -1 then it means that we're looking for reference on a
	//	missile or someting).
	
	if (iVariant == -1)
		{
		CInstalledDevice *pDevice = Ctx.GetDevice();

		//	Start with power requirements

		AppendReferenceString(&sReference, GetReferencePower(Ctx));

		//	Non-standard slots

		if (GetSlotsRequired() != 1)
			AppendReferenceString(&sReference, strPatternSubst(CONSTLIT("%d Slots"), GetSlotsRequired()));

		//	External devices

		if (IsExternal() || (pDevice && pDevice->IsExternal()))
			AppendReferenceString(&sReference, CONSTLIT("External"));
		}

	//	Combine with our subclass

	AppendReferenceString(&sReference, OnGetReference(Ctx, iVariant, dwFlags));
	return sReference;
	}
开发者ID:bmer,项目名称:Mammoth,代码行数:37,代码来源:Devices.cpp


示例6: catch

void CHumanInterface::HardCrash (const CString &sProgramState)

//	HardCrash
//
//	Report an error

	{
	CString sSessionMessage;
	try
		{
		if (m_pCurSession)
			m_pCurSession->HIReportHardCrash(&sSessionMessage);
		}
	catch (...)
		{
		sSessionMessage = CONSTLIT("Unable to obtain crash report from session.");
		}

	CString sMessage = strPatternSubst(CONSTLIT(
			"Unable to continue due to program error.\r\n\r\n"
			"program state: %s\r\n"
			"%s"
			"\r\n\r\nPlease contact transce[email protected] with a copy of Debug.log and your save file. "
			"We are sorry for the inconvenience.\r\n"),
			sProgramState,
			sSessionMessage
			);

	kernelDebugLogMessage(sMessage);
	ShowHardCrashSession(CONSTLIT("Transcendence System Crash"), sMessage);

	//	Ask the controller to post a crash report

	CString *pCrashReport = new CString(::kernelGetSessionDebugLog());
	if (HICommand(CONSTLIT("cmdPostCrashReport"), pCrashReport) == ERR_NOTFOUND)
		delete pCrashReport;
	}
开发者ID:dogguts,项目名称:Transcendence,代码行数:37,代码来源:CHumanInterface.cpp


示例7: if

ALERROR ITopologyProcessor::CreateFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, const CString &sUNID, ITopologyProcessor **retpProc)

//	CreateFromXML
//
//	Creates a new processor based on the XML tag

	{
	ALERROR error;
	ITopologyProcessor *pProc;

	//	Create the approprate class

	if (strEquals(pDesc->GetTag(), ATTRIBUTES_TAG))
		pProc = new CApplySystemProc;
	else if (strEquals(pDesc->GetTag(), CONQUER_NODES_TAG))
		pProc = new CConquerNodesProc;
	else if (strEquals(pDesc->GetTag(), DISTRIBUTE_NODES_TAG))
		pProc = new CDistributeNodesProc;
	else if (strEquals(pDesc->GetTag(), FILL_NODES_TAG))
		pProc = new CFillNodesProc;
	else if (strEquals(pDesc->GetTag(), GROUP_TAG))
		pProc = new CGroupTopologyProc;
	else if (strEquals(pDesc->GetTag(), LOCATE_NODES_TAG))
		pProc = new CLocateNodesProc;
	else if (strEquals(pDesc->GetTag(), PARTITION_NODES_TAG))
		pProc = new CPartitionNodesProc;
	else if (strEquals(pDesc->GetTag(), RANDOM_POINTS_TAG))
		pProc = new CRandomPointsProc;
	else if (strEquals(pDesc->GetTag(), SYSTEM_TAG))
		pProc = new CApplySystemProc;
	else if (strEquals(pDesc->GetTag(), TABLE_TAG))
		pProc = new CTableTopologyProc;
	else
		{
		Ctx.sError = strPatternSubst(CONSTLIT("Unknown topology processor element: <%s>"), pDesc->GetTag());
		return ERR_FAIL;
		}

	//	Load it

	if (error = pProc->InitFromXML(Ctx, pDesc, sUNID))
		return error;

	//	Done

	*retpProc = pProc;

	return NOERROR;
	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:49,代码来源:ITopologyProcessor.cpp


示例8: HideCommsTargetMenu

void CTranscendenceWnd::PlayerDestroyed (const CString &sText, bool bResurrectionPending)

//	PlayerDestroyed
//
//	This method gets called when the player is destroyed

	{
	//	Clean up

	HideCommsTargetMenu();
	m_CurrentPicker = pickNone;
	m_CurrentMenu = menuNone;
	m_bAutopilot = false;
	m_bShowingMap = false;
	if (m_State == gsDocked)
		GetPlayer()->Undock();

	//	Update display

	CString sMsg = sText;
	if (strEquals(strWord(sMsg, 0), CONSTLIT("was")))
		sMsg = strSubString(sMsg, 4, -1);
	sMsg.Capitalize(CString::capFirstLetter);
	DisplayMessage(sMsg);
	UpdateArmorDisplay();

	//	If we are insured, then set our state so that we come back to life
	if (bResurrectionPending)
		{
		//	Prepare resurrect

		m_State = gsDestroyed;
		m_iCountdown = TICKS_AFTER_DESTROYED;
		}

	//	Otherwise, proceed with destruction

	else
		{
		//	Done with ship screens

		CleanUpPlayerShip();

		//	Player destroyed

		m_State = gsDestroyed;
		m_iCountdown = TICKS_AFTER_DESTROYED;
		}
	}
开发者ID:dogguts,项目名称:Transcendence,代码行数:49,代码来源:CTranscendenceWnd.cpp


示例9: strPatternSubst

ALERROR CObjectImage::Exists (SDesignLoadCtx &Ctx)

//	Exists
//
//	Returns TRUE if the appropriate resources exist

	{
	if (m_pBitmap)
		return NOERROR;

	if (!m_sBitmap.IsBlank() && !Ctx.pResDb->ImageExists(NULL_STR, m_sBitmap))
		{
		Ctx.sError = strPatternSubst(CONSTLIT("Unable to find image: '%s'"), m_sBitmap);
		return ERR_FAIL;
		}

	if (!m_sBitmask.IsBlank() && !Ctx.pResDb->ImageExists(NULL_STR, m_sBitmask))
		{
		Ctx.sError = strPatternSubst(CONSTLIT("Unable to find image: '%s'"), m_sBitmask);
		return ERR_FAIL;
		}

	return NOERROR;
	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:24,代码来源:CObjectImage.cpp


示例10: Helper

void CLoginSession::CmdSignIn (void)

//	CmdSignIn
//
//	Sign in the user

	{
	CUIHelper Helper(m_HI);

	//	Get the fields

	CString sUsername = GetPropertyString(ID_CTRL_USERNAME, PROP_TEXT);
	CString sPassword = GetPropertyString(ID_CTRL_PASSWORD, PROP_TEXT);
	bool bAutoSignIn = GetPropertyBool(ID_CTRL_AUTO_SIGN_IN, PROP_CHECKED);

	//	Get the text for the username. If blank, then we have an error.

	if (sUsername.IsBlank())
		{
		Helper.CreateInputErrorMessage(this, m_rcInputError, CONSTLIT("Username Missing"), CONSTLIT("You must have a username to sign in."));
		return;
		}

	//	Register the name

	m_HI.AddBackgroundTask(new CSignInUserTask(m_HI, m_Service, sUsername, sPassword, bAutoSignIn), this, CMD_SIGN_IN_COMPLETE);

	//	Disable controls

	SetPropertyBool(ID_CTRL_USERNAME, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_PASSWORD, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_MAIN_ACTION, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_AUTO_SIGN_IN, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_REGISTER, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_PASSWORD_RESET, PROP_ENABLED, false);
	}
开发者ID:alanhorizon,项目名称:Transcendence,代码行数:36,代码来源:CLoginSession.cpp


示例11: FindDataField

bool CEnergyFieldType::FindDataField (const CString &sField, CString *retsValue)

//	FindDataField
//
//	Returns meta-data

	{
	int i;

	if (strEquals(sField, FIELD_WEAPON_SUPPRESS))
		{
		if (m_WeaponSuppress.IsEmpty())
			*retsValue = NULL_STR;
		else
			{
			*retsValue = CONSTLIT("=(");

			bool bNeedSeparator = false;
			for (i = 0; i < damageCount; i++)
				if (m_WeaponSuppress.InSet(i))
					{
					if (bNeedSeparator)
						retsValue->Append(CONSTLIT(" "));

					retsValue->Append(::GetDamageType((DamageTypes)i));
					bNeedSeparator = true;
					}

			retsValue->Append(CONSTLIT(")"));
			}
		}
	else
		return CDesignType::FindDataField(sField, retsValue);

	return true;
	}
开发者ID:alanhorizon,项目名称:Transcendence,代码行数:36,代码来源:CShipEnergyFieldType.cpp


示例12: strPatternSubst

ALERROR CRandomItems::LoadFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc)

//	LoadFromXML
//
//	Load from XML

	{
	ALERROR error;

	CString sCriteria = pDesc->GetAttribute(CRITERIA_ATTRIB);
	if (sCriteria.IsBlank())
		{
		CString sAttributes = pDesc->GetAttribute(ATTRIBUTES_ATTRIB);
		if (sAttributes.IsBlank())
			sAttributes = pDesc->GetAttribute(MODIFIERS_ATTRIB);

		sCriteria = strPatternSubst(CONSTLIT("%s %s"), pDesc->GetAttribute(CATEGORIES_ATTRIB), sAttributes);
		}

	CItem::ParseCriteria(sCriteria, &m_Criteria);
	m_sLevelFrequency = pDesc->GetAttribute(LEVEL_FREQUENCY_ATTRIB);
	m_bDynamicLevelFrequency = (strFind(m_sLevelFrequency, CONSTLIT(":")) != -1);
	m_iDynamicLevel = 0;

	m_iLevel = pDesc->GetAttributeInteger(LEVEL_ATTRIB);
	m_iLevelCurve = pDesc->GetAttributeInteger(LEVEL_CURVE_ATTRIB);
	m_iDamaged = pDesc->GetAttributeInteger(DAMAGED_ATTRIB);

	if (error = m_Enhanced.InitFromXML(Ctx, pDesc))
		return error;

	m_Table = NULL;
	m_iCount = 0;

	return NOERROR;
	}
开发者ID:dogguts,项目名称:Transcendence,代码行数:36,代码来源:CItemTable.cpp


示例13: ComputeRotationOffsets

ALERROR CObjectImageArray::InitFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, bool bResolveNow)

//	InitFromXML
//
//	Create from XML description

	{
	//	Initialize basic info

	m_rcImage.left = pDesc->GetAttributeInteger(CONSTLIT(g_ImageXAttrib));
	m_rcImage.top = pDesc->GetAttributeInteger(CONSTLIT(g_ImageYAttrib));
	m_rcImage.right = m_rcImage.left + pDesc->GetAttributeInteger(CONSTLIT(g_ImageWidthAttrib));
	m_rcImage.bottom = m_rcImage.top + pDesc->GetAttributeInteger(CONSTLIT(g_ImageHeightAttrib));
	m_iFrameCount = pDesc->GetAttributeInteger(CONSTLIT(g_ImageFrameCountAttrib));
	m_iRotationCount = pDesc->GetAttributeInteger(ROTATION_COUNT_ATTRIB);
	if (m_iRotationCount <= 0)
		m_iRotationCount = 1;
	m_iTicksPerFrame = pDesc->GetAttributeInteger(CONSTLIT(g_ImageTicksPerFrameAttrib));
	if (m_iTicksPerFrame <= 0 && m_iFrameCount > 1)
		m_iTicksPerFrame = 1;
	m_iFlashTicks = pDesc->GetAttributeInteger(FLASH_TICKS_ATTRIB);

	CString sBlending = pDesc->GetAttribute(BLENDING_ATTRIB);
	if (strEquals(sBlending, LIGHTEN_BLENDING))
		m_iBlending = blendLighten;
	else
		m_iBlending = blendNormal;

	//	Compute rotation offsets

	m_iRotationOffset = pDesc->GetAttributeInteger(ROTATE_OFFSET_ATTRIB);
	if (m_iRotationOffset)
		ComputeRotationOffsets();
	else
		{
		int xOffset = pDesc->GetAttributeInteger(X_OFFSET_ATTRIB);
		int yOffset = pDesc->GetAttributeInteger(Y_OFFSET_ATTRIB);
		if (xOffset != 0 || yOffset != 0)
			ComputeRotationOffsets(xOffset, yOffset);
		}

	//	Get the image from the universe

	m_dwBitmapUNID = LoadUNID(Ctx, pDesc->GetAttribute(CONSTLIT(g_ImageIDAttrib)));
	if (bResolveNow)
		m_pImage = g_pUniverse->FindLibraryImage(m_dwBitmapUNID);
	else
		m_pImage = NULL;

	return NOERROR;
	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:51,代码来源:CObjectImageArray.cpp


示例14: if

ALERROR CSingleParticleEffectCreator::OnEffectCreateFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, const CString &sUNID)

//	OnEffectCreateFromXML
//
//	Initializes from XML

	{
	ALERROR error;

	CString sStyle = pDesc->GetAttribute(STYLE_ATTRIB);
	if (sStyle.IsBlank() || strEquals(sStyle, STYLE_PLAIN))
		m_iStyle = paintPlain;
	else if (strEquals(sStyle, STYLE_FLAME))
		m_iStyle = paintFlame;
	else if (strEquals(sStyle, STYLE_SMOKE))
		m_iStyle = paintSmoke;
	else if (strEquals(sStyle, STYLE_LINE))
		m_iStyle = paintLine;
	else
		{
		Ctx.sError = CONSTLIT("Invalid SingleParticle style");
		return ERR_FAIL;
		}

	CString sRange;
	if (pDesc->FindAttribute(MAX_WIDTH_ATTRIB, &sRange))
		{
		if (error = m_MaxWidth.LoadFromXML(sRange))
			return error;
		}
	else
		m_MaxWidth = DiceRange(0, 0, DEFAULT_MAX_WIDTH);

	if (pDesc->FindAttribute(MIN_WIDTH_ATTRIB, &sRange))
		{
		if (error = m_MinWidth.LoadFromXML(sRange))
			return error;
		}
	else
		m_MinWidth = DiceRange(0, 0, DEFAULT_MIN_WIDTH);

	//	Colors

	m_wPrimaryColor = ::LoadRGBColor(pDesc->GetAttribute(PRIMARY_COLOR_ATTRIB));
	m_wSecondaryColor = ::LoadRGBColor(pDesc->GetAttribute(SECONDARY_COLOR_ATTRIB));

	return NOERROR;
	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:48,代码来源:SFXSingleParticle.cpp


示例15: m_bEnabled

CSoundtrackManager::CSoundtrackManager (void) :
		m_bEnabled(false),
		m_iGameState(stateNone),
		m_pNowPlaying(NULL),
		m_LastPlayed(10),
		m_bSystemTrackPlayed(false),
		m_bStartCombatWhenUndocked(false)

//	CSoundtrackManager constructor

	{
	//	Hardcoded intro soundtrack

	m_pIntroTrack = new CSoundType;
	m_pIntroTrack->Init(0xFFFFFFFF, CONSTLIT("TranscendenceIntro.mp3"));
	}
开发者ID:dogguts,项目名称:Transcendence,代码行数:16,代码来源:CSoundtrackManager.cpp


示例16: catch

void CTranscendenceWnd::ReportCrashEvent (CString *retsMessage)

//	ReportCrashEvent
//
//	Include information about the given event

	{
	try
		{
		retsMessage->Append(g_pProgramEvent->DebugCrashInfo());
		}
	catch (...)
		{
		retsMessage->Append(strPatternSubst(CONSTLIT("error obtaining crash info from event: %x\r\n"), g_pProgramEvent));
		}
	}
开发者ID:alanhorizon,项目名称:Transcendence,代码行数:16,代码来源:CTranscendenceWnd.cpp


示例17: CreateError

ICCItem *CCodeChain::EvalLiteralStruct (CEvalContext *pCtx, ICCItem *pItem)

//	EvalLiteralStruct
//
//	Evalues the values in a structure and returns a structure
//	(or an error).

	{
	int i;

	CCSymbolTable *pTable = dynamic_cast<CCSymbolTable *>(pItem);
	if (pTable == NULL)
		return CreateError(CONSTLIT("Not a structure"), pItem);

	ICCItem *pNew = CreateSymbolTable();
	if (pNew->IsError())
		return pNew;

	CCSymbolTable *pNewTable = dynamic_cast<CCSymbolTable *>(pNew);

	//	Loop over all key/value pairs

	for (i = 0; i < pTable->GetCount(); i++)
		{
		CString sKey = pTable->GetKey(i);
		ICCItem *pValue = pTable->GetElement(i);

		ICCItem *pNewKey = CreateString(sKey);
		ICCItem *pNewValue = (pValue ? Eval(pCtx, pValue) : CreateNil());

		ICCItem *pResult = pNewTable->AddEntry(this, pNewKey, pNewValue);
		pNewKey->Discard(this);
		pNewValue->Discard(this);

		if (pResult->IsError())
			{
			pNewTable->Discard(this);
			return pResult;
			}

		pResult->Discard(this);
		}

	//	Done

	return pNewTable;
	}
开发者ID:bmer,项目名称:Alchemy,代码行数:47,代码来源:CodeChain.cpp


示例18: Lock

CMultiverseModel::EOnlineStates CMultiverseModel::GetOnlineState (CString *retsUsername, CString *retsDesc) const

//	GetOnlineState
//
//	Returns the current online state (and optionally the username)

	{
	CSmartLock Lock(m_cs);

	//	Figure out our state

	if (m_fDisabled)
		{
		if (retsUsername) *retsUsername = CONSTLIT("Offline");
#ifdef STEAM_BUILD
		if (retsDesc) *retsDesc = CONSTLIT("Steam client is not running");
#else
		if (retsDesc) *retsDesc = CONSTLIT("Multiverse disabled");
#endif
		return stateDisabled;
		}
	else if (m_sUsername.IsBlank())
		{
		if (retsUsername) *retsUsername = CONSTLIT("Offline");
		if (retsDesc) *retsDesc = CONSTLIT("Click to register a new account");
		return stateNoUser;
		}
	else if (!m_fUserSignedIn)
		{
		if (retsUsername) *retsUsername = m_sUsername;
		if (retsDesc) *retsDesc = CONSTLIT("Click to sign in");
		return stateOffline;
		}
	else
		{
		if (retsUsername) *retsUsername = m_sUsername;
#ifdef STEAM_BUILD
		if (retsDesc) *retsDesc = CONSTLIT("Connected to Steam");
#else
		if (retsDesc) *retsDesc = CONSTLIT("Signed in to the Multiverse");
#endif
		return stateOnline;
		}
	}
开发者ID:bmer,项目名称:Mammoth,代码行数:44,代码来源:CMultiverseModel.cpp


示例19: IsValidStartingClass

bool CAdventureDesc::IsValidStartingClass (CShipClass *pClass)

//	IsValidStartingClass
//
//	Return TRUE if this ship class is a valid starting class for this adventure.

{
    if (m_fIncludeOldShipClasses && pClass->GetVersion() < 12)
    {
        if (pClass->HasAttribute(CONSTLIT("notInPartI")))
            return false;
        else
            return true;
    }

    return (pClass->IsIncludedInAllAdventures() || pClass->MatchesCriteria(m_StartingShips));
}
开发者ID:alanhorizon,项目名称:Transcendence,代码行数:17,代码来源:CAdventureDesc.cpp


示例20: if

ALERROR CSystemMap::ExecuteCreator (STopologyCreateCtx &Ctx, CTopology &Topology, CXMLElement *pCreator)

//	ExecuteCreator
//
//	Runs a specific creator

	{
	ALERROR error;
	int i;

	//	If this is a root node tag then we add it and all its connections.

	if (strEquals(pCreator->GetTag(), ROOT_NODE_TAG))
		{
		if (error = Topology.AddTopologyNode(Ctx, pCreator->GetAttribute(ID_ATTRIB)))
			return error;
		}

	//	Otherwise we process the creator element

	else
		{
		for (i = 0; i < pCreator->GetContentElementCount(); i++)
			{
			CXMLElement *pDirective = pCreator->GetContentElement(i);

			if (strEquals(pDirective->GetTag(), NODE_TAG))
				{
				if (error = Topology.AddTopologyNode(Ctx, pDirective->GetAttribute(ID_ATTRIB)))
					return error;
				}
			else if (strEquals(pDirective->GetTag(), STARGATE_TAG) || strEquals(pDirective->GetTag(), STARGATES_TAG))
				{
				if (error = Topology.AddStargateFromXML(Ctx, pDirective))
					return error;
				}
			else
				{
				Ctx.sError = strPatternSubst(CONSTLIT("Unknown TopologyCreator directive: %s."), pDirective->GetTag());
				return ERR_FAIL;
				}
			}
		}

	return NOERROR;
	}
开发者ID:smileyninja,项目名称:Transcendence,代码行数:46,代码来源:CSystemMap.cpp



注:本文中的CONSTLIT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CONST_BUF_LEN函数代码示例发布时间:2022-05-30
下一篇:
C++ CONSTANT_CLASS_P函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap