本文整理汇总了C++中GS_L函数的典型用法代码示例。如果您正苦于以下问题:C++ GS_L函数的具体用法?C++ GS_L怎么用?C++ GS_L使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GS_L函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ETH_STREAM_DECL
bool ETHScene::LoadFromFile(const str_type::string& fileName)
{
Platform::FileManagerPtr fileManager = m_provider->GetFileManager();
if (!fileManager->FileExists(fileName))
{
ETH_STREAM_DECL(ss) << GS_L("ETHScene::Open: file not found (") << fileName << GS_L(")");
m_provider->Log(ss.str(), Platform::FileLogger::ERROR);
return false;
}
m_minSceneHeight = 0.0f;
m_maxSceneHeight = m_provider->GetVideo()->GetScreenSizeF().y;
// Read the header and check if the file is valid
TiXmlDocument doc(fileName);
str_type::string content;
fileManager->GetUTF16FileString(fileName, content);
if (!doc.LoadFile(content, TIXML_ENCODING_LEGACY))
{
ETH_STREAM_DECL(ss) << GS_L("ETHScene::Open: file found, but parsing failed (") << fileName << GS_L(")");
m_provider->Log(ss.str(), Platform::FileLogger::ERROR);
return false;
}
TiXmlHandle hDoc(&doc);
TiXmlHandle hRoot(0);
TiXmlElement *pElement = hDoc.FirstChildElement().Element();
if (!pElement)
{
ETH_STREAM_DECL(ss) << GS_L("ETHScene::Open: couldn't find root element (") << fileName << GS_L(")");
m_provider->Log(ss.str(), Platform::FileLogger::ERROR);
return false;
}
return ReadFromXMLFile(pElement);
}
开发者ID:skaflux,项目名称:ethanon,代码行数:36,代码来源:ETHScene.cpp
示例2: m_fakeEyeManager
ETHPixelLightDiffuseSpecular::ETHPixelLightDiffuseSpecular(VideoPtr video, const str_type::string& shaderPath, ETHFakeEyePositionManagerPtr fakeEyeManager)
: m_fakeEyeManager(fakeEyeManager)
{
m_video = video;
if (IsSupportedByHardware())
{
m_hPixelLightPS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::PL_PS_Hor_Diff()).c_str(), GSSF_PIXEL, m_profile);
m_vPixelLightPS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::PL_PS_Ver_Diff()).c_str(), GSSF_PIXEL, m_profile);
m_hPixelLightVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::PL_VS_Hor_Light()).c_str(), GSSF_VERTEX, GSSP_MODEL_2);
m_vPixelLightVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::PL_VS_Ver_Light()).c_str(), GSSF_VERTEX, GSSP_MODEL_2);
m_hPixelLightSpecularPS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::PL_PS_Hor_Spec()).c_str(), GSSF_PIXEL, m_profile);
m_vPixelLightSpecularPS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::PL_PS_Ver_Spec()).c_str(), GSSF_PIXEL, m_profile);
m_defaultNM = m_video->CreateSprite(ETHGlobal::GetDataResourceFullPath(shaderPath, GS_L("default_nm.png")));
}
}
开发者ID:AlternatingCt,项目名称:ethanon,代码行数:15,代码来源:ETHPixelLightDiffuseSpecular.cpp
示例3: AddLastSlash
gs2d::str_type::string AddLastSlash(const gs2d::str_type::string& path)
{
if (path.empty())
{
return GS_L("");
}
gs2d::str_type::string r = (path);
FixSlashes(r);
const std::size_t lastChar = r.size()-1;
if (r.at(lastChar) == GS_L('\\'))
{
r[lastChar] = GS_L('/');
return r;
}
else if (r.at(lastChar) != GS_L('/'))
{
return r + GS_L("/");
}
else
{
return r;
}
}
开发者ID:andresan87,项目名称:Torch,代码行数:24,代码来源:Platform.android.cpp
示例4: ETHRenderEntity
int ETHScriptWrapper::AddEntity(const str_type::string &file, const Vector3 &v3Pos, const float angle, ETHEntity **ppOutEntity,
const str_type::string &alternativeName, const float scale)
{
if (WarnIfRunsInMainFunction(GS_L("AddEntity")))
return -1;
const ETHEntityProperties* props = m_entityCache.Get(file, m_provider->GetResourcePath() + ETHDirectories::GetEntityPath(),
m_provider->GetVideo()->GetFileManager());
if (!props)
{
return -1;
}
const float globalScale = m_provider->GetGlobalScaleManager()->GetScale();
ETHRenderEntity* entity = new ETHRenderEntity(m_provider, *props, angle, scale * globalScale);
entity->SetOrphanPosition(v3Pos);
entity->SetAngle(angle);
if (entity->IsStatic() && entity->IsApplyLight())
{
str_type::stringstream ss;
ss << GS_L("AddEntity - This is a static entity and its lightmap has not been rendered yet. ") <<
GS_L("It might be incorrectly lit: ") << m_provider->GetResourcePath() << ETHDirectories::GetEntityPath() << file;
ShowMessage(ss.str(), ETH_WARNING);
}
if (ppOutEntity)
{
entity->AddRef();
*ppOutEntity = entity;
}
return m_pScene->AddEntity(entity, alternativeName);
}
开发者ID:harmy,项目名称:ethanon,代码行数:36,代码来源:ETHScriptWrapper.Scene.cpp
示例5: fixedPath
gs2d::SpritePtr ETHGraphicResourceManager::FindSprite(
const str_type::string& fullFilePath,
const str_type::string& fileName,
const str_type::string& resourceDirectory)
{
std::map<str_type::string, SpriteResource>::iterator iter = m_resource.find(fileName);
if (iter != m_resource.end())
{
str_type::string fixedPath(fullFilePath);
Platform::FixSlashes(fixedPath);
const SpriteResource& resource = iter->second;
if (RemoveResourceDirectory(resourceDirectory, fixedPath) != resource.m_fullOriginPath)
{
str_type::stringstream ss; ss << GS_L("Duplicate resource name found: ") << fixedPath
<< GS_L(" <-> ") << resource.m_fullOriginPath;
ETHResourceProvider::Log(ss.str(), Platform::Logger::ERROR);
}
return resource.m_sprite;
}
else
{
return SpritePtr();
}
}
开发者ID:St0l3nID,项目名称:ethanon,代码行数:24,代码来源:ETHResourceManager.cpp
示例6: GS_L
void ETHEntityProperties::Reset()
{
ETHEntityMaterial::Reset();
entityName = GS_L("");
spriteCut = ETH_DEFAULT_SPRITE_CUT;
pivotAdjust = ETH_DEFAULT_PIVOT_ADJUST;
scale = ETH_DEFAULT_SCALE;
staticEntity = ETH_FALSE;
hideFromSceneEditor = ETH_FALSE;
type = ET_HORIZONTAL;
layerDepth = 0.0f;
successfullyLoaded = false;
soundVolume = ETH_DEFAULT_SOUND_VOLUME;
parallaxIntensity = ETH_DEFAULT_PARALLAX_INTENS;
shape = BS_NONE;
}
开发者ID:ArthurCalazans,项目名称:ethanon,代码行数:16,代码来源:ETHEntityProperties.cpp
示例7: ReadFromXMLFile
bool ETH_COLLISION_BOX::ReadFromXMLFile(TiXmlElement *pElement)
{
TiXmlElement *pIter;
pIter = pElement->FirstChild(GS_L("Position"))->ToElement();
if (pIter)
{
pIter->QueryFloatAttribute(GS_L("x"), &pos.x);
pIter->QueryFloatAttribute(GS_L("y"), &pos.y);
pIter->QueryFloatAttribute(GS_L("z"), &pos.z);
}
pIter = pElement->FirstChild(GS_L("Size"))->ToElement();
if (pIter)
{
pIter->QueryFloatAttribute(GS_L("x"), &size.x);
pIter->QueryFloatAttribute(GS_L("y"), &size.y);
pIter->QueryFloatAttribute(GS_L("z"), &size.z);
}
return true;
}
开发者ID:andresan87,项目名称:Torch,代码行数:19,代码来源:ETHCommon.cpp
示例8:
///////////////////////////////////////////////////////////////
// Float input
///////////////////////////////////////////////////////////////
GSGUI_FLOAT_INPUT::GSGUI_FLOAT_INPUT()
{
//m_video = 0;
//m_input = 0;
m_size = 14.0f;
m_width = 256.0f;
m_active = false;
m_strInput.NumbersOnly(true);
m_strInput.SetString(GS_L("0.0"));
m_text.clear();
m_nMaxChars = 8;
m_min = 0.0f;
m_max = 0.0f;
m_clamp = false;
m_scrollAdd = 0.1f;
m_mouseOver = false;
m_active = false;
}
开发者ID:ArthurCalazans,项目名称:ethanon,代码行数:21,代码来源:gsgui.cpp
示例9: BeginAmbientPass
bool ETHShaderManager::BeginAmbientPass(const ETHSpriteEntity *pRender, const float maxHeight, const float minHeight)
{
m_video->SetPixelShader(ShaderPtr());
if (pRender->GetType() == ETH_VERTICAL)
{
m_verticalStaticAmbientVS->SetConstant(GS_L("spaceLength"), (maxHeight-minHeight));
m_video->SetVertexShader(m_verticalStaticAmbientVS);
}
else
{
m_video->SetVertexShader(m_defaultStaticAmbientVS);
}
m_parallaxManager.SetShaderParameters(m_video, m_video->GetVertexShader(), pRender->GetPosition(), false);
m_lastAM = m_video->GetAlphaMode();
return true;
}
开发者ID:andresan87,项目名称:Torch,代码行数:18,代码来源:ETHShaderManager.cpp
示例10: IsTemporary
bool ETHEntity::IsTemporary() const
{
unsigned int temporary = 0, existent = 0;
for (std::size_t t=0; t<m_properties.particleSystems.size(); t++)
{
if (m_properties.particleSystems[t]->nParticles > 0)
{
if (m_properties.particleSystems[t]->repeat > 0)
temporary++;
existent++;
}
}
if (existent && temporary == existent && m_properties.spriteFile == GS_L(""))
{
return true;
}
return false;
}
开发者ID:angeltown,项目名称:ethanon,代码行数:18,代码来源:ETHEntity.cpp
示例11: GS_L
const gs2d::str_type::string ETHPolygon::GetENMLDeclaration() const
{
gs2d::str_type::stringstream ss;
if (!IsValid())
ss << GS_L("/* warning: invalid polygon */ ");
for (std::size_t t = 0; t < m_vertices.size(); t++)
{
ss << GS_L("v") << t << GS_L("{")
<< GS_L("x=") << m_vertices[t].x << GS_L(";y=") << m_vertices[t].y
<< GS_L(";} ");
}
return ss.str();
}
开发者ID:angeltown,项目名称:ethanon,代码行数:13,代码来源:ETHPolygon.cpp
示例12: CloseW
bool ETHBinaryStream::OpenW(const str_type::string& fileName)
{
CloseW();
SetFileName(fileName);
#ifdef WIN32
errno_t error = fopen_s(&m_out, GetFileName().c_str(), GS_L("wb"));
#else
int error = 0; m_out = fopen(GetFileName().c_str(), "wb");
#endif
if (!error && m_out)
{
return true;
}
else
{
m_out = 0;
return false;
}
}
开发者ID:CeroOscura,项目名称:ethanon,代码行数:19,代码来源:ETHBinaryStream.cpp
示例13: ETH_STREAM_DECL
bool ETHScene::SaveToFile(const str_type::string& fileName)
{
if (m_buckets.IsEmpty())
{
ETH_STREAM_DECL(ss) << GS_L("ETHScene::Save: there are no entities to save: ") << fileName;
m_provider->Log(ss.str(), Platform::FileLogger::ERROR);
return false;
}
// Write the header to the file
TiXmlDocument doc;
TiXmlDeclaration *pDecl = new TiXmlDeclaration(GS_L("1.0"), GS_L(""), GS_L(""));
doc.LinkEndChild(pDecl);
TiXmlElement *pElement = new TiXmlElement(GS_L("Ethanon"));
doc.LinkEndChild(pElement);
TiXmlElement *pRoot = doc.RootElement();
// write the property header
m_sceneProps.WriteToXMLFile(pRoot);
// start writing entities
TiXmlElement *pEntities = new TiXmlElement(GS_L("EntitiesInScene"));
pRoot->LinkEndChild(pEntities);
// Write every entity
for (ETHBucketMap::iterator bucketIter = m_buckets.GetFirstBucket(); bucketIter != m_buckets.GetLastBucket(); ++bucketIter)
{
ETHEntityList::const_iterator iEnd = bucketIter->second.end();
for (ETHEntityList::iterator iter = bucketIter->second.begin(); iter != iEnd; ++iter)
{
(*iter)->WriteToXMLFile(pEntities);
#if defined(_DEBUG) || defined(DEBUG)
ETH_STREAM_DECL(ss) << GS_L("Entity written to file: ") << (*iter)->GetEntityName();
m_provider->Log(ss.str(), Platform::FileLogger::INFO);
#endif
}
}
doc.SaveFile(fileName);
#ifdef GS2D_STR_TYPE_ANSI
m_provider->GetFileManager()->ConvertAnsiFileToUTF16LE(fileName);
#endif
return true;
}
开发者ID:mattguest,项目名称:ethanon,代码行数:45,代码来源:ETHScene.cpp
示例14: m_lastAM
ETHShaderManager::ETHShaderManager(VideoPtr video, const str_type::string& shaderPath) :
m_lastAM(GSAM_PIXEL), m_fakeEyeManager(new ETHFakeEyePositionManager)
{
m_video = video;
m_defaultVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::DefaultVS()).c_str(), GSSF_VERTEX, GSSP_MODEL_2);
m_particle = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Particle_VS()).c_str(), GSSF_VERTEX, GSSP_MODEL_2, "particle");
m_defaultStaticAmbientVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Ambient_VS_Hor()).c_str(), GSSF_VERTEX, GSSP_MODEL_2);
m_verticalStaticAmbientVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Ambient_VS_Ver()).c_str(), GSSF_VERTEX, GSSP_MODEL_2, "vertical");
m_shadowVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Shadow_VS_Ver()).c_str(), GSSF_VERTEX, GSSP_MODEL_2);
// TODO/TO-DO: use a wider macro here
#ifndef ANDROID
m_projShadow = m_video->CreateSprite(ETHGlobal::GetDataResourceFullPath(shaderPath, GS_L("shadow.dds")));
#else
m_projShadow = m_video->CreateSprite(ETHGlobal::GetDataResourceFullPath(shaderPath, GS_L("shadow.png")));
#endif
{
ETHLightingProfilePtr profile(new ETHVertexLightDiffuse(m_video, shaderPath));
if (profile->IsSupportedByHardware())
{
m_lightingProfiles[VERTEX_LIGHTING_DIFFUSE] = profile;
}
}
{
ETHLightingProfilePtr profile(new ETHPixelLightDiffuseSpecular(m_video, shaderPath, m_fakeEyeManager));
if (profile->IsSupportedByHardware())
{
m_lightingProfiles[PIXEL_LIGHTING_DIFFUSE_SPECULAR] = profile;
}
}
if (m_lightingProfiles.empty())
{
video->Message(GS_L("ETHShaderManager::ETHShaderManager: no lighting profile"), GSMT_WARNING);
}
else
{
m_currentProfile = FindHighestLightingProfile();
}
}
开发者ID:andresan87,项目名称:Torch,代码行数:42,代码来源:ETHShaderManager.cpp
示例15: UnbindFrameBuffer
bool GLVideo::SetRenderTarget(SpritePtr pTarget, const unsigned int target)
{
if (!pTarget)
{
m_currentTarget.reset();
UnbindFrameBuffer();
}
else
{
if (pTarget->GetType() == Sprite::T_TARGET)
{
m_currentTarget = pTarget->GetTexture();
}
else
{
Message(GS_L("The current sprite has no render target texture"), GSMT_ERROR);
}
}
return true;
}
开发者ID:St0l3nID,项目名称:ethanon,代码行数:20,代码来源:GLVideo.cpp
示例16: m_provider
ETHParticleManager::ETHParticleManager(
ETHResourceProviderPtr provider,
const str_type::string& file,
const Vector2& v2Pos,
const Vector3& v3Pos,
const float angle,
const float entityVolume) :
m_provider(provider)
{
ETHParticleSystem partSystem;
if (partSystem.ReadFromFile(file, m_provider->GetFileManager()))
{
CreateParticleSystem(partSystem, v2Pos, v3Pos, angle, entityVolume, 1.0f);
}
else
{
ETH_STREAM_DECL(ss) << GS_L("ETHParticleManager: file not found: ") << file;
m_provider->Log(ss.str(), Platform::FileLogger::ERROR);
}
}
开发者ID:angeltown,项目名称:ethanon,代码行数:20,代码来源:ETHParticleManager.cpp
示例17: GS_L
void ParticleEditor::SetupMenu()
{
m_fileMenu.SetupMenu(m_provider->GetVideo(), m_provider->GetInput(), GS_L("Menu"), m_menuSize*m_menuScale, m_menuWidth*2, true);
m_fileMenu.AddButton(SAVE_SYSTEM);
m_fileMenu.AddButton(SAVE_SYSTEM_AS);
m_fileMenu.AddButton(OPEN_SYSTEM);
m_fileMenu.AddButton(LOAD_BMP);
m_fileMenu.AddButton(LOAD_BG);
m_fileMenu.AddButton(_S_GOTO_PROJ);
m_alphaModes.SetupMenu(m_provider->GetVideo(), m_provider->GetInput(), m_menuSize, m_menuWidth*2, true, false, false);
m_alphaModes.AddButton(ALPHA_MODE_PIXEL, true);
m_alphaModes.AddButton(ALPHA_MODE_ADD, false);
m_alphaModes.AddButton(ALPHA_MODE_MODULATE, false);
m_animationModes.SetupMenu(m_provider->GetVideo(), m_provider->GetInput(), m_menuSize, m_menuWidth*2, true, false, false);
m_animationModes.AddButton(ANIMATION_MODE_ANIMATE, true);
m_animationModes.AddButton(ANIMATION_MODE_PICK, false);
SetMenuConstants();
}
开发者ID:CeroOscura,项目名称:ethanon,代码行数:21,代码来源:ParticleFXEditor.cpp
示例18: GS2D_UNUSED_ARGUMENT
bool ETHVertexLightDiffuse::BeginLightPass(ETHSpriteEntity *pRender, Vector3 &v3LightPos, const Vector2 &v2Size,
const ETHLight* light, const float maxHeight, const float minHeight, const float lightIntensity,
const bool drawToTarget)
{
GS2D_UNUSED_ARGUMENT(drawToTarget);
const Vector2 &v2Origin = pRender->ComputeOrigin(v2Size);
const Vector3 &v3EntityPos = pRender->GetPosition();
m_video->SetPixelShader(ShaderPtr());
ShaderPtr pLightShader;
if (pRender->GetType() == ETH_VERTICAL)
{
m_vVertexLightVS->SetConstant(GS_L("spaceLength"), (maxHeight-minHeight));
m_vVertexLightVS->SetConstant(GS_L("topLeft3DPos"), v3EntityPos-(Vector3(v2Origin.x, 0, -v2Origin.y)));
pLightShader = m_vVertexLightVS;
}
else
{
m_hVertexLightVS->SetConstant(GS_L("topLeft3DPos"), v3EntityPos-Vector3(v2Origin, 0));
pLightShader = m_hVertexLightVS;
}
m_video->SetVertexShader(pLightShader);
m_lastAM = m_video->GetAlphaMode();
m_video->SetAlphaMode(GSAM_ADD);
// Set a depth value depending on the entity type
pRender->SetDepth(maxHeight, minHeight);
pLightShader->SetConstant(GS_L("pivotAdjust"), pRender->GetProperties()->pivotAdjust);
pLightShader->SetConstant(GS_L("lightPos"), v3LightPos);
pLightShader->SetConstant(GS_L("lightRange"), light->range);
pLightShader->SetConstant(GS_L("lightColor"), light->color);
pLightShader->SetConstant(GS_L("lightIntensity"), lightIntensity);
return true;
}
开发者ID:andresan87,项目名称:Torch,代码行数:38,代码来源:ETHVertexLightDiffuse.cpp
示例19:
ETHEntity *ETHScriptWrapper::SeekEntity(const int id)
{
if (WarnIfRunsInMainFunction(GS_L("SeekEntity")))
return 0;
ETHEntity *pEntity = m_pScene->GetBucketManager().SeekEntity(id);
if (pEntity)
{
// don't let it return temporary handles
if (pEntity->IsTemporary())
{
return 0;
}
else
{
pEntity->AddRef();
return pEntity;
}
}
return 0;
}
开发者ID:AlternatingCt,项目名称:ethanon,代码行数:21,代码来源:ETHScriptWrapper.Scene.cpp
示例20: Vector3
void ETHParticleSystem::Reset()
{
alphaMode = Video::AM_PIXEL;
nParticles = 0;
lifeTime = 0.0f;
randomizeLifeTime = 0.0f;
size = 1.0f;
growth = 0.0f;
minSize = 0.0f;
maxSize = 99999.0f;
repeat = 0;
randomizeSize = 0.0f;
randAngleStart = 0.0f;
angleStart = 0.0f;
emissive = Vector3(1,1,1);
allAtOnce = false;
boundingSphere = 512.0f;
soundFXFile = GS_L("");
bitmapFile = ETH_DEFAULT_PARTICLE_BITMAP;
spriteCut = Vector2i(1,1);
animationMode = PLAY_ANIMATION;
}
开发者ID:skaflux,项目名称:ethanon,代码行数:22,代码来源:ETHParticleSystem.cpp
注:本文中的GS_L函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论