760
|
1 #include <stdlib.h>
|
|
2 #include <string.h>
|
|
3 #include "ExecMove.h"
|
|
4 #include "SgChange.h"
|
|
5 #include "SceneGraphRoot.h"
|
|
6
|
|
7 SchedDefineTask(ExecMove);
|
|
8
|
|
9 static int
|
|
10 run(SchedTask *smanager, void *rbuf , void *wbuf)
|
|
11 {
|
|
12 SgChange *sgchange = (SgChange *)smanager->get_param(0);
|
|
13 //SceneGraphRoot *sgroot = (SceneGraphRoot *)smanager->get_param(0);
|
|
14 SceneGraphRoot *sgroot = sgchange->sgroot_A;
|
823
|
15 long screen_w = (long)smanager->get_param(1);
|
|
16 long screen_h = (long)smanager->get_param(2);
|
760
|
17
|
|
18 //sgroot->updateControllerState();
|
|
19
|
|
20 SceneGraphPtr list = sgroot->sg_available_list;
|
|
21 sgroot->allRemove(sgroot->sg_remove_list);
|
|
22
|
|
23 sgroot->sg_draw_tree = sgroot->sg_exec_tree;
|
|
24 sgroot->sg_remove_list = sgroot->sg_available_list;
|
|
25
|
|
26 sgroot->sg_exec_tree = NULL;
|
|
27 sgroot->sg_available_list = NULL;
|
|
28
|
|
29 sgroot->camera->move_execute(screen_w, screen_h);
|
|
30 sgroot->camera->update(screen_w, screen_h);
|
|
31
|
|
32 sgroot->camera->children = NULL;
|
|
33 sgroot->camera->lastChild = NULL;
|
|
34
|
|
35 list->move_execute(screen_w, screen_h);
|
|
36
|
|
37 sgroot->list = list;
|
|
38
|
|
39 return 0;
|
|
40 }
|