[Redbutton-devel] SF.net SVN: redbutton: [147] redbutton-browser/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2006-10-08 08:45:28
|
Revision: 147
http://svn.sourceforge.net/redbutton/?rev=147&view=rev
Author: skilvington
Date: 2006-10-08 01:45:09 -0700 (Sun, 08 Oct 2006)
Log Message:
-----------
corrigendum says ignore context-changing actions in OnStartUp and OnCloseDown
Modified Paths:
--------------
redbutton-browser/trunk/ActionClass.c
redbutton-browser/trunk/MHEGEngine.c
redbutton-browser/trunk/TokenGroupClass.c
Modified: redbutton-browser/trunk/ActionClass.c
===================================================================
--- redbutton-browser/trunk/ActionClass.c 2006-09-20 09:00:19 UTC (rev 146)
+++ redbutton-browser/trunk/ActionClass.c 2006-10-08 08:45:09 UTC (rev 147)
@@ -9,6 +9,9 @@
/*
* caller_gid should be the group identifier of the object containing the ActionClass
* it is used to resolve the ObjectReference's in the ElementaryAction's
+ * this function should only be called to run OnStartUp and OnCloseDown actions
+ * all other times (ie CallActionSlot) use MHEGEngine_addToTempActionQ instead
+ * Corrigendum says we should ignore context changing actions - TransitionTo, Launch, Spawn and Quit
*/
void
@@ -18,7 +21,14 @@
while(list)
{
- ElementaryAction_execute(&list->item, caller_gid);
+ unsigned int type = list->item.choice;
+ if(type == ElementaryAction_transition_to
+ || type == ElementaryAction_launch
+ || type == ElementaryAction_spawn
+ || type == ElementaryAction_quit)
+ error("ActionClass: ignoring %s in OnStartup/OnCloseDown actions", ElementaryAction_name(&list->item));
+ else
+ ElementaryAction_execute(&list->item, caller_gid);
list = list->next;
}
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2006-09-20 09:00:19 UTC (rev 146)
+++ redbutton-browser/trunk/MHEGEngine.c 2006-10-08 08:45:09 UTC (rev 147)
@@ -348,14 +348,6 @@
safe_free(scene_id.data);
return;
}
-#if 0
-/* TODO */
-/* should we do this before or after we destroy the current scene? */
- /* empty the Async event queue and any pending actions */
- LIST_FREE(&engine.async_eventq, MHEGAsyncEvent, free_MHEGAsyncEventListItem);
- LIST_FREE(&engine.main_actionq, MHEGAction, free_MHEGActionListItem);
- LIST_FREE(&engine.temp_actionq, MHEGAction, free_MHEGActionListItem);
-#endif
/*
* do Deactivation of all Ingredients in the current app that are not shared
* in the reverse order they appear in the items list
@@ -377,9 +369,7 @@
SceneClass_Deactivation(current_scene);
SceneClass_Destruction(current_scene);
}
-/* TODO */
-/* should we do this before or after we destroy the current scene? */
- /* empty the Async event queue and any pending actions */
+ /* now the old scene is destroyed, empty the Async event queue and any pending actions */
LIST_FREE(&engine.async_eventq, MHEGAsyncEvent, free_MHEGAsyncEventListItem);
LIST_FREE(&engine.main_actionq, MHEGAction, free_MHEGActionListItem);
LIST_FREE(&engine.temp_actionq, MHEGAction, free_MHEGActionListItem);
Modified: redbutton-browser/trunk/TokenGroupClass.c
===================================================================
--- redbutton-browser/trunk/TokenGroupClass.c 2006-09-20 09:00:19 UTC (rev 146)
+++ redbutton-browser/trunk/TokenGroupClass.c 2006-10-08 08:45:09 UTC (rev 147)
@@ -314,7 +314,8 @@
* if the action is not Null, add the ElementaryActions to temp_actionq
* note, just doing:
* ActionClass_execute(&action->item.u.action_class, &t->rootClass.inst.ref.group_identifier);
- * does not work - it makes some BBC apps get into an infinite loop
+ * is not the same as adding the actions to the queue
+ * (also ActionClass_execute will ignore context changing actions - TransitionTo, Launch, Spawn and Quit)
*/
if(action->item.choice == ActionSlot_action_class)
MHEGEngine_addToTempActionQ(&action->item.u.action_class, &t->rootClass.inst.ref.group_identifier);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|