From 16c8689c1cf615cb8d47d6a56c74e72891ef81a2 Mon Sep 17 00:00:00 2001 From: aidinabedi Date: Sun, 13 Dec 2009 19:00:40 +0000 Subject: [PATCH] Another bug bits the dust --- Samples/Simple/Demo_Simple.vcproj | 14 +- Shiny_vs2008.sln => Shiny.sln | 11 +- include/ShinyNode.h | 2 +- include/ShinyNodeState.h | 2 +- include/ShinyZone.h | 2 +- src/Shiny.vcproj | 11 +- src/ShinyManager.c | 4 +- src/ShinyNode.c | 4 +- src/ShinyNodeState.c | 16 +- src/ShinyZone.c | 2 +- src/Shiny_vs2008.vcproj | 249 ------------------------------ 11 files changed, 39 insertions(+), 278 deletions(-) rename Shiny_vs2008.sln => Shiny.sln (53%) delete mode 100644 src/Shiny_vs2008.vcproj diff --git a/Samples/Simple/Demo_Simple.vcproj b/Samples/Simple/Demo_Simple.vcproj index 943ebcf..69e6790 100644 --- a/Samples/Simple/Demo_Simple.vcproj +++ b/Samples/Simple/Demo_Simple.vcproj @@ -18,8 +18,8 @@ @@ -61,9 +61,9 @@ /> _cache) = &_ShinyNode_dummy; diff --git a/include/ShinyNodeState.h b/include/ShinyNodeState.h index 6703e2a..681b90a 100644 --- a/include/ShinyNodeState.h +++ b/include/ShinyNodeState.h @@ -45,7 +45,7 @@ ShinyNodeState* ShinyNodeState_push(ShinyNodeState *a_top, ShinyNode *a_node); ShinyNodeState* ShinyNodeState_pop(ShinyNodeState *a_top); ShinyNode* ShinyNodeState_finishAndGetNext(ShinyNodeState *self, float a_damping); -ShinyNode* ShinyNodeState_finishAndGetNextSimple(ShinyNodeState *self); +ShinyNode* ShinyNodeState_finishAndGetNextClean(ShinyNodeState *self); #endif // if SHINY_COMPILED == TRUE diff --git a/include/ShinyZone.h b/include/ShinyZone.h index 6662388..e3c6b8a 100644 --- a/include/ShinyZone.h +++ b/include/ShinyZone.h @@ -61,7 +61,7 @@ SHINY_INLINE void ShinyZone_uninit(ShinyZone *self) { void ShinyZone_preUpdateChain(ShinyZone *first); void ShinyZone_updateChain(ShinyZone *first, float a_damping); -void ShinyZone_updateChainSimple(ShinyZone *first); +void ShinyZone_updateChainClean(ShinyZone *first); void ShinyZone_resetChain(ShinyZone *first); diff --git a/src/Shiny.vcproj b/src/Shiny.vcproj index 27ee708..7aed93a 100644 --- a/src/Shiny.vcproj +++ b/src/Shiny.vcproj @@ -18,8 +18,8 @@ @@ -62,7 +62,7 @@ /> _firstUpdate || self->damping == 0) { self->_firstUpdate = FALSE; - ShinyNode_updateTreeSimple(&self->rootNode); - ShinyZone_updateChainSimple(&self->rootZone); + ShinyNode_updateTreeClean(&self->rootNode); + ShinyZone_updateChainClean(&self->rootZone); } else { ShinyNode_updateTree(&self->rootNode, self->damping); diff --git a/src/ShinyNode.c b/src/ShinyNode.c index fff582b..5e90818 100644 --- a/src/ShinyNode.c +++ b/src/ShinyNode.c @@ -67,7 +67,7 @@ void ShinyNode_updateTree(ShinyNode* first, float a_damping) { //----------------------------------------------------------------------------- -void ShinyNode_updateTreeSimple(ShinyNode* first) { +void ShinyNode_updateTreeClean(ShinyNode* first) { ShinyNodeState *top = NULL; ShinyNode *node = first; @@ -78,7 +78,7 @@ void ShinyNode_updateTreeSimple(ShinyNode* first) { } while (node); for (;;) { - node = ShinyNodeState_finishAndGetNextSimple(top); + node = ShinyNodeState_finishAndGetNextClean(top); top = ShinyNodeState_pop(top); if (node) break; diff --git a/src/ShinyNodeState.c b/src/ShinyNodeState.c index 59beab5..c42462e 100644 --- a/src/ShinyNodeState.c +++ b/src/ShinyNodeState.c @@ -48,7 +48,7 @@ ShinyNodeState* ShinyNodeState_push(ShinyNodeState *a_top, ShinyNode *a_node) { a_node->_last.selfTicks = 0; a_node->_last.entryCount = 0; - self->zoneUpdating = a_node->zone->_state != SHINY_ZONE_STATE_UPDATING; + self->zoneUpdating = zone->_state != SHINY_ZONE_STATE_UPDATING; if (self->zoneUpdating) { zone->_state = SHINY_ZONE_STATE_UPDATING; } else { @@ -73,14 +73,14 @@ ShinyNode* ShinyNodeState_finishAndGetNext(ShinyNodeState *self, float a_damping ShinyZone *zone = node->zone; if (self->zoneUpdating) { - zone->data.childTicks.cur += zone->data.childTicks.cur; + zone->data.childTicks.cur += node->data.childTicks.cur; zone->_state = SHINY_ZONE_STATE_INITIALIZED; } - ShinyData_computeAverage(&(zone->data), a_damping); + ShinyData_computeAverage(&node->data, a_damping); if (!ShinyNode_isRoot(node)) - node->parent->data.childTicks.cur += zone->data.selfTicks.cur + zone->data.childTicks.cur; + node->parent->data.childTicks.cur += node->data.selfTicks.cur + node->data.childTicks.cur; return node->nextSibling; } @@ -88,19 +88,19 @@ ShinyNode* ShinyNodeState_finishAndGetNext(ShinyNodeState *self, float a_damping //----------------------------------------------------------------------------- -ShinyNode* ShinyNodeState_finishAndGetNextSimple(ShinyNodeState *self) { +ShinyNode* ShinyNodeState_finishAndGetNextClean(ShinyNodeState *self) { ShinyNode *node = self->node; ShinyZone *zone = node->zone; if (self->zoneUpdating) { - zone->data.childTicks.cur += zone->data.childTicks.cur; + zone->data.childTicks.cur += node->data.childTicks.cur; zone->_state = SHINY_ZONE_STATE_INITIALIZED; } - ShinyData_copyAverage(&(zone->data)); + ShinyData_copyAverage(&node->data); if (!ShinyNode_isRoot(node)) - node->parent->data.childTicks.cur += zone->data.selfTicks.cur + zone->data.childTicks.cur; + node->parent->data.childTicks.cur += node->data.selfTicks.cur + node->data.childTicks.cur; return node->nextSibling; } diff --git a/src/ShinyZone.c b/src/ShinyZone.c index 28bd0af..46645c9 100644 --- a/src/ShinyZone.c +++ b/src/ShinyZone.c @@ -53,7 +53,7 @@ void ShinyZone_updateChain(ShinyZone *first, float a_damping) { //----------------------------------------------------------------------------- -void ShinyZone_updateChainSimple(ShinyZone *first) { +void ShinyZone_updateChainClean(ShinyZone *first) { ShinyZone* zone = first; do { diff --git a/src/Shiny_vs2008.vcproj b/src/Shiny_vs2008.vcproj deleted file mode 100644 index 27ee708..0000000 --- a/src/Shiny_vs2008.vcproj +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -