diff --git a/src/contexts/contentcache.cpp b/src/contexts/contentcache.cpp index 7831b4a..1e522db 100644 --- a/src/contexts/contentcache.cpp +++ b/src/contexts/contentcache.cpp @@ -13,14 +13,12 @@ ContentCache::ContentCache(ContentManager *contentManager) { - STACK_TRACE; m_contentManager = contentManager; m_uiFontSize = 0; } ContentCache::~ContentCache() { - STACK_TRACE; m_contentManager->Free(m_uiSkin, TRUE); m_contentManager->Free(m_uiSkinImage, TRUE); m_contentManager->Free(m_standardFont, TRUE); @@ -29,7 +27,6 @@ ContentCache::~ContentCache() void ContentCache::OnLoadGame() { - STACK_TRACE; m_uiSkinFilename = "assets://ui_skin.png"; m_uiSkinImage = m_contentManager->Get(m_uiSkinFilename, TRUE); m_uiSkin = m_contentManager->Get(m_uiSkinFilename, TRUE); diff --git a/src/contexts/rendercontext.cpp b/src/contexts/rendercontext.cpp index f2a3d04..cddb422 100644 --- a/src/contexts/rendercontext.cpp +++ b/src/contexts/rendercontext.cpp @@ -16,7 +16,6 @@ RenderContext::RenderContext(GraphicsDevice *graphicsDevice, ContentManager *contentManager) { - STACK_TRACE; ASSERT(graphicsDevice != NULL); ASSERT(contentManager != NULL); @@ -34,7 +33,6 @@ RenderContext::RenderContext(GraphicsDevice *graphicsDevice, ContentManager *con RenderContext::~RenderContext() { - STACK_TRACE; SAFE_DELETE(m_spriteBatch); SAFE_DELETE(m_billboardSpriteBatch); SAFE_DELETE(m_keyframeMeshRenderer); @@ -44,12 +42,10 @@ RenderContext::~RenderContext() void RenderContext::OnLoadGame() { - STACK_TRACE; } void RenderContext::OnPreRender() { - STACK_TRACE; RENDERSTATE_DEFAULT.Apply(); BLENDSTATE_DEFAULT.Apply(); @@ -60,7 +56,6 @@ void RenderContext::OnPreRender() void RenderContext::OnPostRender() { - STACK_TRACE; m_billboardSpriteBatch->End(); m_spriteBatch->End(); m_graphicsDevice->GetDebugRenderer()->End(); @@ -68,13 +63,11 @@ void RenderContext::OnPostRender() void RenderContext::OnResize() { - STACK_TRACE; CalculateScreenScale(); } void RenderContext::CalculateScreenScale() { - STACK_TRACE; uint16_t width = m_graphicsDevice->GetViewContext()->GetViewportWidth(); uint16_t height = m_graphicsDevice->GetViewContext()->GetViewportHeight(); diff --git a/src/effects/dimeffect.cpp b/src/effects/dimeffect.cpp index d89c6b8..0807629 100644 --- a/src/effects/dimeffect.cpp +++ b/src/effects/dimeffect.cpp @@ -1,5 +1,3 @@ -#include "../framework/debug.h" - #include "dimeffect.h" #include "../contexts/rendercontext.h" #include "../framework/graphics/color.h" @@ -11,21 +9,17 @@ const float DEFAULT_DIM_ALPHA = 0.5f; const Color DEFAULT_DIM_COLOR = COLOR_BLACK; DimEffect::DimEffect() - : Effect() { - STACK_TRACE; m_alpha = DEFAULT_DIM_ALPHA; m_color = DEFAULT_DIM_COLOR; } DimEffect::~DimEffect() { - STACK_TRACE; } void DimEffect::OnRender(RenderContext *renderContext) { - STACK_TRACE; uint16_t width = renderContext->GetGraphicsDevice()->GetViewContext()->GetViewportWidth(); uint16_t height = renderContext->GetGraphicsDevice()->GetViewContext()->GetViewportHeight(); diff --git a/src/effects/effectinfo.cpp b/src/effects/effectinfo.cpp index 150a81c..ee5af2a 100644 --- a/src/effects/effectinfo.cpp +++ b/src/effects/effectinfo.cpp @@ -5,7 +5,6 @@ EffectInfo::EffectInfo(Effect *effect, BOOL isLocal) { - STACK_TRACE; ASSERT(effect != NULL); m_effect = effect; m_isLocal = isLocal; @@ -13,7 +12,6 @@ EffectInfo::EffectInfo(Effect *effect, BOOL isLocal) EffectInfo::~EffectInfo() { - STACK_TRACE; SAFE_DELETE(m_effect); } diff --git a/src/effects/effectmanager.cpp b/src/effects/effectmanager.cpp index d22681b..8f24f73 100644 --- a/src/effects/effectmanager.cpp +++ b/src/effects/effectmanager.cpp @@ -5,20 +5,17 @@ EffectManager::EffectManager() { - STACK_TRACE; m_numLocalEffects = 0; m_numGlobalEffects = 0; } EffectManager::~EffectManager() { - STACK_TRACE; RemoveAll(); } void EffectManager::RemoveAll() { - STACK_TRACE; EffectListItor itor = m_effects.begin(); while (itor != m_effects.end()) Remove(itor++); @@ -26,7 +23,6 @@ void EffectManager::RemoveAll() void EffectManager::Add(EFFECT_TYPE type, EffectInfo *effectInfo) { - STACK_TRACE; ASSERT(effectInfo != NULL); m_effects.insert(EffectList::value_type(type, effectInfo)); effectInfo->GetEffect()->OnAdd(); @@ -39,7 +35,6 @@ void EffectManager::Add(EFFECT_TYPE type, EffectInfo *effectInfo) void EffectManager::Remove(EffectListItor itor) { - STACK_TRACE; if (itor->second->IsLocal()) --m_numLocalEffects; else @@ -52,49 +47,42 @@ void EffectManager::Remove(EffectListItor itor) void EffectManager::OnAppGainFocus() { - STACK_TRACE; for (EffectListItor itor = m_effects.begin(); itor != m_effects.end(); ++itor) itor->second->GetEffect()->OnAppGainFocus(); } void EffectManager::OnAppLostFocus() { - STACK_TRACE; for (EffectListItor itor = m_effects.begin(); itor != m_effects.end(); ++itor) itor->second->GetEffect()->OnAppLostFocus(); } void EffectManager::OnAppPause() { - STACK_TRACE; for (EffectListItor itor = m_effects.begin(); itor != m_effects.end(); ++itor) itor->second->GetEffect()->OnAppPause(); } void EffectManager::OnAppResume() { - STACK_TRACE; for (EffectListItor itor = m_effects.begin(); itor != m_effects.end(); ++itor) itor->second->GetEffect()->OnAppResume(); } void EffectManager::OnLostContext() { - STACK_TRACE; for (EffectListItor itor = m_effects.begin(); itor != m_effects.end(); ++itor) itor->second->GetEffect()->OnLostContext(); } void EffectManager::OnNewContext() { - STACK_TRACE; for (EffectListItor itor = m_effects.begin(); itor != m_effects.end(); ++itor) itor->second->GetEffect()->OnNewContext(); } void EffectManager::OnRenderLocal(RenderContext *renderContext) { - STACK_TRACE; if (m_numLocalEffects == 0) return; @@ -107,7 +95,6 @@ void EffectManager::OnRenderLocal(RenderContext *renderContext) void EffectManager::OnRenderGlobal(RenderContext *renderContext) { - STACK_TRACE; if (m_numGlobalEffects == 0) return; @@ -120,14 +107,12 @@ void EffectManager::OnRenderGlobal(RenderContext *renderContext) void EffectManager::OnResize() { - STACK_TRACE; for (EffectListItor itor = m_effects.begin(); itor != m_effects.end(); ++itor) itor->second->GetEffect()->OnResize(); } void EffectManager::OnUpdate(float delta) { - STACK_TRACE; EffectListItor itor = m_effects.begin(); while (itor != m_effects.end()) { @@ -143,4 +128,3 @@ void EffectManager::OnUpdate(float delta) } } } - diff --git a/src/effects/effectmanager.h b/src/effects/effectmanager.h index 537184d..616f37e 100644 --- a/src/effects/effectmanager.h +++ b/src/effects/effectmanager.h @@ -58,7 +58,6 @@ T* EffectManager::Get() const template T* EffectManager::Add(BOOL isLocalEffect) { - STACK_TRACE; if (Get() != NULL) return NULL; @@ -72,7 +71,6 @@ T* EffectManager::Add(BOOL isLocalEffect) template void EffectManager::Remove() { - STACK_TRACE; EffectListItor itor = m_effects.find(T::GetType()); ASSERT(itor != m_effects.end()); diff --git a/src/effects/fadeeffect.cpp b/src/effects/fadeeffect.cpp index a13af33..3580190 100644 --- a/src/effects/fadeeffect.cpp +++ b/src/effects/fadeeffect.cpp @@ -1,5 +1,3 @@ -#include "../framework/debug.h" - #include "fadeeffect.h" #include "../contexts/rendercontext.h" #include "../framework/graphics/color.h" @@ -12,9 +10,7 @@ const float DEFAULT_FADE_SPEED = 3.0f; const Color DEFAULT_FADE_COLOR = COLOR_BLACK; FadeEffect::FadeEffect() - : Effect() { - STACK_TRACE; m_doneFading = FALSE; m_fadeSpeed = DEFAULT_FADE_SPEED; m_fadingOut = TRUE; @@ -25,12 +21,10 @@ FadeEffect::FadeEffect() FadeEffect::~FadeEffect() { - STACK_TRACE; } void FadeEffect::OnRender(RenderContext *renderContext) { - STACK_TRACE; uint16_t width = renderContext->GetGraphicsDevice()->GetViewContext()->GetViewportWidth(); uint16_t height = renderContext->GetGraphicsDevice()->GetViewContext()->GetViewportHeight(); @@ -45,7 +39,6 @@ void FadeEffect::OnRender(RenderContext *renderContext) void FadeEffect::OnUpdate(float delta) { - STACK_TRACE; if (m_doneFading) return; diff --git a/src/effects/flasheffect.cpp b/src/effects/flasheffect.cpp index 431a929..43051de 100644 --- a/src/effects/flasheffect.cpp +++ b/src/effects/flasheffect.cpp @@ -1,5 +1,3 @@ -#include "../framework/debug.h" - #include "flasheffect.h" #include "../contexts/rendercontext.h" #include "../framework/graphics/color.h" @@ -12,9 +10,7 @@ const float DEFAULT_FLASH_SPEED = 16.0f; const float DEFAULT_MAX_INTENSITY = 1.0f; FlashEffect::FlashEffect() - : Effect() { - STACK_TRACE; m_flashingIn = TRUE; m_flashInSpeed = DEFAULT_FLASH_SPEED; m_flashOutSpeed = DEFAULT_FLASH_SPEED; @@ -25,12 +21,10 @@ FlashEffect::FlashEffect() FlashEffect::~FlashEffect() { - STACK_TRACE; } void FlashEffect::OnRender(RenderContext *renderContext) { - STACK_TRACE; uint16_t width = renderContext->GetGraphicsDevice()->GetViewContext()->GetViewportWidth(); uint16_t height = renderContext->GetGraphicsDevice()->GetViewContext()->GetViewportHeight(); @@ -45,7 +39,6 @@ void FlashEffect::OnRender(RenderContext *renderContext) void FlashEffect::OnUpdate(float delta) { - STACK_TRACE; if (m_flashingIn) { m_alpha += (delta * m_flashInSpeed); diff --git a/src/entities/entity.cpp b/src/entities/entity.cpp index 47be68f..5deeb66 100644 --- a/src/entities/entity.cpp +++ b/src/entities/entity.cpp @@ -1,4 +1,3 @@ -#include "../framework/debug.h" #include "../framework/common.h" #include "entity.h" @@ -6,12 +5,10 @@ Entity::Entity(EntityManager *entityManager) { - STACK_TRACE; m_entityManager = entityManager; } Entity::~Entity() { - STACK_TRACE; } diff --git a/src/entities/entitymanager.cpp b/src/entities/entitymanager.cpp index 4942ccf..bede27f 100644 --- a/src/entities/entitymanager.cpp +++ b/src/entities/entitymanager.cpp @@ -9,13 +9,11 @@ EntityManager::EntityManager(EventManager *eventManager) { - STACK_TRACE; m_eventManager = eventManager; } EntityManager::~EntityManager() { - STACK_TRACE; RemoveAll(); RemoveAllSubsystems(); RemoveAllPresets(); @@ -24,7 +22,6 @@ EntityManager::~EntityManager() void EntityManager::RemoveAllSubsystems() { - STACK_TRACE; for (ComponentSystemList::iterator i = m_componentSystems.begin(); i != m_componentSystems.end(); ++i) SAFE_DELETE(*i); @@ -33,7 +30,6 @@ void EntityManager::RemoveAllSubsystems() void EntityManager::RemoveAllPresets() { - STACK_TRACE; while (!m_entityPresets.empty()) { EntityPresetMap::iterator i = m_entityPresets.begin(); @@ -47,7 +43,6 @@ void EntityManager::RemoveAllPresets() Entity* EntityManager::Add() { - STACK_TRACE; Entity *entity = new Entity(this); m_entities.insert(entity); return entity; @@ -55,7 +50,6 @@ Entity* EntityManager::Add() Entity* EntityManager::AddUsingPreset(ENTITYPRESET_TYPE preset, EntityPresetArgs *args) { - STACK_TRACE; EntityPresetMap::iterator i = m_entityPresets.find(preset); ASSERT(i != m_entityPresets.end()); if (i == m_entityPresets.end()) @@ -73,7 +67,6 @@ Entity* EntityManager::AddUsingPreset(ENTITYPRESET_TYPE preset, EntityPresetArgs BOOL EntityManager::WasCreatedUsingPreset(const Entity *entity, ENTITYPRESET_TYPE type) const { - STACK_TRACE; ASSERT(entity != NULL); ASSERT(type != NULL); EntityPresetComponent *preset = entity->Get(); @@ -85,7 +78,6 @@ BOOL EntityManager::WasCreatedUsingPreset(const Entity *entity, ENTITYPRESET_TYP void EntityManager::Remove(Entity *entity) { - STACK_TRACE; ASSERT(entity != NULL); if (!IsValid(entity)) return; @@ -100,7 +92,6 @@ void EntityManager::Remove(Entity *entity) void EntityManager::RemoveAll() { - STACK_TRACE; for (EntitySet::iterator i = m_entities.begin(); i != m_entities.end(); ++i) { Entity *entity = *i; @@ -113,7 +104,6 @@ void EntityManager::RemoveAll() void EntityManager::RemoveAllComponentsFrom(Entity *entity) { - STACK_TRACE; ASSERT(entity != NULL); for (ComponentStore::iterator i = m_components.begin(); i != m_components.end(); ++i) @@ -143,7 +133,6 @@ BOOL EntityManager::IsValid(const Entity *entity) const void EntityManager::GetAllComponentsFor(const Entity *entity, ComponentList &list) const { - STACK_TRACE; ASSERT(entity != NULL); if (!IsValid(entity)) return; @@ -159,7 +148,6 @@ void EntityManager::GetAllComponentsFor(const Entity *entity, ComponentList &lis void EntityManager::RemoveAllGlobalComponents() { - STACK_TRACE; while (!m_globalComponents.empty()) { GlobalComponentStore::iterator i = m_globalComponents.begin(); @@ -173,35 +161,30 @@ void EntityManager::RemoveAllGlobalComponents() void EntityManager::OnLostContext() { - STACK_TRACE; for (ComponentSystemList::iterator i = m_componentSystems.begin(); i != m_componentSystems.end(); ++i) (*i)->OnLostContext(); } void EntityManager::OnNewContext() { - STACK_TRACE; for (ComponentSystemList::iterator i = m_componentSystems.begin(); i != m_componentSystems.end(); ++i) (*i)->OnNewContext(); } void EntityManager::OnRender(RenderContext *renderContext) { - STACK_TRACE; for (ComponentSystemList::iterator i = m_componentSystems.begin(); i != m_componentSystems.end(); ++i) (*i)->OnRender(renderContext); } void EntityManager::OnResize() { - STACK_TRACE; for (ComponentSystemList::iterator i = m_componentSystems.begin(); i != m_componentSystems.end(); ++i) (*i)->OnResize(); } void EntityManager::OnUpdate(float delta) { - STACK_TRACE; // find any inactive components and remove the associated entities before // we update anything EntityList list; diff --git a/src/entities/entitymanager.h b/src/entities/entitymanager.h index 21e9355..b511589 100644 --- a/src/entities/entitymanager.h +++ b/src/entities/entitymanager.h @@ -89,7 +89,6 @@ private: template T* EntityManager::AddSubsystem() { - STACK_TRACE; ASSERT(GetSubsystem() == NULL); T* subsystem = new T(this, m_eventManager); m_componentSystems.push_back(subsystem); @@ -99,7 +98,6 @@ T* EntityManager::AddSubsystem() template T* EntityManager::AddSubsystemBefore() { - STACK_TRACE; ASSERT(GetSubsystem() == NULL); ComponentSystemList::const_iterator i = FindSubsystem(); ASSERT(i != m_componentSystems.end()); @@ -111,7 +109,6 @@ T* EntityManager::AddSubsystemBefore() template T* EntityManager::GetSubsystem() const { - STACK_TRACE; ComponentSystemList::const_iterator i = FindSubsystem(); if (i == m_componentSystems.end()) return NULL; @@ -122,7 +119,6 @@ T* EntityManager::GetSubsystem() const template void EntityManager::RemoveSubsystem() { - STACK_TRACE; ComponentSystemList::iterator i = FindSubsystem(); if (i == m_componentSystems.end()) return; @@ -134,7 +130,6 @@ void EntityManager::RemoveSubsystem() template void EntityManager::AddPreset() { - STACK_TRACE; T* preset = new T(this); EntityPresetMap::const_iterator i = m_entityPresets.find(T::GetType()); ASSERT(i == m_entityPresets.end()); @@ -147,7 +142,6 @@ void EntityManager::AddPreset() template void EntityManager::RemovePreset() { - STACK_TRACE; EntityPresetMap::iterator i = m_entityPresets.find(T::GetType()); if (i == m_entityPresets.end()) return; @@ -161,14 +155,12 @@ void EntityManager::RemovePreset() template Entity* EntityManager::AddUsingPreset(EntityPresetArgs *args) { - STACK_TRACE; return AddUsingPreset(T::GetType(), args); } template T* EntityManager::AddComponent(Entity *entity) { - STACK_TRACE; ASSERT(GetComponent(entity) == NULL); T* component = new T(); m_components[T::GetType()].insert(EntityComponentsMap::value_type(entity, component)); @@ -178,7 +170,6 @@ T* EntityManager::AddComponent(Entity *entity) template T* EntityManager::GetComponent(const Entity *entity) const { - STACK_TRACE; ComponentStore::const_iterator i = m_components.find(T::GetType()); if (i == m_components.end()) return NULL; @@ -194,7 +185,6 @@ T* EntityManager::GetComponent(const Entity *entity) const template void EntityManager::RemoveComponent(Entity *entity) { - STACK_TRACE; ComponentStore::iterator i = m_components.find(T::GetType()); if (i == m_components.end()) return; @@ -213,7 +203,6 @@ void EntityManager::RemoveComponent(Entity *entity) template BOOL EntityManager::HasComponent(const Entity *entity) const { - STACK_TRACE; ComponentStore::const_iterator i = m_components.find(T::GetType()); if (i == m_components.end()) return FALSE; @@ -229,7 +218,6 @@ BOOL EntityManager::HasComponent(const Entity *entity) const template T* EntityManager::AddGlobalComponent() { - STACK_TRACE; ASSERT(GetGlobalComponent() == NULL); T* newComponent = new T(); m_globalComponents.insert(GlobalComponentStore::value_type(T::GetType(), newComponent)); @@ -239,7 +227,6 @@ T* EntityManager::AddGlobalComponent() template T* EntityManager::GetGlobalComponent() const { - STACK_TRACE; GlobalComponentStore::const_iterator i = m_globalComponents.find(T::GetType()); if (i == m_globalComponents.end()) return NULL; @@ -261,7 +248,6 @@ void EntityManager::RemoveGlobalComponent() template BOOL EntityManager::HasGlobalComponent() const { - STACK_TRACE; GlobalComponentStore::const_iterator i = m_globalComponents.find(T::GetType()); if (i == m_globalComponents.end()) return FALSE; diff --git a/src/events/eventlogger.cpp b/src/events/eventlogger.cpp index 747da2a..0842e8b 100644 --- a/src/events/eventlogger.cpp +++ b/src/events/eventlogger.cpp @@ -1,4 +1,3 @@ -#include "../framework/debug.h" #include "../framework/log.h" #include "eventlogger.h" @@ -6,20 +5,16 @@ #include "eventmanager.h" EventLogger::EventLogger(EventManager *eventManager) - : EventListener() { - STACK_TRACE; eventManager->AddListener(this, EVENT_TYPE_WILDCARD); } EventLogger::~EventLogger() { - STACK_TRACE; } BOOL EventLogger::Handle(const Event *event) { - STACK_TRACE; LOG_INFO("EVENTLOGGER", "Event \"%s\" occurred.\n", event->GetTypeOf()); return FALSE; } diff --git a/src/events/eventmanager.cpp b/src/events/eventmanager.cpp index b7cc1c3..4460657 100644 --- a/src/events/eventmanager.cpp +++ b/src/events/eventmanager.cpp @@ -6,18 +6,15 @@ EventManager::EventManager() { - STACK_TRACE; m_activeQueue = 0; } EventManager::~EventManager() { - STACK_TRACE; } BOOL EventManager::AddListener(EventListener *listener, EVENT_TYPE type) { - STACK_TRACE; // TODO: validate type EventListenerMap::iterator listenerItor = m_registry.find(type); @@ -48,7 +45,6 @@ BOOL EventManager::AddListener(EventListener *listener, EVENT_TYPE type) BOOL EventManager::RemoveListener(EventListener *listener, EVENT_TYPE type) { - STACK_TRACE; BOOL result = FALSE; // TODO: validate type @@ -82,7 +78,6 @@ BOOL EventManager::RemoveListener(EventListener *listener, EVENT_TYPE type) BOOL EventManager::Trigger(const Event *event) const { - STACK_TRACE; // TODO: validate type // trigger events for wildcard listeners first @@ -121,7 +116,6 @@ BOOL EventManager::Trigger(const Event *event) const BOOL EventManager::Queue(const Event *event) { - STACK_TRACE; ASSERT(m_activeQueue >= 0); ASSERT(m_activeQueue < NUM_EVENT_QUEUES); @@ -145,7 +139,6 @@ BOOL EventManager::Queue(const Event *event) BOOL EventManager::Abort(EVENT_TYPE type, BOOL allOfType) { - STACK_TRACE; ASSERT(m_activeQueue >= 0); ASSERT(m_activeQueue < NUM_EVENT_QUEUES); @@ -179,7 +172,6 @@ BOOL EventManager::Abort(EVENT_TYPE type, BOOL allOfType) BOOL EventManager::ProcessQueue() { - STACK_TRACE; EventListenerMap::const_iterator wildcardItor = m_registry.find(EVENT_TYPE_WILDCARD); // swap active queues and empty the new queue @@ -243,7 +235,6 @@ BOOL EventManager::ProcessQueue() EventListenerList EventManager::GetListenerList(EVENT_TYPE type) const { - STACK_TRACE; EventListenerMap::const_iterator listenerItor = m_registry.find(type); if (listenerItor == m_registry.end()) return EventListenerList(); // no registered listeners for this type @@ -263,7 +254,6 @@ EventListenerList EventManager::GetListenerList(EVENT_TYPE type) const EventTypeList EventManager::GetTypeList() const { - STACK_TRACE; if (m_typeList.size() == 0) return EventTypeList(); // no types have been registered diff --git a/src/framework/assets/animation/keyframe.cpp b/src/framework/assets/animation/keyframe.cpp index e94b565..e859340 100644 --- a/src/framework/assets/animation/keyframe.cpp +++ b/src/framework/assets/animation/keyframe.cpp @@ -6,20 +6,17 @@ Keyframe::Keyframe(uint32_t numVertices) { - STACK_TRACE; AllocateMemory(numVertices); } Keyframe::Keyframe(const stl::string &name, uint32_t numVertices) { - STACK_TRACE; m_name = name; AllocateMemory(numVertices); } void Keyframe::AllocateMemory(uint32_t numVertices) { - STACK_TRACE; m_numVertices = numVertices; m_vertices = new Vector3[m_numVertices]; ASSERT(m_vertices != NULL); @@ -29,7 +26,6 @@ void Keyframe::AllocateMemory(uint32_t numVertices) Keyframe::~Keyframe() { - STACK_TRACE; SAFE_DELETE_ARRAY(m_vertices); SAFE_DELETE_ARRAY(m_normals); } diff --git a/src/framework/assets/animation/keyframemesh.cpp b/src/framework/assets/animation/keyframemesh.cpp index 55909cd..5375085 100644 --- a/src/framework/assets/animation/keyframemesh.cpp +++ b/src/framework/assets/animation/keyframemesh.cpp @@ -12,9 +12,7 @@ #include KeyframeMesh::KeyframeMesh(const KeyframeMeshFile *file) - : Content() { - STACK_TRACE; m_numFrames = file->GetNumFrames(); m_frames = new Keyframe*[m_numFrames]; ASSERT(m_frames != NULL); @@ -68,7 +66,6 @@ KeyframeMesh::KeyframeMesh(const KeyframeMeshFile *file) KeyframeMesh::~KeyframeMesh() { - STACK_TRACE; for (uint32_t i = 0; i < m_numFrames; ++i) SAFE_DELETE(m_frames[i]); SAFE_DELETE_ARRAY(m_frames); @@ -79,7 +76,6 @@ KeyframeMesh::~KeyframeMesh() const AnimationSequence* KeyframeMesh::GetAnimation(const stl::string &name) const { - STACK_TRACE; AnimationList::const_iterator itor = m_animations.find(name); if (itor != m_animations.end()) return &itor->second; diff --git a/src/framework/assets/animation/keyframemeshfile.cpp b/src/framework/assets/animation/keyframemeshfile.cpp index 9e926ef..9d1c1c8 100644 --- a/src/framework/assets/animation/keyframemeshfile.cpp +++ b/src/framework/assets/animation/keyframemeshfile.cpp @@ -13,7 +13,6 @@ KeyframeMeshFile::KeyframeMeshFile(File *file) : MeshFile(file) { - STACK_TRACE; m_numFrames = 0; m_numTexCoords = 0; m_numTriangles = 0; @@ -26,7 +25,6 @@ KeyframeMeshFile::KeyframeMeshFile(File *file) KeyframeMeshFile::~KeyframeMeshFile() { - STACK_TRACE; for (uint32_t i = 0; i < m_numFrames; ++i) SAFE_DELETE(m_frames[i]); SAFE_DELETE_ARRAY(m_frames); @@ -37,7 +35,6 @@ KeyframeMeshFile::~KeyframeMeshFile() void KeyframeMeshFile::Load() { - STACK_TRACE; ChunkDescriptor *keyframesDesc = GetChunkDesc("KFR"); ChunkDescriptor *texCoordsDesc = GetChunkDesc("TXT"); ChunkDescriptor *trianglesDesc = GetChunkDesc("KTR"); diff --git a/src/framework/assets/animation/keyframemeshinstance.cpp b/src/framework/assets/animation/keyframemeshinstance.cpp index 9402fee..818c3d4 100644 --- a/src/framework/assets/animation/keyframemeshinstance.cpp +++ b/src/framework/assets/animation/keyframemeshinstance.cpp @@ -10,7 +10,6 @@ KeyframeMeshInstance::KeyframeMeshInstance(KeyframeMesh *mesh) { - STACK_TRACE; m_mesh = mesh; m_texture = NULL; @@ -29,13 +28,11 @@ KeyframeMeshInstance::KeyframeMeshInstance(KeyframeMesh *mesh) KeyframeMeshInstance::~KeyframeMeshInstance() { - STACK_TRACE; SAFE_DELETE(m_renderState); } void KeyframeMeshInstance::OnUpdate(float delta) { - STACK_TRACE; if (m_currentSequenceStart != m_currentSequenceEnd) { m_interpolation += delta * 10; @@ -76,7 +73,6 @@ void KeyframeMeshInstance::OnUpdate(float delta) void KeyframeMeshInstance::SetSequence(uint32_t startFrame, uint32_t endFrame, BOOL loop) { - STACK_TRACE; m_currentSequenceName.clear(); m_currentSequenceStart = startFrame; m_currentSequenceEnd = endFrame; @@ -92,7 +88,6 @@ void KeyframeMeshInstance::SetSequence(uint32_t startFrame, uint32_t endFrame, B void KeyframeMeshInstance::SetSequence(const stl::string &name, BOOL loop) { - STACK_TRACE; if (m_currentSequenceName == name) return; @@ -104,7 +99,6 @@ void KeyframeMeshInstance::SetSequence(const stl::string &name, BOOL loop) void KeyframeMeshInstance::RunSequenceOnce(const stl::string &name) { - STACK_TRACE; if (m_isRunningTempSequence) return; @@ -118,7 +112,6 @@ void KeyframeMeshInstance::RunSequenceOnce(const stl::string &name) void KeyframeMeshInstance::RecoverFromTempSequence() { - STACK_TRACE; m_isRunningTempSequence = FALSE; SetSequence(m_oldSequenceName, m_oldSequenceLoop); m_oldSequenceName.clear(); diff --git a/src/framework/assets/animation/keyframemeshrenderer.cpp b/src/framework/assets/animation/keyframemeshrenderer.cpp index 78c902e..7b8e760 100644 --- a/src/framework/assets/animation/keyframemeshrenderer.cpp +++ b/src/framework/assets/animation/keyframemeshrenderer.cpp @@ -15,17 +15,14 @@ KeyframeMeshRenderer::KeyframeMeshRenderer() { - STACK_TRACE; } KeyframeMeshRenderer::~KeyframeMeshRenderer() { - STACK_TRACE; } void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMeshInstance *instance, VertexLerpShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); instance->GetRenderState()->Apply(); Render(graphicsDevice, instance->GetMesh(), instance->GetTexture(), instance->GetCurrentFrame(), instance->GetNextFrame(), instance->GetInterpolation(), shader); @@ -33,7 +30,6 @@ void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMeshIn void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMeshInstance *instance, uint32_t frame, VertexLerpShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); instance->GetRenderState()->Apply(); Render(graphicsDevice, instance->GetMesh(), instance->GetTexture(), frame, shader); @@ -41,7 +37,6 @@ void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMeshIn void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMeshInstance *instance, uint32_t startFrame, uint32_t endFrame, float interpolation, VertexLerpShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); instance->GetRenderState()->Apply(); Render(graphicsDevice, instance->GetMesh(), instance->GetTexture(), instance->GetCurrentFrame(), instance->GetNextFrame(), instance->GetInterpolation(), shader); @@ -49,14 +44,12 @@ void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMeshIn void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMesh *mesh, const Texture *texture, VertexLerpShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); Render(graphicsDevice, mesh, texture, 0, shader); } void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMesh *mesh, const Texture *texture, uint32_t frame, VertexLerpShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); SetFrameVertices(mesh, frame); @@ -72,7 +65,6 @@ void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMesh * void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMesh *mesh, const Texture *texture, uint32_t startFrame, uint32_t endFrame, float interpolation, VertexLerpShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); SetFrameVertices(mesh, startFrame, endFrame); @@ -88,7 +80,6 @@ void KeyframeMeshRenderer::Render(GraphicsDevice *graphicsDevice, KeyframeMesh * void KeyframeMeshRenderer::SetFrameVertices(KeyframeMesh *mesh, uint32_t frame) { - STACK_TRACE; int pos; Keyframe *keyframe = mesh->GetFrames()[frame]; KeyframeMeshTriangle *triangle; @@ -121,7 +112,6 @@ void KeyframeMeshRenderer::SetFrameVertices(KeyframeMesh *mesh, uint32_t frame) void KeyframeMeshRenderer::SetFrameVertices(KeyframeMesh *mesh, uint32_t startFrame, uint32_t endFrame) { - STACK_TRACE; uint32_t pos; Keyframe *frame1 = mesh->GetFrames()[startFrame]; Keyframe *frame2 = mesh->GetFrames()[endFrame]; diff --git a/src/framework/assets/animation/skeletalmesh.cpp b/src/framework/assets/animation/skeletalmesh.cpp index 1cf4b80..7350ec3 100644 --- a/src/framework/assets/animation/skeletalmesh.cpp +++ b/src/framework/assets/animation/skeletalmesh.cpp @@ -16,7 +16,6 @@ SkeletalMesh::SkeletalMesh() { - STACK_TRACE; m_numVertices = 0; m_numSubsets = 0; m_numJoints = 0; @@ -31,7 +30,6 @@ SkeletalMesh::SkeletalMesh() SkeletalMesh::~SkeletalMesh() { - STACK_TRACE; SAFE_DELETE_ARRAY(m_joints); SAFE_DELETE_ARRAY(m_jointMappings); SAFE_DELETE_ARRAY(m_vertices); @@ -42,7 +40,6 @@ SkeletalMesh::~SkeletalMesh() int32_t SkeletalMesh::GetIndexOfSubset(const stl::string &name) const { - STACK_TRACE; for (uint32_t i = 0; i < m_numSubsets; ++i) { if (m_subsets[i].GetName() == name) @@ -54,7 +51,6 @@ int32_t SkeletalMesh::GetIndexOfSubset(const stl::string &name) const Joint* SkeletalMesh::GetJoint(const stl::string &name) const { - STACK_TRACE; int32_t jointIndex = GetIndexOfJoint(name); if (jointIndex == NO_JOINT) return NULL; @@ -64,7 +60,6 @@ Joint* SkeletalMesh::GetJoint(const stl::string &name) const int32_t SkeletalMesh::GetIndexOfJoint(const stl::string &name) const { - STACK_TRACE; for (uint32_t i = 0; i < m_numJoints; ++i) { if (m_joints[i].name == name) @@ -76,7 +71,6 @@ int32_t SkeletalMesh::GetIndexOfJoint(const stl::string &name) const const AnimationSequence* SkeletalMesh::GetAnimation(const stl::string &name) const { - STACK_TRACE; AnimationList::const_iterator itor = m_animations.find(name); if (itor != m_animations.end()) return &itor->second; @@ -86,7 +80,6 @@ const AnimationSequence* SkeletalMesh::GetAnimation(const stl::string &name) con void SkeletalMesh::FindAndSetRootJointIndex() { - STACK_TRACE; ASSERT(m_numJoints > 0); // if this mesh has only one joint, then that one has to be the root... diff --git a/src/framework/assets/animation/skeletalmeshanimationinstance.cpp b/src/framework/assets/animation/skeletalmeshanimationinstance.cpp index 9743c47..1b8717b 100644 --- a/src/framework/assets/animation/skeletalmeshanimationinstance.cpp +++ b/src/framework/assets/animation/skeletalmeshanimationinstance.cpp @@ -10,7 +10,6 @@ SkeletalMeshAnimationInstance::SkeletalMeshAnimationInstance(SkeletalMesh *mesh) : SkeletalMeshInstance(mesh) { - STACK_TRACE; m_currentSequenceStart = 0; m_currentSequenceEnd = 0; m_currentSequenceLoop = FALSE; @@ -23,12 +22,10 @@ SkeletalMeshAnimationInstance::SkeletalMeshAnimationInstance(SkeletalMesh *mesh) SkeletalMeshAnimationInstance::~SkeletalMeshAnimationInstance() { - STACK_TRACE; } void SkeletalMeshAnimationInstance::OnUpdate(float delta) { - STACK_TRACE; SkeletalMeshInstance::OnUpdate(delta); if (m_currentSequenceStart != m_currentSequenceEnd) { @@ -70,7 +67,6 @@ void SkeletalMeshAnimationInstance::OnUpdate(float delta) void SkeletalMeshAnimationInstance::SetSequence(uint32_t startFrame, uint32_t endFrame, BOOL loop) { - STACK_TRACE; m_currentSequenceName.clear(); m_currentSequenceStart = startFrame; m_currentSequenceEnd = endFrame; @@ -86,7 +82,6 @@ void SkeletalMeshAnimationInstance::SetSequence(uint32_t startFrame, uint32_t en void SkeletalMeshAnimationInstance::SetSequence(const stl::string &name, BOOL loop) { - STACK_TRACE; if (m_currentSequenceName == name) return; @@ -97,7 +92,6 @@ void SkeletalMeshAnimationInstance::SetSequence(const stl::string &name, BOOL lo void SkeletalMeshAnimationInstance::RunSequenceOnce(const stl::string &name) { - STACK_TRACE; if (m_isRunningTempSequence) return; @@ -111,7 +105,6 @@ void SkeletalMeshAnimationInstance::RunSequenceOnce(const stl::string &name) void SkeletalMeshAnimationInstance::RecoverFromTempSequence() { - STACK_TRACE; m_isRunningTempSequence = FALSE; SetSequence(m_oldSequenceName, m_oldSequenceLoop); m_oldSequenceName.clear(); diff --git a/src/framework/assets/animation/skeletalmeshfile.cpp b/src/framework/assets/animation/skeletalmeshfile.cpp index 2be359e..37cdd05 100644 --- a/src/framework/assets/animation/skeletalmeshfile.cpp +++ b/src/framework/assets/animation/skeletalmeshfile.cpp @@ -20,17 +20,14 @@ SkeletalMeshFile::SkeletalMeshFile(File *file) : MeshFile(file) { - STACK_TRACE; } SkeletalMeshFile::~SkeletalMeshFile() { - STACK_TRACE; } SkeletalMesh* SkeletalMeshFile::CreateMesh() { - STACK_TRACE; ChunkDescriptor *verticesDesc = GetChunkDesc("VTX"); ChunkDescriptor *normalsDesc = GetChunkDesc("NRL"); ChunkDescriptor *texCoordsDesc = GetChunkDesc("TXT"); diff --git a/src/framework/assets/animation/skeletalmeshinstance.cpp b/src/framework/assets/animation/skeletalmeshinstance.cpp index 1d1db62..7fb58be 100644 --- a/src/framework/assets/animation/skeletalmeshinstance.cpp +++ b/src/framework/assets/animation/skeletalmeshinstance.cpp @@ -15,7 +15,6 @@ SkeletalMeshInstance::SkeletalMeshInstance(SkeletalMesh *mesh) { - STACK_TRACE; m_mesh = mesh; m_numSubsets = m_mesh->GetNumSubsets(); @@ -43,7 +42,6 @@ SkeletalMeshInstance::SkeletalMeshInstance(SkeletalMesh *mesh) SkeletalMeshInstance::~SkeletalMeshInstance() { - STACK_TRACE; SAFE_DELETE(m_renderState); SAFE_DELETE(m_blendState); SAFE_DELETE(m_alphaBlendState); @@ -56,12 +54,10 @@ SkeletalMeshInstance::~SkeletalMeshInstance() void SkeletalMeshInstance::OnUpdate(float delta) { - STACK_TRACE; } const Matrix4x4* SkeletalMeshInstance::GetJointTransformation(const stl::string &jointName) const { - STACK_TRACE; int32_t jointIndex = GetMesh()->GetIndexOfJoint(jointName); if (jointIndex == NO_JOINT) return NULL; @@ -71,7 +67,6 @@ const Matrix4x4* SkeletalMeshInstance::GetJointTransformation(const stl::string void SkeletalMeshInstance::SetFixedRootJointTransformation(const Matrix4x4 &transform) { - STACK_TRACE; ASSERT(GetMesh()->GetRootJointIndex() != NO_JOINT); m_rootJointHasFixedTransform = TRUE; m_jointTransformations[GetMesh()->GetRootJointIndex()] = transform; @@ -79,14 +74,12 @@ void SkeletalMeshInstance::SetFixedRootJointTransformation(const Matrix4x4 &tran void SkeletalMeshInstance::ClearFixedRootJointTransformation() { - STACK_TRACE; ASSERT(GetMesh()->GetRootJointIndex() != NO_JOINT); m_rootJointHasFixedTransform = FALSE; } void SkeletalMeshInstance::CalculateJointTransformations(uint32_t frame) { - STACK_TRACE; int32_t rootJointIndex = GetMesh()->GetRootJointIndex(); for (uint32_t i = 0; i < m_numJoints; ++i) @@ -124,7 +117,6 @@ void SkeletalMeshInstance::CalculateJointTransformations(uint32_t frame) void SkeletalMeshInstance::CalculateJointTransformations(uint32_t startFrame, uint32_t endFrame, float interpolation) { - STACK_TRACE; int32_t rootJointIndex = GetMesh()->GetRootJointIndex(); for (uint32_t i = 0; i < m_numJoints; ++i) @@ -165,7 +157,6 @@ void SkeletalMeshInstance::CalculateJointTransformations(uint32_t startFrame, ui void SkeletalMeshInstance::BreakDownJointTransformationMatrix(uint32_t jointMatrixIndex) { - STACK_TRACE; const Matrix4x4 *jointMatrix = &m_jointTransformations[jointMatrixIndex]; m_jointPositions[jointMatrixIndex] = jointMatrix->GetTranslation(); @@ -174,7 +165,6 @@ void SkeletalMeshInstance::BreakDownJointTransformationMatrix(uint32_t jointMatr void SkeletalMeshInstance::EnableSubset(const stl::string &subset, BOOL enable) { - STACK_TRACE; int32_t index = m_mesh->GetIndexOfSubset(subset); ASSERT(index != -1); if (index == -1) @@ -185,14 +175,12 @@ void SkeletalMeshInstance::EnableSubset(const stl::string &subset, BOOL enable) void SkeletalMeshInstance::SetTexture(uint32_t index, Texture *texture) { - STACK_TRACE; ASSERT(index < m_numSubsets); m_textures[index] = texture; } void SkeletalMeshInstance::SetTexture(const stl::string &subset, Texture *texture) { - STACK_TRACE; int32_t index = m_mesh->GetIndexOfSubset(subset); ASSERT(index != -1); if (index == -1) diff --git a/src/framework/assets/animation/skeletalmeshrenderer.cpp b/src/framework/assets/animation/skeletalmeshrenderer.cpp index 5ff5c06..ccece5d 100644 --- a/src/framework/assets/animation/skeletalmeshrenderer.cpp +++ b/src/framework/assets/animation/skeletalmeshrenderer.cpp @@ -14,24 +14,20 @@ SkeletalMeshRenderer::SkeletalMeshRenderer() { - STACK_TRACE; } SkeletalMeshRenderer::~SkeletalMeshRenderer() { - STACK_TRACE; } void SkeletalMeshRenderer::Render(GraphicsDevice *graphicsDevice, SkeletalMeshInstance *instance, VertexSkinningShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); Render(graphicsDevice, instance, 0, shader); } void SkeletalMeshRenderer::Render(GraphicsDevice *graphicsDevice, SkeletalMeshInstance *instance, uint32_t frame, VertexSkinningShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); instance->CalculateJointTransformations(frame); shader->SetJointPositions(instance->GetJointPositions(), instance->GetNumJoints()); @@ -41,7 +37,6 @@ void SkeletalMeshRenderer::Render(GraphicsDevice *graphicsDevice, SkeletalMeshIn void SkeletalMeshRenderer::Render(GraphicsDevice *graphicsDevice, SkeletalMeshInstance *instance, uint32_t startFrame, uint32_t endFrame, float interpolation, VertexSkinningShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); instance->CalculateJointTransformations(startFrame, endFrame, interpolation); shader->SetJointPositions(instance->GetJointPositions(), instance->GetNumJoints()); @@ -51,14 +46,12 @@ void SkeletalMeshRenderer::Render(GraphicsDevice *graphicsDevice, SkeletalMeshIn void SkeletalMeshRenderer::Render(GraphicsDevice *graphicsDevice, SkeletalMeshAnimationInstance *instance, VertexSkinningShader *shader) { - STACK_TRACE; ASSERT(shader->IsBound() == TRUE); Render(graphicsDevice, instance, instance->GetCurrentFrame(), instance->GetNextFrame(), instance->GetInterpolation(), shader); } void SkeletalMeshRenderer::RenderAllSubsets(GraphicsDevice *graphicsDevice, SkeletalMeshInstance *instance, VertexSkinningShader *shader) { - STACK_TRACE; instance->GetRenderState()->Apply(); graphicsDevice->BindVertexBuffer(instance->GetMesh()->GetVertexBuffer()); @@ -107,7 +100,6 @@ void SkeletalMeshRenderer::RenderAllSubsets(GraphicsDevice *graphicsDevice, Skel void SkeletalMeshRenderer::RenderSubset(GraphicsDevice *graphicsDevice, const SkeletalMeshSubset *subset, const Texture *texture) { - STACK_TRACE; if (texture != NULL) graphicsDevice->BindTexture(texture); diff --git a/src/framework/assets/animation/skeletalmeshsubset.cpp b/src/framework/assets/animation/skeletalmeshsubset.cpp index 1d16841..5eb85b2 100644 --- a/src/framework/assets/animation/skeletalmeshsubset.cpp +++ b/src/framework/assets/animation/skeletalmeshsubset.cpp @@ -7,20 +7,17 @@ SkeletalMeshSubset::SkeletalMeshSubset() { - STACK_TRACE; m_indices = NULL; m_alpha = FALSE; } SkeletalMeshSubset::~SkeletalMeshSubset() { - STACK_TRACE; SAFE_DELETE(m_indices); } void SkeletalMeshSubset::Create(const stl::string &name, uint32_t numTriangles, BOOL alpha) { - STACK_TRACE; ASSERT(m_indices == NULL); ASSERT(numTriangles > 0); m_name = name; diff --git a/src/framework/assets/meshfile.cpp b/src/framework/assets/meshfile.cpp index 94c1d56..b2e882f 100644 --- a/src/framework/assets/meshfile.cpp +++ b/src/framework/assets/meshfile.cpp @@ -6,7 +6,6 @@ MeshFile::MeshFile(File *file) { - STACK_TRACE; ASSERT(file != NULL); ASSERT(file->IsOpen()); m_file = file; @@ -25,12 +24,10 @@ MeshFile::MeshFile(File *file) MeshFile::~MeshFile() { - STACK_TRACE; } void MeshFile::CollectChunks() { - STACK_TRACE; m_chunks.clear(); // start off just after the header (start of the first chunk) @@ -59,7 +56,6 @@ void MeshFile::CollectChunks() ChunkDescriptor* MeshFile::GetChunkDesc(const stl::string &name) { - STACK_TRACE; ChunkMap::iterator itor = m_chunks.find(name); if (itor == m_chunks.end()) return NULL; diff --git a/src/framework/assets/static/staticmesh.cpp b/src/framework/assets/static/staticmesh.cpp index 2c3b02f..847fb46 100644 --- a/src/framework/assets/static/staticmesh.cpp +++ b/src/framework/assets/static/staticmesh.cpp @@ -14,7 +14,6 @@ StaticMesh::StaticMesh(uint32_t numSubsets, StaticMeshSubset **subsets) : Content() { - STACK_TRACE; ASSERT(numSubsets > 0); ASSERT(subsets != NULL); @@ -28,14 +27,12 @@ StaticMesh::StaticMesh(uint32_t numSubsets, StaticMeshSubset **subsets) StaticMesh::StaticMesh(const StaticMeshFile *file, ContentManager *contentManager) : Content() { - STACK_TRACE; m_numSubsets = 0; CreateSubsets(file, contentManager); } StaticMesh::~StaticMesh() { - STACK_TRACE; for (uint32_t i = 0; i < m_numSubsets; ++i) SAFE_DELETE(m_subsets[i]); SAFE_DELETE_ARRAY(m_subsets); @@ -43,7 +40,6 @@ StaticMesh::~StaticMesh() void StaticMesh::CreateSubsets(const StaticMeshFile *file, ContentManager *contentManager) { - STACK_TRACE; m_numSubsets = file->GetNumSubMeshes(); m_subsets = new StaticMeshSubset*[m_numSubsets]; ASSERT(m_subsets != NULL); diff --git a/src/framework/assets/static/staticmeshbuilder.cpp b/src/framework/assets/static/staticmeshbuilder.cpp index 8c8cfe4..1ebf618 100644 --- a/src/framework/assets/static/staticmeshbuilder.cpp +++ b/src/framework/assets/static/staticmeshbuilder.cpp @@ -12,13 +12,11 @@ StaticMeshBuilder::StaticMeshBuilder() { - STACK_TRACE; m_transform = IDENTITY_MATRIX; } StaticMeshBuilder::~StaticMeshBuilder() { - STACK_TRACE; // BuildMesh() will handle passing off the subset objects to a mesh object // if it is called. if it's not called, this will free up the memory since // it was never passed off anywhere else in that case @@ -35,7 +33,6 @@ void StaticMeshBuilder::Reset() uint32_t StaticMeshBuilder::AddSubset(uint32_t numTriangles, Texture *texture) { - STACK_TRACE; ASSERT(numTriangles > 0); StaticMeshSubset *subset = new StaticMeshSubset(numTriangles, texture); ASSERT(subset != NULL); @@ -53,7 +50,6 @@ void StaticMeshBuilder::SetTriangle( const Vector2 &t1, const Vector2 &t2, const Vector2 &t3 ) { - STACK_TRACE; ASSERT(m_subsets.size() > subsetIndex); StaticMeshSubset *subset = m_subsets[subsetIndex]; @@ -79,7 +75,6 @@ void StaticMeshBuilder::SetTriangle( const Vector2 &t1, const Vector2 &t2, const Vector2 &t3 ) { - STACK_TRACE; ASSERT(m_subsets.size() > subsetIndex); StaticMeshSubset *subset = m_subsets[subsetIndex]; @@ -105,7 +100,6 @@ void StaticMeshBuilder::SetQuad( const Vector2 &t1, const Vector2 &t2, const Vector2 &t3, const Vector2 &t4 ) { - STACK_TRACE; ASSERT(m_subsets.size() > subsetIndex); StaticMeshSubset *subset = m_subsets[subsetIndex]; @@ -137,7 +131,6 @@ void StaticMeshBuilder::SetQuad( const Vector2 &t1, const Vector2 &t2, const Vector2 &t3, const Vector2 &t4 ) { - STACK_TRACE; ASSERT(m_subsets.size() > subsetIndex); StaticMeshSubset *subset = m_subsets[subsetIndex]; @@ -166,7 +159,6 @@ void StaticMeshBuilder::SetBox( const Vector3 ¢er, float width, float height, float depth ) { - STACK_TRACE; ASSERT(width > 0.0f); ASSERT(height > 0.0f); ASSERT(depth > 0.0f); @@ -187,7 +179,6 @@ void StaticMeshBuilder::SetBox( const Vector3 &min, const Vector3 &max ) { - STACK_TRACE; // front SetQuad( subsetIndex, firstTriangle, @@ -239,7 +230,6 @@ void StaticMeshBuilder::SetBox( void StaticMeshBuilder::GenerateNormals() { - STACK_TRACE; ASSERT(m_subsets.size() > 0); for (uint32_t i = 0; i < m_subsets.size(); ++i) @@ -284,7 +274,6 @@ void StaticMeshBuilder::GenerateNormals() StaticMesh* StaticMeshBuilder::BuildMesh() { - STACK_TRACE; ASSERT(m_subsets.size() > 0); // convert the mesh vector to an array so it can be passed into the mesh object diff --git a/src/framework/assets/static/staticmeshfile.cpp b/src/framework/assets/static/staticmeshfile.cpp index 6102341..28ac153 100644 --- a/src/framework/assets/static/staticmeshfile.cpp +++ b/src/framework/assets/static/staticmeshfile.cpp @@ -10,7 +10,6 @@ StaticMeshFile::StaticMeshFile(File *file) : MeshFile(file) { - STACK_TRACE; m_vertices = NULL; m_normals = NULL; m_texCoords = NULL; @@ -28,7 +27,6 @@ StaticMeshFile::StaticMeshFile(File *file) StaticMeshFile::~StaticMeshFile() { - STACK_TRACE; SAFE_DELETE_ARRAY(m_vertices); SAFE_DELETE_ARRAY(m_normals); SAFE_DELETE_ARRAY(m_texCoords); @@ -39,7 +37,6 @@ StaticMeshFile::~StaticMeshFile() void StaticMeshFile::Load() { - STACK_TRACE; ChunkDescriptor *verticesDesc = GetChunkDesc("VTX"); ChunkDescriptor *normalsDesc = GetChunkDesc("NRL"); ChunkDescriptor *texCoordsDesc = GetChunkDesc("TXT"); diff --git a/src/framework/assets/static/staticmeshinstance.cpp b/src/framework/assets/static/staticmeshinstance.cpp index 7cc722c..bb15b87 100644 --- a/src/framework/assets/static/staticmeshinstance.cpp +++ b/src/framework/assets/static/staticmeshinstance.cpp @@ -9,7 +9,6 @@ StaticMeshInstance::StaticMeshInstance(StaticMesh *mesh) { - STACK_TRACE; m_mesh = mesh; m_renderState = new RENDERSTATE_DEFAULT; @@ -30,19 +29,17 @@ StaticMeshInstance::StaticMeshInstance(StaticMesh *mesh) StaticMeshInstance::~StaticMeshInstance() { - STACK_TRACE; SAFE_DELETE(m_renderState); } void StaticMeshInstance::SetTexture(uint32_t index, Texture *texture) { - STACK_TRACE; + m_textures[index] = texture; } void StaticMeshInstance::ResetTexture(uint32_t index) { - STACK_TRACE; m_textures[index] = m_mesh->GetSubset(index)->GetTexture(); } diff --git a/src/framework/assets/static/staticmeshrenderer.cpp b/src/framework/assets/static/staticmeshrenderer.cpp index 100d122..825ed01 100644 --- a/src/framework/assets/static/staticmeshrenderer.cpp +++ b/src/framework/assets/static/staticmeshrenderer.cpp @@ -1,5 +1,3 @@ -#include "../../debug.h" - #include "staticmeshrenderer.h" #include "staticmesh.h" @@ -12,17 +10,14 @@ StaticMeshRenderer::StaticMeshRenderer() { - STACK_TRACE; } StaticMeshRenderer::~StaticMeshRenderer() { - STACK_TRACE; } void StaticMeshRenderer::Render(GraphicsDevice *graphicsDevice, StaticMeshInstance *instance) { - STACK_TRACE; instance->GetRenderState()->Apply(); if (instance->GetNumTextures() > 0) @@ -33,21 +28,18 @@ void StaticMeshRenderer::Render(GraphicsDevice *graphicsDevice, StaticMeshInstan void StaticMeshRenderer::RenderAllSubsets(GraphicsDevice *graphicsDevice, StaticMeshInstance *instance) { - STACK_TRACE; for (uint32_t i = 0; i < instance->GetMesh()->GetNumSubsets(); ++i) RenderSubset(graphicsDevice, instance->GetMesh()->GetSubset(i), instance->GetTexture(i)); } void StaticMeshRenderer::RenderAllSubsetsTextureless(GraphicsDevice *graphicsDevice, StaticMeshInstance *instance) { - STACK_TRACE; for (uint32_t i = 0; i < instance->GetMesh()->GetNumSubsets(); ++i) RenderTexturelessSubset(graphicsDevice, instance->GetMesh()->GetSubset(i)); } void StaticMeshRenderer::RenderSubset(GraphicsDevice *graphicsDevice, const StaticMeshSubset *subset, const Texture *texture) { - STACK_TRACE; if (texture != NULL) graphicsDevice->BindTexture(texture); graphicsDevice->BindVertexBuffer(subset->GetVertices()); @@ -57,7 +49,6 @@ void StaticMeshRenderer::RenderSubset(GraphicsDevice *graphicsDevice, const Stat void StaticMeshRenderer::RenderTexturelessSubset(GraphicsDevice *graphicsDevice, const StaticMeshSubset *subset) { - STACK_TRACE; graphicsDevice->BindVertexBuffer(subset->GetVertices()); graphicsDevice->RenderTriangles(); graphicsDevice->UnbindVertexBuffer(); diff --git a/src/framework/assets/static/staticmeshsubset.cpp b/src/framework/assets/static/staticmeshsubset.cpp index 2e1c19a..f2a1eca 100644 --- a/src/framework/assets/static/staticmeshsubset.cpp +++ b/src/framework/assets/static/staticmeshsubset.cpp @@ -7,7 +7,6 @@ StaticMeshSubset::StaticMeshSubset(uint32_t numTriangles, Texture *texture) { - STACK_TRACE; VERTEX_ATTRIBS attribs[] = { VERTEX_POS_3D, VERTEX_NORMAL, @@ -22,6 +21,5 @@ StaticMeshSubset::StaticMeshSubset(uint32_t numTriangles, Texture *texture) StaticMeshSubset::~StaticMeshSubset() { - STACK_TRACE; SAFE_DELETE(m_vertices); } diff --git a/src/framework/basegameapp.cpp b/src/framework/basegameapp.cpp index c63af79..9ad5b26 100644 --- a/src/framework/basegameapp.cpp +++ b/src/framework/basegameapp.cpp @@ -18,7 +18,6 @@ const uint32_t DEFAULT_MAX_FRAMESKIP = 10; BaseGameApp::BaseGameApp() { - STACK_TRACE; m_stop = FALSE; m_isPaused = FALSE; m_fps = 0; @@ -43,7 +42,6 @@ BaseGameApp::BaseGameApp() BaseGameApp::~BaseGameApp() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Releasing.\n"); if (m_graphics != NULL) OnLostContext(); @@ -54,7 +52,6 @@ BaseGameApp::~BaseGameApp() BOOL BaseGameApp::Start(OperatingSystem *system) { - STACK_TRACE; m_system = system; LOG_INFO(LOGCAT_GAMEAPP, "Starting.\n"); @@ -72,7 +69,6 @@ BOOL BaseGameApp::Start(OperatingSystem *system) BOOL BaseGameApp::Initialize(GameWindowParams *windowParams) { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Starting initialization.\n"); if (!m_system->CreateGameWindow(this, windowParams)) @@ -106,7 +102,6 @@ BOOL BaseGameApp::Initialize(GameWindowParams *windowParams) void BaseGameApp::Loop() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "OnLoadGame event.\n"); m_content->OnLoadGame(); OnLoadGame(); @@ -208,7 +203,6 @@ void BaseGameApp::Loop() void BaseGameApp::Quit() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Quit requested.\n"); if (!m_system->IsQuitting()) m_system->Quit(); @@ -217,26 +211,22 @@ void BaseGameApp::Quit() void BaseGameApp::OnAppGainFocus() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Gained focus.\n"); } void BaseGameApp::OnAppLostFocus() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Lost focus.\n"); } void BaseGameApp::OnAppPause() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Paused.\n"); m_isPaused = TRUE; } void BaseGameApp::OnAppResume() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Resumed.\n"); m_isPaused = FALSE; @@ -248,7 +238,6 @@ void BaseGameApp::OnAppResume() void BaseGameApp::OnLostContext() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Lost OpenGL context.\n"); if (m_graphics != NULL) @@ -259,7 +248,6 @@ void BaseGameApp::OnLostContext() void BaseGameApp::OnNewContext() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "New OpenGL context.\n"); m_graphics->OnNewContext(); m_content->OnNewContext(); @@ -270,13 +258,11 @@ void BaseGameApp::OnNewContext() void BaseGameApp::OnRender() { - STACK_TRACE; m_graphics->OnRender(); } void BaseGameApp::OnResize() { - STACK_TRACE; LOG_INFO(LOGCAT_GAMEAPP, "Window resize complete.\n"); m_graphics->OnResize(m_window->GetRect()); @@ -286,7 +272,6 @@ void BaseGameApp::OnResize() void BaseGameApp::InternalUpdate() { - STACK_TRACE; m_system->ProcessEvents(); if (m_window->IsClosing() && !m_stop) @@ -295,13 +280,11 @@ void BaseGameApp::InternalUpdate() void BaseGameApp::OnUpdate(float delta) { - STACK_TRACE; InternalUpdate(); } void BaseGameApp::SetUpdateFrequency(uint32_t targetFrequency) { - STACK_TRACE; m_targetUpdatesPerSecond = targetFrequency; m_ticksPerUpdate = 1000 / m_targetUpdatesPerSecond; m_fixedUpdateInterval = m_ticksPerUpdate / 1000.0f; @@ -309,7 +292,6 @@ void BaseGameApp::SetUpdateFrequency(uint32_t targetFrequency) BOOL BaseGameApp::IsAppFocused() const { - STACK_TRACE; if (m_window != NULL) return m_window->IsFocused(); else diff --git a/src/framework/content/content.cpp b/src/framework/content/content.cpp index 8439bba..33efcf0 100644 --- a/src/framework/content/content.cpp +++ b/src/framework/content/content.cpp @@ -4,7 +4,6 @@ Content::Content() { - STACK_TRACE; m_referenceCount = 0; m_isReferenceCounted = FALSE; m_wasLoadedByContentLoader = FALSE; @@ -12,20 +11,17 @@ Content::Content() Content::~Content() { - STACK_TRACE; ASSERT(m_isReferenceCounted == FALSE || m_referenceCount == 0); } void Content::Reference() { - STACK_TRACE; m_isReferenceCounted = TRUE; ++m_referenceCount; } void Content::ReleaseReference() { - STACK_TRACE; ASSERT(m_isReferenceCounted == TRUE); ASSERT(IsReferenced() == TRUE); if (m_referenceCount > 0) diff --git a/src/framework/content/contentloader.cpp b/src/framework/content/contentloader.cpp index 2145697..410f437 100644 --- a/src/framework/content/contentloader.cpp +++ b/src/framework/content/contentloader.cpp @@ -6,21 +6,18 @@ void ContentLoaderBase::MarkLoadedByContentLoader(Content *content) { - STACK_TRACE; ASSERT(content != NULL); content->m_wasLoadedByContentLoader = TRUE; } void ContentLoaderBase::Reference(Content *content) { - STACK_TRACE; ASSERT(content != NULL); content->Reference(); } void ContentLoaderBase::ReleaseReference(Content *content) { - STACK_TRACE; ASSERT(content != NULL); content->ReleaseReference(); } diff --git a/src/framework/content/contentloadermapstorebase.h b/src/framework/content/contentloadermapstorebase.h index 7922610..48d4679 100644 --- a/src/framework/content/contentloadermapstorebase.h +++ b/src/framework/content/contentloadermapstorebase.h @@ -58,7 +58,6 @@ template ContentLoaderMapStoreBase::ContentLoaderMapStoreBase(const stl::string &loggingTag, ContentManager *contentManager, const stl::string &defaultPath) : ContentLoader(contentManager) { - STACK_TRACE; ASSERT(loggingTag.length() > 0); m_loggingTag = loggingTag; SetDefaultPath(defaultPath); @@ -67,14 +66,12 @@ ContentLoaderMapStoreBase::ContentLoaderMapStoreBase(const stl::string &loggi template ContentLoaderMapStoreBase::~ContentLoaderMapStoreBase() { - STACK_TRACE; ASSERT(m_content.empty()); } template T* ContentLoaderMapStoreBase::Get(const stl::string &name, const ContentParam *params, BOOL preload) { - STACK_TRACE; ContentContainer content; stl::string filename = AddDefaultPathIfNeeded(name); @@ -111,7 +108,6 @@ T* ContentLoaderMapStoreBase::Get(const stl::string &name, const ContentParam template void ContentLoaderMapStoreBase::Free(T *content, BOOL preload) { - STACK_TRACE; ASSERT(content != NULL); for (ContentStoreItor itor = m_content.begin(); itor != m_content.end(); ++itor) @@ -138,7 +134,6 @@ void ContentLoaderMapStoreBase::Free(const stl::string &name, const ContentPa template void ContentLoaderMapStoreBase::Free(ContentStoreItor &itor, BOOL force, BOOL preload) { - STACK_TRACE; ASSERT(itor->second.content->WasLoadedByContentLoader() == TRUE); if (!itor->second.isPreLoaded) @@ -177,7 +172,6 @@ void ContentLoaderMapStoreBase::Free(ContentStoreItor &itor, BOOL force, BOOL template void ContentLoaderMapStoreBase::RemoveAllContent() { - STACK_TRACE; while (m_content.size() > 0) { ContentStoreItor itor = m_content.begin(); @@ -196,7 +190,6 @@ void ContentLoaderMapStoreBase::RemoveAllContent() template stl::string ContentLoaderMapStoreBase::GetNameOf(T *content) const { - STACK_TRACE; ASSERT(content != NULL); for (ContentStoreConstItor itor = m_content.begin(); itor != m_content.end(); ++itor) @@ -218,7 +211,6 @@ typename ContentLoaderMapStoreBase::ContentStoreItor ContentLoaderMapStoreBas template void ContentLoaderMapStoreBase::SetDefaultPath(const stl::string &path) { - STACK_TRACE; if (path.length() == 0) { m_defaultPath = ""; @@ -239,7 +231,6 @@ void ContentLoaderMapStoreBase::SetDefaultPath(const stl::string &path) template stl::string ContentLoaderMapStoreBase::AddDefaultPathIfNeeded(const stl::string &imageFile) const { - STACK_TRACE; if (imageFile[0] == '/' || m_defaultPath.length() == 0 || imageFile.substr(0, 9) == "assets://") return imageFile; else @@ -249,7 +240,6 @@ stl::string ContentLoaderMapStoreBase::AddDefaultPathIfNeeded(const stl::stri template stl::string ContentLoaderMapStoreBase::ProcessFilename(const stl::string &filename, const ContentParam *params) const { - STACK_TRACE; return filename; } diff --git a/src/framework/content/contentmanager.cpp b/src/framework/content/contentmanager.cpp index f9c18bd..93d0cbf 100644 --- a/src/framework/content/contentmanager.cpp +++ b/src/framework/content/contentmanager.cpp @@ -9,13 +9,11 @@ ContentManager::ContentManager(BaseGameApp *gameApp) { - STACK_TRACE; m_gameApp = gameApp; } ContentManager::~ContentManager() { - STACK_TRACE; for (ContentLoaderMap::iterator itor = m_loaders.begin(); itor != m_loaders.end(); ++itor) { ContentLoaderBase *loader = itor->second; @@ -26,7 +24,6 @@ ContentManager::~ContentManager() void ContentManager::OnLoadGame() { - STACK_TRACE; for (ContentLoaderMap::iterator itor = m_loaders.begin(); itor != m_loaders.end(); ++itor) { ContentLoaderBase *loader = itor->second; @@ -36,7 +33,6 @@ void ContentManager::OnLoadGame() void ContentManager::OnNewContext() { - STACK_TRACE; for (ContentLoaderMap::iterator itor = m_loaders.begin(); itor != m_loaders.end(); ++itor) { ContentLoaderBase *loader = itor->second; @@ -46,7 +42,6 @@ void ContentManager::OnNewContext() void ContentManager::OnLostContext() { - STACK_TRACE; for (ContentLoaderMap::iterator itor = m_loaders.begin(); itor != m_loaders.end(); ++itor) { ContentLoaderBase *loader = itor->second; @@ -56,7 +51,6 @@ void ContentManager::OnLostContext() void ContentManager::RegisterLoader(ContentLoaderBase *loader) { - STACK_TRACE; ASSERT(loader != NULL); ContentLoaderBase *existingLoader = GetLoaderFor(loader->GetTypeOf()); @@ -67,7 +61,6 @@ void ContentManager::RegisterLoader(ContentLoaderBase *loader) ContentLoaderBase* ContentManager::GetLoaderFor(CONTENT_TYPE type) const { - STACK_TRACE; ContentLoaderMap::const_iterator itor = m_loaders.find(type); if (itor == m_loaders.end()) return NULL; diff --git a/src/framework/content/contentmanager.h b/src/framework/content/contentmanager.h index 13db86d..07f0998 100644 --- a/src/framework/content/contentmanager.h +++ b/src/framework/content/contentmanager.h @@ -189,7 +189,6 @@ private: template T* ContentManager::Get(const stl::string &name, BOOL preload) { - STACK_TRACE; ContentLoader *loader = GetLoader(); T* content = loader->Get(name, NULL, preload); return content; @@ -198,7 +197,6 @@ T* ContentManager::Get(const stl::string &name, BOOL preload) template T* ContentManager::Get(const stl::string &name, const ContentParam ¶ms, BOOL preload) { - STACK_TRACE; ContentLoader *loader = GetLoader(); T* content = loader->Get(name, ¶ms, preload); return content; @@ -207,21 +205,18 @@ T* ContentManager::Get(const stl::string &name, const ContentParam ¶ms, BOOL template T* ContentManager::Load(const stl::string &name) { - STACK_TRACE; return Get(name, TRUE); } template T* ContentManager::Load(const stl::string &name, const ContentParam ¶ms) { - STACK_TRACE; return Get(name, params, TRUE); } template void ContentManager::Free(const stl::string &name, BOOL preload) { - STACK_TRACE; ContentLoader *loader = GetLoader(); loader->Free(name, NULL, preload); } @@ -229,7 +224,6 @@ void ContentManager::Free(const stl::string &name, BOOL preload) template void ContentManager::Free(const stl::string &name, const ContentParam ¶ms, BOOL preload) { - STACK_TRACE; ContentLoader *loader = GetLoader(); loader->Free(name, ¶ms, preload); } @@ -237,7 +231,6 @@ void ContentManager::Free(const stl::string &name, const ContentParam ¶ms, B template void ContentManager::Free(T *content, BOOL preload) { - STACK_TRACE; ContentLoader *loader = GetLoader(); loader->Free(content, preload); } @@ -245,28 +238,24 @@ void ContentManager::Free(T *content, BOOL preload) template void ContentManager::Unload(const stl::string &name) { - STACK_TRACE; Free(name, TRUE); } template void ContentManager::Unload(const stl::string &name, const ContentParam ¶ms) { - STACK_TRACE; Free(name, params, TRUE); } template void ContentManager::Unload(T *content) { - STACK_TRACE; Free(content, TRUE); } template stl::string ContentManager::GetNameOf(T *content) const { - STACK_TRACE; ContentLoader *loader = GetLoader(); return loader->GetNameOf(content); } @@ -274,7 +263,6 @@ stl::string ContentManager::GetNameOf(T *content) const template ContentLoader* ContentManager::GetLoaderForType() const { - STACK_TRACE; return GetLoader(); } diff --git a/src/framework/content/imageloader.cpp b/src/framework/content/imageloader.cpp index a3886e4..9dba0c6 100644 --- a/src/framework/content/imageloader.cpp +++ b/src/framework/content/imageloader.cpp @@ -16,23 +16,19 @@ ImageLoader::ImageLoader(ContentManager *contentManager) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, "assets://images/") { - STACK_TRACE; } ImageLoader::ImageLoader(ContentManager *contentManager, const stl::string &defaultPath) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, defaultPath) { - STACK_TRACE; } ImageLoader::~ImageLoader() { - STACK_TRACE; } Image* ImageLoader::LoadContent(const stl::string &file, const ContentParam *params) { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: loading \"%s\"\n", GetLoggingTag(), file.c_str() @@ -54,6 +50,5 @@ Image* ImageLoader::LoadContent(const stl::string &file, const ContentParam *par void ImageLoader::FreeContent(Image *content) { - STACK_TRACE; SAFE_DELETE(content); } diff --git a/src/framework/content/keyframemeshloader.cpp b/src/framework/content/keyframemeshloader.cpp index fbf0ca1..86a2431 100644 --- a/src/framework/content/keyframemeshloader.cpp +++ b/src/framework/content/keyframemeshloader.cpp @@ -17,23 +17,19 @@ KeyframeMeshLoader::KeyframeMeshLoader(ContentManager *contentManager) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, "assets://meshes/") { - STACK_TRACE; } KeyframeMeshLoader::KeyframeMeshLoader(ContentManager *contentManager, const stl::string &defaultPath) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, defaultPath) { - STACK_TRACE; } KeyframeMeshLoader::~KeyframeMeshLoader() { - STACK_TRACE; } KeyframeMesh* KeyframeMeshLoader::LoadContent(const stl::string &file, const ContentParam *params) { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: loading \"%s\"\n", GetLoggingTag(), file.c_str() @@ -56,7 +52,6 @@ KeyframeMesh* KeyframeMeshLoader::LoadContent(const stl::string &file, const Con void KeyframeMeshLoader::FreeContent(KeyframeMesh *content) { - STACK_TRACE; SAFE_DELETE(content); } diff --git a/src/framework/content/skeletalmeshloader.cpp b/src/framework/content/skeletalmeshloader.cpp index 6e300f4..2c6f34a 100644 --- a/src/framework/content/skeletalmeshloader.cpp +++ b/src/framework/content/skeletalmeshloader.cpp @@ -17,23 +17,19 @@ SkeletalMeshLoader::SkeletalMeshLoader(ContentManager *contentManager) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, "assets://meshes/") { - STACK_TRACE; } SkeletalMeshLoader::SkeletalMeshLoader(ContentManager *contentManager, const stl::string &defaultPath) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, defaultPath) { - STACK_TRACE; } SkeletalMeshLoader::~SkeletalMeshLoader() { - STACK_TRACE; } SkeletalMesh* SkeletalMeshLoader::LoadContent(const stl::string &file, const ContentParam *params) { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: loading \"%s\"\n", GetLoggingTag(), file.c_str() @@ -56,7 +52,6 @@ SkeletalMesh* SkeletalMeshLoader::LoadContent(const stl::string &file, const Con void SkeletalMeshLoader::FreeContent(SkeletalMesh *content) { - STACK_TRACE; SAFE_DELETE(content); } diff --git a/src/framework/content/spritefontloader.cpp b/src/framework/content/spritefontloader.cpp index 1164739..f9f408d 100644 --- a/src/framework/content/spritefontloader.cpp +++ b/src/framework/content/spritefontloader.cpp @@ -28,23 +28,19 @@ SpriteFontLoader::SpriteFontLoader(ContentManager *contentManager) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, "assets://fonts/") { - STACK_TRACE; } SpriteFontLoader::SpriteFontLoader(ContentManager *contentManager, const stl::string &defaultPath) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, defaultPath) { - STACK_TRACE; } SpriteFontLoader::~SpriteFontLoader() { - STACK_TRACE; } void SpriteFontLoader::OnNewContext() { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: reloading previous fonts for new OpenGL context.\n", GetLoggingTag()); for (ContentStoreItor itor = m_content.begin(); itor != m_content.end(); ++itor) @@ -69,7 +65,6 @@ void SpriteFontLoader::OnNewContext() void SpriteFontLoader::OnLostContext() { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: invoking lost OpenGL context event for all loaded fonts.\n", GetLoggingTag()); for (ContentStoreItor itor = m_content.begin(); itor != m_content.end(); ++itor) @@ -81,7 +76,6 @@ void SpriteFontLoader::OnLostContext() SpriteFont* SpriteFontLoader::LoadContent(const stl::string &file, const ContentParam *params) { - STACK_TRACE; stl::string filename; uint8_t size = 0; @@ -113,7 +107,6 @@ stl::string SpriteFontLoader::ProcessFilename(const stl::string &filename, const void SpriteFontLoader::DecomposeFilename(const stl::string &filename, stl::string &outFilename, uint8_t &outSize) const { - STACK_TRACE; ASSERT(filename.length() > 0); size_t startOfSize = filename.find_last_of(':'); @@ -126,7 +119,6 @@ void SpriteFontLoader::DecomposeFilename(const stl::string &filename, stl::strin SpriteFont* SpriteFontLoader::Load(File *file, uint8_t size, SpriteFont *existing) const { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: loading \"%s:%d\"\n", GetLoggingTag(), file->GetFilename().c_str(), size); // TODO: somehow find a way to base this on the font size requested, as this @@ -276,13 +268,11 @@ SpriteFont* SpriteFontLoader::Load(File *file, uint8_t size, SpriteFont *existin void SpriteFontLoader::FreeContent(SpriteFont *content) { - STACK_TRACE; SAFE_DELETE(content); } BOOL SpriteFontLoader::GetGlyphMetrics(stbtt_fontinfo *fontInfo, char glyph, uint8_t size, SpriteFontGlyphMetrics *metrics) const { - STACK_TRACE; ASSERT(metrics != NULL); // need to properly scale! sizes as returned from most (all?) metric-related functions will be huge diff --git a/src/framework/content/staticmeshloader.cpp b/src/framework/content/staticmeshloader.cpp index 0e49562..b1bc949 100644 --- a/src/framework/content/staticmeshloader.cpp +++ b/src/framework/content/staticmeshloader.cpp @@ -18,23 +18,19 @@ const char* LOGGING_TAG = "StaticMeshLoader"; StaticMeshLoader::StaticMeshLoader(ContentManager *contentManager) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, "assets://meshes/") { - STACK_TRACE; } StaticMeshLoader::StaticMeshLoader(ContentManager *contentManager, const stl::string &defaultPath) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, defaultPath) { - STACK_TRACE; } StaticMeshLoader::~StaticMeshLoader() { - STACK_TRACE; } StaticMesh* StaticMeshLoader::LoadContent(const stl::string &file, const ContentParam *params) { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: loading \"%s\"\n", GetLoggingTag(), file.c_str() @@ -57,6 +53,5 @@ StaticMesh* StaticMeshLoader::LoadContent(const stl::string &file, const Content void StaticMeshLoader::FreeContent(StaticMesh *content) { - STACK_TRACE; SAFE_DELETE(content); } diff --git a/src/framework/content/textloader.cpp b/src/framework/content/textloader.cpp index 08f3321..d263bfc 100644 --- a/src/framework/content/textloader.cpp +++ b/src/framework/content/textloader.cpp @@ -17,23 +17,19 @@ TextLoader::TextLoader(ContentManager *contentManager) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, "") { - STACK_TRACE; } TextLoader::TextLoader(ContentManager *contentManager, const stl::string &defaultPath) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, defaultPath) { - STACK_TRACE; } TextLoader::~TextLoader() { - STACK_TRACE; } Text* TextLoader::LoadContent(const stl::string &file, const ContentParam *params) { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: loading \"%s\"\n", GetLoggingTag(), file.c_str() @@ -52,6 +48,5 @@ Text* TextLoader::LoadContent(const stl::string &file, const ContentParam *param void TextLoader::FreeContent(Text *content) { - STACK_TRACE; SAFE_DELETE(content); } diff --git a/src/framework/content/textureloader.cpp b/src/framework/content/textureloader.cpp index f6b0afe..003900a 100644 --- a/src/framework/content/textureloader.cpp +++ b/src/framework/content/textureloader.cpp @@ -20,23 +20,19 @@ TextureLoader::TextureLoader(ContentManager *contentManager) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, "assets://textures/") { - STACK_TRACE; } TextureLoader::TextureLoader(ContentManager *contentManager, const stl::string &defaultPath) : ContentLoaderMapStoreBase(LOGGING_TAG, contentManager, defaultPath) { - STACK_TRACE; } TextureLoader::~TextureLoader() { - STACK_TRACE; } void TextureLoader::OnNewContext() { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: reloading previous textures for new OpenGL context.\n", GetLoggingTag()); for (ContentStoreItor itor = m_content.begin(); itor != m_content.end(); ++itor) @@ -54,7 +50,6 @@ void TextureLoader::OnNewContext() void TextureLoader::OnLostContext() { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: resetting loaded texture IDs due to lost OpenGL context.\n", GetLoggingTag()); for (ContentStoreItor itor = m_content.begin(); itor != m_content.end(); ++itor) @@ -63,19 +58,16 @@ void TextureLoader::OnLostContext() Texture* TextureLoader::LoadContent(const stl::string &file, const ContentParam *params) { - STACK_TRACE; return Load(file, NULL); } void TextureLoader::FreeContent(Texture *content) { - STACK_TRACE; SAFE_DELETE(content); } Texture* TextureLoader::Load(const stl::string &file, Texture *existingTexture) { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "%s: loading \"%s\"\n", GetLoggingTag(), file.c_str() diff --git a/src/framework/file/diskfile.cpp b/src/framework/file/diskfile.cpp index 7c56c98..3a5e17b 100644 --- a/src/framework/file/diskfile.cpp +++ b/src/framework/file/diskfile.cpp @@ -4,9 +4,7 @@ #include "diskfile.h" DiskFile::DiskFile() - : File() { - STACK_TRACE; m_fp = NULL; m_mode = 0; m_canRead = FALSE; @@ -15,13 +13,11 @@ DiskFile::DiskFile() DiskFile::~DiskFile() { - STACK_TRACE; Close(); } BOOL DiskFile::Open(const stl::string &filename, int mode) { - STACK_TRACE; ASSERT(IsOpen() == FALSE); m_filename = filename; @@ -70,7 +66,6 @@ BOOL DiskFile::Open(const stl::string &filename, int mode) void DiskFile::Close() { - STACK_TRACE; if (IsOpen()) { LOG_INFO(LOGCAT_FILEIO, "Closed DiskFile \"%s\"\n", m_filename.c_str()); diff --git a/src/framework/file/marmaladefile.cpp b/src/framework/file/marmaladefile.cpp index 57e62b8..f5b615b 100644 --- a/src/framework/file/marmaladefile.cpp +++ b/src/framework/file/marmaladefile.cpp @@ -6,9 +6,7 @@ #include "s3eFile.h" MarmaladeFile::MarmaladeFile() - : File() { - STACK_TRACE; m_fp = NULL; m_mode = 0; m_canRead = FALSE; @@ -17,13 +15,11 @@ MarmaladeFile::MarmaladeFile() MarmaladeFile::~MarmaladeFile() { - STACK_TRACE; Close(); } BOOL MarmaladeFile::Open(const stl::string &filename, int mode) { - STACK_TRACE; ASSERT(IsOpen() == FALSE); m_filename = filename; @@ -72,7 +68,6 @@ BOOL MarmaladeFile::Open(const stl::string &filename, int mode) void MarmaladeFile::Close() { - STACK_TRACE; if (IsOpen()) { LOG_INFO(LOGCAT_FILEIO, "Closed MarmaladeFile \"%s\"\n", m_filename.c_str()); @@ -88,7 +83,6 @@ void MarmaladeFile::Close() int8_t MarmaladeFile::ReadChar() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); int8_t buffer; @@ -98,7 +92,6 @@ int8_t MarmaladeFile::ReadChar() uint8_t MarmaladeFile::ReadUnsignedChar() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); uint8_t buffer; @@ -108,7 +101,6 @@ uint8_t MarmaladeFile::ReadUnsignedChar() int16_t MarmaladeFile::ReadShort() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); int16_t buffer; @@ -118,7 +110,6 @@ int16_t MarmaladeFile::ReadShort() uint16_t MarmaladeFile::ReadUnsignedShort() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); uint16_t buffer; @@ -128,7 +119,6 @@ uint16_t MarmaladeFile::ReadUnsignedShort() int32_t MarmaladeFile::ReadInt() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); int32_t buffer; @@ -138,7 +128,6 @@ int32_t MarmaladeFile::ReadInt() uint32_t MarmaladeFile::ReadUnsignedInt() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); uint32_t buffer; @@ -148,7 +137,6 @@ uint32_t MarmaladeFile::ReadUnsignedInt() int64_t MarmaladeFile::ReadLong() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); int64_t buffer; @@ -158,7 +146,6 @@ int64_t MarmaladeFile::ReadLong() uint64_t MarmaladeFile::ReadUnsignedLong() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); uint64_t buffer; @@ -168,7 +155,6 @@ uint64_t MarmaladeFile::ReadUnsignedLong() float MarmaladeFile::ReadFloat() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); float buffer; @@ -178,7 +164,6 @@ float MarmaladeFile::ReadFloat() double MarmaladeFile::ReadDouble() { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); double buffer; @@ -188,7 +173,6 @@ double MarmaladeFile::ReadDouble() size_t MarmaladeFile::Read(int8_t *buffer, size_t bytesToRead) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); ASSERT(buffer != NULL); @@ -199,7 +183,6 @@ size_t MarmaladeFile::Read(int8_t *buffer, size_t bytesToRead) size_t MarmaladeFile::ReadString(stl::string &buffer) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); size_t charactersRead = 0; @@ -219,7 +202,6 @@ size_t MarmaladeFile::ReadString(stl::string &buffer) size_t MarmaladeFile::ReadFixedString(stl::string &buffer, size_t maxLength) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanRead()); size_t charactersRead = 0; @@ -241,7 +223,6 @@ size_t MarmaladeFile::ReadFixedString(stl::string &buffer, size_t maxLength) size_t MarmaladeFile::WriteChar(int8_t data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(int8_t), 1, m_fp); @@ -250,7 +231,6 @@ size_t MarmaladeFile::WriteChar(int8_t data) size_t MarmaladeFile::WriteUnsignedChar(uint8_t data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(uint8_t), 1, m_fp); @@ -259,7 +239,6 @@ size_t MarmaladeFile::WriteUnsignedChar(uint8_t data) size_t MarmaladeFile::WriteShort(int16_t data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(int16_t), 1, m_fp); @@ -268,7 +247,6 @@ size_t MarmaladeFile::WriteShort(int16_t data) size_t MarmaladeFile::WriteUnsignedShort(uint16_t data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(uint16_t), 1, m_fp); @@ -277,7 +255,6 @@ size_t MarmaladeFile::WriteUnsignedShort(uint16_t data) size_t MarmaladeFile::WriteInt(int32_t data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(int32_t), 1, m_fp); @@ -286,7 +263,6 @@ size_t MarmaladeFile::WriteInt(int32_t data) size_t MarmaladeFile::WriteUnsignedInt(uint32_t data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(uint32_t), 1, m_fp); @@ -295,7 +271,6 @@ size_t MarmaladeFile::WriteUnsignedInt(uint32_t data) size_t MarmaladeFile::WriteLong(int64_t data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(int64_t), 1, m_fp); @@ -304,7 +279,6 @@ size_t MarmaladeFile::WriteLong(int64_t data) size_t MarmaladeFile::WriteUnsignedLong(uint64_t data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(uint64_t), 1, m_fp); @@ -313,7 +287,6 @@ size_t MarmaladeFile::WriteUnsignedLong(uint64_t data) size_t MarmaladeFile::WriteFloat(float data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(float), 1, m_fp); @@ -322,7 +295,6 @@ size_t MarmaladeFile::WriteFloat(float data) size_t MarmaladeFile::WriteDouble(double data) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); size_t numWritten = s3eFileWrite(&data, sizeof(double), 1, m_fp); @@ -331,7 +303,6 @@ size_t MarmaladeFile::WriteDouble(double data) size_t MarmaladeFile::Write(int8_t *buffer, size_t bytesToWrite) { - STACK_TRACE; ASSERT(IsOpen()); ASSERT(CanWrite()); ASSERT(buffer != NULL); @@ -342,14 +313,12 @@ size_t MarmaladeFile::Write(int8_t *buffer, size_t bytesToWrite) size_t MarmaladeFile::Tell() { - STACK_TRACE; ASSERT(IsOpen()); return (size_t)s3eFileTell(m_fp); } void MarmaladeFile::Seek(size_t offset, FileSeek from) { - STACK_TRACE; ASSERT(IsOpen()); s3eFileSeekOrigin origin = S3E_FILESEEK_CUR; @@ -363,7 +332,6 @@ void MarmaladeFile::Seek(size_t offset, FileSeek from) BOOL MarmaladeFile::AtEOF() { - STACK_TRACE; ASSERT(IsOpen()); if (s3eFileEOF(m_fp) == S3E_TRUE) return TRUE; @@ -373,7 +341,6 @@ BOOL MarmaladeFile::AtEOF() size_t MarmaladeFile::GetFileSize() { - STACK_TRACE; ASSERT(IsOpen()); return (size_t)s3eFileGetSize(m_fp); } diff --git a/src/framework/file/marmaladefilesystem.cpp b/src/framework/file/marmaladefilesystem.cpp index aeae3cd..b6826b0 100644 --- a/src/framework/file/marmaladefilesystem.cpp +++ b/src/framework/file/marmaladefilesystem.cpp @@ -12,21 +12,17 @@ #include "util.h" MarmaladeFileSystem::MarmaladeFileSystem() - : FileSystem() { - STACK_TRACE; m_assetsPath = ::GetAssetsPath(); LOG_INFO(LOGCAT_FILEIO, "FileSystem assets path is \"%s\".\n", m_assetsPath.c_str()); } MarmaladeFileSystem::~MarmaladeFileSystem() { - STACK_TRACE; } File* MarmaladeFileSystem::Open(const stl::string &filename, int mode) { - STACK_TRACE; File *result = NULL; stl::string realFilename = TranslateFilePath(filename); @@ -40,7 +36,6 @@ File* MarmaladeFileSystem::Open(const stl::string &filename, int mode) File* MarmaladeFileSystem::OpenFile(const stl::string &filename, int mode) { - STACK_TRACE; MarmaladeFile *file = new MarmaladeFile(); ASSERT(file != NULL); @@ -55,7 +50,6 @@ File* MarmaladeFileSystem::OpenFile(const stl::string &filename, int mode) File* MarmaladeFileSystem::OpenMemory(const stl::string &filename, int mode) { - STACK_TRACE; // open the specified file off the disk (or whatever) File *file = OpenFile(filename, mode); if (file == NULL) @@ -78,7 +72,6 @@ File* MarmaladeFileSystem::OpenMemory(const stl::string &filename, int mode) stl::string MarmaladeFileSystem::TranslateFilePath(const stl::string &filename) const { - STACK_TRACE; if (filename.substr(0, 9) == "assets://") return m_assetsPath + filename.substr(9); else diff --git a/src/framework/file/memoryfile.cpp b/src/framework/file/memoryfile.cpp index 6265e88..86357cc 100644 --- a/src/framework/file/memoryfile.cpp +++ b/src/framework/file/memoryfile.cpp @@ -6,9 +6,7 @@ #include MemoryFile::MemoryFile() - : File() { - STACK_TRACE; m_data = NULL; m_ownData = FALSE; m_length = 0; @@ -19,13 +17,11 @@ MemoryFile::MemoryFile() MemoryFile::~MemoryFile() { - STACK_TRACE; Close(); } BOOL MemoryFile::Open(File *srcFile) { - STACK_TRACE; ASSERT(IsOpen() == FALSE); ASSERT(srcFile->IsOpen()); size_t filesize = srcFile->GetFileSize(); @@ -47,7 +43,6 @@ BOOL MemoryFile::Open(File *srcFile) BOOL MemoryFile::Open(const void *memory, size_t numBytes, BOOL canRead, BOOL canWrite, BOOL assumeOwnershipOfMemory) { - STACK_TRACE; ASSERT(IsOpen() == FALSE); ASSERT(memory != NULL); ASSERT(numBytes > 0); @@ -66,7 +61,6 @@ BOOL MemoryFile::Open(const void *memory, size_t numBytes, BOOL canRead, BOOL ca void MemoryFile::Close() { - STACK_TRACE; if (IsOpen()) { if (m_ownData) diff --git a/src/framework/file/sdlfile.cpp b/src/framework/file/sdlfile.cpp index e0a0c0d..2b7e65a 100644 --- a/src/framework/file/sdlfile.cpp +++ b/src/framework/file/sdlfile.cpp @@ -5,9 +5,7 @@ #include "sdlfile.h" SDLFile::SDLFile() - : File() { - STACK_TRACE; m_fp = NULL; m_mode = 0; m_canRead = FALSE; @@ -16,13 +14,11 @@ SDLFile::SDLFile() SDLFile::~SDLFile() { - STACK_TRACE; Close(); } BOOL SDLFile::Open(const stl::string &filename, int mode) { - STACK_TRACE; ASSERT(IsOpen() == FALSE); m_filename = filename; @@ -71,7 +67,6 @@ BOOL SDLFile::Open(const stl::string &filename, int mode) void SDLFile::Close() { - STACK_TRACE; if (IsOpen()) { LOG_INFO(LOGCAT_FILEIO, "Closed SDLFIle \"%s\"\n", m_filename.c_str()); diff --git a/src/framework/file/sdlfilesystem.cpp b/src/framework/file/sdlfilesystem.cpp index 4bfc592..8f94e08 100644 --- a/src/framework/file/sdlfilesystem.cpp +++ b/src/framework/file/sdlfilesystem.cpp @@ -12,21 +12,17 @@ #include "util.h" SDLFileSystem::SDLFileSystem() - : FileSystem() { - STACK_TRACE; m_assetsPath = ::GetAssetsPath(); LOG_INFO(LOGCAT_FILEIO, "FileSystem assets path is \"%s\".\n", m_assetsPath.c_str()); } SDLFileSystem::~SDLFileSystem() { - STACK_TRACE; } File* SDLFileSystem::Open(const stl::string &filename, int mode) { - STACK_TRACE; File *result = NULL; stl::string realFilename = TranslateFilePath(filename); @@ -40,7 +36,6 @@ File* SDLFileSystem::Open(const stl::string &filename, int mode) File* SDLFileSystem::OpenFile(const stl::string &filename, int mode) { - STACK_TRACE; SDLFile *file = new SDLFile(); ASSERT(file != NULL); @@ -55,7 +50,6 @@ File* SDLFileSystem::OpenFile(const stl::string &filename, int mode) File* SDLFileSystem::OpenMemory(const stl::string &filename, int mode) { - STACK_TRACE; // open the specified file off the disk (or whatever) File *file = OpenFile(filename, mode); if (file == NULL) @@ -78,7 +72,6 @@ File* SDLFileSystem::OpenMemory(const stl::string &filename, int mode) stl::string SDLFileSystem::TranslateFilePath(const stl::string &filename) const { - STACK_TRACE; if (filename.substr(0, 9) == "assets://") return m_assetsPath + filename.substr(9); else diff --git a/src/framework/file/util.cpp b/src/framework/file/util.cpp index c0ad1e8..432313f 100644 --- a/src/framework/file/util.cpp +++ b/src/framework/file/util.cpp @@ -23,7 +23,6 @@ stl::string g_assetsPath; const stl::string& GetAppPath() { - STACK_TRACE; if (g_appPath.length() > 0) return g_appPath; @@ -94,7 +93,6 @@ const stl::string& GetAppPath() const stl::string& GetAssetsPath() { - STACK_TRACE; if (g_assetsPath.length() > 0) return g_assetsPath; diff --git a/src/framework/graphics/billboardspritebatch.cpp b/src/framework/graphics/billboardspritebatch.cpp index 920cbdb..a8b3e04 100644 --- a/src/framework/graphics/billboardspritebatch.cpp +++ b/src/framework/graphics/billboardspritebatch.cpp @@ -28,7 +28,6 @@ char __billboardSpriteBatch_PrintfBuffer[PRINTF_BUFFER_SIZE + 1]; BillboardSpriteBatch::BillboardSpriteBatch(GraphicsDevice *graphicsDevice) { - STACK_TRACE; m_graphicsDevice = graphicsDevice; m_shader = NULL; @@ -63,7 +62,6 @@ BillboardSpriteBatch::BillboardSpriteBatch(GraphicsDevice *graphicsDevice) BillboardSpriteBatch::~BillboardSpriteBatch() { - STACK_TRACE; SAFE_DELETE(m_vertices); SAFE_DELETE(m_renderState); SAFE_DELETE(m_blendState); @@ -71,7 +69,6 @@ BillboardSpriteBatch::~BillboardSpriteBatch() void BillboardSpriteBatch::InternalBegin(const RenderState *renderState, const BlendState *blendState, SpriteShader *shader) { - STACK_TRACE; ASSERT(m_begunRendering == FALSE); m_cameraPosition = m_graphicsDevice->GetViewContext()->GetCamera()->GetPosition(); @@ -107,43 +104,36 @@ void BillboardSpriteBatch::InternalBegin(const RenderState *renderState, const B void BillboardSpriteBatch::Begin(SpriteShader *shader) { - STACK_TRACE; InternalBegin(NULL, NULL, shader); } void BillboardSpriteBatch::Begin(const RenderState &renderState, SpriteShader *shader) { - STACK_TRACE; InternalBegin(&renderState, NULL, shader); } void BillboardSpriteBatch::Begin(const BlendState &blendState, SpriteShader *shader) { - STACK_TRACE; InternalBegin(NULL, &blendState, shader); } void BillboardSpriteBatch::Begin(const RenderState &renderState, const BlendState &blendState, SpriteShader *shader) { - STACK_TRACE; InternalBegin(&renderState, &blendState, shader); } void BillboardSpriteBatch::Render(const Texture *texture, float x, float y, float z, float width, float height, BILLBOARDSPRITE_TYPE type, const Color &color) { - STACK_TRACE; AddSprite(type, texture, Vector3(x, y, z), width, height, 0, 0, texture->GetWidth(), texture->GetHeight(), color); } void BillboardSpriteBatch::Render(const Texture *texture, const Vector3 &position, float width, float height, BILLBOARDSPRITE_TYPE type, const Color &color) { - STACK_TRACE; AddSprite(type, texture, position, width, height, 0, 0, texture->GetWidth(), texture->GetHeight(), color); } void BillboardSpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, float x, float y, float z, float width, float height, BILLBOARDSPRITE_TYPE type, const Color &color) { - STACK_TRACE; const RectF *texCoords = &atlas->GetTile(index).texCoords; const Texture *texture = atlas->GetTexture(); @@ -152,7 +142,6 @@ void BillboardSpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, flo void BillboardSpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, const Vector3 &position, float width, float height, BILLBOARDSPRITE_TYPE type, const Color &color) { - STACK_TRACE; const RectF *texCoords = &atlas->GetTile(index).texCoords; const Texture *texture = atlas->GetTexture(); @@ -161,13 +150,11 @@ void BillboardSpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, con void BillboardSpriteBatch::Render(const SpriteFont *font, float x, float y, float z, BILLBOARDSPRITE_TYPE type, const Color &color, float pixelScale, const char *text) { - STACK_TRACE; Render(font, Vector3(x, y, z), type, color, pixelScale, text); } void BillboardSpriteBatch::Render(const SpriteFont *font, const Vector3 &position, BILLBOARDSPRITE_TYPE type, const Color &color, float pixelScale, const char *text) { - STACK_TRACE; size_t textLength = strlen(text); uint16_t textWidth = 0; @@ -217,7 +204,6 @@ void BillboardSpriteBatch::Render(const SpriteFont *font, const Vector3 &positio void BillboardSpriteBatch::Printf(const SpriteFont *font, float x, float y, float z, BILLBOARDSPRITE_TYPE type, const Color &color, float pixelScale, const char *format, ...) { - STACK_TRACE; va_list args; va_start(args, format); vsnprintf(__billboardSpriteBatch_PrintfBuffer, PRINTF_BUFFER_SIZE, format, args); @@ -228,7 +214,6 @@ void BillboardSpriteBatch::Printf(const SpriteFont *font, float x, float y, floa void BillboardSpriteBatch::Printf(const SpriteFont *font, const Vector3 &position, BILLBOARDSPRITE_TYPE type, const Color &color, float pixelScale, const char *format, ...) { - STACK_TRACE; va_list args; va_start(args, format); vsnprintf(__billboardSpriteBatch_PrintfBuffer, PRINTF_BUFFER_SIZE, format, args); @@ -239,7 +224,6 @@ void BillboardSpriteBatch::Printf(const SpriteFont *font, const Vector3 &positio void BillboardSpriteBatch::AddSprite(BILLBOARDSPRITE_TYPE type, const Texture *texture, const Vector3 &position, float width, float height, uint16_t sourceLeft, uint16_t sourceTop, uint16_t sourceRight, uint16_t sourceBottom, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); Matrix4x4 transform = GetTransformFor(type, position); @@ -250,7 +234,6 @@ void BillboardSpriteBatch::AddSprite(BILLBOARDSPRITE_TYPE type, const Texture *t void BillboardSpriteBatch::AddSprite(BILLBOARDSPRITE_TYPE type, const Texture *texture, const Vector3 &position, float width, float height, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); Matrix4x4 transform = GetTransformFor(type, position); @@ -261,7 +244,6 @@ void BillboardSpriteBatch::AddSprite(BILLBOARDSPRITE_TYPE type, const Texture *t void BillboardSpriteBatch::AddSprite(BILLBOARDSPRITE_TYPE type, const Matrix4x4 &transform, const Texture *texture, const Vector3 &offset, float width, float height, uint16_t sourceLeft, uint16_t sourceTop, uint16_t sourceRight, uint16_t sourceBottom, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); uint16_t sourceWidth = sourceRight - sourceLeft; @@ -280,7 +262,6 @@ void BillboardSpriteBatch::AddSprite(BILLBOARDSPRITE_TYPE type, const Matrix4x4 void BillboardSpriteBatch::AddSprite(BILLBOARDSPRITE_TYPE type, const Matrix4x4 &transform, const Texture *texture, const Vector3 &offset, float width, float height, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); CheckForNewSpriteSpace(); SetSpriteInfo(m_currentSpritePointer, type, transform, texture, offset, width, height, texCoordLeft, texCoordTop, texCoordRight, texCoordBottom, color); @@ -289,7 +270,6 @@ void BillboardSpriteBatch::AddSprite(BILLBOARDSPRITE_TYPE type, const Matrix4x4 void BillboardSpriteBatch::SetSpriteInfo(uint32_t spriteIndex, BILLBOARDSPRITE_TYPE type, const Matrix4x4 &transform, const Texture *texture, const Vector3 &offset, float width, float height, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; uint32_t base = spriteIndex * VERTICES_PER_SPRITE; float halfWidth = width / 2.0f; @@ -338,7 +318,6 @@ void BillboardSpriteBatch::SetSpriteInfo(uint32_t spriteIndex, BILLBOARDSPRITE_T void BillboardSpriteBatch::End() { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); if (m_isRenderStateOverridden) @@ -361,7 +340,6 @@ void BillboardSpriteBatch::End() void BillboardSpriteBatch::RenderQueue() { - STACK_TRACE; m_graphicsDevice->BindVertexBuffer(m_vertices); const Texture *currentTexture = NULL; @@ -393,7 +371,6 @@ void BillboardSpriteBatch::RenderQueue() void BillboardSpriteBatch::RenderQueueRange(const Texture *texture, uint32_t firstSprite, uint32_t lastSprite) { - STACK_TRACE; const int TRIANGLES_PER_SPRITE = 2; uint32_t vertexOffset = firstSprite * VERTICES_PER_SPRITE; uint32_t numTriangles = (lastSprite - firstSprite) * TRIANGLES_PER_SPRITE; @@ -428,7 +405,6 @@ inline Matrix4x4 BillboardSpriteBatch::GetTransformFor(BILLBOARDSPRITE_TYPE type void BillboardSpriteBatch::CheckForNewSpriteSpace() { - STACK_TRACE; // m_currentSpritePointer = zero-based index // m_currentSpriteCapacity = count of items (not zero-based) if (m_currentSpritePointer >= m_currentSpriteCapacity) diff --git a/src/framework/graphics/blendstate.cpp b/src/framework/graphics/blendstate.cpp index 574e8e1..877cdb2 100644 --- a/src/framework/graphics/blendstate.cpp +++ b/src/framework/graphics/blendstate.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "blendstate.h" #include "glincludes.h" @@ -7,13 +5,11 @@ BlendState::BlendState() { - STACK_TRACE; Initialize(); } BlendState::BlendState(BLEND_FACTOR sourceFactor, BLEND_FACTOR destinationFactor) { - STACK_TRACE; Initialize(); m_blending = TRUE; @@ -23,12 +19,10 @@ BlendState::BlendState(BLEND_FACTOR sourceFactor, BLEND_FACTOR destinationFactor BlendState::~BlendState() { - STACK_TRACE; } void BlendState::Initialize() { - STACK_TRACE; m_blending = FALSE; m_sourceBlendFactor = ONE; m_destBlendFactor = ZERO; @@ -36,7 +30,6 @@ void BlendState::Initialize() void BlendState::Apply() const { - STACK_TRACE; if (m_blending) { GL_CALL(glEnable(GL_BLEND)); @@ -50,7 +43,6 @@ void BlendState::Apply() const int BlendState::FindBlendFactorValue(BLEND_FACTOR factor) const { - STACK_TRACE; switch (factor) { case ZERO: return GL_ZERO; diff --git a/src/framework/graphics/bufferobject.cpp b/src/framework/graphics/bufferobject.cpp index 746fe79..33d960e 100644 --- a/src/framework/graphics/bufferobject.cpp +++ b/src/framework/graphics/bufferobject.cpp @@ -6,7 +6,6 @@ BufferObject::BufferObject() { - STACK_TRACE; m_type = BUFFEROBJECT_TYPE_VERTEX; m_usage = BUFFEROBJECT_USAGE_STATIC; m_bufferId = 0; @@ -16,7 +15,6 @@ BufferObject::BufferObject() void BufferObject::Release() { - STACK_TRACE; if (!IsClientSideBuffer()) FreeBufferObject(); @@ -31,7 +29,6 @@ void BufferObject::Release() BOOL BufferObject::Initialize(GraphicsDevice *graphicsDevice, BUFFEROBJECT_TYPE type, BUFFEROBJECT_USAGE usage) { - STACK_TRACE; BOOL success = TRUE; if (graphicsDevice != NULL) success = GraphicsContextResource::Initialize(graphicsDevice); @@ -46,14 +43,12 @@ BOOL BufferObject::Initialize(GraphicsDevice *graphicsDevice, BUFFEROBJECT_TYPE void BufferObject::CreateOnGpu() { - STACK_TRACE; ASSERT(IsClientSideBuffer() == TRUE); CreateBufferObject(); } void BufferObject::RecreateOnGpu() { - STACK_TRACE; ASSERT(IsClientSideBuffer() == FALSE); FreeBufferObject(); CreateBufferObject(); @@ -61,14 +56,12 @@ void BufferObject::RecreateOnGpu() void BufferObject::FreeFromGpu() { - STACK_TRACE; ASSERT(IsClientSideBuffer() == FALSE); FreeBufferObject(); } void BufferObject::CreateBufferObject() { - STACK_TRACE; GL_CALL(glGenBuffers(1, &m_bufferId)); SizeBufferObject(); @@ -77,7 +70,6 @@ void BufferObject::CreateBufferObject() void BufferObject::FreeBufferObject() { - STACK_TRACE; ASSERT(m_bufferId != 0); GL_CALL(glDeleteBuffers(1, &m_bufferId)); @@ -88,7 +80,6 @@ void BufferObject::FreeBufferObject() void BufferObject::Update() { - STACK_TRACE; ASSERT(IsClientSideBuffer() == FALSE); ASSERT(IsDirty() == TRUE); ASSERT(GetNumElements() > 0); @@ -142,7 +133,6 @@ void BufferObject::Update() void BufferObject::SizeBufferObject() { - STACK_TRACE; ASSERT(IsClientSideBuffer() == FALSE); ASSERT(GetNumElements() > 0); ASSERT(GetElementWidthInBytes() > 0); @@ -175,11 +165,9 @@ void BufferObject::SizeBufferObject() void BufferObject::OnNewContext() { - STACK_TRACE; RecreateOnGpu(); } void BufferObject::OnLostContext() { - STACK_TRACE; } diff --git a/src/framework/graphics/customspriteshader.cpp b/src/framework/graphics/customspriteshader.cpp index 8f47b3e..bb25b6b 100644 --- a/src/framework/graphics/customspriteshader.cpp +++ b/src/framework/graphics/customspriteshader.cpp @@ -4,17 +4,14 @@ CustomSpriteShader::CustomSpriteShader() { - STACK_TRACE; } CustomSpriteShader::~CustomSpriteShader() { - STACK_TRACE; } BOOL CustomSpriteShader::Initialize(GraphicsDevice *graphicsDevice, const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; if (!SpriteShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return FALSE; @@ -27,7 +24,6 @@ BOOL CustomSpriteShader::Initialize(GraphicsDevice *graphicsDevice, const char * BOOL CustomSpriteShader::Initialize(GraphicsDevice *graphicsDevice, const Text *vertexShaderSource, const Text *fragmentShaderSource) { - STACK_TRACE; if (!SpriteShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return FALSE; diff --git a/src/framework/graphics/customstandardshader.cpp b/src/framework/graphics/customstandardshader.cpp index e00770d..e9387a5 100644 --- a/src/framework/graphics/customstandardshader.cpp +++ b/src/framework/graphics/customstandardshader.cpp @@ -4,17 +4,14 @@ CustomStandardShader::CustomStandardShader() { - STACK_TRACE; } CustomStandardShader::~CustomStandardShader() { - STACK_TRACE; } BOOL CustomStandardShader::Initialize(GraphicsDevice *graphicsDevice, const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; if (!StandardShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return FALSE; @@ -26,7 +23,6 @@ BOOL CustomStandardShader::Initialize(GraphicsDevice *graphicsDevice, const char BOOL CustomStandardShader::Initialize(GraphicsDevice *graphicsDevice, const Text *vertexShaderSource, const Text *fragmentShaderSource) { - STACK_TRACE; if (!StandardShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return FALSE; diff --git a/src/framework/graphics/customtextureatlas.cpp b/src/framework/graphics/customtextureatlas.cpp index 7e737ca..7d9c7b2 100644 --- a/src/framework/graphics/customtextureatlas.cpp +++ b/src/framework/graphics/customtextureatlas.cpp @@ -8,29 +8,24 @@ CustomTextureAtlas::CustomTextureAtlas(uint16_t textureWidth, uint16_t textureHeight, float texCoordEdgeOffset) : TextureAtlas(textureWidth, textureHeight, texCoordEdgeOffset) { - STACK_TRACE; } CustomTextureAtlas::CustomTextureAtlas(Texture *source, float texCoordEdgeOffset) : TextureAtlas(source, texCoordEdgeOffset) { - STACK_TRACE; } CustomTextureAtlas::~CustomTextureAtlas() { - STACK_TRACE; } uint32_t CustomTextureAtlas::Add(const Rect &position) { - STACK_TRACE; return Add(position.left, position.top, position.right, position.bottom); } uint32_t CustomTextureAtlas::Add(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { - STACK_TRACE; ASSERT(right <= GetWidth()); ASSERT(bottom <= GetHeight()); ASSERT(left < right); @@ -61,6 +56,5 @@ uint32_t CustomTextureAtlas::Add(uint16_t left, uint16_t top, uint16_t right, ui void CustomTextureAtlas::Reset() { - STACK_TRACE; m_tiles.clear(); } diff --git a/src/framework/graphics/customvertexlerpshader.cpp b/src/framework/graphics/customvertexlerpshader.cpp index a16f6c2..477ea8f 100644 --- a/src/framework/graphics/customvertexlerpshader.cpp +++ b/src/framework/graphics/customvertexlerpshader.cpp @@ -4,17 +4,14 @@ CustomVertexLerpShader::CustomVertexLerpShader() { - STACK_TRACE; } CustomVertexLerpShader::~CustomVertexLerpShader() { - STACK_TRACE; } BOOL CustomVertexLerpShader::Initialize(GraphicsDevice *graphicsDevice, const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; if (!VertexLerpShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return FALSE; @@ -27,7 +24,6 @@ BOOL CustomVertexLerpShader::Initialize(GraphicsDevice *graphicsDevice, const ch BOOL CustomVertexLerpShader::Initialize(GraphicsDevice *graphicsDevice, const Text *vertexShaderSource, const Text *fragmentShaderSource) { - STACK_TRACE; if (!VertexLerpShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return FALSE; diff --git a/src/framework/graphics/customvertexskinningshader.cpp b/src/framework/graphics/customvertexskinningshader.cpp index 4e63d43..854b581 100644 --- a/src/framework/graphics/customvertexskinningshader.cpp +++ b/src/framework/graphics/customvertexskinningshader.cpp @@ -5,17 +5,14 @@ CustomVertexSkinningShader::CustomVertexSkinningShader() { - STACK_TRACE; } CustomVertexSkinningShader::~CustomVertexSkinningShader() { - STACK_TRACE; } BOOL CustomVertexSkinningShader::Initialize(GraphicsDevice *graphicsDevice, const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; if (!VertexSkinningShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return FALSE; @@ -29,7 +26,6 @@ BOOL CustomVertexSkinningShader::Initialize(GraphicsDevice *graphicsDevice, cons BOOL CustomVertexSkinningShader::Initialize(GraphicsDevice *graphicsDevice, const Text *vertexShaderSource, const Text *fragmentShaderSource) { - STACK_TRACE; if (!VertexSkinningShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return FALSE; diff --git a/src/framework/graphics/debugshader.cpp b/src/framework/graphics/debugshader.cpp index 87a6bc9..a0f38cd 100644 --- a/src/framework/graphics/debugshader.cpp +++ b/src/framework/graphics/debugshader.cpp @@ -32,17 +32,14 @@ const char* DebugShader::m_fragmentShaderSource = DebugShader::DebugShader() { - STACK_TRACE; } DebugShader::~DebugShader() { - STACK_TRACE; } BOOL DebugShader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!StandardShader::Initialize(graphicsDevice)) return FALSE; diff --git a/src/framework/graphics/framebuffer.cpp b/src/framework/graphics/framebuffer.cpp index 95534d9..84a69a1 100644 --- a/src/framework/graphics/framebuffer.cpp +++ b/src/framework/graphics/framebuffer.cpp @@ -15,7 +15,6 @@ Framebuffer::Framebuffer() { - STACK_TRACE; m_viewContext = NULL; m_framebufferName = 0; m_fixedWidth = 0; @@ -24,7 +23,6 @@ Framebuffer::Framebuffer() BOOL Framebuffer::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; ASSERT(m_framebufferName == 0); if (m_framebufferName != 0) return FALSE; @@ -43,7 +41,6 @@ BOOL Framebuffer::Initialize(GraphicsDevice *graphicsDevice) BOOL Framebuffer::Initialize(GraphicsDevice *graphicsDevice, uint16_t fixedWidth, uint16_t fixedHeight) { - STACK_TRACE; ASSERT(fixedWidth != 0); ASSERT(fixedHeight != 0); if (fixedWidth == 0 || fixedHeight == 0) @@ -61,7 +58,6 @@ BOOL Framebuffer::Initialize(GraphicsDevice *graphicsDevice, uint16_t fixedWidth void Framebuffer::Release() { - STACK_TRACE; if (m_framebufferName != 0) { for (FramebufferRenderbufferMap::iterator i = m_renderbuffers.begin(); i != m_renderbuffers.end(); ++i) @@ -98,14 +94,12 @@ void Framebuffer::Release() void Framebuffer::CreateFramebuffer() { - STACK_TRACE; ASSERT(m_framebufferName == 0); GL_CALL(glGenFramebuffers(1, &m_framebufferName)); } BOOL Framebuffer::AttachViewContext() { - STACK_TRACE; ASSERT(m_framebufferName != 0); if (m_framebufferName == 0) return FALSE; @@ -131,7 +125,6 @@ BOOL Framebuffer::AttachViewContext() BOOL Framebuffer::AttachTexture(FRAMEBUFFER_DATA_TYPE type) { - STACK_TRACE; ASSERT(m_framebufferName != 0); if (m_framebufferName == 0) return FALSE; @@ -204,7 +197,6 @@ BOOL Framebuffer::AttachTexture(FRAMEBUFFER_DATA_TYPE type) BOOL Framebuffer::ReCreateAndAttach(FramebufferTextureMap::iterator &itor, BOOL releaseFirst) { - STACK_TRACE; Texture *existing = itor->second; // determine attachment type @@ -243,7 +235,6 @@ BOOL Framebuffer::ReCreateAndAttach(FramebufferTextureMap::iterator &itor, BOOL BOOL Framebuffer::AttachRenderbuffer(FRAMEBUFFER_DATA_TYPE type) { - STACK_TRACE; ASSERT(m_framebufferName != 0); if (m_framebufferName == 0) return FALSE; @@ -301,7 +292,6 @@ BOOL Framebuffer::AttachRenderbuffer(FRAMEBUFFER_DATA_TYPE type) BOOL Framebuffer::ReCreateAndAttach(FramebufferRenderbufferMap::iterator &itor, BOOL releaseFirst) { - STACK_TRACE; Renderbuffer *existing = itor->second; // determine framebuffer attachment type @@ -341,7 +331,6 @@ BOOL Framebuffer::ReCreateAndAttach(FramebufferRenderbufferMap::iterator &itor, BOOL Framebuffer::ReleaseViewContext() { - STACK_TRACE; ASSERT(m_framebufferName != 0); if (m_framebufferName == 0) return FALSE; @@ -360,7 +349,6 @@ BOOL Framebuffer::ReleaseViewContext() BOOL Framebuffer::ReleaseTexture(FRAMEBUFFER_DATA_TYPE type) { - STACK_TRACE; ASSERT(m_framebufferName != 0); if (m_framebufferName == 0) return FALSE; @@ -404,7 +392,6 @@ BOOL Framebuffer::ReleaseTexture(FRAMEBUFFER_DATA_TYPE type) BOOL Framebuffer::ReleaseRenderbuffer(FRAMEBUFFER_DATA_TYPE type) { - STACK_TRACE; ASSERT(m_framebufferName != 0); if (m_framebufferName == 0) return FALSE; @@ -448,7 +435,6 @@ BOOL Framebuffer::ReleaseRenderbuffer(FRAMEBUFFER_DATA_TYPE type) Texture* Framebuffer::GetTexture(FRAMEBUFFER_DATA_TYPE type) const { - STACK_TRACE; ASSERT(m_framebufferName != 0); if (m_framebufferName == 0) return NULL; @@ -474,7 +460,6 @@ Texture* Framebuffer::GetTexture(FRAMEBUFFER_DATA_TYPE type) const Renderbuffer* Framebuffer::GetRenderbuffer(FRAMEBUFFER_DATA_TYPE type) const { - STACK_TRACE; ASSERT(m_framebufferName != 0); if (m_framebufferName == 0) return NULL; @@ -500,7 +485,6 @@ Renderbuffer* Framebuffer::GetRenderbuffer(FRAMEBUFFER_DATA_TYPE type) const void Framebuffer::OnNewContext() { - STACK_TRACE; if (m_framebufferName == 0 && GetGraphicsDevice() != NULL) { // recreate the framebuffer @@ -537,7 +521,6 @@ void Framebuffer::OnNewContext() void Framebuffer::OnLostContext() { - STACK_TRACE; m_framebufferName = 0; if (m_viewContext != NULL) m_viewContext->OnLostContext(); @@ -549,7 +532,6 @@ void Framebuffer::OnLostContext() void Framebuffer::OnResize() { - STACK_TRACE; if (m_framebufferName != 0 && GetGraphicsDevice() != NULL) { if (m_viewContext != NULL) @@ -586,17 +568,14 @@ void Framebuffer::OnResize() void Framebuffer::OnBind() { - STACK_TRACE; } void Framebuffer::OnUnBind() { - STACK_TRACE; } BOOL Framebuffer::RemoveTexture(Texture *texture) { - STACK_TRACE; for (FramebufferTextureMap::iterator i = m_textures.begin(); i != m_textures.end(); ++i) { if (i->second == texture) @@ -612,7 +591,6 @@ BOOL Framebuffer::RemoveTexture(Texture *texture) BOOL Framebuffer::RemoveRenderbuffer(Renderbuffer *renderbuffer) { - STACK_TRACE; for (FramebufferRenderbufferMap::iterator i = m_renderbuffers.begin(); i != m_renderbuffers.end(); ++i) { if (i->second == renderbuffer) @@ -628,7 +606,6 @@ BOOL Framebuffer::RemoveRenderbuffer(Renderbuffer *renderbuffer) void Framebuffer::GetDimensionsForAttachment(uint16_t &width, uint16_t &height) const { - STACK_TRACE; if (IsUsingFixedDimensions()) { width = m_fixedWidth; diff --git a/src/framework/graphics/geometrydebugrenderer.cpp b/src/framework/graphics/geometrydebugrenderer.cpp index 7393772..16bcb2c 100644 --- a/src/framework/graphics/geometrydebugrenderer.cpp +++ b/src/framework/graphics/geometrydebugrenderer.cpp @@ -18,7 +18,6 @@ GeometryDebugRenderer::GeometryDebugRenderer(GraphicsDevice *graphicsDevice, BOOL depthTesting) { - STACK_TRACE; m_graphicsDevice = graphicsDevice; m_color1 = Color(1.0f, 1.0f, 0.0f); m_color2 = Color(1.0f, 0.0f, 0.0f); @@ -43,21 +42,18 @@ GeometryDebugRenderer::GeometryDebugRenderer(GraphicsDevice *graphicsDevice, BOO GeometryDebugRenderer::~GeometryDebugRenderer() { - STACK_TRACE; SAFE_DELETE(m_vertices); SAFE_DELETE(m_renderState); } void GeometryDebugRenderer::Begin() { - STACK_TRACE; m_currentVertex = 0; m_begunRendering = TRUE; } void GeometryDebugRenderer::Render(const BoundingBox &box, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); ASSERT(m_vertices->GetNumElements() > (m_currentVertex + 24)); @@ -115,14 +111,12 @@ void GeometryDebugRenderer::Render(const BoundingBox &box, const Color &color) void GeometryDebugRenderer::Render(const Point3 &boxMin, const Point3 &boxMax, const Color &color) { - STACK_TRACE; BoundingBox b((float)boxMin.x, (float)boxMin.y, (float)boxMin.z, (float)boxMax.x, (float)boxMax.y, (float)boxMax.z); Render(b, color); } void GeometryDebugRenderer::Render(const BoundingSphere &sphere, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); ASSERT(m_vertices->GetNumElements() > (m_currentVertex + 615)); @@ -184,7 +178,6 @@ void GeometryDebugRenderer::Render(const BoundingSphere &sphere, const Color &co void GeometryDebugRenderer::Render(const Ray &ray, float length, const Color &color1, const Color &color2) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); ASSERT(m_vertices->GetNumElements() > (m_currentVertex + 2)); @@ -200,7 +193,6 @@ void GeometryDebugRenderer::Render(const Ray &ray, float length, const Color &co void GeometryDebugRenderer::Render(const LineSegment &line, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); ASSERT(m_vertices->GetNumElements() > (m_currentVertex + 2)); @@ -214,7 +206,6 @@ void GeometryDebugRenderer::Render(const LineSegment &line, const Color &color) void GeometryDebugRenderer::Render(const Vector3 &a, const Vector3 &b, const Vector3 &c, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); ASSERT(m_vertices->GetNumElements() > (m_currentVertex + 6)); @@ -236,7 +227,6 @@ void GeometryDebugRenderer::Render(const Vector3 &a, const Vector3 &b, const Vec void GeometryDebugRenderer::End() { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); if (m_currentVertex > 0) diff --git a/src/framework/graphics/glutils.cpp b/src/framework/graphics/glutils.cpp index c9dc81c..9e64af1 100644 --- a/src/framework/graphics/glutils.cpp +++ b/src/framework/graphics/glutils.cpp @@ -5,7 +5,6 @@ BOOL IsGLExtensionPresent(const char* extension) { - STACK_TRACE; ASSERT(extension != NULL); ASSERT(strlen(extension) > 0); diff --git a/src/framework/graphics/graphicscontextresource.cpp b/src/framework/graphics/graphicscontextresource.cpp index 7cec9af..e416d49 100644 --- a/src/framework/graphics/graphicscontextresource.cpp +++ b/src/framework/graphics/graphicscontextresource.cpp @@ -5,13 +5,11 @@ GraphicsContextResource::GraphicsContextResource() { - STACK_TRACE; m_graphicsDevice = NULL; } void GraphicsContextResource::Release() { - STACK_TRACE; if (m_graphicsDevice != NULL) m_graphicsDevice->UnregisterManagedResource(this); @@ -20,7 +18,6 @@ void GraphicsContextResource::Release() BOOL GraphicsContextResource::Initialize() { - STACK_TRACE; ASSERT(m_graphicsDevice == NULL); if (m_graphicsDevice != NULL) return FALSE; @@ -30,7 +27,6 @@ BOOL GraphicsContextResource::Initialize() BOOL GraphicsContextResource::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; ASSERT(m_graphicsDevice == NULL); if (m_graphicsDevice != NULL) return FALSE; diff --git a/src/framework/graphics/graphicsdevice.cpp b/src/framework/graphics/graphicsdevice.cpp index a9f72cb..479af57 100644 --- a/src/framework/graphics/graphicsdevice.cpp +++ b/src/framework/graphics/graphicsdevice.cpp @@ -44,7 +44,6 @@ const unsigned int MAX_GPU_ATTRIB_SLOTS = 8; GraphicsDevice::GraphicsDevice() { - STACK_TRACE; m_hasNewContextRunYet = FALSE; m_boundVertexBuffer = NULL; m_boundIndexBuffer = NULL; @@ -72,7 +71,6 @@ GraphicsDevice::GraphicsDevice() BOOL GraphicsDevice::Initialize(GameWindow *window) { - STACK_TRACE; ASSERT(m_window == NULL); if (m_window != NULL) return FALSE; @@ -113,7 +111,6 @@ BOOL GraphicsDevice::Initialize(GameWindow *window) void GraphicsDevice::Release() { - STACK_TRACE; SAFE_DELETE(m_defaultViewContext); SAFE_DELETE(m_debugRenderer); SAFE_DELETE(m_solidColorTextures); @@ -144,7 +141,6 @@ void GraphicsDevice::Release() SimpleColorShader* GraphicsDevice::GetSimpleColorShader() { - STACK_TRACE; if (m_simpleColorShader == NULL) { m_simpleColorShader = new SimpleColorShader(); @@ -156,7 +152,6 @@ SimpleColorShader* GraphicsDevice::GetSimpleColorShader() SimpleColorTextureShader* GraphicsDevice::GetSimpleColorTextureShader() { - STACK_TRACE; if (m_simpleColorTextureShader == NULL) { m_simpleColorTextureShader = new SimpleColorTextureShader(); @@ -168,7 +163,6 @@ SimpleColorTextureShader* GraphicsDevice::GetSimpleColorTextureShader() SimpleTextureShader* GraphicsDevice::GetSimpleTextureShader() { - STACK_TRACE; if (m_simpleTextureShader == NULL) { m_simpleTextureShader = new SimpleTextureShader(); @@ -180,7 +174,6 @@ SimpleTextureShader* GraphicsDevice::GetSimpleTextureShader() Sprite2DShader* GraphicsDevice::GetSprite2DShader() { - STACK_TRACE; if (m_sprite2dShader == NULL) { m_sprite2dShader = new Sprite2DShader(); @@ -192,7 +185,6 @@ Sprite2DShader* GraphicsDevice::GetSprite2DShader() Sprite3DShader* GraphicsDevice::GetSprite3DShader() { - STACK_TRACE; if (m_sprite3dShader == NULL) { m_sprite3dShader = new Sprite3DShader(); @@ -204,7 +196,6 @@ Sprite3DShader* GraphicsDevice::GetSprite3DShader() SimpleTextureVertexLerpShader* GraphicsDevice::GetSimpleTextureVertexLerpShader() { - STACK_TRACE; if (m_simpleTextureVertexLerpShader == NULL) { m_simpleTextureVertexLerpShader = new SimpleTextureVertexLerpShader(); @@ -216,7 +207,6 @@ SimpleTextureVertexLerpShader* GraphicsDevice::GetSimpleTextureVertexLerpShader( SimpleTextureVertexSkinningShader* GraphicsDevice::GetSimpleTextureVertexSkinningShader() { - STACK_TRACE; if (m_simpleTextureVertexSkinningShader == NULL) { m_simpleTextureVertexSkinningShader = new SimpleTextureVertexSkinningShader(); @@ -228,7 +218,6 @@ SimpleTextureVertexSkinningShader* GraphicsDevice::GetSimpleTextureVertexSkinnin DebugShader* GraphicsDevice::GetDebugShader() { - STACK_TRACE; if (m_debugShader == NULL) { m_debugShader = new DebugShader(); @@ -240,7 +229,6 @@ DebugShader* GraphicsDevice::GetDebugShader() void GraphicsDevice::OnNewContext() { - STACK_TRACE; LOG_INFO(LOGCAT_GRAPHICS, "Initializing default state for new OpenGL context.\n"); m_activeViewContext->OnNewContext(); @@ -273,7 +261,6 @@ void GraphicsDevice::OnNewContext() void GraphicsDevice::OnLostContext() { - STACK_TRACE; LOG_INFO(LOGCAT_GRAPHICS, "Cleaning up objects/state specific to the lost OpenGL context.\n"); m_activeViewContext->OnLostContext(); @@ -288,8 +275,6 @@ void GraphicsDevice::OnLostContext() void GraphicsDevice::OnResize(const Rect &size) { - STACK_TRACE; - LOG_INFO(LOGCAT_GRAPHICS, "Window resized (%d, %d) - (%d, %d).\n", size.left, size.top, size.GetWidth(), size.GetHeight()); if (m_window->GetScreenOrientation() != SCREEN_ANGLE_0) LOG_INFO(LOGCAT_GRAPHICS, "Screen is rotated (angle = %d).\n", (int)m_window->GetScreenOrientation()); @@ -298,7 +283,6 @@ void GraphicsDevice::OnResize(const Rect &size) void GraphicsDevice::OnRender() { - STACK_TRACE; GLenum error = glGetError(); ASSERT(error == GL_NO_ERROR); if (error != GL_NO_ERROR) @@ -315,26 +299,22 @@ void GraphicsDevice::OnRender() void GraphicsDevice::Clear(float r, float g, float b, float a) { - STACK_TRACE; GL_CALL(glClearColor(r, g, b, a)); GL_CALL(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)); } void GraphicsDevice::Clear(const Color &color) { - STACK_TRACE; Clear(color.r, color.g, color.b, color.a); } Texture* GraphicsDevice::GetSolidColorTexture(const Color &color) { - STACK_TRACE; return m_solidColorTextures->Get(color); } void GraphicsDevice::BindTexture(const Texture *texture, uint32_t unit) { - STACK_TRACE; ASSERT(unit < MAX_BOUND_TEXTURES); ASSERT(texture != NULL); ASSERT(texture->IsInvalidated() == FALSE); @@ -348,14 +328,12 @@ void GraphicsDevice::BindTexture(const Texture *texture, uint32_t unit) void GraphicsDevice::BindSolidColorTexture(const Color &color, uint32_t unit) { - STACK_TRACE; Texture *texture = m_solidColorTextures->Get(color); BindTexture(texture, unit); } void GraphicsDevice::UnbindTexture(uint32_t unit) { - STACK_TRACE; ASSERT(unit < MAX_BOUND_TEXTURES); GL_CALL(glActiveTexture(GL_TEXTURE0 + unit)); GL_CALL(glBindTexture(GL_TEXTURE_2D, 0)); @@ -364,7 +342,6 @@ void GraphicsDevice::UnbindTexture(uint32_t unit) void GraphicsDevice::UnbindTexture(const Texture *texture) { - STACK_TRACE; ASSERT(texture != NULL); if (texture == NULL) return; @@ -378,7 +355,6 @@ void GraphicsDevice::UnbindTexture(const Texture *texture) void GraphicsDevice::BindRenderbuffer(Renderbuffer *renderbuffer) { - STACK_TRACE; ASSERT(renderbuffer != NULL); ASSERT(renderbuffer->IsInvalidated() == FALSE); if (m_boundRenderbuffer != renderbuffer) @@ -390,14 +366,12 @@ void GraphicsDevice::BindRenderbuffer(Renderbuffer *renderbuffer) void GraphicsDevice::UnbindRenderbuffer() { - STACK_TRACE; GL_CALL(glBindRenderbuffer(GL_RENDERBUFFER, 0)); m_boundRenderbuffer = NULL; } void GraphicsDevice::UnbindRenderBuffer(Renderbuffer *renderBuffer) { - STACK_TRACE; ASSERT(renderBuffer != NULL); if (renderBuffer == NULL) return; @@ -408,7 +382,6 @@ void GraphicsDevice::UnbindRenderBuffer(Renderbuffer *renderBuffer) void GraphicsDevice::BindFramebuffer(Framebuffer *framebuffer) { - STACK_TRACE; ASSERT(framebuffer != NULL); ASSERT(framebuffer->IsInvalidated() == FALSE); if (m_boundFramebuffer != framebuffer) @@ -421,7 +394,6 @@ void GraphicsDevice::BindFramebuffer(Framebuffer *framebuffer) void GraphicsDevice::UnbindFramebuffer() { - STACK_TRACE; GL_CALL(glBindFramebuffer(GL_FRAMEBUFFER, 0)); if (m_boundFramebuffer != NULL) m_boundFramebuffer->OnUnBind(); @@ -430,7 +402,6 @@ void GraphicsDevice::UnbindFramebuffer() void GraphicsDevice::UnbindFramebuffer(Framebuffer *framebuffer) { - STACK_TRACE; ASSERT(framebuffer != NULL); if (framebuffer == NULL) return; @@ -441,7 +412,6 @@ void GraphicsDevice::UnbindFramebuffer(Framebuffer *framebuffer) void GraphicsDevice::SetViewContext(ViewContext *viewContext) { - STACK_TRACE; if (viewContext == m_activeViewContext) return; // nothing has changed @@ -455,7 +425,6 @@ void GraphicsDevice::SetViewContext(ViewContext *viewContext) void GraphicsDevice::RegisterManagedResource(GraphicsContextResource *resource) { - STACK_TRACE; ASSERT(resource != NULL); // make sure this resource isn't in our list already @@ -472,20 +441,17 @@ void GraphicsDevice::RegisterManagedResource(GraphicsContextResource *resource) void GraphicsDevice::UnregisterManagedResource(GraphicsContextResource *resource) { - STACK_TRACE; ASSERT(resource != NULL); m_managedResources.remove(resource); } void GraphicsDevice::UnregisterAllManagedResources() { - STACK_TRACE; m_managedResources.clear(); } void GraphicsDevice::BindVertexBuffer(VertexBuffer *buffer) { - STACK_TRACE; ASSERT(buffer != NULL); ASSERT(buffer->GetNumElements() > 0); @@ -505,7 +471,6 @@ void GraphicsDevice::BindVertexBuffer(VertexBuffer *buffer) void GraphicsDevice::UnbindVertexBuffer() { - STACK_TRACE; GL_CALL(glBindBuffer(GL_ARRAY_BUFFER, 0)); m_boundVertexBuffer = NULL; @@ -515,7 +480,6 @@ void GraphicsDevice::UnbindVertexBuffer() void GraphicsDevice::BindIndexBuffer(IndexBuffer *buffer) { - STACK_TRACE; ASSERT(buffer != NULL); ASSERT(buffer->GetNumElements() > 0); @@ -533,7 +497,6 @@ void GraphicsDevice::BindIndexBuffer(IndexBuffer *buffer) void GraphicsDevice::UnbindIndexBuffer() { - STACK_TRACE; GL_CALL(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)); m_boundIndexBuffer = NULL; @@ -541,7 +504,6 @@ void GraphicsDevice::UnbindIndexBuffer() void GraphicsDevice::BindShader(Shader *shader) { - STACK_TRACE; ASSERT(shader != NULL); ASSERT(shader->IsReadyForUse() == TRUE); GL_CALL(glUseProgram(shader->GetProgramId())); @@ -555,7 +517,6 @@ void GraphicsDevice::BindShader(Shader *shader) void GraphicsDevice::UnbindShader() { - STACK_TRACE; GL_CALL(glUseProgram(0)); if (m_boundShader != NULL) @@ -568,7 +529,6 @@ void GraphicsDevice::UnbindShader() void GraphicsDevice::BindVBO(VertexBuffer *buffer) { - STACK_TRACE; if (buffer->IsDirty()) buffer->Update(); @@ -577,13 +537,11 @@ void GraphicsDevice::BindVBO(VertexBuffer *buffer) void GraphicsDevice::BindClientBuffer(VertexBuffer *buffer) { - STACK_TRACE; GL_CALL(glBindBuffer(GL_ARRAY_BUFFER, 0)); } void GraphicsDevice::BindIBO(IndexBuffer *buffer) { - STACK_TRACE; if (buffer->IsDirty()) buffer->Update(); @@ -592,13 +550,11 @@ void GraphicsDevice::BindIBO(IndexBuffer *buffer) void GraphicsDevice::BindClientBuffer(IndexBuffer *buffer) { - STACK_TRACE; GL_CALL(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)); } void GraphicsDevice::SetShaderVertexAttributes() { - STACK_TRACE; ASSERT(m_boundVertexBuffer != NULL); ASSERT(m_boundShader != NULL); ASSERT(m_enabledVertexAttribIndices.empty() == TRUE); @@ -647,7 +603,6 @@ void GraphicsDevice::SetShaderVertexAttributes() void GraphicsDevice::ClearSetShaderVertexAttributes() { - STACK_TRACE; while (!m_enabledVertexAttribIndices.empty()) { uint32_t index = m_enabledVertexAttribIndices.back(); @@ -660,7 +615,6 @@ void GraphicsDevice::ClearSetShaderVertexAttributes() void GraphicsDevice::RenderTriangles(const IndexBuffer *buffer) { - STACK_TRACE; ASSERT(buffer != NULL); ASSERT(buffer->IsClientSideBuffer() == TRUE); ASSERT(m_boundVertexBuffer != NULL); @@ -674,7 +628,6 @@ void GraphicsDevice::RenderTriangles(const IndexBuffer *buffer) void GraphicsDevice::RenderTriangles() { - STACK_TRACE; ASSERT(m_boundVertexBuffer != NULL); if (!m_shaderVertexAttribsSet) SetShaderVertexAttributes(); @@ -706,7 +659,6 @@ void GraphicsDevice::RenderTriangles() void GraphicsDevice::RenderTriangles(uint32_t startVertex, uint32_t numTriangles) { - STACK_TRACE; ASSERT(m_boundVertexBuffer != NULL); if (!m_shaderVertexAttribsSet) SetShaderVertexAttributes(); @@ -739,7 +691,6 @@ void GraphicsDevice::RenderTriangles(uint32_t startVertex, uint32_t numTriangles void GraphicsDevice::RenderLines(const IndexBuffer *buffer) { - STACK_TRACE; ASSERT(buffer != NULL); ASSERT(buffer->IsClientSideBuffer() == TRUE); ASSERT(m_boundVertexBuffer != NULL); @@ -753,7 +704,6 @@ void GraphicsDevice::RenderLines(const IndexBuffer *buffer) void GraphicsDevice::RenderLines() { - STACK_TRACE; ASSERT(m_boundVertexBuffer != NULL); if (!m_shaderVertexAttribsSet) SetShaderVertexAttributes(); @@ -785,7 +735,6 @@ void GraphicsDevice::RenderLines() void GraphicsDevice::RenderLines(uint32_t startVertex, uint32_t numLines) { - STACK_TRACE; ASSERT(m_boundVertexBuffer != NULL); if (!m_shaderVertexAttribsSet) SetShaderVertexAttributes(); @@ -818,7 +767,6 @@ void GraphicsDevice::RenderLines(uint32_t startVertex, uint32_t numLines) void GraphicsDevice::RenderPoints(const IndexBuffer *buffer) { - STACK_TRACE; ASSERT(buffer != NULL); ASSERT(buffer->IsClientSideBuffer() == TRUE); ASSERT(m_boundVertexBuffer != NULL); @@ -831,7 +779,6 @@ void GraphicsDevice::RenderPoints(const IndexBuffer *buffer) void GraphicsDevice::RenderPoints() { - STACK_TRACE; ASSERT(m_boundVertexBuffer != NULL); if (!m_shaderVertexAttribsSet) SetShaderVertexAttributes(); @@ -861,7 +808,6 @@ void GraphicsDevice::RenderPoints() void GraphicsDevice::RenderPoints(uint32_t startVertex, uint32_t numPoints) { - STACK_TRACE; ASSERT(m_boundVertexBuffer != NULL); if (!m_shaderVertexAttribsSet) SetShaderVertexAttributes(); diff --git a/src/framework/graphics/gridtextureatlas.cpp b/src/framework/graphics/gridtextureatlas.cpp index 6be2f21..2198021 100644 --- a/src/framework/graphics/gridtextureatlas.cpp +++ b/src/framework/graphics/gridtextureatlas.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "gridtextureatlas.h" #include "texture.h" @@ -7,25 +5,21 @@ GridTextureAtlas::GridTextureAtlas(uint16_t textureWidth, uint16_t textureHeight, uint16_t tileWidth, uint16_t tileHeight, uint16_t tileBorder, float texCoordEdgeOffset) : TextureAtlas(textureWidth, textureHeight, texCoordEdgeOffset) { - STACK_TRACE; GenerateGrid(tileWidth, tileHeight, tileBorder); } GridTextureAtlas::GridTextureAtlas(Texture *source, uint16_t tileWidth, uint16_t tileHeight, uint16_t tileBorder, float texCoordEdgeOffset) : TextureAtlas(source, texCoordEdgeOffset) { - STACK_TRACE; GenerateGrid(tileWidth, tileHeight, tileBorder); } GridTextureAtlas::~GridTextureAtlas() { - STACK_TRACE; } void GridTextureAtlas::GenerateGrid(uint16_t tileWidth, uint16_t tileHeight, uint16_t tileBorder) { - STACK_TRACE; m_tileWidth = tileWidth; m_tileHeight = tileHeight; diff --git a/src/framework/graphics/image.cpp b/src/framework/graphics/image.cpp index b596440..2dbdfa7 100644 --- a/src/framework/graphics/image.cpp +++ b/src/framework/graphics/image.cpp @@ -13,7 +13,6 @@ Image::Image() { - STACK_TRACE; m_pixels = NULL; m_width = 0; m_height = 0; @@ -24,7 +23,6 @@ Image::Image() void Image::Release() { - STACK_TRACE; SAFE_DELETE(m_pixels); m_width = 0; m_height = 0; @@ -36,7 +34,6 @@ void Image::Release() BOOL Image::Create(uint16_t width, uint16_t height, IMAGE_FORMAT format) { - STACK_TRACE; ASSERT(m_pixels == NULL); if (m_pixels != NULL) return FALSE; @@ -73,7 +70,6 @@ BOOL Image::Create(uint16_t width, uint16_t height, IMAGE_FORMAT format) BOOL Image::Create(const Image *source) { - STACK_TRACE; ASSERT(source != NULL); if (source == NULL) return FALSE; @@ -83,7 +79,6 @@ BOOL Image::Create(const Image *source) BOOL Image::Create(const Image *source, uint16_t x, uint16_t y, uint16_t width, uint16_t height) { - STACK_TRACE; ASSERT(m_pixels == NULL); if (m_pixels != NULL) return FALSE; @@ -112,7 +107,6 @@ BOOL Image::Create(const Image *source, uint16_t x, uint16_t y, uint16_t width, BOOL Image::Create(File *file) { - STACK_TRACE; ASSERT(m_pixels == NULL); if (m_pixels != NULL) return FALSE; @@ -195,7 +189,6 @@ BOOL Image::Create(File *file) Color Image::GetColor(uint16_t x, uint16_t y) const { - STACK_TRACE; ASSERT(m_format == IMAGE_FORMAT_RGB || m_format == IMAGE_FORMAT_RGBA); if (m_format == IMAGE_FORMAT_RGB) @@ -212,7 +205,6 @@ Color Image::GetColor(uint16_t x, uint16_t y) const void Image::SetColor(uint16_t x, uint16_t y, const Color &color) { - STACK_TRACE; ASSERT(m_format == IMAGE_FORMAT_RGB || m_format == IMAGE_FORMAT_RGBA); if (m_format == IMAGE_FORMAT_RGB) @@ -230,14 +222,12 @@ void Image::SetColor(uint16_t x, uint16_t y, const Color &color) void Image::Copy(const Image *source, uint16_t destX, uint16_t destY) { - STACK_TRACE; ASSERT(source != NULL); Copy(source, 0, 0, source->GetWidth(), source->GetHeight(), destX, destY); } void Image::Copy(const Image *source, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t destX, uint16_t destY) { - STACK_TRACE; ASSERT(source != NULL); if (source == NULL) return; @@ -264,13 +254,11 @@ void Image::Copy(const Image *source, uint16_t x, uint16_t y, uint16_t width, ui void Image::Clear() { - STACK_TRACE; memset(m_pixels, 0, GetSizeInBytes()); } void Image::Clear(const Color &color) { - STACK_TRACE; ASSERT(m_format == IMAGE_FORMAT_RGB || m_format == IMAGE_FORMAT_RGBA); uint32_t sizeInBytes = GetSizeInBytes(); @@ -299,20 +287,17 @@ void Image::Clear(const Color &color) void Image::Clear(const uint32_t color) { - STACK_TRACE; Clear(Color::FromInt(color)); } void Image::Clear(const uint8_t alpha) { - STACK_TRACE; ASSERT(m_format == IMAGE_FORMAT_ALPHA); memset(m_pixels, alpha, GetSizeInBytes()); } void Image::FlipVertically() { - STACK_TRACE; ASSERT(m_pixels != NULL); if (m_pixels == NULL) return; diff --git a/src/framework/graphics/indexbuffer.cpp b/src/framework/graphics/indexbuffer.cpp index d40b9ce..b7a6178 100644 --- a/src/framework/graphics/indexbuffer.cpp +++ b/src/framework/graphics/indexbuffer.cpp @@ -6,7 +6,6 @@ IndexBuffer::IndexBuffer() { - STACK_TRACE; m_currentIndex = 0; } @@ -21,13 +20,11 @@ void IndexBuffer::Release() BOOL IndexBuffer::Initialize(uint32_t numIndices, BUFFEROBJECT_USAGE usage) { - STACK_TRACE; return Initialize(NULL, numIndices, usage); } BOOL IndexBuffer::Initialize(GraphicsDevice *graphicsDevice, uint32_t numIndices, BUFFEROBJECT_USAGE usage) { - STACK_TRACE; ASSERT(m_buffer.size() == 0); if (m_buffer.size() > 0) return FALSE; @@ -46,13 +43,11 @@ BOOL IndexBuffer::Initialize(GraphicsDevice *graphicsDevice, uint32_t numIndices BOOL IndexBuffer::Initialize(const IndexBuffer *source) { - STACK_TRACE; return Initialize(NULL, source); } BOOL IndexBuffer::Initialize(GraphicsDevice *graphicsDevice, const IndexBuffer *source) { - STACK_TRACE; ASSERT(m_buffer.size() == 0); if (m_buffer.size() > 0) return FALSE; @@ -74,13 +69,11 @@ BOOL IndexBuffer::Initialize(GraphicsDevice *graphicsDevice, const IndexBuffer * void IndexBuffer::Set(const uint16_t *indices, uint32_t numIndices) { - STACK_TRACE; memcpy(&m_buffer[0], indices, GetNumElements() * GetElementWidthInBytes()); } void IndexBuffer::Resize(uint32_t numIndices) { - STACK_TRACE; ASSERT(numIndices > 0); if (numIndices == 0) return; @@ -96,7 +89,6 @@ void IndexBuffer::Resize(uint32_t numIndices) void IndexBuffer::Extend(uint32_t amount) { - STACK_TRACE; uint32_t newSize = GetNumElements() + amount; Resize(newSize); } diff --git a/src/framework/graphics/renderbuffer.cpp b/src/framework/graphics/renderbuffer.cpp index 7042deb..8d44437 100644 --- a/src/framework/graphics/renderbuffer.cpp +++ b/src/framework/graphics/renderbuffer.cpp @@ -9,7 +9,6 @@ Renderbuffer::Renderbuffer() { - STACK_TRACE; m_renderbufferName = 0; m_width = 0; m_height = 0; @@ -18,7 +17,6 @@ Renderbuffer::Renderbuffer() BOOL Renderbuffer::Initialize(GraphicsDevice *graphicsDevice, uint16_t width, uint16_t height, FRAMEBUFFER_DATA_TYPE type) { - STACK_TRACE; ASSERT(m_renderbufferName == 0); if (m_renderbufferName != 0) return FALSE; @@ -43,7 +41,6 @@ BOOL Renderbuffer::Initialize(GraphicsDevice *graphicsDevice, uint16_t width, ui void Renderbuffer::Release() { - STACK_TRACE; if (m_renderbufferName != 0) { GetGraphicsDevice()->UnbindRenderBuffer(this); @@ -59,7 +56,6 @@ void Renderbuffer::Release() BOOL Renderbuffer::CreateRenderbuffer() { - STACK_TRACE; ASSERT(m_renderbufferName == 0); uint32_t format = 0; @@ -117,7 +113,6 @@ BOOL Renderbuffer::CreateRenderbuffer() void Renderbuffer::OnNewContext() { - STACK_TRACE; if (m_renderbufferName == 0 && GetGraphicsDevice() != NULL) { BOOL success = CreateRenderbuffer(); @@ -127,6 +122,5 @@ void Renderbuffer::OnNewContext() void Renderbuffer::OnLostContext() { - STACK_TRACE; m_renderbufferName = 0; } diff --git a/src/framework/graphics/renderstate.cpp b/src/framework/graphics/renderstate.cpp index 2f66e9b..ffeb892 100644 --- a/src/framework/graphics/renderstate.cpp +++ b/src/framework/graphics/renderstate.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "renderstate.h" #include "glincludes.h" @@ -7,18 +5,15 @@ RenderState::RenderState() { - STACK_TRACE; Initialize(); } RenderState::~RenderState() { - STACK_TRACE; } void RenderState::Initialize() { - STACK_TRACE; m_depthTesting = TRUE; m_depthFunction = DEPTH_LESS; m_faceCulling = TRUE; @@ -28,7 +23,6 @@ void RenderState::Initialize() void RenderState::Apply() const { - STACK_TRACE; if (m_depthTesting) { GL_CALL(glEnable(GL_DEPTH_TEST)); @@ -46,7 +40,6 @@ void RenderState::Apply() const void RenderState::SetFaceCulling() const { - STACK_TRACE; if (m_faceCulling) { GL_CALL(glEnable(GL_CULL_FACE)); diff --git a/src/framework/graphics/shader.cpp b/src/framework/graphics/shader.cpp index ab94fcb..4f8ed9e 100644 --- a/src/framework/graphics/shader.cpp +++ b/src/framework/graphics/shader.cpp @@ -32,7 +32,6 @@ STATIC_ASSERT(sizeof(Point3) == 3 * sizeof(int32_t)); Shader::Shader() { - STACK_TRACE; m_isBound = FALSE; m_cachedVertexShaderSource = NULL; m_cachedFragmentShaderSource = NULL; @@ -48,7 +47,6 @@ Shader::Shader() BOOL Shader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!GraphicsContextResource::Initialize(graphicsDevice)) return FALSE; @@ -57,7 +55,6 @@ BOOL Shader::Initialize(GraphicsDevice *graphicsDevice) BOOL Shader::Initialize(GraphicsDevice *graphicsDevice, const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; if (!GraphicsContextResource::Initialize(graphicsDevice)) return FALSE; @@ -79,7 +76,6 @@ BOOL Shader::Initialize(GraphicsDevice *graphicsDevice, const char *vertexShader BOOL Shader::Initialize(GraphicsDevice *graphicsDevice, const Text *vertexShaderSource, const Text *fragmentShaderSource) { - STACK_TRACE; ASSERT(vertexShaderSource != NULL && vertexShaderSource->GetLength() > 0); if (vertexShaderSource == NULL || vertexShaderSource->GetLength() == 0) return FALSE; @@ -93,7 +89,6 @@ BOOL Shader::Initialize(GraphicsDevice *graphicsDevice, const Text *vertexShader void Shader::Release() { - STACK_TRACE; if (m_vertexShaderId) { GL_CALL(glDeleteShader(m_vertexShaderId)); @@ -143,7 +138,6 @@ void Shader::Release() BOOL Shader::LoadCompileAndLink(const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; const char *vertexShaderToLoad = vertexShaderSource; const char *fragmentShaderToLoad = fragmentShaderSource; @@ -171,7 +165,6 @@ BOOL Shader::LoadCompileAndLink(const char *vertexShaderSource, const char *frag BOOL Shader::ReloadCompileAndLink(const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; // clear out data that will be reset during the reload first m_isBound = FALSE; m_vertexShaderCompileStatus = FALSE; @@ -197,7 +190,6 @@ BOOL Shader::ReloadCompileAndLink(const char *vertexShaderSource, const char *fr void Shader::CacheShaderSources(const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; ASSERT(vertexShaderSource != NULL); ASSERT(fragmentShaderSource != NULL); @@ -226,7 +218,6 @@ void Shader::CacheShaderSources(const char *vertexShaderSource, const char *frag BOOL Shader::Compile(const char *vertexShaderSource, const char *fragmentShaderSource) { - STACK_TRACE; ASSERT(m_vertexShaderId == 0); ASSERT(m_fragmentShaderId == 0); ASSERT(m_programId == 0); @@ -308,7 +299,6 @@ BOOL Shader::Compile(const char *vertexShaderSource, const char *fragmentShaderS BOOL Shader::Link() { - STACK_TRACE; ASSERT(m_vertexShaderId != 0); ASSERT(m_fragmentShaderId != 0); ASSERT(m_programId == 0); @@ -344,7 +334,6 @@ BOOL Shader::Link() void Shader::LoadUniformInfo() { - STACK_TRACE; ASSERT(m_programId != 0); m_uniforms.clear(); @@ -396,7 +385,6 @@ void Shader::LoadUniformInfo() void Shader::LoadAttributeInfo() { - STACK_TRACE; ASSERT(m_programId != 0); m_attributes.clear(); @@ -457,7 +445,6 @@ void Shader::LoadAttributeInfo() BOOL Shader::HasUniform(const stl::string &name) const { - STACK_TRACE; ShaderUniformMap::const_iterator i = m_uniforms.find(name); if (i == m_uniforms.end()) return FALSE; @@ -467,7 +454,6 @@ BOOL Shader::HasUniform(const stl::string &name) const const ShaderUniform* Shader::GetUniform(const stl::string &name) const { - STACK_TRACE; ShaderUniformMap::const_iterator i = m_uniforms.find(name); if (i == m_uniforms.end()) return NULL; @@ -477,7 +463,6 @@ const ShaderUniform* Shader::GetUniform(const stl::string &name) const ShaderUniform* Shader::GetUniform(const stl::string &name) { - STACK_TRACE; ShaderUniformMap::iterator i = m_uniforms.find(name); if (i == m_uniforms.end()) return NULL; @@ -487,7 +472,6 @@ ShaderUniform* Shader::GetUniform(const stl::string &name) BOOL Shader::HasAttribute(const stl::string &name) const { - STACK_TRACE; ShaderAttributeMap::const_iterator i = m_attributes.find(name); if (i == m_attributes.end()) return FALSE; @@ -497,7 +481,6 @@ BOOL Shader::HasAttribute(const stl::string &name) const const ShaderAttribute* Shader::GetAttribute(const stl::string &name) const { - STACK_TRACE; ShaderAttributeMap::const_iterator i = m_attributes.find(name); if (i == m_attributes.end()) return NULL; @@ -507,7 +490,6 @@ const ShaderAttribute* Shader::GetAttribute(const stl::string &name) const ShaderAttribute* Shader::GetAttribute(const stl::string &name) { - STACK_TRACE; ShaderAttributeMap::iterator i = m_attributes.find(name); if (i == m_attributes.end()) return NULL; @@ -517,13 +499,11 @@ ShaderAttribute* Shader::GetAttribute(const stl::string &name) void Shader::CacheUniform(const stl::string &name, CachedShaderUniform uniform) { - STACK_TRACE; m_cachedUniforms[name] = uniform; } CachedShaderUniform* Shader::GetCachedUniform(const stl::string &name) { - STACK_TRACE; CachedShaderUniformMap::iterator i = m_cachedUniforms.find(name); if (i == m_cachedUniforms.end()) { @@ -536,7 +516,6 @@ CachedShaderUniform* Shader::GetCachedUniform(const stl::string &name) void Shader::FlushCachedUniforms() { - STACK_TRACE; ASSERT(m_isBound == TRUE); if (m_cachedUniforms.empty()) return; @@ -570,7 +549,6 @@ void Shader::FlushCachedUniforms() void Shader::SetUniform(const stl::string &name, float x) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -589,7 +567,6 @@ void Shader::SetUniform(const stl::string &name, float x) void Shader::SetUniform(const stl::string &name, int32_t x) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -608,7 +585,6 @@ void Shader::SetUniform(const stl::string &name, int32_t x) void Shader::SetUniform(const stl::string &name, float x, float y) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -628,7 +604,6 @@ void Shader::SetUniform(const stl::string &name, float x, float y) void Shader::SetUniform(const stl::string &name, const Vector2 &v) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -648,7 +623,6 @@ void Shader::SetUniform(const stl::string &name, const Vector2 &v) void Shader::SetUniform(const stl::string &name, int32_t x, int32_t y) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -668,7 +642,6 @@ void Shader::SetUniform(const stl::string &name, int32_t x, int32_t y) void Shader::SetUniform(const stl::string &name, const Point2 &p) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -688,7 +661,6 @@ void Shader::SetUniform(const stl::string &name, const Point2 &p) void Shader::SetUniform(const stl::string &name, float x, float y, float z) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -709,7 +681,6 @@ void Shader::SetUniform(const stl::string &name, float x, float y, float z) void Shader::SetUniform(const stl::string &name, const Vector3 &v) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -730,7 +701,6 @@ void Shader::SetUniform(const stl::string &name, const Vector3 &v) void Shader::SetUniform(const stl::string &name, int32_t x, int32_t y, int32_t z) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -751,7 +721,6 @@ void Shader::SetUniform(const stl::string &name, int32_t x, int32_t y, int32_t z void Shader::SetUniform(const stl::string &name, const Point3 &p) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -772,7 +741,6 @@ void Shader::SetUniform(const stl::string &name, const Point3 &p) void Shader::SetUniform(const stl::string &name, float x, float y, float z, float w) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -794,7 +762,6 @@ void Shader::SetUniform(const stl::string &name, float x, float y, float z, floa void Shader::SetUniform(const stl::string &name, const Vector4 &v) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -816,7 +783,6 @@ void Shader::SetUniform(const stl::string &name, const Vector4 &v) void Shader::SetUniform(const stl::string &name, const Quaternion &q) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -838,7 +804,6 @@ void Shader::SetUniform(const stl::string &name, const Quaternion &q) void Shader::SetUniform(const stl::string &name, const Color &c) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -860,7 +825,6 @@ void Shader::SetUniform(const stl::string &name, const Color &c) void Shader::SetUniform(const stl::string &name, int32_t x, int32_t y, int32_t z, int32_t w) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -882,7 +846,6 @@ void Shader::SetUniform(const stl::string &name, int32_t x, int32_t y, int32_t z void Shader::SetUniform(const stl::string &name, const Matrix3x3 &m) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -901,7 +864,6 @@ void Shader::SetUniform(const stl::string &name, const Matrix3x3 &m) void Shader::SetUniform(const stl::string &name, const Matrix4x4 &m) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -920,7 +882,6 @@ void Shader::SetUniform(const stl::string &name, const Matrix4x4 &m) void Shader::SetUniform(const stl::string &name, const float *x, uint32_t count) { - STACK_TRACE; if (m_isBound) { const ShaderUniform *uniform = GetUniform(name); @@ -936,7 +897,6 @@ void Shader::SetUniform(const stl::string &name, const float *x, uint32_t count) void Shader::SetUniform(const stl::string &name, const Vector2 *v, uint32_t count) { - STACK_TRACE; if (m_isBound) { // TODO: erm... this _seems_ unnecessarily ugly... even for me @@ -955,7 +915,6 @@ void Shader::SetUniform(const stl::string &name, const Vector2 *v, uint32_t coun void Shader::SetUniform(const stl::string &name, const Vector3 *v, uint32_t count) { - STACK_TRACE; if (m_isBound) { // TODO: erm... this _seems_ unnecessarily ugly... even for me @@ -974,7 +933,6 @@ void Shader::SetUniform(const stl::string &name, const Vector3 *v, uint32_t coun void Shader::SetUniform(const stl::string &name, const Vector4 *v, uint32_t count) { - STACK_TRACE; if (m_isBound) { // TODO: erm... this _seems_ unnecessarily ugly... even for me @@ -993,7 +951,6 @@ void Shader::SetUniform(const stl::string &name, const Vector4 *v, uint32_t coun void Shader::SetUniform(const stl::string &name, const Quaternion *q, uint32_t count) { - STACK_TRACE; if (m_isBound) { // TODO: erm... this _seems_ unnecessarily ugly... even for me @@ -1013,7 +970,6 @@ void Shader::SetUniform(const stl::string &name, const Quaternion *q, uint32_t c void Shader::SetUniform(const stl::string &name, const Color *c, uint32_t count) { - STACK_TRACE; if (m_isBound) { // TODO: erm... this _seems_ unnecessarily ugly... even for me @@ -1033,7 +989,6 @@ void Shader::SetUniform(const stl::string &name, const Color *c, uint32_t count) void Shader::SetUniform(const stl::string &name, const Matrix3x3 *m, uint32_t count) { - STACK_TRACE; if (m_isBound) { // TODO: erm... this _seems_ unnecessarily ugly... even for me @@ -1053,7 +1008,6 @@ void Shader::SetUniform(const stl::string &name, const Matrix3x3 *m, uint32_t co void Shader::SetUniform(const stl::string &name, const Matrix4x4 *m, uint32_t count) { - STACK_TRACE; if (m_isBound) { // TODO: erm... this _seems_ unnecessarily ugly... even for me @@ -1073,7 +1027,6 @@ void Shader::SetUniform(const stl::string &name, const Matrix4x4 *m, uint32_t co void Shader::MapAttributeToVboAttribIndex(const stl::string &name, uint32_t vboAttribIndex) { - STACK_TRACE; ShaderAttribute *attribute = GetAttribute(name); ASSERT(attribute != NULL); ASSERT(attribute->location < m_numAttributes); @@ -1087,7 +1040,6 @@ void Shader::MapAttributeToVboAttribIndex(const stl::string &name, uint32_t vboA void Shader::MapAttributeToStandardAttribType(const stl::string &name, VERTEX_STANDARD_ATTRIBS standardAttribType) { - STACK_TRACE; ShaderAttribute *attribute = GetAttribute(name); ASSERT(attribute != NULL); ASSERT(attribute->location < m_numAttributes); @@ -1101,18 +1053,15 @@ void Shader::MapAttributeToStandardAttribType(const stl::string &name, VERTEX_ST void Shader::OnNewContext() { - STACK_TRACE; ReloadCompileAndLink(NULL, NULL); } void Shader::OnLostContext() { - STACK_TRACE; } void Shader::OnBind() { - STACK_TRACE; ASSERT(m_isBound == FALSE); m_isBound = TRUE; FlushCachedUniforms(); @@ -1120,7 +1069,6 @@ void Shader::OnBind() void Shader::OnUnbind() { - STACK_TRACE; ASSERT(m_isBound == TRUE); m_isBound = FALSE; m_cachedUniforms.clear(); diff --git a/src/framework/graphics/simplecolorshader.cpp b/src/framework/graphics/simplecolorshader.cpp index c50a1e8..b94e223 100644 --- a/src/framework/graphics/simplecolorshader.cpp +++ b/src/framework/graphics/simplecolorshader.cpp @@ -31,17 +31,14 @@ const char* SimpleColorShader::m_fragmentShaderSource = SimpleColorShader::SimpleColorShader() { - STACK_TRACE; } SimpleColorShader::~SimpleColorShader() { - STACK_TRACE; } BOOL SimpleColorShader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!StandardShader::Initialize(graphicsDevice)) return FALSE; diff --git a/src/framework/graphics/simplecolortextureshader.cpp b/src/framework/graphics/simplecolortextureshader.cpp index f1f134f..ca265d6 100644 --- a/src/framework/graphics/simplecolortextureshader.cpp +++ b/src/framework/graphics/simplecolortextureshader.cpp @@ -36,17 +36,14 @@ const char* SimpleColorTextureShader::m_fragmentShaderSource = SimpleColorTextureShader::SimpleColorTextureShader() { - STACK_TRACE; } SimpleColorTextureShader::~SimpleColorTextureShader() { - STACK_TRACE; } BOOL SimpleColorTextureShader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!StandardShader::Initialize(graphicsDevice)) return FALSE; diff --git a/src/framework/graphics/simpletextureshader.cpp b/src/framework/graphics/simpletextureshader.cpp index 32da3c9..07a5892 100644 --- a/src/framework/graphics/simpletextureshader.cpp +++ b/src/framework/graphics/simpletextureshader.cpp @@ -31,17 +31,14 @@ const char* SimpleTextureShader::m_fragmentShaderSource = SimpleTextureShader::SimpleTextureShader() { - STACK_TRACE; } SimpleTextureShader::~SimpleTextureShader() { - STACK_TRACE; } BOOL SimpleTextureShader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!StandardShader::Initialize(graphicsDevice)) return FALSE; diff --git a/src/framework/graphics/simpletexturevertexlerpshader.cpp b/src/framework/graphics/simpletexturevertexlerpshader.cpp index 8d207d6..2132af1 100644 --- a/src/framework/graphics/simpletexturevertexlerpshader.cpp +++ b/src/framework/graphics/simpletexturevertexlerpshader.cpp @@ -32,17 +32,14 @@ const char* SimpleTextureVertexLerpShader::m_fragmentShaderSource = SimpleTextureVertexLerpShader::SimpleTextureVertexLerpShader() { - STACK_TRACE; } SimpleTextureVertexLerpShader::~SimpleTextureVertexLerpShader() { - STACK_TRACE; } BOOL SimpleTextureVertexLerpShader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!VertexLerpShader::Initialize(graphicsDevice)) return FALSE; diff --git a/src/framework/graphics/simpletexturevertexskinningshader.cpp b/src/framework/graphics/simpletexturevertexskinningshader.cpp index 73b47b4..c8758f3 100644 --- a/src/framework/graphics/simpletexturevertexskinningshader.cpp +++ b/src/framework/graphics/simpletexturevertexskinningshader.cpp @@ -50,17 +50,14 @@ const char* SimpleTextureVertexSkinningShader::m_fragmentShaderSource = SimpleTextureVertexSkinningShader::SimpleTextureVertexSkinningShader() { - STACK_TRACE; } SimpleTextureVertexSkinningShader::~SimpleTextureVertexSkinningShader() { - STACK_TRACE; } BOOL SimpleTextureVertexSkinningShader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!VertexSkinningShader::Initialize(graphicsDevice)) return FALSE; diff --git a/src/framework/graphics/solidcolortexturecache.cpp b/src/framework/graphics/solidcolortexturecache.cpp index ba550b4..3bb5edc 100644 --- a/src/framework/graphics/solidcolortexturecache.cpp +++ b/src/framework/graphics/solidcolortexturecache.cpp @@ -11,19 +11,16 @@ SolidColorTextureCache::SolidColorTextureCache(GraphicsDevice *graphicsDevice) { - STACK_TRACE; m_graphicsDevice = graphicsDevice; } SolidColorTextureCache::~SolidColorTextureCache() { - STACK_TRACE; FreeAll(); } void SolidColorTextureCache::OnNewContext() { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "SolidColorTextureCache: regenerating previous textures for new OpenGL context.\n"); for (ColorTextureMap::iterator itor = m_textures.begin(); itor != m_textures.end(); ++itor) @@ -37,7 +34,6 @@ void SolidColorTextureCache::OnNewContext() void SolidColorTextureCache::OnLostContext() { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "SolidColorTextureCache: resetting generated texture IDs due to lost OpenGL context.\n"); for (ColorTextureMap::iterator itor = m_textures.begin(); itor != m_textures.end(); ++itor) @@ -46,7 +42,6 @@ void SolidColorTextureCache::OnLostContext() Texture* SolidColorTextureCache::Get(const Color &color) { - STACK_TRACE; Texture *texture; uint32_t colorInt = color.ToInt(); @@ -65,7 +60,6 @@ Texture* SolidColorTextureCache::Get(const Color &color) Texture* SolidColorTextureCache::CreateFor(const Color &color, Texture *existing) { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "SolidColorTextureCache: creating texture for color 0x%8x.\n", color.ToInt()); Image *img = new Image(); @@ -99,7 +93,6 @@ Texture* SolidColorTextureCache::CreateFor(const Color &color, Texture *existing void SolidColorTextureCache::FreeAll() { - STACK_TRACE; LOG_INFO(LOGCAT_ASSETS, "SolidColorTextureCache: freeing all generated textures.\n"); for (ColorTextureMap::iterator itor = m_textures.begin(); itor != m_textures.end(); ++itor) { @@ -108,4 +101,3 @@ void SolidColorTextureCache::FreeAll() m_textures.clear(); } - diff --git a/src/framework/graphics/sprite2dshader.cpp b/src/framework/graphics/sprite2dshader.cpp index d945534..6adb349 100644 --- a/src/framework/graphics/sprite2dshader.cpp +++ b/src/framework/graphics/sprite2dshader.cpp @@ -42,17 +42,14 @@ const char* Sprite2DShader::m_fragmentShaderSource = Sprite2DShader::Sprite2DShader() { - STACK_TRACE; } Sprite2DShader::~Sprite2DShader() { - STACK_TRACE; } BOOL Sprite2DShader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!SpriteShader::Initialize(graphicsDevice)) return FALSE; diff --git a/src/framework/graphics/sprite3dshader.cpp b/src/framework/graphics/sprite3dshader.cpp index 4b5a54c..c9b63e7 100644 --- a/src/framework/graphics/sprite3dshader.cpp +++ b/src/framework/graphics/sprite3dshader.cpp @@ -48,17 +48,14 @@ const char* Sprite3DShader::m_fragmentShaderSource = Sprite3DShader::Sprite3DShader() { - STACK_TRACE; } Sprite3DShader::~Sprite3DShader() { - STACK_TRACE; } BOOL Sprite3DShader::Initialize(GraphicsDevice *graphicsDevice) { - STACK_TRACE; if (!SpriteShader::Initialize(graphicsDevice)) return FALSE; diff --git a/src/framework/graphics/spritebatch.cpp b/src/framework/graphics/spritebatch.cpp index bf28cc4..fb2ddc6 100644 --- a/src/framework/graphics/spritebatch.cpp +++ b/src/framework/graphics/spritebatch.cpp @@ -28,7 +28,6 @@ char __spriteBatch_printfBuffer[PRINTF_BUFFER_SIZE + 1]; SpriteBatch::SpriteBatch(GraphicsDevice *graphicsDevice) { - STACK_TRACE; m_graphicsDevice = graphicsDevice; m_shader = NULL; @@ -67,7 +66,6 @@ SpriteBatch::SpriteBatch(GraphicsDevice *graphicsDevice) SpriteBatch::~SpriteBatch() { - STACK_TRACE; SAFE_DELETE(m_vertices); SAFE_DELETE(m_renderState); SAFE_DELETE(m_blendState); @@ -75,7 +73,6 @@ SpriteBatch::~SpriteBatch() void SpriteBatch::InternalBegin(const RenderState *renderState, const BlendState *blendState, SpriteShader *shader) { - STACK_TRACE; ASSERT(m_begunRendering == FALSE); // keep these around for any 3d -> 2d coordinate projection we may need to do @@ -114,59 +111,50 @@ void SpriteBatch::InternalBegin(const RenderState *renderState, const BlendState void SpriteBatch::Begin(SpriteShader *shader) { - STACK_TRACE; InternalBegin(NULL, NULL, shader); } void SpriteBatch::Begin(const RenderState &renderState, SpriteShader *shader) { - STACK_TRACE; InternalBegin(&renderState, NULL, shader); } void SpriteBatch::Begin(const BlendState &blendState, SpriteShader *shader) { - STACK_TRACE; InternalBegin(NULL, &blendState, shader); } void SpriteBatch::Begin(const RenderState &renderState, const BlendState &blendState, SpriteShader *shader) { - STACK_TRACE; InternalBegin(&renderState, &blendState, shader); } void SpriteBatch::Render(const Texture *texture, int16_t x, int16_t y, const Color &color) { - STACK_TRACE; y = FixYCoord(y, texture->GetHeight()); AddSprite(texture, x, y, x + texture->GetWidth(), y + texture->GetHeight(), 0, 0, texture->GetWidth(), texture->GetHeight(), color); } void SpriteBatch::Render(const Texture *texture, int16_t x, int16_t y, uint16_t width, uint16_t height, const Color &color) { - STACK_TRACE; y = FixYCoord(y, height); AddSprite(texture, x, y, x + width, y + height, 0, 0, width, height, color); } void SpriteBatch::Render(const Texture *texture, int16_t x, int16_t y, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; y = FixYCoord(y, texture->GetHeight()); AddSprite(texture, x, y, x + texture->GetWidth(), y + texture->GetHeight(), texCoordLeft, texCoordTop, texCoordRight, texCoordBottom, color); } void SpriteBatch::Render(const Texture *texture, int16_t x, int16_t y, uint16_t width, uint16_t height, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; y = FixYCoord(y, height); AddSprite(texture, x, y, x + width, y + height, texCoordLeft, texCoordTop, texCoordRight, texCoordBottom, color); } void SpriteBatch::Render(const Texture *texture, const Vector3 &worldPosition, const Color &color) { - STACK_TRACE; Point2 screenCoordinates = m_graphicsDevice->GetViewContext()->GetCamera()->Project(worldPosition, m_previousModelview, m_previousProjection); screenCoordinates.x -= texture->GetWidth() / 2; @@ -177,7 +165,6 @@ void SpriteBatch::Render(const Texture *texture, const Vector3 &worldPosition, c void SpriteBatch::Render(const Texture *texture, const Vector3 &worldPosition, uint16_t width, uint16_t height, const Color &color) { - STACK_TRACE; Point2 screenCoordinates = m_graphicsDevice->GetViewContext()->GetCamera()->Project(worldPosition, m_previousModelview, m_previousProjection); screenCoordinates.x -= width / 2; @@ -188,7 +175,6 @@ void SpriteBatch::Render(const Texture *texture, const Vector3 &worldPosition, u void SpriteBatch::Render(const Texture *texture, const Vector3 &worldPosition, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; Point2 screenCoordinates = m_graphicsDevice->GetViewContext()->GetCamera()->Project(worldPosition, m_previousModelview, m_previousProjection); screenCoordinates.x -= texture->GetWidth() / 2; @@ -199,7 +185,6 @@ void SpriteBatch::Render(const Texture *texture, const Vector3 &worldPosition, f void SpriteBatch::Render(const Texture *texture, const Vector3 &worldPosition, uint16_t width, uint16_t height, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; Point2 screenCoordinates = m_graphicsDevice->GetViewContext()->GetCamera()->Project(worldPosition, m_previousModelview, m_previousProjection); screenCoordinates.x -= width / 2; @@ -210,7 +195,6 @@ void SpriteBatch::Render(const Texture *texture, const Vector3 &worldPosition, u void SpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, int16_t x, int16_t y, const Color &color) { - STACK_TRACE; const RectF *texCoords = &atlas->GetTile(index).texCoords; const Rect *tileSize = &atlas->GetTile(index).dimensions; const Texture *texture = atlas->GetTexture(); @@ -221,7 +205,6 @@ void SpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, int16_t x, i void SpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, int16_t x, int16_t y, uint16_t width, uint16_t height, const Color &color) { - STACK_TRACE; const RectF *texCoords = &atlas->GetTile(index).texCoords; const Texture *texture = atlas->GetTexture(); @@ -231,7 +214,6 @@ void SpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, int16_t x, i void SpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, const Vector3 &worldPosition, const Color &color) { - STACK_TRACE; Point2 screenCoordinates = m_graphicsDevice->GetViewContext()->GetCamera()->Project(worldPosition, m_previousModelview, m_previousProjection); const TextureAtlasTile &tile = atlas->GetTile(index); @@ -243,7 +225,6 @@ void SpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, const Vector void SpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, const Vector3 &worldPosition, uint16_t width, uint16_t height, const Color &color) { - STACK_TRACE; Point2 screenCoordinates = m_graphicsDevice->GetViewContext()->GetCamera()->Project(worldPosition, m_previousModelview, m_previousProjection); screenCoordinates.x -= width / 2; @@ -254,7 +235,6 @@ void SpriteBatch::Render(const TextureAtlas *atlas, uint32_t index, const Vector void SpriteBatch::Render(const SpriteFont *font, int16_t x, int16_t y, const Color &color, const char *text) { - STACK_TRACE; size_t textLength = strlen(text); y = FixYCoord(y, (uint16_t)font->GetLetterHeight()); @@ -289,7 +269,6 @@ void SpriteBatch::Render(const SpriteFont *font, int16_t x, int16_t y, const Col void SpriteBatch::Render(const SpriteFont *font, int16_t x, int16_t y, const Color &color, float scale, const char *text) { - STACK_TRACE; size_t textLength = strlen(text); float scaledLetterHeight = (float)font->GetLetterHeight() * scale; @@ -329,7 +308,6 @@ void SpriteBatch::Render(const SpriteFont *font, int16_t x, int16_t y, const Col void SpriteBatch::Render(const SpriteFont *font, const Vector3 &worldPosition, const Color &color, const char *text) { - STACK_TRACE; Point2 screenCoordinates = m_graphicsDevice->GetViewContext()->GetCamera()->Project(worldPosition, m_previousModelview, m_previousProjection); uint16_t textWidth = 0; @@ -344,7 +322,6 @@ void SpriteBatch::Render(const SpriteFont *font, const Vector3 &worldPosition, c void SpriteBatch::Render(const SpriteFont *font, const Vector3 &worldPosition, const Color &color, float scale, const char *text) { - STACK_TRACE; Point2 screenCoordinates = m_graphicsDevice->GetViewContext()->GetCamera()->Project(worldPosition, m_previousModelview, m_previousProjection); uint16_t textWidth = 0; @@ -359,7 +336,6 @@ void SpriteBatch::Render(const SpriteFont *font, const Vector3 &worldPosition, c void SpriteBatch::Printf(const SpriteFont *font, int16_t x, int16_t y, const Color &color, const char *format, ...) { - STACK_TRACE; va_list args; va_start(args, format); vsnprintf(__spriteBatch_printfBuffer, PRINTF_BUFFER_SIZE, format, args); @@ -370,7 +346,6 @@ void SpriteBatch::Printf(const SpriteFont *font, int16_t x, int16_t y, const Col void SpriteBatch::Printf(const SpriteFont *font, int16_t x, int16_t y, const Color &color, float scale, const char *format, ...) { - STACK_TRACE; va_list args; va_start(args, format); vsnprintf(__spriteBatch_printfBuffer, PRINTF_BUFFER_SIZE, format, args); @@ -381,7 +356,6 @@ void SpriteBatch::Printf(const SpriteFont *font, int16_t x, int16_t y, const Col void SpriteBatch::Printf(const SpriteFont *font, const Vector3 &worldPosition, const Color &color, const char *format, ...) { - STACK_TRACE; va_list args; va_start(args, format); vsnprintf(__spriteBatch_printfBuffer, PRINTF_BUFFER_SIZE, format, args); @@ -392,7 +366,6 @@ void SpriteBatch::Printf(const SpriteFont *font, const Vector3 &worldPosition, c void SpriteBatch::Printf(const SpriteFont *font, const Vector3 &worldPosition, const Color &color, float scale, const char *format, ...) { - STACK_TRACE; va_list args; va_start(args, format); vsnprintf(__spriteBatch_printfBuffer, PRINTF_BUFFER_SIZE, format, args); @@ -403,7 +376,6 @@ void SpriteBatch::Printf(const SpriteFont *font, const Vector3 &worldPosition, c void SpriteBatch::RenderLine(int16_t x1, int16_t y1, int16_t x2, int16_t y2, const Color &color) { - STACK_TRACE; y1 = FixYCoord(y1, (uint16_t)1); y2 = FixYCoord(y2, (uint16_t)1); @@ -412,7 +384,6 @@ void SpriteBatch::RenderLine(int16_t x1, int16_t y1, int16_t x2, int16_t y2, con void SpriteBatch::RenderBox(int16_t left, int16_t top, int16_t right, int16_t bottom, const Color &color) { - STACK_TRACE; uint16_t height = bottom - top; top = FixYCoord(top, height); bottom = top + height; @@ -425,7 +396,6 @@ void SpriteBatch::RenderBox(int16_t left, int16_t top, int16_t right, int16_t bo void SpriteBatch::RenderBox(const Rect &rect, const Color &color) { - STACK_TRACE; int16_t left = (int16_t)rect.left; int16_t top = (int16_t)rect.top; int16_t right = (int16_t)rect.right; @@ -443,7 +413,6 @@ void SpriteBatch::RenderBox(const Rect &rect, const Color &color) void SpriteBatch::RenderFilledBox(int16_t left, int16_t top, int16_t right, int16_t bottom, const Color &color) { - STACK_TRACE; uint16_t height = bottom - top; top = FixYCoord(top, height); bottom = top + height; @@ -453,7 +422,6 @@ void SpriteBatch::RenderFilledBox(int16_t left, int16_t top, int16_t right, int1 void SpriteBatch::RenderFilledBox(const Rect &rect, const Color &color) { - STACK_TRACE; int16_t left = (int16_t)rect.left; int16_t top = (int16_t)rect.top; int16_t right = (int16_t)rect.right; @@ -468,7 +436,6 @@ void SpriteBatch::RenderFilledBox(const Rect &rect, const Color &color) void SpriteBatch::AddSprite(const Texture *texture, int16_t destLeft, int16_t destTop, int16_t destRight, int16_t destBottom, uint16_t sourceLeft, uint16_t sourceTop, uint16_t sourceRight, uint16_t sourceBottom, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); uint16_t width = sourceRight - sourceLeft; @@ -497,7 +464,6 @@ void SpriteBatch::AddSprite(const Texture *texture, int16_t destLeft, int16_t de void SpriteBatch::AddSprite(const Texture *texture, int16_t destLeft, int16_t destTop, int16_t destRight, int16_t destBottom, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); float destLeftF = (float)destLeft; @@ -518,7 +484,6 @@ void SpriteBatch::AddSprite(const Texture *texture, int16_t destLeft, int16_t de void SpriteBatch::AddSprite(const Texture *texture, float destLeft, float destTop, float destRight, float destBottom, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); if (m_isClipping) @@ -534,8 +499,6 @@ void SpriteBatch::AddSprite(const Texture *texture, float destLeft, float destTo BOOL SpriteBatch::ClipSpriteCoords(float &left, float &top, float &right, float &bottom, float &texCoordLeft, float &texCoordTop, float &texCoordRight, float &texCoordBottom) { - STACK_TRACE; - // check for completely out of bounds scenarios first if (left >= m_clipRegion.right) return FALSE; @@ -594,7 +557,6 @@ BOOL SpriteBatch::ClipSpriteCoords(float &left, float &top, float &right, float void SpriteBatch::SetSpriteInfo(uint32_t spriteIndex, const Texture *texture, float destLeft, float destTop, float destRight, float destBottom, float texCoordLeft, float texCoordTop, float texCoordRight, float texCoordBottom, const Color &color) { - STACK_TRACE; uint32_t base = m_vertices->GetCurrentPosition(); m_vertices->SetPosition2(base, destLeft, destTop); @@ -631,7 +593,6 @@ void SpriteBatch::SetSpriteInfo(uint32_t spriteIndex, const Texture *texture, fl void SpriteBatch::AddLine(float x1, float y1, float x2, float y2, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); if (m_isClipping) @@ -647,7 +608,6 @@ void SpriteBatch::AddLine(float x1, float y1, float x2, float y2, const Color &c void SpriteBatch::SetLineInfo(uint32_t spriteIndex, float x1, float y1, float x2, float y2, const Color &color) { - STACK_TRACE; uint32_t base = m_vertices->GetCurrentPosition(); m_vertices->SetPosition2(base, x1, y1); @@ -673,8 +633,6 @@ void SpriteBatch::SetLineInfo(uint32_t spriteIndex, float x1, float y1, float x2 BOOL SpriteBatch::ClipLineCoords(float &x1, float &y1, float &x2, float &y2) { - STACK_TRACE; - // TODO: implementation return TRUE; @@ -682,7 +640,6 @@ BOOL SpriteBatch::ClipLineCoords(float &x1, float &y1, float &x2, float &y2) void SpriteBatch::AddFilledBox(float left, float top, float right, float bottom, const Color &color) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); if (m_isClipping) @@ -698,7 +655,6 @@ void SpriteBatch::AddFilledBox(float left, float top, float right, float bottom, void SpriteBatch::SetFilledBoxInfo(uint32_t spriteIndex, float left, float top, float right, float bottom, const Color &color) { - STACK_TRACE; uint32_t base = m_vertices->GetCurrentPosition(); m_vertices->SetPosition2(base, left, top); @@ -736,8 +692,6 @@ void SpriteBatch::SetFilledBoxInfo(uint32_t spriteIndex, float left, float top, BOOL SpriteBatch::ClipFilledBoxCoords(float &left, float &top, float &right, float &bottom) { - STACK_TRACE; - // check for completely out of bounds scenarios first if (left >= m_clipRegion.right) return FALSE; @@ -772,7 +726,6 @@ BOOL SpriteBatch::ClipFilledBoxCoords(float &left, float &top, float &right, flo void SpriteBatch::End() { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); // don't do anything if nothing is to be rendered! @@ -806,7 +759,6 @@ void SpriteBatch::End() void SpriteBatch::RenderQueue() { - STACK_TRACE; m_graphicsDevice->BindVertexBuffer(m_vertices); const SpriteBatchEntity *firstEntity = &m_entities[0]; @@ -847,7 +799,6 @@ void SpriteBatch::RenderQueue() void SpriteBatch::RenderQueueRange(const SpriteBatchEntity *firstEntity, const SpriteBatchEntity *lastEntity) { - STACK_TRACE; uint32_t startVertex = firstEntity->firstVertex; uint32_t lastVertex = lastEntity->lastVertex + 1; @@ -876,7 +827,6 @@ void SpriteBatch::RenderQueueRange(const SpriteBatchEntity *firstEntity, const S void SpriteBatch::CheckForNewSpriteSpace(SPRITEBATCH_ENTITY_TYPE type) { - STACK_TRACE; // HACK: the assumption is made here that this will never expand the buffers // by an amount that could be used to store more then one entity at a // time. This is because we use std::vector::push_back to expand the @@ -920,7 +870,6 @@ inline float SpriteBatch::FixYCoord(int16_t y, float sourceHeight) const void SpriteBatch::SetClipRegion(const Rect &rect) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); m_isClipping = TRUE; @@ -935,7 +884,6 @@ void SpriteBatch::SetClipRegion(const Rect &rect) void SpriteBatch::SetClipRegion(int16_t left, int16_t top, int16_t right, int16_t bottom) { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); m_isClipping = TRUE; @@ -951,7 +899,6 @@ void SpriteBatch::SetClipRegion(int16_t left, int16_t top, int16_t right, int16_ void SpriteBatch::ClearClipRegion() { - STACK_TRACE; ASSERT(m_begunRendering == TRUE); m_isClipping = FALSE; } diff --git a/src/framework/graphics/spritefont.cpp b/src/framework/graphics/spritefont.cpp index fce9ca7..f4abba2 100644 --- a/src/framework/graphics/spritefont.cpp +++ b/src/framework/graphics/spritefont.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "spritefont.h" #include @@ -12,7 +10,6 @@ #include "textureatlas.h" SpriteFont::SpriteFont() - : Content() { m_size = 0; m_texture = NULL; @@ -22,14 +19,12 @@ SpriteFont::SpriteFont() SpriteFont::~SpriteFont() { - STACK_TRACE; SAFE_DELETE(m_glyphs); SAFE_DELETE(m_texture); } void SpriteFont::Load(Texture *texture, TextureAtlas *glyphs, uint8_t size) { - STACK_TRACE; m_texture = texture; m_glyphs = glyphs; m_size = size; @@ -38,7 +33,6 @@ void SpriteFont::Load(Texture *texture, TextureAtlas *glyphs, uint8_t size) void SpriteFont::OnLostContext() { - STACK_TRACE; SAFE_DELETE(m_glyphs); m_letterHeight = 0; SAFE_DELETE(m_texture); @@ -46,7 +40,6 @@ void SpriteFont::OnLostContext() const TextureAtlasTile& SpriteFont::GetGlyph(unsigned char c) const { - STACK_TRACE; if (c < LOW_GLYPH || c > HIGH_GLYPH) return m_glyphs->GetTile(HIGH_GLYPH - LOW_GLYPH); else @@ -55,8 +48,9 @@ const TextureAtlasTile& SpriteFont::GetGlyph(unsigned char c) const void SpriteFont::MeasureString(uint16_t *width, uint16_t *height, const char *format, ...) const { - STACK_TRACE; - ASSERT(width != NULL || height != NULL); + if (width == NULL && height == NULL) + return; + static char buffer[8096]; // probably way more then adequate va_list args; @@ -96,8 +90,9 @@ void SpriteFont::MeasureString(uint16_t *width, uint16_t *height, const char *fo void SpriteFont::MeasureString(uint16_t *width, uint16_t *height, float scale, const char *format, ...) const { - STACK_TRACE; - ASSERT(width != NULL || height != NULL); + if (width == NULL && height == NULL) + return; + static char buffer[8096]; // probably way more then adequate va_list args; diff --git a/src/framework/graphics/spriteshader.cpp b/src/framework/graphics/spriteshader.cpp index 608ef09..2ea243c 100644 --- a/src/framework/graphics/spriteshader.cpp +++ b/src/framework/graphics/spriteshader.cpp @@ -4,18 +4,15 @@ SpriteShader::SpriteShader() { - STACK_TRACE; SetTextureHasAlphaOnlyUniform("u_textureHasAlphaOnly"); } SpriteShader::~SpriteShader() { - STACK_TRACE; } void SpriteShader::SetTextureHasAlphaOnly(BOOL hasAlphaOnly) { - STACK_TRACE; ASSERT(IsReadyForUse() == TRUE); SetUniform(m_textureHasAlphaOnlyUniform, (int32_t)hasAlphaOnly); } diff --git a/src/framework/graphics/standardshader.cpp b/src/framework/graphics/standardshader.cpp index 66860c8..0c371b9 100644 --- a/src/framework/graphics/standardshader.cpp +++ b/src/framework/graphics/standardshader.cpp @@ -5,7 +5,6 @@ StandardShader::StandardShader() { - STACK_TRACE; m_inlineVertexShaderSource = NULL; m_inlineFragmentShaderSource = NULL; @@ -15,12 +14,10 @@ StandardShader::StandardShader() StandardShader::~StandardShader() { - STACK_TRACE; } BOOL StandardShader::LoadCompileAndLinkInlineSources(const char *inlineVertexShaderSource, const char *inlineFragmentShaderSource) { - STACK_TRACE; ASSERT(inlineVertexShaderSource != NULL); ASSERT(inlineFragmentShaderSource != NULL); @@ -38,25 +35,21 @@ BOOL StandardShader::LoadCompileAndLinkInlineSources(const char *inlineVertexSha void StandardShader::SetModelViewMatrix(const Matrix4x4 &matrix) { - STACK_TRACE; ASSERT(IsReadyForUse() == TRUE); SetUniform(m_modelViewMatrixUniform, matrix); } void StandardShader::SetProjectionMatrix(const Matrix4x4 &matrix) { - STACK_TRACE; ASSERT(IsReadyForUse() == TRUE); SetUniform(m_projectionMatrixUniform, matrix); } void StandardShader::OnNewContext() { - STACK_TRACE; ReloadCompileAndLink(m_inlineVertexShaderSource, m_inlineFragmentShaderSource); } void StandardShader::OnLostContext() { - STACK_TRACE; } diff --git a/src/framework/graphics/texture.cpp b/src/framework/graphics/texture.cpp index 45718cc..66b0210 100644 --- a/src/framework/graphics/texture.cpp +++ b/src/framework/graphics/texture.cpp @@ -11,9 +11,7 @@ #include "../math/mathhelpers.h" Texture::Texture() - : Content() { - STACK_TRACE; m_graphicsDevice = NULL; m_textureName = 0; m_width = 0; @@ -23,13 +21,11 @@ Texture::Texture() Texture::~Texture() { - STACK_TRACE; Release(); } BOOL Texture::Create(GraphicsDevice *graphicsDevice, Image *image) { - STACK_TRACE; ASSERT(m_textureName == 0); if (m_textureName != 0) return FALSE; @@ -85,7 +81,6 @@ BOOL Texture::Create(GraphicsDevice *graphicsDevice, Image *image) BOOL Texture::Create(GraphicsDevice *graphicsDevice, uint16_t width, uint16_t height, TEXTURE_FORMAT textureFormat) { - STACK_TRACE; ASSERT(m_textureName == 0); if (m_textureName != 0) return FALSE; @@ -132,7 +127,6 @@ BOOL Texture::Create(GraphicsDevice *graphicsDevice, uint16_t width, uint16_t he void Texture::Release() { - STACK_TRACE; if (m_textureName != 0) { m_graphicsDevice->UnbindTexture(this); @@ -150,7 +144,6 @@ void Texture::Release() BOOL Texture::Update(Image *image, uint16_t destX, uint16_t destY) { - STACK_TRACE; ASSERT(m_textureName != 0); if (m_textureName == 0) return FALSE; @@ -198,13 +191,11 @@ BOOL Texture::Update(Image *image, uint16_t destX, uint16_t destY) void Texture::OnLostContext() { - STACK_TRACE; m_textureName = 0; } void Texture::GetTextureSpecsFromFormat(TEXTURE_FORMAT textureFormat, int *bpp, uint32_t *format, uint32_t *type) { - STACK_TRACE; switch (textureFormat) { case TEXTURE_FORMAT_ALPHA: diff --git a/src/framework/graphics/textureatlas.cpp b/src/framework/graphics/textureatlas.cpp index 01f58ea..19e327f 100644 --- a/src/framework/graphics/textureatlas.cpp +++ b/src/framework/graphics/textureatlas.cpp @@ -6,7 +6,6 @@ TextureAtlas::TextureAtlas(uint16_t textureWidth, uint16_t textureHeight, float texCoordEdgeOffset) { - STACK_TRACE; ASSERT(textureWidth > 0); ASSERT(textureHeight > 0); @@ -18,7 +17,6 @@ TextureAtlas::TextureAtlas(uint16_t textureWidth, uint16_t textureHeight, float TextureAtlas::TextureAtlas(Texture *source, float texCoordEdgeOffset) { - STACK_TRACE; ASSERT(source != NULL); m_source = source; @@ -29,12 +27,10 @@ TextureAtlas::TextureAtlas(Texture *source, float texCoordEdgeOffset) TextureAtlas::~TextureAtlas() { - STACK_TRACE; } void TextureAtlas::SetTexture(Texture *source) { - STACK_TRACE; if (source == NULL) m_source = NULL; else diff --git a/src/framework/graphics/textureparameters.cpp b/src/framework/graphics/textureparameters.cpp index a8e01d6..2eafc4b 100644 --- a/src/framework/graphics/textureparameters.cpp +++ b/src/framework/graphics/textureparameters.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "textureparameters.h" #include "glincludes.h" @@ -7,13 +5,11 @@ TextureParameters::TextureParameters() { - STACK_TRACE; Initialize(); } TextureParameters::TextureParameters(MINIFICATION_FILTER minFilter, MAGNIFICATION_FILTER magFilter) { - STACK_TRACE; Initialize(); m_minFilter = minFilter; @@ -22,12 +18,10 @@ TextureParameters::TextureParameters(MINIFICATION_FILTER minFilter, MAGNIFICATIO TextureParameters::~TextureParameters() { - STACK_TRACE; } void TextureParameters::Initialize() { - STACK_TRACE; m_minFilter = MIN_NEAREST; m_magFilter = MAG_LINEAR; m_wrapS = REPEAT; @@ -36,7 +30,6 @@ void TextureParameters::Initialize() void TextureParameters::Apply() const { - STACK_TRACE; GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, FindMinificationFilterValue(m_minFilter))); GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, FindMagnificationFilterValue(m_magFilter))); GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, FindWrapModeValue(m_wrapS))); @@ -45,7 +38,6 @@ void TextureParameters::Apply() const int TextureParameters::FindMinificationFilterValue(MINIFICATION_FILTER filter) const { - STACK_TRACE; switch (filter) { case MIN_NEAREST: return GL_NEAREST; @@ -59,7 +51,6 @@ int TextureParameters::FindMinificationFilterValue(MINIFICATION_FILTER filter) c int TextureParameters::FindMagnificationFilterValue(MAGNIFICATION_FILTER filter) const { - STACK_TRACE; switch (filter) { case MAG_NEAREST: return GL_NEAREST; @@ -69,7 +60,6 @@ int TextureParameters::FindMagnificationFilterValue(MAGNIFICATION_FILTER filter) int TextureParameters::FindWrapModeValue(WRAP_MODE mode) const { - STACK_TRACE; switch (mode) { case CLAMP_TO_EDGE: return GL_CLAMP_TO_EDGE; diff --git a/src/framework/graphics/vertexbuffer.cpp b/src/framework/graphics/vertexbuffer.cpp index 33fd415..f2de99b 100644 --- a/src/framework/graphics/vertexbuffer.cpp +++ b/src/framework/graphics/vertexbuffer.cpp @@ -9,7 +9,6 @@ const unsigned int MAX_GPU_ATTRIB_SLOTS = 8; VertexBuffer::VertexBuffer() { - STACK_TRACE; m_numVertices = 0; m_currentVertex = 0; m_standardTypeAttribs = 0; @@ -26,7 +25,6 @@ VertexBuffer::VertexBuffer() void VertexBuffer::Release() { - STACK_TRACE; m_buffer.clear(); stl::vector().swap(m_buffer); @@ -48,13 +46,11 @@ void VertexBuffer::Release() BOOL VertexBuffer::Initialize(const VERTEX_ATTRIBS *attributes, uint32_t numAttributes, uint32_t numVertices, BUFFEROBJECT_USAGE usage) { - STACK_TRACE; return Initialize(NULL, attributes, numAttributes, numVertices, usage); } BOOL VertexBuffer::Initialize(GraphicsDevice *graphicsDevice, const VERTEX_ATTRIBS *attributes, uint32_t numAttributes, uint32_t numVertices, BUFFEROBJECT_USAGE usage) { - STACK_TRACE; ASSERT(m_buffer.size() == 0); if (m_buffer.size() > 0) return FALSE; @@ -72,13 +68,11 @@ BOOL VertexBuffer::Initialize(GraphicsDevice *graphicsDevice, const VERTEX_ATTRI BOOL VertexBuffer::Initialize(const VertexBuffer *source) { - STACK_TRACE; return Initialize(NULL, source); } BOOL VertexBuffer::Initialize(GraphicsDevice *graphicsDevice, const VertexBuffer *source) { - STACK_TRACE; ASSERT(m_buffer.size() == 0); if (m_buffer.size() > 0) return FALSE; @@ -113,7 +107,6 @@ BOOL VertexBuffer::Initialize(GraphicsDevice *graphicsDevice, const VertexBuffer BOOL VertexBuffer::SetSizesAndOffsets(const VERTEX_ATTRIBS *attributes, uint32_t numAttributes) { - STACK_TRACE; ASSERT(attributes != NULL); ASSERT(numAttributes > 0); ASSERT(m_buffer.size() == 0); @@ -209,7 +202,6 @@ BOOL VertexBuffer::SetSizesAndOffsets(const VERTEX_ATTRIBS *attributes, uint32_t int32_t VertexBuffer::GetIndexOfStandardAttrib(VERTEX_STANDARD_ATTRIBS standardAttrib) const { - STACK_TRACE; for (uint32_t i = 0; i < m_numAttributes; ++i) { if ((uint32_t)m_attribs[i].standardType == (uint32_t)standardAttrib) @@ -221,7 +213,6 @@ int32_t VertexBuffer::GetIndexOfStandardAttrib(VERTEX_STANDARD_ATTRIBS standardA void VertexBuffer::Resize(uint32_t numVertices) { - STACK_TRACE; ASSERT(numVertices > 0); if (numVertices == 0) return; @@ -238,14 +229,12 @@ void VertexBuffer::Resize(uint32_t numVertices) void VertexBuffer::Extend(uint32_t amount) { - STACK_TRACE; uint32_t newSize = GetNumElements() + amount; Resize(newSize); } void VertexBuffer::Copy(const VertexBuffer *source, uint32_t destIndex) { - STACK_TRACE; ASSERT(source != NULL); ASSERT(source->GetNumElements() > 0); ASSERT(source->GetStandardAttribs() == m_standardTypeAttribs); diff --git a/src/framework/graphics/vertexlerpshader.cpp b/src/framework/graphics/vertexlerpshader.cpp index 0f37381..a224102 100644 --- a/src/framework/graphics/vertexlerpshader.cpp +++ b/src/framework/graphics/vertexlerpshader.cpp @@ -4,18 +4,15 @@ VertexLerpShader::VertexLerpShader() { - STACK_TRACE; SetLerpUniform("u_lerp"); } VertexLerpShader::~VertexLerpShader() { - STACK_TRACE; } void VertexLerpShader::SetLerp(float t) { - STACK_TRACE; ASSERT(IsReadyForUse() == TRUE); SetUniform(m_lerpUniform, t); } diff --git a/src/framework/graphics/vertexskinningshader.cpp b/src/framework/graphics/vertexskinningshader.cpp index 935c3fe..41b9721 100644 --- a/src/framework/graphics/vertexskinningshader.cpp +++ b/src/framework/graphics/vertexskinningshader.cpp @@ -6,26 +6,22 @@ VertexSkinningShader::VertexSkinningShader() { - STACK_TRACE; SetJointPositionsUniform("u_jointPositions"); SetJointRotationsUniform("u_jointRotations"); } VertexSkinningShader::~VertexSkinningShader() { - STACK_TRACE; } void VertexSkinningShader::SetJointPositions(const Vector3 *positions, uint32_t count) { - STACK_TRACE; ASSERT(IsReadyForUse() == TRUE); SetUniform(m_positionsUniform, positions, count); } void VertexSkinningShader::SetJointRotations(const Quaternion *rotations, uint32_t count) { - STACK_TRACE; ASSERT(IsReadyForUse() == TRUE); SetUniform(m_rotationsUniform, rotations, count); } diff --git a/src/framework/graphics/viewcontext.cpp b/src/framework/graphics/viewcontext.cpp index 7a2ba0e..e6f323a 100644 --- a/src/framework/graphics/viewcontext.cpp +++ b/src/framework/graphics/viewcontext.cpp @@ -15,7 +15,6 @@ ViewContext::ViewContext() { - STACK_TRACE; m_graphicsDevice = NULL; m_viewport = Rect(0, 0, 0, 0); m_viewportIsFixedSize = FALSE; @@ -25,13 +24,11 @@ ViewContext::ViewContext() ViewContext::~ViewContext() { - STACK_TRACE; Release(); } void ViewContext::Release() { - STACK_TRACE; if (m_usingDefaultCamera) SAFE_DELETE(m_camera); @@ -45,7 +42,6 @@ void ViewContext::Release() BOOL ViewContext::Create(GraphicsDevice *graphicsDevice) { - STACK_TRACE; ASSERT(m_graphicsDevice == NULL); if (m_graphicsDevice != NULL) return FALSE; @@ -65,7 +61,6 @@ BOOL ViewContext::Create(GraphicsDevice *graphicsDevice) BOOL ViewContext::Create(GraphicsDevice *graphicsDevice, const Rect &fixedViewportSize) { - STACK_TRACE; ASSERT(m_graphicsDevice == NULL); if (m_graphicsDevice != NULL) return FALSE; @@ -85,7 +80,6 @@ BOOL ViewContext::Create(GraphicsDevice *graphicsDevice, const Rect &fixedViewpo void ViewContext::OnNewContext() { - STACK_TRACE; m_modelviewStack.Clear(); m_modelviewStack.top = IDENTITY_MATRIX; m_projectionStack.Clear(); @@ -94,25 +88,21 @@ void ViewContext::OnNewContext() void ViewContext::OnLostContext() { - STACK_TRACE; } void ViewContext::OnResize(const Rect &size, SCREEN_ORIENTATION_ANGLE screenOrientation) { - STACK_TRACE; SetupViewport(size, screenOrientation); } void ViewContext::OnRender() { - STACK_TRACE; if (m_camera != NULL) m_camera->OnRender(); } void ViewContext::OnApply(const Rect &size, SCREEN_ORIENTATION_ANGLE screenOrientation) { - STACK_TRACE; SetupViewport(size, screenOrientation); // ensures it's set up for rendering immediately when this call returns @@ -124,7 +114,6 @@ void ViewContext::OnApply(const Rect &size, SCREEN_ORIENTATION_ANGLE screenOrien void ViewContext::SetProjectionMatrix(const Matrix4x4 &m) { - STACK_TRACE; if (!IgnoringScreenRotation() && m_screenOrientation != SCREEN_ANGLE_0) { // apply a rotation immediately _after_ the projection matrix transform @@ -138,7 +127,6 @@ void ViewContext::SetProjectionMatrix(const Matrix4x4 &m) void ViewContext::PushProjectionMatrix() { - STACK_TRACE; m_projectionStack.Push(); // with MatrixStack, pushing does not change the top matrix, so // we don't need to re-set the projection matrix with OpenGL @@ -146,13 +134,11 @@ void ViewContext::PushProjectionMatrix() void ViewContext::PopProjectionMatrix() { - STACK_TRACE; m_projectionStack.Pop(); } Matrix4x4 ViewContext::GetOrthographicProjectionMatrix() { - STACK_TRACE; Matrix4x4 ortho = Matrix4x4::CreateOrthographic((float)m_viewport.left, (float)m_viewport.right, (float)m_viewport.top, (float)m_viewport.bottom, 0.0f, 1.0f); if (!IgnoringScreenRotation() && m_screenOrientation != SCREEN_ANGLE_0) @@ -168,13 +154,11 @@ Matrix4x4 ViewContext::GetOrthographicProjectionMatrix() void ViewContext::SetModelViewMatrix(const Matrix4x4 &m) { - STACK_TRACE; m_modelviewStack.top = m; } void ViewContext::PushModelViewMatrix() { - STACK_TRACE; m_modelviewStack.Push(); // with MatrixStack, pushing does not change the top matrix, so // we don't need to re-set the modelview matrix with OpenGL @@ -182,13 +166,11 @@ void ViewContext::PushModelViewMatrix() void ViewContext::PopModelViewMatrix() { - STACK_TRACE; m_modelviewStack.Pop(); } void ViewContext::SetCamera(Camera *camera) { - STACK_TRACE; // using the default camera but a new camera is being provided? if (m_usingDefaultCamera && camera != NULL) { @@ -214,7 +196,6 @@ void ViewContext::SetCamera(Camera *camera) void ViewContext::SetupViewport(const Rect &size, SCREEN_ORIENTATION_ANGLE screenOrientation) { - STACK_TRACE; Rect viewport; if (m_viewportIsFixedSize) diff --git a/src/framework/gwen/gwen_inputprocessor.cpp b/src/framework/gwen/gwen_inputprocessor.cpp index da62ce3..c37be19 100644 --- a/src/framework/gwen/gwen_inputprocessor.cpp +++ b/src/framework/gwen/gwen_inputprocessor.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "gwen_inputprocessor.h" #include #include "../basegameapp.h" @@ -15,7 +13,6 @@ namespace Gwen { InputProcessor::InputProcessor(BaseGameApp *gameApp, Gwen::Controls::Canvas *canvas) { - STACK_TRACE; m_gameApp = gameApp; m_canvas = canvas; m_enabled = FALSE; @@ -25,7 +22,6 @@ namespace Gwen InputProcessor::~InputProcessor() { - STACK_TRACE; Enable(FALSE); } diff --git a/src/framework/input/marmaladekeyboard.cpp b/src/framework/input/marmaladekeyboard.cpp index e7e0c98..568a95d 100644 --- a/src/framework/input/marmaladekeyboard.cpp +++ b/src/framework/input/marmaladekeyboard.cpp @@ -1,34 +1,26 @@ #ifdef __S3E__ -#include "../debug.h" - #include "marmaladekeyboard.h" #include "keyboardlistener.h" #include MarmaladeKeyboard::MarmaladeKeyboard(BOOL hasPhysicalKeysForGameControls) - : Keyboard() { - STACK_TRACE; m_hasPhysicalKeysForGameControls = hasPhysicalKeysForGameControls; m_keys = new BOOL[KSYM_LAST]; - ASSERT(m_keys != NULL); m_lockedKeys = new BOOL[KSYM_LAST]; - ASSERT(m_lockedKeys != NULL); Reset(); } MarmaladeKeyboard::~MarmaladeKeyboard() { - STACK_TRACE; SAFE_DELETE_ARRAY(m_keys); SAFE_DELETE_ARRAY(m_lockedKeys); } BOOL MarmaladeKeyboard::OnKeyEvent(const s3eKeyboardEvent *eventArgs) { - STACK_TRACE; int32_t keyCode = (int32_t)eventArgs->m_Key; BOOL isDown = (BOOL)eventArgs->m_Pressed; @@ -66,14 +58,12 @@ BOOL MarmaladeKeyboard::OnKeyEvent(const s3eKeyboardEvent *eventArgs) BOOL MarmaladeKeyboard::OnKeyCharEvent(const s3eKeyboardCharEvent *eventArgs) { - STACK_TRACE; // TODO: implementation return FALSE; } BOOL MarmaladeKeyboard::IsPressed(KEYS key) { - STACK_TRACE; if (m_keys[key] && !m_lockedKeys[key]) { m_lockedKeys[key] = TRUE; @@ -85,20 +75,17 @@ BOOL MarmaladeKeyboard::IsPressed(KEYS key) void MarmaladeKeyboard::Reset() { - STACK_TRACE; memset(m_keys, FALSE, sizeof(BOOL) * KSYM_LAST); memset(m_lockedKeys, FALSE, sizeof(BOOL) * KSYM_LAST); } void MarmaladeKeyboard::RegisterListener(KeyboardListener *listener) { - STACK_TRACE; m_listeners.insert(listener); } void MarmaladeKeyboard::UnregisterListener(KeyboardListener *listener) { - STACK_TRACE; m_listeners.erase(listener); } diff --git a/src/framework/input/marmalademouse.cpp b/src/framework/input/marmalademouse.cpp index 962acaf..e6f9c73 100644 --- a/src/framework/input/marmalademouse.cpp +++ b/src/framework/input/marmalademouse.cpp @@ -8,34 +8,27 @@ const int32_t NUM_BUTTONS = S3E_POINTER_BUTTON_MAX; MarmaladeMouse::MarmaladeMouse() - : Mouse() { - STACK_TRACE; m_buttons = new BOOL[NUM_BUTTONS]; - ASSERT(m_buttons != NULL); m_lockedButtons = new BOOL[NUM_BUTTONS]; - ASSERT(m_lockedButtons != NULL); Reset(); } MarmaladeMouse::~MarmaladeMouse() { - STACK_TRACE; SAFE_DELETE_ARRAY(m_buttons); SAFE_DELETE_ARRAY(m_lockedButtons); } void MarmaladeMouse::ResetDeltas() { - STACK_TRACE; m_deltaX = 0; m_deltaY = 0; } BOOL MarmaladeMouse::OnButtonEvent(const s3ePointerEvent *eventArgs) { - STACK_TRACE; int32_t button = (int32_t)eventArgs->m_Button; BOOL isDown = (BOOL)eventArgs->m_Pressed; int32_t x = eventArgs->m_x; @@ -76,7 +69,6 @@ BOOL MarmaladeMouse::OnButtonEvent(const s3ePointerEvent *eventArgs) BOOL MarmaladeMouse::OnMotionEvent(const s3ePointerMotionEvent *eventArgs) { - STACK_TRACE; m_deltaX = eventArgs->m_x - m_x; m_deltaY = eventArgs->m_y - m_y; @@ -98,7 +90,6 @@ BOOL MarmaladeMouse::OnMotionEvent(const s3ePointerMotionEvent *eventArgs) BOOL MarmaladeMouse::IsPressed(MOUSE_BUTTONS button) { - STACK_TRACE; if (m_buttons[button] && !m_lockedButtons[button]) { m_lockedButtons[button] = TRUE; @@ -110,7 +101,6 @@ BOOL MarmaladeMouse::IsPressed(MOUSE_BUTTONS button) void MarmaladeMouse::Reset() { - STACK_TRACE; memset(m_buttons, FALSE, sizeof(BOOL) * NUM_BUTTONS); memset(m_lockedButtons, FALSE, sizeof(BOOL) * NUM_BUTTONS); m_x = 0; @@ -121,13 +111,11 @@ void MarmaladeMouse::Reset() void MarmaladeMouse::RegisterListener(MouseListener *listener) { - STACK_TRACE; m_listeners.insert(listener); } void MarmaladeMouse::UnregisterListener(MouseListener *listener) { - STACK_TRACE; m_listeners.erase(listener); } diff --git a/src/framework/input/marmaladetouchscreen.cpp b/src/framework/input/marmaladetouchscreen.cpp index aa2eae1..64542e3 100644 --- a/src/framework/input/marmaladetouchscreen.cpp +++ b/src/framework/input/marmaladetouchscreen.cpp @@ -9,7 +9,6 @@ MarmaladeTouchPointer::MarmaladeTouchPointer() { - STACK_TRACE; m_id = INVALID_TOUCH_POINTER; m_x = 0; m_y = 0; @@ -20,19 +19,16 @@ MarmaladeTouchPointer::MarmaladeTouchPointer() MarmaladeTouchPointer::~MarmaladeTouchPointer() { - STACK_TRACE; } void MarmaladeTouchPointer::ResetDeltas() { - STACK_TRACE; m_deltaX = 0; m_deltaY = 0; } BOOL MarmaladeTouchPointer::IsTouchingWithinArea(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) const { - STACK_TRACE; if (m_isTouching && m_x >= left && m_y >= top && m_x <= right && m_y <= bottom) return TRUE; else @@ -41,7 +37,6 @@ BOOL MarmaladeTouchPointer::IsTouchingWithinArea(uint16_t left, uint16_t top, ui BOOL MarmaladeTouchPointer::IsTouchingWithinArea(const Rect &area) const { - STACK_TRACE; if (m_isTouching && m_x >= area.left && m_y >= area.top && m_x <= area.right && m_y <= area.bottom) return TRUE; else @@ -50,7 +45,6 @@ BOOL MarmaladeTouchPointer::IsTouchingWithinArea(const Rect &area) const BOOL MarmaladeTouchPointer::IsTouchingWithinArea(uint16_t centerX, uint16_t centerY, uint16_t radius) const { - STACK_TRACE; if (m_isTouching) { uint32_t squaredDistance = ((centerX - m_x) * (centerX - m_x)) + ((centerY - m_y) * (centerY - m_y)); @@ -64,7 +58,6 @@ BOOL MarmaladeTouchPointer::IsTouchingWithinArea(uint16_t centerX, uint16_t cent BOOL MarmaladeTouchPointer::IsTouchingWithinArea(const Circle &area) const { - STACK_TRACE; if (m_isTouching) { uint32_t squaredDistance = ((area.x - m_x) * (area.x - m_x)) + ((area.y - m_y) * (area.y - m_y)); @@ -78,7 +71,6 @@ BOOL MarmaladeTouchPointer::IsTouchingWithinArea(const Circle &area) const void MarmaladeTouchPointer::OnDown(int32_t id, uint16_t x, uint16_t y) { - STACK_TRACE; m_isTouching = TRUE; m_x = x; m_y = y; @@ -89,7 +81,6 @@ void MarmaladeTouchPointer::OnDown(int32_t id, uint16_t x, uint16_t y) void MarmaladeTouchPointer::OnMove(int32_t id, uint16_t x, uint16_t y) { - STACK_TRACE; // calculate the amount moved since the last time first... m_deltaX = x - m_x; m_deltaY = y - m_y; @@ -101,7 +92,6 @@ void MarmaladeTouchPointer::OnMove(int32_t id, uint16_t x, uint16_t y) void MarmaladeTouchPointer::OnUp() { - STACK_TRACE; m_id = INVALID_TOUCH_POINTER; m_x = 0; m_y = 0; @@ -112,7 +102,6 @@ void MarmaladeTouchPointer::OnUp() MarmaladeTouchscreen::MarmaladeTouchscreen(MarmaladeSystem *system, BOOL isMultitouchAvailable) { - STACK_TRACE; m_system = system; m_isMultitouchAvailable = isMultitouchAvailable; @@ -129,13 +118,11 @@ MarmaladeTouchscreen::MarmaladeTouchscreen(MarmaladeSystem *system, BOOL isMulti MarmaladeTouchscreen::~MarmaladeTouchscreen() { - STACK_TRACE; SAFE_DELETE_ARRAY(m_pointers); } void MarmaladeTouchscreen::ResetDeltas() { - STACK_TRACE; for (uint32_t i = 0; i < m_maxTouchPoints; ++i) { if (m_pointers[i].GetId() != INVALID_TOUCH_POINTER) @@ -145,27 +132,23 @@ void MarmaladeTouchscreen::ResetDeltas() void MarmaladeTouchscreen::ResetViewBounds(const Rect &viewBounds) { - STACK_TRACE; m_viewBounds = viewBounds; } BOOL MarmaladeTouchscreen::OnSingleTouchTapEvent(const s3ePointerEvent *eventArgs) { - STACK_TRACE; ASSERT(m_maxTouchPoints == 1); return FALSE; } BOOL MarmaladeTouchscreen::OnSingleTouchMotionEvent(const s3ePointerMotionEvent *eventArgs) { - STACK_TRACE; ASSERT(m_maxTouchPoints == 1); return FALSE; } BOOL MarmaladeTouchscreen::OnMultiTouchTapEvent(const s3ePointerTouchEvent *eventArgs) { - STACK_TRACE; ASSERT(m_maxTouchPoints > 1); BOOL isDown = (BOOL)eventArgs->m_Pressed; if (isDown) @@ -238,7 +221,6 @@ BOOL MarmaladeTouchscreen::OnMultiTouchTapEvent(const s3ePointerTouchEvent *even BOOL MarmaladeTouchscreen::OnMultiTouchMotionEvent(const s3ePointerTouchMotionEvent *eventArgs) { - STACK_TRACE; ASSERT(m_maxTouchPoints > 1); MarmaladeTouchPointer *pointer = GetPointerById_internal(eventArgs->m_TouchID); if (pointer != NULL) @@ -269,7 +251,6 @@ BOOL MarmaladeTouchscreen::OnMultiTouchMotionEvent(const s3ePointerTouchMotionEv BOOL MarmaladeTouchscreen::WasTapped() { - STACK_TRACE; if (m_isTouching && !m_isLocked) { m_isLocked = TRUE; @@ -285,7 +266,6 @@ BOOL MarmaladeTouchscreen::WasTapped() const TouchPointer* MarmaladeTouchscreen::GetPointerById(int32_t id) const { - STACK_TRACE; for (uint32_t i = 0; i < m_maxTouchPoints; ++i) { if (m_pointers[i].GetId() == id) @@ -297,7 +277,6 @@ const TouchPointer* MarmaladeTouchscreen::GetPointerById(int32_t id) const MarmaladeTouchPointer* MarmaladeTouchscreen::GetPointerById_internal(int32_t id) { - STACK_TRACE; for (uint32_t i = 0; i < m_maxTouchPoints; ++i) { if (m_pointers[i].GetId() == id) @@ -309,7 +288,6 @@ MarmaladeTouchPointer* MarmaladeTouchscreen::GetPointerById_internal(int32_t id) MarmaladeTouchPointer* MarmaladeTouchscreen::GetFirstAvailablePointer() { - STACK_TRACE; for (uint32_t i = 0; i < m_maxTouchPoints; ++i) { if (m_pointers[i].GetId() == INVALID_TOUCH_POINTER) @@ -321,7 +299,6 @@ MarmaladeTouchPointer* MarmaladeTouchscreen::GetFirstAvailablePointer() MarmaladeTouchPointer* MarmaladeTouchscreen::GetPointerByIdOrFirstAvailable(int32_t id) { - STACK_TRACE; MarmaladeTouchPointer *result = GetPointerById_internal(id); if (result == NULL) result = GetFirstAvailablePointer(); @@ -331,7 +308,6 @@ MarmaladeTouchPointer* MarmaladeTouchscreen::GetPointerByIdOrFirstAvailable(int3 MarmaladeTouchPointer* MarmaladeTouchscreen::GetNextDownPointer() { - STACK_TRACE; for (uint32_t i = 0; i < m_maxTouchPoints; ++i) { if (m_pointers[i].IsTouching()) @@ -346,7 +322,6 @@ MarmaladeTouchPointer* MarmaladeTouchscreen::GetNextDownPointer() void MarmaladeTouchscreen::Reset() { - STACK_TRACE; MarmaladeTouchPointer *oldPrimaryPointer = m_primaryPointer; m_primaryPointer = &m_pointers[0]; @@ -373,13 +348,11 @@ void MarmaladeTouchscreen::Reset() void MarmaladeTouchscreen::RegisterListener(TouchscreenListener *listener) { - STACK_TRACE; m_listeners.insert(listener); } void MarmaladeTouchscreen::UnregisterListener(TouchscreenListener *listener) { - STACK_TRACE; m_listeners.erase(listener); } diff --git a/src/framework/input/sdlkeyboard.cpp b/src/framework/input/sdlkeyboard.cpp index 303f5a5..2c86d94 100644 --- a/src/framework/input/sdlkeyboard.cpp +++ b/src/framework/input/sdlkeyboard.cpp @@ -1,6 +1,4 @@ #ifdef SDL -#include "../debug.h" - #include "sdlkeyboard.h" #include "keyboardlistener.h" #include "../sdlincludes.h" @@ -9,28 +7,23 @@ SDLKeyboard::SDLKeyboard(SDLSystem *system, BOOL hasPhysicalKeysForGameControls) { - STACK_TRACE; m_system = system; m_hasPhysicalKeysForGameControls = hasPhysicalKeysForGameControls; m_keys = new BOOL[KSYM_LAST]; - ASSERT(m_keys != NULL); m_lockedKeys = new BOOL[KSYM_LAST]; - ASSERT(m_lockedKeys != NULL); Reset(); } SDLKeyboard::~SDLKeyboard() { - STACK_TRACE; SAFE_DELETE_ARRAY(m_keys); SAFE_DELETE_ARRAY(m_lockedKeys); } BOOL SDLKeyboard::OnKeyEvent(const SDL_KeyboardEvent *eventArgs) { - STACK_TRACE; int32_t keyCode = (int32_t)eventArgs->keysym.sym; if (eventArgs->state == SDL_PRESSED) @@ -67,7 +60,6 @@ BOOL SDLKeyboard::OnKeyEvent(const SDL_KeyboardEvent *eventArgs) BOOL SDLKeyboard::IsPressed(KEYS key) { - STACK_TRACE; if (m_keys[key] && !m_lockedKeys[key]) { m_lockedKeys[key] = TRUE; @@ -79,7 +71,6 @@ BOOL SDLKeyboard::IsPressed(KEYS key) void SDLKeyboard::Reset() { - STACK_TRACE; memset(m_keys, FALSE, sizeof(BOOL) * KSYM_LAST); memset(m_lockedKeys, FALSE, sizeof(BOOL) * KSYM_LAST); } diff --git a/src/framework/input/sdlmouse.cpp b/src/framework/input/sdlmouse.cpp index 1500c25..141ed27 100644 --- a/src/framework/input/sdlmouse.cpp +++ b/src/framework/input/sdlmouse.cpp @@ -1,6 +1,4 @@ #ifdef SDL -#include "../debug.h" - #include "sdlmouse.h" #include "mouselistener.h" #include "../sdlincludes.h" @@ -12,34 +10,28 @@ const int32_t NUM_BUTTONS = 5; SDLMouse::SDLMouse(SDLSystem *system) { - STACK_TRACE; m_system = system; m_buttons = new BOOL[NUM_BUTTONS]; - ASSERT(m_buttons != NULL); m_lockedButtons = new BOOL[NUM_BUTTONS]; - ASSERT(m_lockedButtons != NULL); Reset(); } SDLMouse::~SDLMouse() { - STACK_TRACE; SAFE_DELETE_ARRAY(m_buttons); SAFE_DELETE_ARRAY(m_lockedButtons); } void SDLMouse::ResetDeltas() { - STACK_TRACE; m_deltaX = 0; m_deltaY = 0; } BOOL SDLMouse::OnButtonEvent(const SDL_MouseButtonEvent *eventArgs) { - STACK_TRACE; // translate from SDL's button values to our own MOUSE_BUTTONS enum int32_t button = (int32_t)eventArgs->button - 1; @@ -84,7 +76,6 @@ BOOL SDLMouse::OnButtonEvent(const SDL_MouseButtonEvent *eventArgs) BOOL SDLMouse::OnMotionEvent(const SDL_MouseMotionEvent *eventArgs) { - STACK_TRACE; m_deltaX = eventArgs->x - m_x; m_deltaY = eventArgs->y - m_y; @@ -106,7 +97,6 @@ BOOL SDLMouse::OnMotionEvent(const SDL_MouseMotionEvent *eventArgs) BOOL SDLMouse::IsPressed(MOUSE_BUTTONS button) { - STACK_TRACE; if (m_buttons[button] && !m_lockedButtons[button]) { m_lockedButtons[button] = TRUE; @@ -118,7 +108,6 @@ BOOL SDLMouse::IsPressed(MOUSE_BUTTONS button) void SDLMouse::Reset() { - STACK_TRACE; memset(m_buttons, FALSE, sizeof(BOOL) * NUM_BUTTONS); memset(m_lockedButtons, FALSE, sizeof(BOOL) * NUM_BUTTONS); m_x = 0; @@ -138,4 +127,3 @@ void SDLMouse::UnregisterListener(MouseListener *listener) } #endif - diff --git a/src/framework/marmaladegamewindow.cpp b/src/framework/marmaladegamewindow.cpp index 139b8da..7cd06a6 100644 --- a/src/framework/marmaladegamewindow.cpp +++ b/src/framework/marmaladegamewindow.cpp @@ -15,7 +15,6 @@ MarmaladeGameWindow::MarmaladeGameWindow(BaseGameApp *gameApp, MarmaladeSystem *system) : GameWindow(gameApp) { - STACK_TRACE; m_system = system; m_active = FALSE; m_focused = FALSE; @@ -31,7 +30,6 @@ MarmaladeGameWindow::MarmaladeGameWindow(BaseGameApp *gameApp, MarmaladeSystem * MarmaladeGameWindow::~MarmaladeGameWindow() { - STACK_TRACE; LOG_INFO(LOGCAT_WINDOW, "Releasing.\n"); if (!DestroyWindow()) LOG_ERROR(LOGCAT_WINDOW, "Failed to destroy the EGL context.\n"); @@ -39,7 +37,6 @@ MarmaladeGameWindow::~MarmaladeGameWindow() BOOL MarmaladeGameWindow::Create(GameWindowParams *params) { - STACK_TRACE; LOG_INFO(LOGCAT_WINDOW, "Creating a window.\n"); LOG_INFO(LOGCAT_WINDOW, "Received window creation parameters:\n"); @@ -62,7 +59,6 @@ BOOL MarmaladeGameWindow::Create(GameWindowParams *params) BOOL MarmaladeGameWindow::Resize(uint16_t width, uint16_t height) { - STACK_TRACE; // note that the parameters are ignored completely because they don't really // make sense for our primary/only usage of Marmalade (mobile devices) // the parameters need to be there obviously because of the GameWindow parent @@ -101,14 +97,12 @@ BOOL MarmaladeGameWindow::Resize(uint16_t width, uint16_t height) BOOL MarmaladeGameWindow::ToggleFullscreen() { - STACK_TRACE; ASSERT(!"Not implemented."); return FALSE; } BOOL MarmaladeGameWindow::SetUpWindow() { - STACK_TRACE; if (!SetUpEGL()) { LOG_ERROR(LOGCAT_WINDOW, "EGL setup not completed successfully.\n"); @@ -120,7 +114,6 @@ BOOL MarmaladeGameWindow::SetUpWindow() BOOL MarmaladeGameWindow::DestroyWindow() { - STACK_TRACE; if (!DestroyEGL()) { LOG_ERROR(LOGCAT_WINDOW, "EGL destroy not completed successfully.\n"); @@ -132,7 +125,6 @@ BOOL MarmaladeGameWindow::DestroyWindow() BOOL MarmaladeGameWindow::SetUpEGL() { - STACK_TRACE; LOG_INFO(LOGCAT_WINDOW, "Connecting to EGL display server.\n"); EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); if (display == EGL_NO_DISPLAY) @@ -321,7 +313,6 @@ BOOL MarmaladeGameWindow::SetUpEGL() BOOL MarmaladeGameWindow::DestroyEGL() { - STACK_TRACE; if (m_eglDisplay != EGL_NO_DISPLAY) { LOG_INFO(LOGCAT_WINDOW, "Destroying EGL context.\n"); @@ -362,7 +353,6 @@ BOOL MarmaladeGameWindow::DestroyEGL() SCREEN_ORIENTATION_ANGLE MarmaladeGameWindow::GetCurrentScreenOrientationAngle() { - STACK_TRACE; s3eSurfaceBlitDirection direction = (s3eSurfaceBlitDirection)s3eSurfaceGetInt(S3E_SURFACE_DEVICE_BLIT_DIRECTION); SCREEN_ORIENTATION_ANGLE angle = SCREEN_ANGLE_0; @@ -388,7 +378,6 @@ SCREEN_ORIENTATION_ANGLE MarmaladeGameWindow::GetCurrentScreenOrientationAngle() void MarmaladeGameWindow::Close() { - STACK_TRACE; if (m_active) { LOG_INFO(LOGCAT_WINDOW, "Window marked inactive.\n"); @@ -404,7 +393,6 @@ void MarmaladeGameWindow::Close() void MarmaladeGameWindow::ProcessEvent(const OSEvent *event) { - STACK_TRACE; if (IsClosing()) return; diff --git a/src/framework/marmaladesystem.cpp b/src/framework/marmaladesystem.cpp index 995f6ef..36843bb 100644 --- a/src/framework/marmaladesystem.cpp +++ b/src/framework/marmaladesystem.cpp @@ -36,9 +36,7 @@ int32 _MarmaladeEventCallback_PointerMultitouchMotion(void *systemData, void *us int32_t _MarmaladeEvent_PassToSystem(MARMALADE_EVENT event, void *systemData, void *userData); MarmaladeSystem::MarmaladeSystem() - : OperatingSystem() { - STACK_TRACE; m_isQuitting = FALSE; m_window = NULL; m_filesystem = NULL; @@ -51,7 +49,6 @@ MarmaladeSystem::MarmaladeSystem() MarmaladeSystem::~MarmaladeSystem() { - STACK_TRACE; LOG_INFO(LOGCAT_SYSTEM, "Releasing.\n"); if (!m_isQuitting) @@ -70,7 +67,6 @@ MarmaladeSystem::~MarmaladeSystem() BOOL MarmaladeSystem::Initialize() { - STACK_TRACE; LOG_INFO(LOGCAT_SYSTEM, "MarmaladeSystem initialization starting.\n"); const char* marmaladeRuntimeVersion = s3eDeviceGetString(S3E_DEVICE_SDK_VERSION); @@ -227,7 +223,6 @@ BOOL MarmaladeSystem::Initialize() BOOL MarmaladeSystem::CreateGameWindow(BaseGameApp *gameApp, GameWindowParams *params) { - STACK_TRACE; ASSERT(m_window == NULL); MarmaladeGameWindow *window = new MarmaladeGameWindow(gameApp, this); @@ -289,7 +284,6 @@ BOOL MarmaladeSystem::CreateGameWindow(BaseGameApp *gameApp, GameWindowParams *p void MarmaladeSystem::ProcessEvents() { - STACK_TRACE; // need to manually reset deltas for the Mouse/Touchscreen device objects // since we use callbacks to get state updates. as a result of using // callbacks, the deltas won't ever get reset to zero when motion of these @@ -310,7 +304,6 @@ void MarmaladeSystem::ProcessEvents() int32_t MarmaladeSystem::OnEvent(const MarmaladeSystemEvent *eventArgs) { - STACK_TRACE; switch (eventArgs->event) { case MARMALADE_EVENT_PAUSE: @@ -391,7 +384,6 @@ int32_t MarmaladeSystem::OnEvent(const MarmaladeSystemEvent *eventArgs) void MarmaladeSystem::Quit() { - STACK_TRACE; LOG_INFO(LOGCAT_SYSTEM, "Quit requested.\n"); m_isQuitting = TRUE; @@ -404,7 +396,6 @@ void MarmaladeSystem::Quit() void MarmaladeSystem::Delay(uint32_t milliseconds) const { - STACK_TRACE; unsigned int start = GetTicks(); unsigned int elapsed = 0; @@ -477,7 +468,6 @@ int32 _MarmaladeEventCallback_PointerMultitouchMotion(void *systemData, void *us int32_t _MarmaladeEvent_PassToSystem(MARMALADE_EVENT event, void *systemData, void *userData) { - STACK_TRACE; MarmaladeSystemEvent eventArgs; eventArgs.event = event; eventArgs.data = systemData; diff --git a/src/framework/math/boundingbox.cpp b/src/framework/math/boundingbox.cpp index f33a5e1..33757ae 100644 --- a/src/framework/math/boundingbox.cpp +++ b/src/framework/math/boundingbox.cpp @@ -6,7 +6,6 @@ BoundingBox::BoundingBox(const Vector3 *vertices, int numVertices) { - STACK_TRACE; ASSERT(vertices != NULL); ASSERT(numVertices > 0); float minX = 0.0f; @@ -32,7 +31,6 @@ BoundingBox::BoundingBox(const Vector3 *vertices, int numVertices) float BoundingBox::GetSquaredDistanceFromPointToBox(const Vector3 &point, const BoundingBox &box) { - STACK_TRACE; float distanceSq = 0.0f; float v; @@ -59,6 +57,5 @@ float BoundingBox::GetSquaredDistanceFromPointToBox(const Vector3 &point, const float BoundingBox::GetDistanceFromPointToBox(const Vector3 &point, const BoundingBox &box) { - STACK_TRACE; return sqrtf(GetSquaredDistanceFromPointToBox(point, box)); } diff --git a/src/framework/math/boundingsphere.cpp b/src/framework/math/boundingsphere.cpp index b71303d..46066bf 100644 --- a/src/framework/math/boundingsphere.cpp +++ b/src/framework/math/boundingsphere.cpp @@ -6,7 +6,6 @@ BoundingSphere::BoundingSphere(const Vector3 *vertices, int numVertices) { - STACK_TRACE; ASSERT(vertices != NULL); ASSERT(numVertices > 0); diff --git a/src/framework/math/camera.cpp b/src/framework/math/camera.cpp index 19ff04d..2f9a7fb 100644 --- a/src/framework/math/camera.cpp +++ b/src/framework/math/camera.cpp @@ -10,7 +10,6 @@ Camera::Camera(ViewContext *viewContext) { - STACK_TRACE; m_viewContext = viewContext; m_frustum = new Frustum(m_viewContext); ASSERT(m_frustum != NULL); @@ -35,13 +34,11 @@ Camera::Camera(ViewContext *viewContext) Camera::~Camera() { - STACK_TRACE; SAFE_DELETE(m_frustum); } void Camera::CalculateDefaultProjection(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { - STACK_TRACE; m_viewportWidth = right - left; m_viewportHeight = bottom - top; @@ -55,7 +52,6 @@ void Camera::CalculateDefaultProjection(uint16_t left, uint16_t top, uint16_t ri void Camera::CalculateDefaultLookAt(const Vector3 &movement) { - STACK_TRACE; // final camera orientation. angles must be negative (or rather, inverted) for the camera matrix. also the matrix concatenation order is important! Matrix4x4 rotation = Matrix4x4::CreateRotationY(-m_orientation.y) * Matrix4x4::CreateRotationX(-m_orientation.x); @@ -73,12 +69,10 @@ void Camera::CalculateDefaultLookAt(const Vector3 &movement) void Camera::OnUpdate(float delta) { - STACK_TRACE; } void Camera::OnRender() { - STACK_TRACE; UpdateLookAtMatrix(ZERO_VECTOR); m_viewContext->SetModelViewMatrix(m_lookAt); m_frustum->Calculate(); @@ -86,20 +80,17 @@ void Camera::OnRender() void Camera::OnResize(const Rect &size) { - STACK_TRACE; CalculateDefaultProjection(size.left, size.top, size.right, size.bottom); m_viewContext->SetProjectionMatrix(m_projection); } void Camera::UpdateLookAtMatrix(const Vector3 &movement) { - STACK_TRACE; CalculateDefaultLookAt(movement); } void Camera::UpdateProjectionMatrix() { - STACK_TRACE; CalculateDefaultProjection( m_viewContext->GetViewportLeft(), m_viewContext->GetViewportTop(), @@ -110,7 +101,6 @@ void Camera::UpdateProjectionMatrix() Ray Camera::Pick(uint16_t screenX, uint16_t screenY) const { - STACK_TRACE; float nx = 2.0f * ((float)(screenX - (m_viewContext->GetViewportWidth() / 2))) / ((float)m_viewContext->GetViewportWidth()); float ny = 2.0f * -((float)(screenY - (m_viewContext->GetViewportHeight() / 2))) / ((float)m_viewContext->GetViewportHeight()); @@ -132,7 +122,6 @@ Ray Camera::Pick(uint16_t screenX, uint16_t screenY) const Point2 Camera::Project(const Vector3 &objectPosition) const { - STACK_TRACE; Matrix4x4 modelview = m_viewContext->GetModelViewMatrix(); Matrix4x4 projection = m_viewContext->GetProjectionMatrix(); @@ -141,7 +130,6 @@ Point2 Camera::Project(const Vector3 &objectPosition) const Point2 Camera::Project(const Vector3 &objectPosition, const Matrix4x4 &modelview, const Matrix4x4 &projection) const { - STACK_TRACE; // transform object position by modelview matrix (vector transform, w = 1) float tempX = objectPosition.x * modelview.m[_11] + objectPosition.y * modelview.m[_12] + objectPosition.z * modelview.m[_13] + modelview.m[_14]; float tempY = objectPosition.x * modelview.m[_21] + objectPosition.y * modelview.m[_22] + objectPosition.z * modelview.m[_23] + modelview.m[_24]; @@ -175,4 +163,3 @@ Point2 Camera::Project(const Vector3 &objectPosition, const Matrix4x4 &modelview return out; } - diff --git a/src/framework/math/frustum.cpp b/src/framework/math/frustum.cpp index 0d2057c..0d750d6 100644 --- a/src/framework/math/frustum.cpp +++ b/src/framework/math/frustum.cpp @@ -10,19 +10,16 @@ Frustum::Frustum(ViewContext *viewContext) { - STACK_TRACE; m_viewContext = viewContext; Calculate(); } Frustum::~Frustum() { - STACK_TRACE; } void Frustum::Calculate() { - STACK_TRACE; Matrix4x4 projection = m_viewContext->GetProjectionMatrix(); Matrix4x4 modelview = m_viewContext->GetModelViewMatrix(); @@ -69,7 +66,6 @@ void Frustum::Calculate() BOOL Frustum::Test(const Vector3 &point) const { - STACK_TRACE; for (int p = 0; p < NUM_FRUSTUM_SIDES; ++p) { if (Plane::ClassifyPoint(m_planes[p], point) == BEHIND) @@ -81,7 +77,6 @@ BOOL Frustum::Test(const Vector3 &point) const BOOL Frustum::Test(const BoundingBox &box) const { - STACK_TRACE; if (!TestPlaneAgainstBox(m_planes[FRUSTUM_RIGHT], box.min.x, box.min.y, box.min.z, box.GetWidth(), box.GetHeight(), box.GetDepth())) return FALSE; if (!TestPlaneAgainstBox(m_planes[FRUSTUM_LEFT], box.min.x, box.min.y, box.min.z, box.GetWidth(), box.GetHeight(), box.GetDepth())) @@ -100,7 +95,6 @@ BOOL Frustum::Test(const BoundingBox &box) const BOOL Frustum::Test(const BoundingSphere &sphere) const { - STACK_TRACE; if (!TestPlaneAgainstSphere(m_planes[FRUSTUM_RIGHT], sphere.center, sphere.radius)) return FALSE; if (!TestPlaneAgainstSphere(m_planes[FRUSTUM_LEFT], sphere.center, sphere.radius)) @@ -119,7 +113,6 @@ BOOL Frustum::Test(const BoundingSphere &sphere) const BOOL Frustum::TestPlaneAgainstBox(const Plane &plane, float minX, float minY, float minZ, float width, float height, float depth) const { - STACK_TRACE; if (Plane::ClassifyPoint(plane, Vector3(minX, minY, minZ)) != BEHIND) return TRUE; if (Plane::ClassifyPoint(plane, Vector3(minX, minY, minZ + depth)) != BEHIND) @@ -142,7 +135,6 @@ BOOL Frustum::TestPlaneAgainstBox(const Plane &plane, float minX, float minY, fl BOOL Frustum::TestPlaneAgainstSphere(const Plane &plane, const Vector3 ¢er, float radius) const { - STACK_TRACE; float distance = Plane::DistanceBetween(plane, center); if (distance <= -radius) return FALSE; diff --git a/src/framework/math/intersectiontester.cpp b/src/framework/math/intersectiontester.cpp index 5dbbf55..766edaf 100644 --- a/src/framework/math/intersectiontester.cpp +++ b/src/framework/math/intersectiontester.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "intersectiontester.h" #include @@ -15,7 +13,6 @@ BOOL IntersectionTester::Test(const BoundingBox &box, const Vector3 &point) { - STACK_TRACE; if ((point.x >= box.min.x && point.x <= box.max.x) && (point.y >= box.min.y && point.y <= box.max.y) && (point.z >= box.min.z && point.z <= box.max.z)) @@ -26,7 +23,6 @@ BOOL IntersectionTester::Test(const BoundingBox &box, const Vector3 &point) BOOL IntersectionTester::Test(const BoundingSphere &sphere, const Vector3 &point) { - STACK_TRACE; if (fabsf(Vector3::Distance(point, sphere.center)) < sphere.radius) return TRUE; else @@ -35,7 +31,6 @@ BOOL IntersectionTester::Test(const BoundingSphere &sphere, const Vector3 &point BOOL IntersectionTester::Test(const BoundingBox &box, const Vector3 *vertices, int numVertices, Vector3 *firstIntersection) { - STACK_TRACE; for (int i = 0; i < numVertices; ++i) { if ((vertices[i].x >= box.min.x && vertices[i].x <= box.max.x) && @@ -53,7 +48,6 @@ BOOL IntersectionTester::Test(const BoundingBox &box, const Vector3 *vertices, i BOOL IntersectionTester::Test(const BoundingSphere &sphere, const Vector3 *vertices, int numVertices, Vector3 *firstIntersection) { - STACK_TRACE; for (int i = 0; i < numVertices; ++i) { if (fabsf(Vector3::Distance(vertices[i], sphere.center)) < sphere.radius) @@ -69,7 +63,6 @@ BOOL IntersectionTester::Test(const BoundingSphere &sphere, const Vector3 *verti BOOL IntersectionTester::Test(const BoundingBox &a, const BoundingBox &b) { - STACK_TRACE; if (a.max.x < b.min.x || a.min.x > b.max.x) return FALSE; if (a.max.y < b.min.y || a.min.y > b.max.y) @@ -82,7 +75,6 @@ BOOL IntersectionTester::Test(const BoundingBox &a, const BoundingBox &b) BOOL IntersectionTester::Test(const BoundingSphere &a, const BoundingSphere &b) { - STACK_TRACE; Vector3 temp = a.center - b.center; float distanceSquared = Vector3::Dot(temp, temp); @@ -95,7 +87,6 @@ BOOL IntersectionTester::Test(const BoundingSphere &a, const BoundingSphere &b) BOOL IntersectionTester::Test(const BoundingSphere &sphere, const Plane &plane) { - STACK_TRACE; float distance = Vector3::Dot(sphere.center, plane.normal) - plane.d; if (fabsf(distance) <= sphere.radius) return TRUE; @@ -105,7 +96,6 @@ BOOL IntersectionTester::Test(const BoundingSphere &sphere, const Plane &plane) BOOL IntersectionTester::Test(const BoundingBox &box, const Plane &plane) { - STACK_TRACE; Vector3 temp1 = (box.max + box.min) / 2.0f; Vector3 temp2 = box.max - temp1; @@ -121,7 +111,6 @@ BOOL IntersectionTester::Test(const BoundingBox &box, const Plane &plane) BOOL IntersectionTester::Test(const Ray &ray, const Plane &plane, Vector3 *intersection) { - STACK_TRACE; float denominator = Vector3::Dot(ray.direction, plane.normal); if (denominator == 0.0f) return FALSE; @@ -143,7 +132,6 @@ BOOL IntersectionTester::Test(const Ray &ray, const Plane &plane, Vector3 *inter BOOL IntersectionTester::Test(const Ray &ray, const BoundingSphere &sphere, Vector3 *intersection) { - STACK_TRACE; Vector3 temp1 = ray.position - sphere.center; float b = Vector3::Dot(temp1, ray.direction); @@ -173,7 +161,6 @@ BOOL IntersectionTester::Test(const Ray &ray, const BoundingSphere &sphere, Vect BOOL IntersectionTester::Test(const Ray &ray, const BoundingBox &box, Vector3 *intersection) { - STACK_TRACE; float tmin = 0.0f; float tmax = FLT_MAX; @@ -265,7 +252,6 @@ BOOL IntersectionTester::Test(const Ray &ray, const BoundingBox &box, Vector3 *i BOOL IntersectionTester::Test(const BoundingBox &box, const BoundingSphere &sphere) { - STACK_TRACE; float distanceSq = BoundingBox::GetSquaredDistanceFromPointToBox(sphere.center, box); if (distanceSq <= (sphere.radius * sphere.radius)) @@ -276,7 +262,6 @@ BOOL IntersectionTester::Test(const BoundingBox &box, const BoundingSphere &sphe BOOL IntersectionTester::Test(const Ray &ray, const Vector3 &a, const Vector3 &b, const Vector3 &c, Vector3 *intersection) { - STACK_TRACE; float r, num1, num2; Vector3 temp1 = Vector3::Cross(b - a, c - a); @@ -315,7 +300,6 @@ BOOL IntersectionTester::Test(const Ray &ray, const Vector3 &a, const Vector3 &b BOOL IntersectionTester::Test(CollisionPacket &packet, const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) { - STACK_TRACE; BOOL foundCollision = FALSE; Vector3 p1 = v1 / packet.ellipsoidRadius; diff --git a/src/framework/sdlgamewindow.cpp b/src/framework/sdlgamewindow.cpp index 93c3a10..b172ed6 100644 --- a/src/framework/sdlgamewindow.cpp +++ b/src/framework/sdlgamewindow.cpp @@ -13,7 +13,6 @@ SDLGameWindow::SDLGameWindow(BaseGameApp *gameApp) : GameWindow(gameApp) { - STACK_TRACE; m_active = FALSE; m_focused = FALSE; m_closing = FALSE; @@ -35,13 +34,11 @@ SDLGameWindow::SDLGameWindow(BaseGameApp *gameApp) SDLGameWindow::~SDLGameWindow() { - STACK_TRACE; LOG_INFO(LOGCAT_WINDOW, "Releasing.\n"); } BOOL SDLGameWindow::Create(GameWindowParams *params) { - STACK_TRACE; LOG_INFO(LOGCAT_WINDOW, "Creating a window.\n"); SDLGameWindowParams *sdlParams = (SDLGameWindowParams*)params; @@ -88,7 +85,6 @@ BOOL SDLGameWindow::Create(GameWindowParams *params) BOOL SDLGameWindow::Resize(uint16_t width, uint16_t height) { - STACK_TRACE; BOOL result = SetUpWindow(width, height); GetGameApp()->OnNewContext(); GetGameApp()->OnResize(); @@ -97,7 +93,6 @@ BOOL SDLGameWindow::Resize(uint16_t width, uint16_t height) BOOL SDLGameWindow::ToggleFullscreen() { - STACK_TRACE; BOOL screenToggleResult; if (m_fullscreen) LOG_INFO(LOGCAT_WINDOW, "Beginning switch to windowed mode...\n"); @@ -131,7 +126,6 @@ BOOL SDLGameWindow::ToggleFullscreen() void SDLGameWindow::DisplaySdlHardwareInfo() { - STACK_TRACE; const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo(); char *videoDriver = new char[100]; videoDriver = SDL_VideoDriverName(videoDriver, 100); @@ -190,7 +184,6 @@ void SDLGameWindow::DisplaySdlHardwareInfo() BOOL SDLGameWindow::SetUpWindow(uint16_t width, uint16_t height) { - STACK_TRACE; int ret; const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo(); @@ -266,7 +259,6 @@ BOOL SDLGameWindow::SetUpWindow(uint16_t width, uint16_t height) void SDLGameWindow::ProcessEvent(const OSEvent *event) { - STACK_TRACE; if (IsClosing()) return; @@ -344,7 +336,6 @@ void SDLGameWindow::ProcessEvent(const OSEvent *event) void SDLGameWindow::Close() { - STACK_TRACE; if (m_active) { LOG_INFO(LOGCAT_WINDOW, "Window marked inactive.\n"); @@ -357,5 +348,5 @@ void SDLGameWindow::Close() LOG_INFO(LOGCAT_WINDOW, "Closing.\n"); m_closing = TRUE; } -#endif +#endif diff --git a/src/framework/sdlsystem.cpp b/src/framework/sdlsystem.cpp index 431481a..c83f578 100644 --- a/src/framework/sdlsystem.cpp +++ b/src/framework/sdlsystem.cpp @@ -19,9 +19,7 @@ #include "sdlincludes.h" SDLSystem::SDLSystem() - : OperatingSystem() { - STACK_TRACE; m_isQuitting = FALSE; m_hasShaderSupport = FALSE; m_window = NULL; @@ -32,7 +30,6 @@ SDLSystem::SDLSystem() SDLSystem::~SDLSystem() { - STACK_TRACE; LOG_INFO(LOGCAT_SYSTEM, "Releasing.\n"); if (!m_isQuitting) @@ -53,7 +50,6 @@ SDLSystem::~SDLSystem() BOOL SDLSystem::Initialize() { - STACK_TRACE; LOG_INFO(LOGCAT_SYSTEM, "SDLSystem initialization starting.\n"); const SDL_version *SDLversion = SDL_Linked_Version(); @@ -108,7 +104,6 @@ BOOL SDLSystem::Initialize() BOOL SDLSystem::CreateGameWindow(BaseGameApp *gameApp, GameWindowParams *params) { - STACK_TRACE; ASSERT(m_window == NULL); SDLGameWindow *window = new SDLGameWindow(gameApp); @@ -208,8 +203,6 @@ BOOL SDLSystem::CreateGameWindow(BaseGameApp *gameApp, GameWindowParams *params) void SDLSystem::ProcessEvents() { - STACK_TRACE; - // little bit of housekeeping m_mouse->ResetDeltas(); @@ -262,7 +255,6 @@ void SDLSystem::ProcessEvents() void SDLSystem::Quit() { - STACK_TRACE; LOG_INFO(LOGCAT_SYSTEM, "Quit requested.\n"); m_isQuitting = TRUE; @@ -273,5 +265,5 @@ void SDLSystem::Quit() } } -#endif +#endif diff --git a/src/framework/support/freecamera.cpp b/src/framework/support/freecamera.cpp index 5c4fdd0..945317c 100644 --- a/src/framework/support/freecamera.cpp +++ b/src/framework/support/freecamera.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "freecamera.h" #include "../basegameapp.h" @@ -12,7 +10,6 @@ FreeCamera::FreeCamera(ViewContext *viewContext, BaseGameApp *gameApp) : Camera(viewContext) { - STACK_TRACE; m_gameApp = gameApp; m_movement = ZERO_VECTOR; m_forward = ZERO_VECTOR; @@ -20,12 +17,10 @@ FreeCamera::FreeCamera(ViewContext *viewContext, BaseGameApp *gameApp) FreeCamera::~FreeCamera() { - STACK_TRACE; } void FreeCamera::Move(float x, float y, float z) { - STACK_TRACE; GetPosition().x += x; GetPosition().y += y; GetPosition().z += z; @@ -33,7 +28,6 @@ void FreeCamera::Move(float x, float y, float z) void FreeCamera::Orient(float x, float y, float z) { - STACK_TRACE; GetOrientation().x += x; GetOrientation().y += y; GetOrientation().z += z; @@ -41,7 +35,6 @@ void FreeCamera::Orient(float x, float y, float z) void FreeCamera::OnUpdate(float delta) { - STACK_TRACE; #ifdef MOBILE if (m_gameApp->GetTouchscreen()->IsTouching()) { diff --git a/src/framework/support/grid.cpp b/src/framework/support/grid.cpp index fa1fdf4..86e259e 100644 --- a/src/framework/support/grid.cpp +++ b/src/framework/support/grid.cpp @@ -8,7 +8,6 @@ Grid::Grid(GraphicsDevice *graphicsDevice, uint16_t width, uint16_t height) { - STACK_TRACE; m_graphicsDevice = graphicsDevice; m_renderState = new RENDERSTATE_DEFAULT; @@ -46,14 +45,12 @@ Grid::Grid(GraphicsDevice *graphicsDevice, uint16_t width, uint16_t height) Grid::~Grid() { - STACK_TRACE; SAFE_DELETE(m_horizontalPoints); SAFE_DELETE(m_verticalPoints); } void Grid::OnRender() { - STACK_TRACE; m_renderState->Apply(); m_graphicsDevice->BindVertexBuffer(m_horizontalPoints); diff --git a/src/framework/support/text.cpp b/src/framework/support/text.cpp index 2c66d08..4960d72 100644 --- a/src/framework/support/text.cpp +++ b/src/framework/support/text.cpp @@ -6,7 +6,6 @@ Text* Text::CreateFrom(File *file) { - STACK_TRACE; ASSERT(file != NULL); ASSERT(file->IsOpen()); @@ -31,7 +30,6 @@ Text* Text::CreateFrom(File *file) Text* Text::CreateFrom(const char *text, size_t length) { - STACK_TRACE; ASSERT(text != NULL); ASSERT(length > 0); @@ -54,7 +52,6 @@ Text* Text::CreateFrom(const char *text, size_t length) Text::Text(char *text, size_t length) { - STACK_TRACE; ASSERT(text != NULL); ASSERT(length > 0); m_text = text; @@ -64,13 +61,11 @@ Text::Text(char *text, size_t length) Text::~Text() { - STACK_TRACE; SAFE_DELETE(m_text); } uint32_t Text::CountLines() { - STACK_TRACE; uint32_t numLines = 1; for (uint32_t i = 0; i < m_length; ++i) { @@ -84,7 +79,6 @@ uint32_t Text::CountLines() const char* Text::GetLine(uint32_t line, size_t &lineLength) const { - STACK_TRACE; ASSERT(line < m_numLines); // find the start of the requested line @@ -125,4 +119,4 @@ const char* Text::GetLine(uint32_t line, size_t &lineLength) const --lineLength; return startOfLine; -} \ No newline at end of file +} diff --git a/src/framework/util/hashing.cpp b/src/framework/util/hashing.cpp index aef879a..5eb7a37 100644 --- a/src/framework/util/hashing.cpp +++ b/src/framework/util/hashing.cpp @@ -1,5 +1,3 @@ -#include "../debug.h" - #include "hashing.h" #include @@ -7,7 +5,6 @@ HashedValue HashString(const char *str) { - STACK_TRACE; const unsigned long base = 65521L; const unsigned long nmax = 5552; diff --git a/src/game/debuginfoprocess.cpp b/src/game/debuginfoprocess.cpp index 30ac827..3a3614d 100644 --- a/src/game/debuginfoprocess.cpp +++ b/src/game/debuginfoprocess.cpp @@ -1,5 +1,3 @@ -#include "../framework/debug.h" - #include "debuginfoprocess.h" #include "../gameapp.h" @@ -22,17 +20,14 @@ const Color TEXT_COLOR = COLOR_WHITE; DebugInfoProcess::DebugInfoProcess(GameState *gameState, ProcessManager *processManager) : GameProcess(gameState, processManager) { - STACK_TRACE; } DebugInfoProcess::~DebugInfoProcess() { - STACK_TRACE; } void DebugInfoProcess::OnRender(RenderContext *renderContext) { - STACK_TRACE; SpriteFont *font = GetGameApp()->GetContentCache()->GetUIFont(); uint16_t y = 5; diff --git a/src/game/testingstate.cpp b/src/game/testingstate.cpp index a2eeb9f..fcee8c8 100644 --- a/src/game/testingstate.cpp +++ b/src/game/testingstate.cpp @@ -1,4 +1,3 @@ -#include "../framework/debug.h" #include "../framework/log.h" #include "../framework/common.h" @@ -21,19 +20,16 @@ TestingState::TestingState(GameApp *gameApp, StateManager *stateManager) : GameState(gameApp, stateManager) { - STACK_TRACE; m_grid = NULL; m_camera = NULL; } TestingState::~TestingState() { - STACK_TRACE; } void TestingState::OnPush() { - STACK_TRACE; m_camera = new FreeCamera(GetGameApp()->GetGraphicsDevice()->GetViewContext(), GetGameApp()); m_camera->GetPosition().Set(0.0f, 1.0f, 0.0f); GetGameApp()->GetGraphicsDevice()->GetViewContext()->SetCamera(m_camera); @@ -45,7 +41,6 @@ void TestingState::OnPush() void TestingState::OnPop() { - STACK_TRACE; GetGameApp()->GetGraphicsDevice()->GetViewContext()->SetCamera(NULL); SAFE_DELETE(m_grid); @@ -54,43 +49,36 @@ void TestingState::OnPop() void TestingState::OnPause(BOOL dueToOverlay) { - STACK_TRACE; GameState::OnPause(dueToOverlay); } void TestingState::OnResume(BOOL fromOverlay) { - STACK_TRACE; GameState::OnResume(fromOverlay); } void TestingState::OnAppGainFocus() { - STACK_TRACE; GameState::OnAppGainFocus(); } void TestingState::OnAppLostFocus() { - STACK_TRACE; GameState::OnAppLostFocus(); } void TestingState::OnLostContext() { - STACK_TRACE; GameState::OnLostContext(); } void TestingState::OnNewContext() { - STACK_TRACE; GameState::OnNewContext(); } void TestingState::OnRender(RenderContext *renderContext) { - STACK_TRACE; SimpleColorShader *colorShader = renderContext->GetGraphicsDevice()->GetSimpleColorShader(); renderContext->GetGraphicsDevice()->Clear(0.25f, 0.5f, 1.0f, 1.0f); @@ -107,13 +95,11 @@ void TestingState::OnRender(RenderContext *renderContext) void TestingState::OnResize() { - STACK_TRACE; GameState::OnResize(); } void TestingState::OnUpdate(float delta) { - STACK_TRACE; GameState::OnUpdate(delta); if (GetGameApp()->GetKeyboard()->IsPressed(KSYM_ESCAPE)) @@ -124,6 +110,5 @@ void TestingState::OnUpdate(float delta) BOOL TestingState::OnTransition(float delta, BOOL isTransitioningOut, BOOL started) { - STACK_TRACE; return TRUE; } diff --git a/src/gameapp.cpp b/src/gameapp.cpp index 4ea7f88..825601f 100644 --- a/src/gameapp.cpp +++ b/src/gameapp.cpp @@ -1,4 +1,3 @@ -#include "framework/debug.h" #include "framework/log.h" #include "gameapp.h" @@ -23,9 +22,7 @@ #include "states/statemanager.h" GameApp::GameApp() - : BaseGameApp() { - STACK_TRACE; m_contentCache = NULL; m_renderContext = NULL; m_stateManager = NULL; @@ -34,7 +31,6 @@ GameApp::GameApp() GameApp::~GameApp() { - STACK_TRACE; SAFE_DELETE(m_stateManager); SAFE_DELETE(m_eventManager); SAFE_DELETE(m_contentCache); @@ -43,36 +39,30 @@ GameApp::~GameApp() void GameApp::OnAppGainFocus() { - STACK_TRACE; BaseGameApp::OnAppGainFocus(); m_stateManager->OnAppGainFocus(); } void GameApp::OnAppLostFocus() { - STACK_TRACE; BaseGameApp::OnAppLostFocus(); m_stateManager->OnAppLostFocus(); } void GameApp::OnAppPause() { - STACK_TRACE; BaseGameApp::OnAppPause(); m_stateManager->OnAppPause(); } void GameApp::OnAppResume() { - STACK_TRACE; BaseGameApp::OnAppResume(); m_stateManager->OnAppResume(); } BOOL GameApp::OnInit() { - STACK_TRACE; - #if defined(DESKTOP) && defined(SDL) SDLGameWindowParams windowParams; windowParams.title = "Engine Test"; @@ -111,7 +101,6 @@ BOOL GameApp::OnInit() void GameApp::OnLoadGame() { - STACK_TRACE; GetGraphicsDevice()->SetTextureParameters(TEXPARAM_PIXELATED); m_renderContext->OnLoadGame(); @@ -122,21 +111,18 @@ void GameApp::OnLoadGame() void GameApp::OnLostContext() { - STACK_TRACE; BaseGameApp::OnLostContext(); m_stateManager->OnLostContext(); } void GameApp::OnNewContext() { - STACK_TRACE; BaseGameApp::OnNewContext(); m_stateManager->OnNewContext(); } void GameApp::OnRender() { - STACK_TRACE; BaseGameApp::OnRender(); m_renderContext->OnPreRender(); m_stateManager->OnRender(m_renderContext); @@ -145,7 +131,6 @@ void GameApp::OnRender() void GameApp::OnResize() { - STACK_TRACE; BaseGameApp::OnResize(); m_renderContext->OnResize(); m_stateManager->OnResize(); @@ -153,7 +138,6 @@ void GameApp::OnResize() void GameApp::OnUpdate(float delta) { - STACK_TRACE; BaseGameApp::OnUpdate(delta); m_eventManager->ProcessQueue(); @@ -169,6 +153,5 @@ void GameApp::OnUpdate(float delta) uint32_t GameApp::GetScreenScale() const { - STACK_TRACE; return m_renderContext->GetScreenScale(); } diff --git a/src/graphics/textureanimator.cpp b/src/graphics/textureanimator.cpp index df02e53..62b9405 100644 --- a/src/graphics/textureanimator.cpp +++ b/src/graphics/textureanimator.cpp @@ -11,14 +11,12 @@ TextureAnimator::TextureAnimator(ContentManager *contentManager, GraphicsDevice *graphicsDevice) { - STACK_TRACE; m_contentManager = contentManager; m_graphicsDevice = graphicsDevice; } TextureAnimator::~TextureAnimator() { - STACK_TRACE; ResetAll(); } @@ -47,13 +45,11 @@ void TextureAnimator::ResetAll() void TextureAnimator::AddTileSequence(TextureAtlas *atlas, uint32_t tileToBeAnimated, uint32_t start, uint32_t stop, float delay, BOOL loop) { - STACK_TRACE; AddTileSequence("", atlas, tileToBeAnimated, start, stop, delay, loop); } void TextureAnimator::AddTileSequence(const stl::string &name, TextureAtlas *atlas, uint32_t tileToBeAnimated, uint32_t start, uint32_t stop, float delay, BOOL loop) { - STACK_TRACE; ASSERT(atlas != NULL); ASSERT(tileToBeAnimated < atlas->GetNumTextures()); ASSERT(start < atlas->GetNumTextures()); @@ -105,7 +101,6 @@ void TextureAnimator::AddTileSequence(const stl::string &name, TextureAtlas *atl void TextureAnimator::ResetTileSequence(const stl::string &name) { - STACK_TRACE; ASSERT(name.length() != 0); TextureAtlasAnimationSequence *existingSequence = FindTileSequenceByName(name); @@ -120,7 +115,6 @@ void TextureAnimator::ResetTileSequence(const stl::string &name) void TextureAnimator::StopTileSequence(const stl::string &name, BOOL restoreOriginalTile) { - STACK_TRACE; ASSERT(name.length() != 0); TextureAtlasAnimationSequence *existingSequence = FindTileSequenceByName(name); @@ -152,7 +146,6 @@ void TextureAnimator::EnableTileSequence(const stl::string &name, BOOL enable) void TextureAnimator::OnUpdate(float delta) { - STACK_TRACE; for (TextureAtlasAnimations::iterator i = m_textureAtlasAnimations.begin(); i != m_textureAtlasAnimations.end(); ++i) { TextureAtlasAnimationSequence &sequence = *i; @@ -178,7 +171,6 @@ void TextureAnimator::OnUpdate(float delta) void TextureAnimator::OnNewContext() { - STACK_TRACE; for (TextureAtlasAnimations::iterator i = m_textureAtlasAnimations.begin(); i != m_textureAtlasAnimations.end(); ++i) { TextureAtlasAnimationSequence &sequence = *i; @@ -188,7 +180,6 @@ void TextureAnimator::OnNewContext() TextureAtlasAnimationSequence* TextureAnimator::FindTileSequenceByName(const stl::string &name) { - STACK_TRACE; if (name.length() == 0) return NULL; @@ -204,7 +195,6 @@ TextureAtlasAnimationSequence* TextureAnimator::FindTileSequenceByName(const stl void TextureAnimator::UpdateTextureWithCurrentTileFrame(TextureAtlasAnimationSequence &sequence) { - STACK_TRACE; uint32_t frameIndex = sequence.current - sequence.start; ASSERT(frameIndex < sequence.GetNumFrames()); Image *frameImage = sequence.frames[frameIndex]; @@ -215,7 +205,6 @@ void TextureAnimator::UpdateTextureWithCurrentTileFrame(TextureAtlasAnimationSeq void TextureAnimator::RestoreTextureWithOriginalTile(TextureAtlasAnimationSequence &sequence) { - STACK_TRACE; const TextureAtlasTile &tile = sequence.atlas->GetTile(sequence.animatingIndex); sequence.atlas->GetTexture()->Update(sequence.originalAnimatingTile, tile.dimensions.left, tile.dimensions.top); } diff --git a/src/main.cpp b/src/main.cpp index 7530855..7c47699 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,8 +17,6 @@ int main(int argc, char **argv) { - STACK_TRACE; - LogStart(); DebugInit(); LOG_INFO(LOGCAT_SYSTEM, "Build compiled on %s %s\n", __DATE__, __TIME__); diff --git a/src/processes/gameprocess.cpp b/src/processes/gameprocess.cpp index fdbeea0..a11efd9 100644 --- a/src/processes/gameprocess.cpp +++ b/src/processes/gameprocess.cpp @@ -9,7 +9,6 @@ GameProcess::GameProcess(GameState *gameState, ProcessManager *processManager) : EventListenerEx(gameState->GetGameApp()->GetEventManager()) { - STACK_TRACE; ASSERT(gameState != NULL); ASSERT(processManager != NULL); @@ -20,95 +19,77 @@ GameProcess::GameProcess(GameState *gameState, ProcessManager *processManager) GameProcess::~GameProcess() { - STACK_TRACE; } void GameProcess::OnAdd() { - STACK_TRACE; } void GameProcess::OnRemove() { - STACK_TRACE; } void GameProcess::OnPause(BOOL dueToOverlay) { - STACK_TRACE; } void GameProcess::OnResume(BOOL fromOverlay) { - STACK_TRACE; } void GameProcess::OnAppGainFocus() { - STACK_TRACE; } void GameProcess::OnAppLostFocus() { - STACK_TRACE; } void GameProcess::OnAppPause() { - STACK_TRACE; } void GameProcess::OnAppResume() { - STACK_TRACE; } void GameProcess::OnLostContext() { - STACK_TRACE; } void GameProcess::OnNewContext() { - STACK_TRACE; } void GameProcess::OnRender(RenderContext *renderContext) { - STACK_TRACE; } void GameProcess::OnResize() { - STACK_TRACE; } void GameProcess::OnUpdate(float delta) { - STACK_TRACE; } BOOL GameProcess::OnTransition(float delta, BOOL isTransitioningOut, BOOL started) { - STACK_TRACE; return TRUE; } BOOL GameProcess::Handle(const Event *event) { - STACK_TRACE; return FALSE; } BOOL GameProcess::IsTransitioning() const { - STACK_TRACE; return m_processManager->IsTransitioning(this); } void GameProcess::SetFinished() { - STACK_TRACE; m_finished = TRUE; } diff --git a/src/processes/gwengameprocess.cpp b/src/processes/gwengameprocess.cpp index d80dcc9..b6bf6d7 100644 --- a/src/processes/gwengameprocess.cpp +++ b/src/processes/gwengameprocess.cpp @@ -6,80 +6,67 @@ GwenGameProcess::GwenGameProcess(GameState *gameState, ProcessManager *processManager) : GameProcess(gameState, processManager) { - STACK_TRACE; m_gwenController = NULL; } GwenGameProcess::~GwenGameProcess() { - STACK_TRACE; SAFE_DELETE(m_gwenController); } void GwenGameProcess::OnAdd() { - STACK_TRACE; ASSERT(m_gwenController != NULL); m_gwenController->OnAdd(); } void GwenGameProcess::OnRemove() { - STACK_TRACE; m_gwenController->OnRemove(); } void GwenGameProcess::OnPause(BOOL dueToOverlay) { - STACK_TRACE; m_gwenController->OnPause(dueToOverlay); } void GwenGameProcess::OnResume(BOOL fromOverlay) { - STACK_TRACE; m_gwenController->OnResume(fromOverlay); } void GwenGameProcess::OnLostContext() { - STACK_TRACE; m_gwenController->OnLostContext(); } void GwenGameProcess::OnNewContext() { - STACK_TRACE; m_gwenController->OnNewContext(); } void GwenGameProcess::OnRender(RenderContext *renderContext) { - STACK_TRACE; m_gwenController->OnRender(renderContext); } void GwenGameProcess::OnResize() { - STACK_TRACE; m_gwenController->OnResize(); } void GwenGameProcess::OnUpdate(float delta) { - STACK_TRACE; m_gwenController->OnUpdate(delta); } BOOL GwenGameProcess::OnTransition(float delta, BOOL isTransitioningOut, BOOL started) { - STACK_TRACE; return m_gwenController->OnTransition(delta, isTransitioningOut, started); } BOOL GwenGameProcess::Handle(const Event *event) { - STACK_TRACE; // handle events... // any events we don't want to handle ourselves should be passed off to diff --git a/src/processes/gwengameprocess.h b/src/processes/gwengameprocess.h index b08e08a..53483cf 100644 --- a/src/processes/gwengameprocess.h +++ b/src/processes/gwengameprocess.h @@ -48,7 +48,6 @@ private: template void GwenGameProcess::SetGwenHandler() { - STACK_TRACE; ASSERT(m_gwenController == NULL); T *gwenController = new T(this); m_gwenController = (GwenGameProcessUIController*)gwenController; diff --git a/src/processes/gwengameprocessuicontroller.cpp b/src/processes/gwengameprocessuicontroller.cpp index d015489..8215f09 100644 --- a/src/processes/gwengameprocessuicontroller.cpp +++ b/src/processes/gwengameprocessuicontroller.cpp @@ -13,7 +13,6 @@ GwenGameProcessUIController::GwenGameProcessUIController(GwenGameProcess *gameProcess) { - STACK_TRACE; ASSERT(gameProcess != NULL); m_gameProcess = gameProcess; m_canvas = NULL; @@ -26,7 +25,6 @@ GwenGameProcessUIController::GwenGameProcessUIController(GwenGameProcess *gamePr GwenGameProcessUIController::~GwenGameProcessUIController() { - STACK_TRACE; SAFE_DELETE(m_inputProcessor); SAFE_DELETE(m_canvas); SAFE_DELETE(m_skin); @@ -35,39 +33,32 @@ GwenGameProcessUIController::~GwenGameProcessUIController() void GwenGameProcessUIController::OnAdd() { - STACK_TRACE; } void GwenGameProcessUIController::OnRemove() { - STACK_TRACE; } void GwenGameProcessUIController::OnPause(BOOL dueToOverlay) { - STACK_TRACE; EnableGwenInput(FALSE); } void GwenGameProcessUIController::OnResume(BOOL fromOverlay) { - STACK_TRACE; EnableGwenInput(TRUE); } void GwenGameProcessUIController::OnLostContext() { - STACK_TRACE; } void GwenGameProcessUIController::OnNewContext() { - STACK_TRACE; } void GwenGameProcessUIController::OnRender(RenderContext *renderContext) { - STACK_TRACE; ASSERT(m_renderer != NULL); ASSERT(m_canvas != NULL); m_renderer->PreRender(renderContext->GetSpriteBatch()); @@ -77,32 +68,27 @@ void GwenGameProcessUIController::OnRender(RenderContext *renderContext) void GwenGameProcessUIController::OnResize() { - STACK_TRACE; ResizeAndScaleCanvas(); } void GwenGameProcessUIController::OnUpdate(float delta) { - STACK_TRACE; ASSERT(m_canvas != NULL); m_canvas->DoThink(); } BOOL GwenGameProcessUIController::OnTransition(float delta, BOOL isTransitioningOut, BOOL started) { - STACK_TRACE; return TRUE; } BOOL GwenGameProcessUIController::Handle(const Event *event) { - STACK_TRACE; return FALSE; } Gwen::Controls::Canvas* GwenGameProcessUIController::InitializeGwen(const stl::string &skinFilename, const stl::string &fontFilename, uint8_t fontSize) { - STACK_TRACE; ASSERT(m_renderer == NULL); ASSERT(m_skin == NULL); ASSERT(m_canvas == NULL); @@ -125,7 +111,6 @@ Gwen::Controls::Canvas* GwenGameProcessUIController::InitializeGwen(const stl::s void GwenGameProcessUIController::ResizeAndScaleCanvas() { - STACK_TRACE; if (m_canvas != NULL) { // make sure that the control is using the most up-to-date scale (which @@ -143,14 +128,12 @@ void GwenGameProcessUIController::ResizeAndScaleCanvas() void GwenGameProcessUIController::EnableGwenInput(BOOL enable) { - STACK_TRACE; if (m_inputProcessor != NULL) m_inputProcessor->Enable(enable); } void GwenGameProcessUIController::SetAlpha(float alpha) { - STACK_TRACE; ASSERT(m_renderer != NULL); m_alpha = alpha; m_renderer->SetAlpha(alpha); @@ -158,7 +141,6 @@ void GwenGameProcessUIController::SetAlpha(float alpha) void GwenGameProcessUIController::SetScale(float scale) { - STACK_TRACE; ASSERT(m_canvas != NULL); m_scale = scale; diff --git a/src/processes/processinfo.cpp b/src/processes/processinfo.cpp index 54804c5..bba91d6 100644 --- a/src/processes/processinfo.cpp +++ b/src/processes/processinfo.cpp @@ -7,7 +7,6 @@ ProcessInfo::ProcessInfo(GameProcess *process) { - STACK_TRACE; ASSERT(process != NULL); this->process = process; name = ""; @@ -22,7 +21,6 @@ ProcessInfo::ProcessInfo(GameProcess *process) ProcessInfo::ProcessInfo(GameProcess *process, const stl::string &name) { - STACK_TRACE; ASSERT(process != NULL); this->process = process; this->name = name; @@ -37,7 +35,6 @@ ProcessInfo::ProcessInfo(GameProcess *process, const stl::string &name) void ProcessInfo::SetDescriptor() { - STACK_TRACE; m_descriptor = process->GetTypeOf(); if (name.length() > 0) diff --git a/src/processes/processmanager.cpp b/src/processes/processmanager.cpp index 570e1ae..e4125e8 100644 --- a/src/processes/processmanager.cpp +++ b/src/processes/processmanager.cpp @@ -10,14 +10,12 @@ ProcessManager::ProcessManager(GameState *gameState) { - STACK_TRACE; ASSERT(gameState != NULL); m_gameState = gameState; } ProcessManager::~ProcessManager() { - STACK_TRACE; LOG_INFO(LOGCAT_PROCESSMANAGER, "ProcessManager shutting down.\n"); while (!m_processes.empty()) @@ -43,14 +41,12 @@ ProcessManager::~ProcessManager() void ProcessManager::Remove(const stl::string &name) { - STACK_TRACE; ProcessInfoList::iterator itor = GetProcessItorFor(name); StartTransitionOut(itor, TRUE); } BOOL ProcessManager::HasProcess(const stl::string &name) const { - STACK_TRACE; for (ProcessInfoList::const_iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -63,7 +59,6 @@ BOOL ProcessManager::HasProcess(const stl::string &name) const void ProcessManager::OnPause(BOOL dueToOverlay) { - STACK_TRACE; if (IsEmpty()) return; @@ -94,7 +89,6 @@ void ProcessManager::OnPause(BOOL dueToOverlay) void ProcessManager::OnResume(BOOL fromOverlay) { - STACK_TRACE; if (IsEmpty()) return; @@ -134,7 +128,6 @@ void ProcessManager::OnResume(BOOL fromOverlay) void ProcessManager::OnAppGainFocus() { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -145,7 +138,6 @@ void ProcessManager::OnAppGainFocus() void ProcessManager::OnAppLostFocus() { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -156,7 +148,6 @@ void ProcessManager::OnAppLostFocus() void ProcessManager::OnAppPause() { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -167,7 +158,6 @@ void ProcessManager::OnAppPause() void ProcessManager::OnAppResume() { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -178,7 +168,6 @@ void ProcessManager::OnAppResume() void ProcessManager::OnLostContext() { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -189,7 +178,6 @@ void ProcessManager::OnLostContext() void ProcessManager::OnNewContext() { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -200,7 +188,6 @@ void ProcessManager::OnNewContext() void ProcessManager::OnRender(RenderContext *renderContext) { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -211,7 +198,6 @@ void ProcessManager::OnRender(RenderContext *renderContext) void ProcessManager::OnResize() { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -222,7 +208,6 @@ void ProcessManager::OnResize() void ProcessManager::OnUpdate(float delta) { - STACK_TRACE; CleanupInactiveProcesses(); CheckForFinishedProcesses(); ProcessQueue(); @@ -238,7 +223,6 @@ void ProcessManager::OnUpdate(float delta) void ProcessManager::CleanupInactiveProcesses() { - STACK_TRACE; if (m_processes.empty()) return; @@ -261,7 +245,6 @@ void ProcessManager::CleanupInactiveProcesses() void ProcessManager::CheckForFinishedProcesses() { - STACK_TRACE; if (m_processes.empty()) return; @@ -282,7 +265,6 @@ void ProcessManager::CheckForFinishedProcesses() void ProcessManager::ProcessQueue() { - STACK_TRACE; while (!m_queue.empty()) { ProcessInfo *processInfo = m_queue.front(); @@ -301,7 +283,6 @@ void ProcessManager::ProcessQueue() void ProcessManager::UpdateTransitions(float delta) { - STACK_TRACE; if (m_processes.empty()) return; @@ -343,7 +324,6 @@ void ProcessManager::UpdateTransitions(float delta) void ProcessManager::RemoveAll() { - STACK_TRACE; LOG_INFO(LOGCAT_PROCESSMANAGER, "Transitioning out all processes pending removal.\n"); for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { @@ -355,7 +335,6 @@ void ProcessManager::RemoveAll() void ProcessManager::Queue(ProcessInfo *newProcessInfo) { - STACK_TRACE; ASSERT(newProcessInfo != NULL); ASSERT(newProcessInfo->process != NULL); @@ -365,7 +344,6 @@ void ProcessManager::Queue(ProcessInfo *newProcessInfo) void ProcessManager::StartTransitionOut(ProcessInfoList::iterator itor, BOOL forRemoval) { - STACK_TRACE; ASSERT(itor != m_processes.end()); ProcessInfo *processInfo = *itor; ASSERT(processInfo->isInactive == FALSE); @@ -379,7 +357,6 @@ void ProcessManager::StartTransitionOut(ProcessInfoList::iterator itor, BOOL for BOOL ProcessManager::IsTransitioning() const { - STACK_TRACE; for (ProcessInfoList::const_iterator i = m_processes.begin(); i != m_processes.end(); ++i) { const ProcessInfo *processInfo = *i; @@ -392,7 +369,6 @@ BOOL ProcessManager::IsTransitioning() const ProcessInfoList::iterator ProcessManager::GetProcessItorFor(const stl::string &name) { - STACK_TRACE; ASSERT(name.length() > 0); if (name.length() == 0) return m_processes.end(); @@ -409,7 +385,6 @@ ProcessInfoList::iterator ProcessManager::GetProcessItorFor(const stl::string &n ProcessInfoList::iterator ProcessManager::GetProcessItorForFirstOf(GAMEPROCESS_TYPE processType) { - STACK_TRACE; for (ProcessInfoList::iterator i = m_processes.begin(); i != m_processes.end(); ++i) { ProcessInfo *processInfo = *i; @@ -422,7 +397,6 @@ ProcessInfoList::iterator ProcessManager::GetProcessItorForFirstOf(GAMEPROCESS_T ProcessInfo* ProcessManager::GetProcessInfoFor(const GameProcess *process) const { - STACK_TRACE; ASSERT(process != NULL); for (ProcessInfoList::const_iterator i = m_processes.begin(); i != m_processes.end(); ++i) { diff --git a/src/states/gamestate.cpp b/src/states/gamestate.cpp index 56eb611..5990076 100644 --- a/src/states/gamestate.cpp +++ b/src/states/gamestate.cpp @@ -10,7 +10,6 @@ GameState::GameState(GameApp *gameApp, StateManager *stateManager) : EventListenerEx(gameApp->GetEventManager()) { - STACK_TRACE; ASSERT(gameApp != NULL); ASSERT(stateManager != NULL); @@ -27,78 +26,66 @@ GameState::GameState(GameApp *gameApp, StateManager *stateManager) GameState::~GameState() { - STACK_TRACE; SAFE_DELETE(m_effectManager); SAFE_DELETE(m_processManager); } void GameState::OnPush() { - STACK_TRACE; } void GameState::OnPop() { - STACK_TRACE; } void GameState::OnPause(BOOL dueToOverlay) { - STACK_TRACE; m_processManager->OnPause(dueToOverlay); } void GameState::OnResume(BOOL fromOverlay) { - STACK_TRACE; m_processManager->OnResume(fromOverlay); } void GameState::OnAppGainFocus() { - STACK_TRACE; m_processManager->OnAppGainFocus(); m_effectManager->OnAppGainFocus(); } void GameState::OnAppLostFocus() { - STACK_TRACE; m_processManager->OnAppLostFocus(); m_effectManager->OnAppLostFocus(); } void GameState::OnAppPause() { - STACK_TRACE; m_processManager->OnAppPause(); m_effectManager->OnAppPause(); } void GameState::OnAppResume() { - STACK_TRACE; m_processManager->OnAppResume(); m_effectManager->OnAppResume(); } void GameState::OnLostContext() { - STACK_TRACE; m_processManager->OnLostContext(); m_effectManager->OnLostContext(); } void GameState::OnNewContext() { - STACK_TRACE; m_processManager->OnNewContext(); m_effectManager->OnNewContext(); } void GameState::OnRender(RenderContext *renderContext) { - STACK_TRACE; // switch it up and do effects before processes here so that processes // (which would commonly be used for UI overlay elements) don't get // overwritten by local effects (e.g. flashes, etc.) @@ -108,45 +95,38 @@ void GameState::OnRender(RenderContext *renderContext) void GameState::OnResize() { - STACK_TRACE; m_processManager->OnResize(); m_effectManager->OnResize(); } void GameState::OnUpdate(float delta) { - STACK_TRACE; m_processManager->OnUpdate(delta); m_effectManager->OnUpdate(delta); } BOOL GameState::OnTransition(float delta, BOOL isTransitioningOut, BOOL started) { - STACK_TRACE; return TRUE; } BOOL GameState::Handle(const Event *event) { - STACK_TRACE; return FALSE; } BOOL GameState::IsTransitioning() const { - STACK_TRACE; return m_stateManager->IsTransitioning(this); } BOOL GameState::IsTopState() const { - STACK_TRACE; return m_stateManager->IsTop(this); } void GameState::SetFinished() { - STACK_TRACE; m_isFinished = TRUE; m_returnValue = 0; m_hasReturnValue = FALSE; diff --git a/src/states/gwengamestate.cpp b/src/states/gwengamestate.cpp index a2e1dab..e39a734 100644 --- a/src/states/gwengamestate.cpp +++ b/src/states/gwengamestate.cpp @@ -6,87 +6,74 @@ GwenGameState::GwenGameState(GameApp *gameApp, StateManager *stateManager) : GameState(gameApp, stateManager) { - STACK_TRACE; m_gwenController = NULL; } GwenGameState::~GwenGameState() { - STACK_TRACE; SAFE_DELETE(m_gwenController); } void GwenGameState::OnPush() { - STACK_TRACE; ASSERT(m_gwenController != NULL); m_gwenController->OnPush(); } void GwenGameState::OnPop() { - STACK_TRACE; m_gwenController->OnPop(); } void GwenGameState::OnPause(BOOL dueToOverlay) { - STACK_TRACE; GameState::OnPause(dueToOverlay); m_gwenController->OnPause(dueToOverlay); } void GwenGameState::OnResume(BOOL fromOverlay) { - STACK_TRACE; GameState::OnResume(fromOverlay); m_gwenController->OnResume(fromOverlay); } void GwenGameState::OnLostContext() { - STACK_TRACE; GameState::OnLostContext(); m_gwenController->OnLostContext(); } void GwenGameState::OnNewContext() { - STACK_TRACE; GameState::OnNewContext(); m_gwenController->OnNewContext(); } void GwenGameState::OnRender(RenderContext *renderContext) { - STACK_TRACE; m_gwenController->OnRender(renderContext); GameState::OnRender(renderContext); } void GwenGameState::OnResize() { - STACK_TRACE; GameState::OnResize(); m_gwenController->OnResize(); } void GwenGameState::OnUpdate(float delta) { - STACK_TRACE; GameState::OnUpdate(delta); m_gwenController->OnUpdate(delta); } BOOL GwenGameState::OnTransition(float delta, BOOL isTransitioningOut, BOOL started) { - STACK_TRACE; return m_gwenController->OnTransition(delta, isTransitioningOut, started); } BOOL GwenGameState::Handle(const Event *event) { - STACK_TRACE; // handle events... // any events we don't want to handle ourselves should be passed off to diff --git a/src/states/gwengamestate.h b/src/states/gwengamestate.h index 4a211ca..dd88903 100644 --- a/src/states/gwengamestate.h +++ b/src/states/gwengamestate.h @@ -48,7 +48,6 @@ private: template void GwenGameState::SetGwenHandler() { - STACK_TRACE; ASSERT(m_gwenController == NULL); T *gwenController = new T(this); m_gwenController = (GwenGameStateUIController*)gwenController; diff --git a/src/states/gwengamestateuicontroller.cpp b/src/states/gwengamestateuicontroller.cpp index 802b604..6fe393b 100644 --- a/src/states/gwengamestateuicontroller.cpp +++ b/src/states/gwengamestateuicontroller.cpp @@ -13,7 +13,6 @@ GwenGameStateUIController::GwenGameStateUIController(GwenGameState *gameState) { - STACK_TRACE; ASSERT(gameState != NULL); m_gameState = gameState; @@ -27,7 +26,6 @@ GwenGameStateUIController::GwenGameStateUIController(GwenGameState *gameState) GwenGameStateUIController::~GwenGameStateUIController() { - STACK_TRACE; SAFE_DELETE(m_inputProcessor); SAFE_DELETE(m_canvas); SAFE_DELETE(m_skin); @@ -36,39 +34,32 @@ GwenGameStateUIController::~GwenGameStateUIController() void GwenGameStateUIController::OnPush() { - STACK_TRACE; } void GwenGameStateUIController::OnPop() { - STACK_TRACE; } void GwenGameStateUIController::OnPause(BOOL dueToOverlay) { - STACK_TRACE; EnableGwenInput(FALSE); } void GwenGameStateUIController::OnResume(BOOL fromOverlay) { - STACK_TRACE; EnableGwenInput(TRUE); } void GwenGameStateUIController::OnLostContext() { - STACK_TRACE; } void GwenGameStateUIController::OnNewContext() { - STACK_TRACE; } void GwenGameStateUIController::OnRender(RenderContext *renderContext) { - STACK_TRACE; ASSERT(m_renderer != NULL); ASSERT(m_canvas != NULL); m_renderer->PreRender(renderContext->GetSpriteBatch()); @@ -78,32 +69,27 @@ void GwenGameStateUIController::OnRender(RenderContext *renderContext) void GwenGameStateUIController::OnResize() { - STACK_TRACE; ResizeAndScaleCanvas(); } void GwenGameStateUIController::OnUpdate(float delta) { - STACK_TRACE; ASSERT(m_canvas != NULL); m_canvas->DoThink(); } BOOL GwenGameStateUIController::OnTransition(float delta, BOOL isTransitioningOut, BOOL started) { - STACK_TRACE; return TRUE; } BOOL GwenGameStateUIController::Handle(const Event *event) { - STACK_TRACE; return FALSE; } Gwen::Controls::Canvas* GwenGameStateUIController::InitializeGwen(const stl::string &skinFilename, const stl::string &fontFilename, uint8_t fontSize) { - STACK_TRACE; ASSERT(m_renderer == NULL); ASSERT(m_skin == NULL); ASSERT(m_canvas == NULL); @@ -126,7 +112,6 @@ Gwen::Controls::Canvas* GwenGameStateUIController::InitializeGwen(const stl::str void GwenGameStateUIController::ResizeAndScaleCanvas() { - STACK_TRACE; if (m_canvas != NULL) { // make sure that the control is using the most up-to-date scale (which @@ -145,14 +130,12 @@ void GwenGameStateUIController::ResizeAndScaleCanvas() void GwenGameStateUIController::EnableGwenInput(BOOL enable) { - STACK_TRACE; if (m_inputProcessor != NULL) m_inputProcessor->Enable(enable); } void GwenGameStateUIController::SetAlpha(float alpha) { - STACK_TRACE; ASSERT(m_renderer != NULL); m_alpha = alpha; m_renderer->SetAlpha(alpha); @@ -160,7 +143,6 @@ void GwenGameStateUIController::SetAlpha(float alpha) void GwenGameStateUIController::SetScale(float scale) { - STACK_TRACE; ASSERT(m_canvas != NULL); m_scale = scale; diff --git a/src/states/stateinfo.cpp b/src/states/stateinfo.cpp index 237eacf..6527c83 100644 --- a/src/states/stateinfo.cpp +++ b/src/states/stateinfo.cpp @@ -7,7 +7,6 @@ StateInfo::StateInfo(GameState *gameState) { - STACK_TRACE; ASSERT(gameState != NULL); this->gameState = gameState; name = ""; @@ -24,7 +23,6 @@ StateInfo::StateInfo(GameState *gameState) StateInfo::StateInfo(GameState *gameState, const stl::string &name) { - STACK_TRACE; ASSERT(gameState != NULL); this->gameState = gameState; this->name = name; @@ -41,7 +39,6 @@ StateInfo::StateInfo(GameState *gameState, const stl::string &name) void StateInfo::SetDescriptor() { - STACK_TRACE; m_descriptor = gameState->GetTypeOf(); if (name.length() > 0) diff --git a/src/states/statemanager.cpp b/src/states/statemanager.cpp index 09984d3..d6ebfbf 100644 --- a/src/states/statemanager.cpp +++ b/src/states/statemanager.cpp @@ -12,7 +12,6 @@ StateManager::StateManager(GameApp *gameApp) { - STACK_TRACE; ASSERT(gameApp != NULL); m_gameApp = gameApp; m_stateReturnValue = 0; @@ -24,7 +23,6 @@ StateManager::StateManager(GameApp *gameApp) StateManager::~StateManager() { - STACK_TRACE; LOG_INFO(LOGCAT_STATEMANAGER, "StateManager shutting down.\n"); while (!m_states.empty()) @@ -58,7 +56,6 @@ StateManager::~StateManager() void StateManager::Pop() { - STACK_TRACE; ASSERT(IsTransitioning() == FALSE); LOG_INFO(LOGCAT_STATEMANAGER, "Pop initiated for top-most state only.\n"); StartOnlyTopStateTransitioningOut(FALSE); @@ -66,7 +63,6 @@ void StateManager::Pop() void StateManager::PopTopNonOverlay() { - STACK_TRACE; ASSERT(IsTransitioning() == FALSE); LOG_INFO(LOGCAT_STATEMANAGER, "Pop initiated for all top active states.\n"); StartTopStatesTransitioningOut(FALSE); @@ -74,7 +70,6 @@ void StateManager::PopTopNonOverlay() BOOL StateManager::HasState(const stl::string &name) const { - STACK_TRACE; for (StateInfoList::const_iterator i = m_states.begin(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -87,7 +82,6 @@ BOOL StateManager::HasState(const stl::string &name) const void StateManager::OnAppGainFocus() { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -98,7 +92,6 @@ void StateManager::OnAppGainFocus() void StateManager::OnAppLostFocus() { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -109,7 +102,6 @@ void StateManager::OnAppLostFocus() void StateManager::OnAppPause() { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -120,7 +112,6 @@ void StateManager::OnAppPause() void StateManager::OnAppResume() { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -131,7 +122,6 @@ void StateManager::OnAppResume() void StateManager::OnLostContext() { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -142,7 +132,6 @@ void StateManager::OnLostContext() void StateManager::OnNewContext() { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -153,7 +142,6 @@ void StateManager::OnNewContext() void StateManager::OnRender(RenderContext *renderContext) { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -167,7 +155,6 @@ void StateManager::OnRender(RenderContext *renderContext) void StateManager::OnResize() { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -178,7 +165,6 @@ void StateManager::OnResize() void StateManager::OnUpdate(float delta) { - STACK_TRACE; // clear return values (ensuring they're only accessible for 1 tick) m_stateReturnValue = 0; m_hasStateReturnValue = FALSE; @@ -200,7 +186,6 @@ void StateManager::OnUpdate(float delta) void StateManager::ProcessQueues() { - STACK_TRACE; // don't do anything if stuff is currently transitioning if (IsTransitioning()) return; @@ -271,7 +256,6 @@ void StateManager::ProcessQueues() void StateManager::ResumeStatesIfNeeded() { - STACK_TRACE; if (m_states.empty()) return; @@ -317,7 +301,6 @@ void StateManager::ResumeStatesIfNeeded() void StateManager::UpdateTransitions(float delta) { - STACK_TRACE; if (m_states.empty()) return; @@ -366,7 +349,6 @@ void StateManager::UpdateTransitions(float delta) void StateManager::TransitionOut(StateInfo *stateInfo, BOOL forPopping) { - STACK_TRACE; stateInfo->isTransitioning = TRUE; stateInfo->isTransitioningOut = TRUE; stateInfo->isTransitionStarting = TRUE; @@ -381,7 +363,6 @@ void StateManager::TransitionOut(StateInfo *stateInfo, BOOL forPopping) void StateManager::TransitionIn(StateInfo *stateInfo, BOOL forResuming) { - STACK_TRACE; stateInfo->isInactive = FALSE; stateInfo->isTransitioning = TRUE; stateInfo->isTransitioningOut = FALSE; @@ -394,7 +375,6 @@ void StateManager::TransitionIn(StateInfo *stateInfo, BOOL forResuming) void StateManager::QueueForPush(StateInfo *newStateInfo) { - STACK_TRACE; //ASSERT(IsTransitioning() == FALSE); //ASSERT(m_swapQueue.empty() == TRUE); ASSERT(newStateInfo != NULL); @@ -414,7 +394,6 @@ void StateManager::QueueForPush(StateInfo *newStateInfo) void StateManager::QueueForSwap(StateInfo *newStateInfo, BOOL swapTopNonOverlay) { - STACK_TRACE; //ASSERT(IsTransitioning() == FALSE); //ASSERT(m_pushQueue.empty() == TRUE); ASSERT(newStateInfo != NULL); @@ -436,7 +415,6 @@ void StateManager::QueueForSwap(StateInfo *newStateInfo, BOOL swapTopNonOverlay) StateInfo* StateManager::GetTopNonOverlay() const { - STACK_TRACE; StateInfoList::const_reverse_iterator itor = m_states.rbegin(); while (itor != m_states.rend() && (*itor)->isOverlay) ++itor; @@ -446,7 +424,6 @@ StateInfo* StateManager::GetTopNonOverlay() const StateInfoList::iterator StateManager::GetTopNonOverlayItor() { - STACK_TRACE; // TODO: probably a more efficient way to do this using reverse iterators StateInfoList::iterator result = m_states.end(); for (StateInfoList::iterator i = m_states.begin(); i != m_states.end(); ++i) @@ -460,7 +437,6 @@ StateInfoList::iterator StateManager::GetTopNonOverlayItor() StateInfo* StateManager::GetStateInfoFor(const GameState *state) const { - STACK_TRACE; ASSERT(state != NULL); for (StateInfoList::const_iterator i = m_states.begin(); i != m_states.end(); ++i) { @@ -474,7 +450,6 @@ StateInfo* StateManager::GetStateInfoFor(const GameState *state) const BOOL StateManager::IsTransitioning() const { - STACK_TRACE; for (StateInfoList::const_iterator i = m_states.begin(); i != m_states.end(); ++i) { const StateInfo *stateInfo = *i; @@ -487,7 +462,6 @@ BOOL StateManager::IsTransitioning() const void StateManager::StartTopStatesTransitioningOut(BOOL pausing) { - STACK_TRACE; for (StateInfoList::iterator i = GetTopNonOverlayItor(); i != m_states.end(); ++i) { StateInfo *stateInfo = *i; @@ -500,7 +474,6 @@ void StateManager::StartTopStatesTransitioningOut(BOOL pausing) void StateManager::StartOnlyTopStateTransitioningOut(BOOL pausing) { - STACK_TRACE; StateInfo *stateInfo = GetTop(); // if it's not active, then it's just been transitioned out and will be // removed on the next OnUpdate() @@ -510,7 +483,6 @@ void StateManager::StartOnlyTopStateTransitioningOut(BOOL pausing) void StateManager::CleanupInactiveStates() { - STACK_TRACE; if (m_states.empty()) return; @@ -551,7 +523,6 @@ void StateManager::CleanupInactiveStates() void StateManager::CheckForFinishedStates() { - STACK_TRACE; if (m_states.empty()) return; diff --git a/src/tilemap/chunkrenderer.cpp b/src/tilemap/chunkrenderer.cpp index 61abc6f..2ef5437 100644 --- a/src/tilemap/chunkrenderer.cpp +++ b/src/tilemap/chunkrenderer.cpp @@ -1,5 +1,3 @@ -#include "../framework/debug.h" - #include "chunkrenderer.h" #include "../framework/graphics/blendstate.h" @@ -15,22 +13,15 @@ ChunkRenderer::ChunkRenderer(GraphicsDevice *graphicsDevice) { - STACK_TRACE; m_graphicsDevice = graphicsDevice; m_renderState = new RENDERSTATE_DEFAULT; - ASSERT(m_renderState != NULL); - m_defaultBlendState = new BLENDSTATE_DEFAULT; - ASSERT(m_defaultBlendState != NULL); - m_alphaBlendState = new BLENDSTATE_ALPHABLEND; - ASSERT(m_alphaBlendState != NULL); } ChunkRenderer::~ChunkRenderer() { - STACK_TRACE; SAFE_DELETE(m_renderState); SAFE_DELETE(m_defaultBlendState); SAFE_DELETE(m_alphaBlendState); @@ -38,7 +29,6 @@ ChunkRenderer::~ChunkRenderer() uint32_t ChunkRenderer::Render(const TileChunk *chunk) { - STACK_TRACE; const Texture *texture = chunk->GetTileMap()->GetMeshes()->GetTextureAtlas()->GetTexture(); uint32_t numVertices = chunk->GetNumVertices(); @@ -55,7 +45,6 @@ uint32_t ChunkRenderer::Render(const TileChunk *chunk) uint32_t ChunkRenderer::RenderAlpha(const TileChunk *chunk) { - STACK_TRACE; uint32_t numVertices = 0; if (chunk->IsAlphaEnabled()) diff --git a/src/tilemap/chunkvertexgenerator.cpp b/src/tilemap/chunkvertexgenerator.cpp index 426f019..4a8a0fc 100644 --- a/src/tilemap/chunkvertexgenerator.cpp +++ b/src/tilemap/chunkvertexgenerator.cpp @@ -17,17 +17,14 @@ ChunkVertexGenerator::ChunkVertexGenerator() { - STACK_TRACE; } ChunkVertexGenerator::~ChunkVertexGenerator() { - STACK_TRACE; } void ChunkVertexGenerator::Generate(TileChunk *chunk, uint32_t &numVertices, uint32_t &numAlphaVertices) { - STACK_TRACE; numVertices = 0; numAlphaVertices = 0; @@ -177,7 +174,6 @@ void ChunkVertexGenerator::Generate(TileChunk *chunk, uint32_t &numVertices, uin uint32_t ChunkVertexGenerator::AddMesh(const TileMesh *mesh, TileChunk *chunk, BOOL isAlpha, const Point3 &position, const Matrix4x4 *transform, const Color &color, uint32_t firstVertex, uint32_t numVertices) { - STACK_TRACE; VertexBuffer *sourceBuffer = mesh->GetBuffer(); sourceBuffer->MoveToStart(); diff --git a/src/tilemap/cubetilemesh.cpp b/src/tilemap/cubetilemesh.cpp index 69f0de6..b110ba2 100644 --- a/src/tilemap/cubetilemesh.cpp +++ b/src/tilemap/cubetilemesh.cpp @@ -11,7 +11,6 @@ CubeTileMesh::CubeTileMesh(CUBE_FACES faces, const RectF *textureAtlasTileBoundaries, MESH_SIDES opaqueSides, TILE_LIGHT_VALUE lightValue, BOOL alpha, float translucency, const Color &color) { - STACK_TRACE; m_faces = faces; SetOpaque(opaqueSides); @@ -77,13 +76,11 @@ CubeTileMesh::CubeTileMesh(CUBE_FACES faces, const RectF *textureAtlasTileBounda CubeTileMesh::~CubeTileMesh() { - STACK_TRACE; SAFE_DELETE(m_vertices); } void CubeTileMesh::SetupFaceVertices(const RectF *textureAtlasTileBoundaries) { - STACK_TRACE; uint32_t pos = 0; Vector3 a(-0.5f, -0.5f, -0.5f); Vector3 b(0.5f, 0.5f, 0.5f); @@ -265,7 +262,6 @@ void CubeTileMesh::SetupFaceVertices(const RectF *textureAtlasTileBoundaries) void CubeTileMesh::SetupCollisionVertices() { - STACK_TRACE; m_numCollisionVertices = m_vertices->GetNumElements(); m_collisionVertices = new Vector3[m_numCollisionVertices]; diff --git a/src/tilemap/litchunkvertexgenerator.cpp b/src/tilemap/litchunkvertexgenerator.cpp index 6707152..0e98951 100644 --- a/src/tilemap/litchunkvertexgenerator.cpp +++ b/src/tilemap/litchunkvertexgenerator.cpp @@ -1,5 +1,3 @@ -#include "../framework/debug.h" - #include "litchunkvertexgenerator.h" #include "tile.h" #include "tilechunk.h" @@ -12,12 +10,10 @@ LitChunkVertexGenerator::LitChunkVertexGenerator() { - STACK_TRACE; } LitChunkVertexGenerator::~LitChunkVertexGenerator() { - STACK_TRACE; } void LitChunkVertexGenerator::CopyVertex(const TileChunk *chunk, VertexBuffer *sourceBuffer, VertexBuffer *destBuffer, const Vector3 &positionOffset, const Matrix4x4 *transform, const Color &color) diff --git a/src/tilemap/positionandskytilemaplighter.cpp b/src/tilemap/positionandskytilemaplighter.cpp index 4716426..b6e8888 100644 --- a/src/tilemap/positionandskytilemaplighter.cpp +++ b/src/tilemap/positionandskytilemaplighter.cpp @@ -1,5 +1,3 @@ -#include "../framework/debug.h" - #include "positionandskytilemaplighter.h" #include "tile.h" #include "tilechunk.h" @@ -11,17 +9,14 @@ PositionAndSkyTileMapLighter::PositionAndSkyTileMapLighter() { - STACK_TRACE; } PositionAndSkyTileMapLighter::~PositionAndSkyTileMapLighter() { - STACK_TRACE; } void PositionAndSkyTileMapLighter::Light(TileMap *tileMap) { - STACK_TRACE; ResetLightValues(tileMap); SetupSkyLight(tileMap); ApplyLighting(tileMap); @@ -29,7 +24,6 @@ void PositionAndSkyTileMapLighter::Light(TileMap *tileMap) void PositionAndSkyTileMapLighter::ResetLightValues(TileMap *tileMap) { - STACK_TRACE; for (uint32_t y = 0; y < tileMap->GetHeight(); ++y) { for (uint32_t z = 0; z < tileMap->GetDepth(); ++z) @@ -50,7 +44,6 @@ void PositionAndSkyTileMapLighter::ResetLightValues(TileMap *tileMap) void PositionAndSkyTileMapLighter::SetupSkyLight(TileMap *tileMap) { - STACK_TRACE; // NOTE: ResetLightValues() clears sky light data in such a way that // doesn't require us to flood-fill 0 light values here for everything // that isn't sky-lit @@ -89,7 +82,6 @@ void PositionAndSkyTileMapLighter::SetupSkyLight(TileMap *tileMap) void PositionAndSkyTileMapLighter::ApplyLighting(TileMap *tileMap) { - STACK_TRACE; // for each light source (sky or not), recursively go through and set // appropriate lighting for each adjacent tile for (uint32_t y = 0; y < tileMap->GetHeight(); ++y) diff --git a/src/tilemap/simpletilemaplighter.cpp b/src/tilemap/simpletilemaplighter.cpp index 518354a..f4f9180 100644 --- a/src/tilemap/simpletilemaplighter.cpp +++ b/src/tilemap/simpletilemaplighter.cpp @@ -1,5 +1,3 @@ -#include "../framework/debug.h" - #include "simpletilemaplighter.h" #include "tile.h" #include "tilechunk.h" @@ -11,24 +9,20 @@ SimpleTileMapLighter::SimpleTileMapLighter() { - STACK_TRACE; } SimpleTileMapLighter::~SimpleTileMapLighter() { - STACK_TRACE; } void SimpleTileMapLighter::Light(TileMap *tileMap) { - STACK_TRACE; ResetLightValues(tileMap); ApplySkyLight(tileMap); } void SimpleTileMapLighter::ResetLightValues(TileMap *tileMap) { - STACK_TRACE; for (uint32_t y = 0; y < tileMap->GetHeight(); ++y) { for (uint32_t z = 0; z < tileMap->GetDepth(); ++z) @@ -49,7 +43,6 @@ void SimpleTileMapLighter::ResetLightValues(TileMap *tileMap) void SimpleTileMapLighter::ApplySkyLight(TileMap *tileMap) { - STACK_TRACE; // NOTE: ResetLightValues() clears sky light data in such a way that // doesn't require us to flood-fill 0 light values here for everything // that isn't sky-lit diff --git a/src/tilemap/statictilemesh.cpp b/src/tilemap/statictilemesh.cpp index 66704de..f69c79c 100644 --- a/src/tilemap/statictilemesh.cpp +++ b/src/tilemap/statictilemesh.cpp @@ -9,7 +9,6 @@ StaticTileMesh::StaticTileMesh(const StaticMesh *mesh, const RectF *textureAtlasTileBoundaries, MESH_SIDES opaqueSides, TILE_LIGHT_VALUE lightValue, BOOL alpha, float translucency, const Color &color, const StaticMesh *collisionMesh) { - STACK_TRACE; // only work with the first mesh subset StaticMeshSubset *subset = mesh->GetSubset(0); @@ -39,7 +38,6 @@ StaticTileMesh::StaticTileMesh(const StaticMesh *mesh, const RectF *textureAtlas StaticTileMesh::StaticTileMesh(const StaticMesh *mesh, const RectF *textureAtlasTileBoundaries, uint32_t numTiles, MESH_SIDES opaqueSides, TILE_LIGHT_VALUE lightValue, BOOL alpha, float translucency, const Color &color, const StaticMesh *collisionMesh) { - STACK_TRACE; ASSERT(numTiles > 0); ASSERT(mesh->GetNumSubsets() >= numTiles); @@ -94,7 +92,6 @@ StaticTileMesh::StaticTileMesh(const StaticMesh *mesh, const RectF *textureAtlas void StaticTileMesh::SetupCollisionVertices(const StaticMesh *collisionMesh) { - STACK_TRACE; const VertexBuffer *srcCollisionVertices; if (collisionMesh != NULL) srcCollisionVertices = collisionMesh->GetSubset(0)->GetVertices(); @@ -112,10 +109,6 @@ void StaticTileMesh::SetupCollisionVertices(const StaticMesh *collisionMesh) StaticTileMesh::~StaticTileMesh() { - STACK_TRACE; SAFE_DELETE(m_vertices); SAFE_DELETE(m_collisionVertices); } - - - diff --git a/src/tilemap/tilechunk.cpp b/src/tilemap/tilechunk.cpp index 344bca0..eff52d3 100644 --- a/src/tilemap/tilechunk.cpp +++ b/src/tilemap/tilechunk.cpp @@ -18,7 +18,6 @@ TileChunk::TileChunk(uint32_t x, uint32_t y, uint32_t z, uint32_t width, uint32_t height, uint32_t depth, const TileMap *tileMap, GraphicsDevice *graphicsDevice) { - STACK_TRACE; ASSERT(tileMap != NULL); ASSERT(graphicsDevice != NULL); @@ -59,7 +58,6 @@ TileChunk::TileChunk(uint32_t x, uint32_t y, uint32_t z, uint32_t width, uint32_ TileChunk::~TileChunk() { - STACK_TRACE; m_graphicsDevice->UnregisterManagedResource(m_vertices); if (m_alphaVertices != NULL) m_graphicsDevice->UnregisterManagedResource(m_alphaVertices); @@ -71,7 +69,6 @@ TileChunk::~TileChunk() void TileChunk::GetBoundingBoxFor(uint32_t x, uint32_t y, uint32_t z, BoundingBox *box) const { - STACK_TRACE; ASSERT(box != NULL); // "chunk space" @@ -85,7 +82,6 @@ void TileChunk::GetBoundingBoxFor(uint32_t x, uint32_t y, uint32_t z, BoundingBo BoundingBox TileChunk::GetBoundingBoxFor(uint32_t x, uint32_t y, uint32_t z) const { - STACK_TRACE; BoundingBox box; // "chunk space" @@ -101,7 +97,6 @@ BoundingBox TileChunk::GetBoundingBoxFor(uint32_t x, uint32_t y, uint32_t z) con BOOL TileChunk::CheckForCollision(const Ray &ray, uint32_t &x, uint32_t &y, uint32_t &z) const { - STACK_TRACE; // make sure that the ray and this chunk can actually collide in the first place Vector3 position; if (!IntersectionTester::Test(ray, m_bounds, &position)) @@ -257,7 +252,6 @@ BOOL TileChunk::CheckForCollision(const Ray &ray, uint32_t &x, uint32_t &y, uint BOOL TileChunk::CheckForCollision(const Ray &ray, Vector3 &point, uint32_t &x, uint32_t &y, uint32_t &z) const { - STACK_TRACE; // if the ray doesn't collide with any solid tiles in the first place, then // we can skip this more expensive triangle collision check... if (!CheckForCollision(ray, x, y, z)) @@ -270,7 +264,6 @@ BOOL TileChunk::CheckForCollision(const Ray &ray, Vector3 &point, uint32_t &x, u BOOL TileChunk::CheckForCollisionWithTile(const Ray &ray, Vector3 &point, uint32_t x, uint32_t y, uint32_t z) const { - STACK_TRACE; const Tile *tile = Get(x, y, z); const TileMesh *mesh = m_tileMap->GetMeshes()->Get(tile); @@ -317,7 +310,6 @@ BOOL TileChunk::CheckForCollisionWithTile(const Ray &ray, Vector3 &point, uint32 BOOL TileChunk::GetOverlappedTiles(const BoundingBox &box, uint32_t &x1, uint32_t &y1, uint32_t &z1, uint32_t &x2, uint32_t &y2, uint32_t &z2) const { - STACK_TRACE; // make sure the given box actually intersects with this chunk in the first place if (!IntersectionTester::Test(m_bounds, box)) return FALSE; @@ -375,7 +367,6 @@ Tile* TileChunk::GetWithinSelfOrNeighbourSafe(int32_t x, int32_t y, int32_t z) c void TileChunk::EnableAlphaVertices(BOOL enable) { - STACK_TRACE; if (enable) { if (m_alphaVertices != NULL) @@ -409,7 +400,6 @@ void TileChunk::EnableAlphaVertices(BOOL enable) void TileChunk::UpdateVertices(ChunkVertexGenerator *vertexGenerator) { - STACK_TRACE; vertexGenerator->Generate(this, m_numVertices, m_numAlphaVertices); } diff --git a/src/tilemap/tilemap.cpp b/src/tilemap/tilemap.cpp index fd26d65..7a571a0 100644 --- a/src/tilemap/tilemap.cpp +++ b/src/tilemap/tilemap.cpp @@ -16,7 +16,6 @@ TileMap::TileMap(TileMeshCollection *tileMeshes, ChunkVertexGenerator *vertexGenerator, TileMapLighter *lighter, GraphicsDevice *graphicsDevice) { - STACK_TRACE; ASSERT(tileMeshes != NULL); ASSERT(vertexGenerator != NULL); ASSERT(graphicsDevice != NULL); @@ -44,13 +43,11 @@ TileMap::TileMap(TileMeshCollection *tileMeshes, ChunkVertexGenerator *vertexGen TileMap::~TileMap() { - STACK_TRACE; Clear(); } void TileMap::SetSize(uint32_t numChunksX, uint32_t numChunksY, uint32_t numChunksZ, uint32_t chunkSizeX, uint32_t chunkSizeY, uint32_t chunkSizeZ) { - STACK_TRACE; ASSERT(numChunksX > 0); ASSERT(numChunksY > 0); ASSERT(numChunksZ > 0); @@ -94,7 +91,6 @@ void TileMap::SetSize(uint32_t numChunksX, uint32_t numChunksY, uint32_t numChun void TileMap::Clear() { - STACK_TRACE; for (uint32_t i = 0; i < m_numChunks; ++i) { TileChunk *chunk = m_chunks[i]; @@ -113,7 +109,6 @@ void TileMap::Clear() BOOL TileMap::CheckForCollision(const Ray &ray, uint32_t &x, uint32_t &y, uint32_t &z) const { - STACK_TRACE; // make sure that the ray can actually collide with this map in the first place Vector3 position; if (!IntersectionTester::Test(ray, m_bounds, &position)) @@ -264,7 +259,6 @@ BOOL TileMap::CheckForCollision(const Ray &ray, uint32_t &x, uint32_t &y, uint32 BOOL TileMap::CheckForCollision(const Ray &ray, Vector3 &point, uint32_t &x, uint32_t &y, uint32_t &z) const { - STACK_TRACE; // if the ray doesn't collide with any solid tiles in the first place, then // we can skip this more expensive triangle collision check... if (!CheckForCollision(ray, x, y, z)) @@ -277,7 +271,6 @@ BOOL TileMap::CheckForCollision(const Ray &ray, Vector3 &point, uint32_t &x, uin BOOL TileMap::CheckForCollisionWithTile(const Ray &ray, Vector3 &point, uint32_t x, uint32_t y, uint32_t z) const { - STACK_TRACE; const Tile *tile = Get(x, y, z); const TileMesh *mesh = m_tileMeshes->Get(tile); @@ -324,7 +317,6 @@ BOOL TileMap::CheckForCollisionWithTile(const Ray &ray, Vector3 &point, uint32_t BOOL TileMap::GetOverlappedTiles(const BoundingBox &box, uint32_t &x1, uint32_t &y1, uint32_t &z1, uint32_t &x2, uint32_t &y2, uint32_t &z2) const { - STACK_TRACE; // make sure the given box actually intersects with the map in the first place if (!IntersectionTester::Test(m_bounds, box)) return FALSE; @@ -363,7 +355,6 @@ BOOL TileMap::GetOverlappedTiles(const BoundingBox &box, uint32_t &x1, uint32_t BOOL TileMap::GetOverlappedChunks(const BoundingBox &box, uint32_t &x1, uint32_t &y1, uint32_t &z1, uint32_t &x2, uint32_t &y2, uint32_t &z2) const { - STACK_TRACE; // make sure the given box actually intersects with the map in the first place if (!IntersectionTester::Test(m_bounds, box)) return FALSE; @@ -410,7 +401,6 @@ BOOL TileMap::GetOverlappedChunks(const BoundingBox &box, uint32_t &x1, uint32_t void TileMap::UpdateVertices() { - STACK_TRACE; ASSERT(m_numChunks > 0); for (uint32_t i = 0; i < m_numChunks; ++i) @@ -422,7 +412,6 @@ void TileMap::UpdateVertices() void TileMap::UpdateChunkVertices(TileChunk *chunk) { - STACK_TRACE; ASSERT(m_numChunks > 0); ASSERT(chunk != NULL); @@ -431,7 +420,6 @@ void TileMap::UpdateChunkVertices(TileChunk *chunk) void TileMap::UpdateLighting() { - STACK_TRACE; ASSERT(m_numChunks > 0); if (m_lighter != NULL) diff --git a/src/tilemap/tilemaprenderer.cpp b/src/tilemap/tilemaprenderer.cpp index 5d3558d..4c51133 100644 --- a/src/tilemap/tilemaprenderer.cpp +++ b/src/tilemap/tilemaprenderer.cpp @@ -13,7 +13,6 @@ TileMapRenderer::TileMapRenderer(GraphicsDevice *graphicsDevice) { - STACK_TRACE; m_graphicsDevice = graphicsDevice; m_chunkRenderer = new ChunkRenderer(graphicsDevice); @@ -26,13 +25,11 @@ TileMapRenderer::TileMapRenderer(GraphicsDevice *graphicsDevice) TileMapRenderer::~TileMapRenderer() { - STACK_TRACE; SAFE_DELETE(m_chunkRenderer); } void TileMapRenderer::Render(const TileMap *tileMap, Shader *shader) { - STACK_TRACE; m_numChunksRendered = 0; m_numVerticesRendered = 0; diff --git a/src/tilemap/tilemeshcollection.cpp b/src/tilemap/tilemeshcollection.cpp index 3672564..063c8e1 100644 --- a/src/tilemap/tilemeshcollection.cpp +++ b/src/tilemap/tilemeshcollection.cpp @@ -12,7 +12,6 @@ TileMeshCollection::TileMeshCollection(const TextureAtlas *textureAtlas) { - STACK_TRACE; ASSERT(textureAtlas != NULL); m_textureAtlas = textureAtlas; @@ -23,7 +22,6 @@ TileMeshCollection::TileMeshCollection(const TextureAtlas *textureAtlas) TileMeshCollection::~TileMeshCollection() { - STACK_TRACE; for (size_t i = 0; i < m_meshes.size(); ++i) { TileMesh *mesh = m_meshes[i]; @@ -33,13 +31,11 @@ TileMeshCollection::~TileMeshCollection() uint32_t TileMeshCollection::Add(const StaticMesh *mesh, uint32_t textureIndex, MESH_SIDES opaqueSides, TILE_LIGHT_VALUE lightValue, BOOL alpha, float translucency, const Color &color) { - STACK_TRACE; return Add(mesh, (StaticMesh*)NULL, textureIndex, opaqueSides, lightValue, alpha, translucency, color); } uint32_t TileMeshCollection::Add(const StaticMesh *mesh, const StaticMesh *collisionMesh, uint32_t textureIndex, MESH_SIDES opaqueSides, TILE_LIGHT_VALUE lightValue, BOOL alpha, float translucency, const Color &color) { - STACK_TRACE; StaticTileMesh *tileMesh = new StaticTileMesh(mesh, &m_textureAtlas->GetTile(textureIndex).texCoords, opaqueSides, lightValue, alpha, translucency, color, collisionMesh); ASSERT(tileMesh != NULL); @@ -48,13 +44,11 @@ uint32_t TileMeshCollection::Add(const StaticMesh *mesh, const StaticMesh *colli uint32_t TileMeshCollection::Add(const StaticMesh *mesh, uint32_t *textureIndexes, uint32_t numIndexes, MESH_SIDES opaqueSides, TILE_LIGHT_VALUE lightValue, BOOL alpha, float translucency, const Color &color) { - STACK_TRACE; return Add(mesh, (StaticMesh*)NULL, textureIndexes, numIndexes, opaqueSides, lightValue, alpha, translucency, color); } uint32_t TileMeshCollection::Add(const StaticMesh *mesh, const StaticMesh *collisionMesh, uint32_t *textureIndexes, uint32_t numIndexes, MESH_SIDES opaqueSides, TILE_LIGHT_VALUE lightValue, BOOL alpha, float translucency, const Color &color) { - STACK_TRACE; ASSERT(numIndexes > 0); RectF *tileBoundaries = new RectF[numIndexes]; ASSERT(tileBoundaries != NULL); @@ -72,7 +66,6 @@ uint32_t TileMeshCollection::Add(const StaticMesh *mesh, const StaticMesh *colli uint32_t TileMeshCollection::AddCube(uint32_t textureIndex, MESH_SIDES opaqueSides, TILE_LIGHT_VALUE lightValue, BOOL alpha, float translucency, const Color &color) { - STACK_TRACE; CubeTileMesh *tileMesh = new CubeTileMesh(SIDE_ALL, &m_textureAtlas->GetTile(textureIndex).texCoords, opaqueSides, lightValue, alpha, translucency, color); ASSERT(tileMesh != NULL); @@ -81,7 +74,6 @@ uint32_t TileMeshCollection::AddCube(uint32_t textureIndex, MESH_SIDES opaqueSid uint32_t TileMeshCollection::AddMesh(TileMesh *mesh) { - STACK_TRACE; m_meshes.push_back(mesh); return m_meshes.size() - 1; }