Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/task/ExecMove.cc @ 761:be6e43d977d1
add task/ExecMove
author | hiroki |
---|---|
date | Thu, 04 Feb 2010 14:50:01 +0900 |
parents | |
children | 01b6d924a560 |
comparison
equal
deleted
inserted
replaced
760:24a37fe8419a | 761:be6e43d977d1 |
---|---|
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; | |
15 int screen_w = (int)smanager->get_param(1); | |
16 int screen_h = (int)smanager->get_param(2); | |
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 } |