Mercurial > hg > Members > kono > Cerium
annotate Renderer/Engine/SgChange.cc @ 726:9136cf9186b6
remove swap buffer
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 19 Dec 2009 16:37:49 +0900 |
parents | 3c05b9e518ac |
children | aaaa0baeab89 31d0a5baafdf |
rev | line source |
---|---|
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
1 #include <SDL.h> |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
2 #include "SgChange.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
3 #include "viewer_types.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
4 #include "SceneGraph.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
5 #include "SceneGraphRoot.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
6 #include "scene_graph_pack.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
7 #include "sys.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
8 #include "Func.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
9 #include "error.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
10 #include "TaskManager.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
11 #include <wchar.h> |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
12 #include "Pad.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
13 #include "Application.h" |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
14 #include "lindaapi.h" |
691 | 15 #include "global_alloc.h" |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
16 |
691 | 17 static void post2runLoop(SchedTask *s, void *viewer, void *s1); |
18 static void post2runDraw(SchedTask *s, void *viewer, void *s1); | |
715 | 19 static void post2runMove(SchedTask *s, void *viewer, void *s1); |
20 static void post2rendering(SchedTask *s, void *viewer, void *s1); | |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
21 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
22 /* measure for FPS (Frame Per Second) */ |
724
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
23 extern int start_time; |
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
24 extern int this_time; |
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
25 extern int frames; |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
26 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
27 /* Data Pack sent to Other CPUs (ex. SPE) */ |
724
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
28 extern SceneGraphPack *sgpack; |
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
29 extern PolygonPack *ppack; |
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
30 extern SpanPackPtr spackList; |
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
31 extern SpanPackPtr *spackList_ptr; |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
32 |
724
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
33 extern int spackList_length; |
6d11ecef3b74
Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
715
diff
changeset
|
34 extern int spackList_length_align; |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
35 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
36 SgChange::SgChange(int b, int w, int h, int _num) |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
37 { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
38 bpp = b; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
39 width = w; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
40 height = h; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
41 spe_num = _num; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
42 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
43 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
44 int |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
45 SgChange::get_ticks(void) |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
46 { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
47 int time; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
48 time = SDL_GetTicks(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
49 return time; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
50 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
51 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
52 bool |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
53 SgChange::quit_check(void) |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
54 { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
55 SDL_Event event; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
56 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
57 while(SDL_PollEvent(&event)) { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
58 if (event.type==SDL_QUIT) { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
59 return true; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
60 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
61 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
62 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
63 Uint8 *keys=SDL_GetKeyState(NULL); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
64 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
65 if (keys[SDLK_q] == SDL_PRESSED) { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
66 return true; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
67 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
68 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
69 return false; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
70 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
71 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
72 void |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
73 SgChange::quit(void) |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
74 { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
75 SDL_Quit(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
76 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
77 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
78 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
79 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
80 void |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
81 SgChange::run_init(TaskManager *manager, Application *app) |
691 | 82 { |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
83 this->manager = manager; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
84 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
85 start_time = get_ticks(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
86 this_time = 0; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
87 frames = 0; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
88 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
89 // ココ! |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
90 sgroot_A = new SceneGraphRoot(this->width, this->height); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
91 sgroot_A->tmanager = manager; |
715 | 92 sgroot_B = new SceneGraphRoot(this->width, this->height); |
93 sgroot_B->tmanager = manager; | |
691 | 94 |
725
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
724
diff
changeset
|
95 int size = sizeof(float)*4; |
691 | 96 light_xyz[0] = 0.0f; |
97 light_xyz[1] = 0.0f; | |
98 light_xyz[2] = 0.0f; | |
99 light_xyz[3] = 0.0f; | |
100 | |
101 HTaskPtr data_load; | |
102 for(int i = 0; i < spe_num; i++) { | |
103 data_load = manager->create_task(DataLoad); | |
104 data_load->set_param(0, (memaddr)size); | |
105 data_load->set_param(1, (memaddr)LOAD_ID); | |
106 data_load->set_cpu((CPU_TYPE)((int)SPE_0 + i)); | |
107 data_load->spawn(); | |
108 } | |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
109 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
110 MainLoop *mainloop = app->init_only_sg(this, this->width, this->height); |
691 | 111 |
112 mainloop->mainLoop(); | |
113 } | |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
114 |
691 | 115 HTaskPtr |
116 SgChange::initLoop() | |
117 { | |
118 HTaskPtr task_next; | |
119 HTaskPtr task_tex; | |
693 | 120 |
691 | 121 sgpack = (SceneGraphPack*)manager->allocate(sizeof(SceneGraphPack)); |
122 sgpack->init(); | |
123 ppack = (PolygonPack*)manager->allocate(sizeof(PolygonPack)); | |
124 | |
125 spackList_length = (this->height + split_screen_h - 1) / split_screen_h; | |
126 spackList = (SpanPack*)manager->allocate(sizeof(SpanPack)*spackList_length); | |
127 | |
128 spackList_length_align = (spackList_length + 3)&(~3); | |
129 | |
130 spackList_ptr = | |
131 (SpanPack**)manager->allocate(sizeof(SpanPack*)*spackList_length_align); | |
132 | |
133 for (int i = 0; i < spackList_length; i++) { | |
134 spackList_ptr[i] = &spackList[i]; | |
135 } | |
136 | |
137 for (int i = 1; i <= spackList_length; i++) { | |
138 spackList[i-1].init(i*split_screen_h); | |
139 } | |
140 | |
141 task_next = manager->create_task(Dummy); | |
142 | |
143 for (int i = 0; i < spe_num; i++) { | |
144 task_tex = manager->create_task(LoadTexture); | |
145 task_tex->set_cpu((CPU_TYPE)((int)SPE_0 + i)); | |
146 task_next->wait_for(task_tex); | |
147 task_tex->spawn(); | |
148 } | |
149 | |
150 return task_next; | |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
151 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
152 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
153 void |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
154 SgChange::mainLoop() |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
155 { |
691 | 156 HTaskPtr task_next = initLoop(); |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
157 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
158 task_next->set_post(&post2runLoop, (void *)this, 0); // set_post(function(this->run_loop()), NULL) |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
159 task_next->spawn(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
160 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
161 |
691 | 162 |
163 | |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
164 static void |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
165 post2runLoop(SchedTask *s, void *viewer_, void *arg) |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
166 { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
167 SgChange *viewer = (SgChange*)viewer_; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
168 HTaskPtr task_next = viewer->manager->create_task(Dummy); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
169 viewer->run_loop(task_next); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
170 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
171 psx_sync_n(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
172 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
173 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
174 void |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
175 SgChange::exchange_sgroot() |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
176 { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
177 SceneGraphRoot *tmp; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
178 tmp = sgroot_A; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
179 sgroot_A = sgroot_B; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
180 sgroot_B = tmp; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
181 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
182 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
183 void |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
184 SgChange::run_loop(HTaskPtr task_next) |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
185 { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
186 bool quit_flg; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
187 quit_flg = quit_check(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
188 if (quit_flg == true) { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
189 this_time = get_ticks(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
190 run_finish(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
191 return; |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
192 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
193 |
691 | 194 clean_pixels(); |
195 | |
196 for (int i = 1; i <= spackList_length; i++) { | |
197 spackList[i-1].reinit(i*split_screen_h); | |
198 } | |
199 | |
715 | 200 #if 0 |
201 exchange_sgroot(); | |
691 | 202 light_xyz_stock = sgroot_A->getLightVector(); |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
203 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
204 //printf("Sgroot = %x\n", sgroot_A); |
693 | 205 |
206 //task_next->set_post(&post2runLoop, (void *)this, 0); | |
207 //task_next->spawn(); | |
208 | |
691 | 209 rendering(task_next); |
715 | 210 #else |
211 //exchange_sgroot(); | |
212 | |
213 sgroot_A->updateControllerState(); | |
214 sgroot_A->allExecute(width, height); | |
215 light_xyz_stock = sgroot_A->getLightVector(); | |
216 | |
217 HTaskPtr loop_task = manager->create_task(Dummy); | |
218 loop_task->set_post(post2runLoop, (void *)this, 0); | |
219 | |
220 HTaskPtr draw_task = manager->create_task(Dummy); | |
221 draw_task->set_post(post2rendering, (void *)this, 0); | |
222 | |
223 HTaskPtr move_task = manager->create_task(Dummy); | |
224 move_task->set_post(post2runMove, (void *)this, 0); | |
225 | |
226 HTaskPtr dummy_task = manager->create_task(Dummy); | |
227 | |
228 this->dummy_task = dummy_task; | |
229 loop_task->wait_for(dummy_task); | |
230 loop_task->wait_for(move_task); | |
231 | |
232 move_task->spawn(); | |
233 draw_task->spawn(); | |
234 loop_task->spawn(); | |
235 #endif | |
236 } | |
237 | |
238 static void | |
239 post2runMove(SchedTask *s, void *viewer_, void *arg) | |
240 { | |
241 SgChange *viewer = (SgChange *)viewer_; | |
242 HTaskPtr task_next = viewer->manager->create_task(Dummy); | |
243 viewer->run_move(task_next); | |
244 } | |
245 | |
246 void | |
247 SgChange::run_move(HTaskPtr task_next) | |
248 { | |
249 //sgroot_A->updateControllerState(); | |
250 //sgroot_A->allExecute(width, height); | |
251 } | |
252 | |
253 static void | |
254 post2rendering(SchedTask *s, void *viewer_, void *arg) | |
255 { | |
256 SgChange *viewer = (SgChange *)viewer_; | |
257 HTaskPtr task_next = viewer->manager->create_task(Dummy); | |
258 viewer->run_draw(task_next); | |
259 | |
691 | 260 } |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
261 |
691 | 262 void |
263 SgChange::rendering(HTaskPtr task_next) | |
264 { | |
265 common_rendering(task_next); | |
266 | |
715 | 267 task_next->set_post(post2runDraw, (void*)this, 0); |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
268 task_next->spawn(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
269 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
270 |
691 | 271 void |
272 SgChange::common_rendering(HTaskPtr task_next) | |
273 { | |
274 HTaskPtr task_create_pp = manager->create_task(CreatePolygonFromSceneGraph); | |
275 | |
276 //task_create_pp->set_param(0, (memaddr)sgroot_B->getDrawSceneGraph()); | |
277 task_create_pp->set_param(0, (memaddr)sgroot_A->getDrawSceneGraph()); | |
278 task_create_pp->set_param(1, (memaddr)ppack); | |
279 | |
280 task_next->wait_for(task_create_pp); | |
281 | |
282 int range_base = spe_num; | |
283 int range = (spackList_length + range_base - 1) / range_base; | |
284 | |
285 for (int i = 0; i < range_base; i++) { | |
286 int index_start = range*i; | |
287 int index_end = (index_start + range >= spackList_length) | |
288 ? spackList_length : index_start + range; | |
289 | |
290 HTaskPtr task_create_sp = manager->create_task(CreateSpan); | |
291 | |
292 task_create_sp->set_param(0,index_start); | |
293 | |
294 task_create_sp->set_param(1,index_start*split_screen_h + 1); | |
295 task_create_sp->set_param(2,index_end*split_screen_h); | |
296 | |
297 task_create_sp->add_inData(ppack, sizeof(PolygonPack)); | |
298 task_create_sp->add_inData(spackList_ptr, | |
299 sizeof(SpanPack*)*spackList_length_align); | |
300 task_create_sp->add_inData(&spackList[index_start], sizeof(SpanPack)); | |
301 | |
302 task_next->wait_for(task_create_sp); | |
303 task_create_sp->wait_for(task_create_pp); | |
304 | |
305 task_create_sp->set_cpu(SPE_ANY); | |
306 task_create_sp->spawn(); | |
307 } | |
308 | |
309 task_create_pp->spawn(); | |
310 } | |
311 | |
715 | 312 |
691 | 313 static void |
314 post2runDraw(SchedTask *s, void *viewer_, void *arg) | |
315 { | |
316 SgChange *viewer = (SgChange *)viewer_; | |
317 HTaskPtr task_next = viewer->manager->create_task(Dummy); | |
318 viewer->run_draw(task_next); | |
319 } | |
320 | |
321 void | |
322 SgChange::run_draw(HTaskPtr task_next) // 引数に post2runLoop を入れるようにする | |
323 { | |
324 common_draw(task_next); | |
325 | |
715 | 326 #if 0 |
691 | 327 task_next->set_post(post2runLoop, (void*)this, 0); // set_post(function(this->run_loop()), NULL) |
328 task_next->spawn(); | |
715 | 329 #else |
330 this->dummy_task->wait_for(task_next); | |
331 task_next->spawn(); | |
332 this->dummy_task->spawn(); | |
333 #endif | |
691 | 334 |
335 frames++; | |
336 } | |
337 | |
338 void | |
339 SgChange::common_draw(HTaskPtr task_next) | |
340 { | |
341 HTaskPtr task_draw; | |
342 | |
343 //Light info update | |
344 HTaskPtr data_update; | |
345 HTaskPtr data_update_wait; | |
725
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
724
diff
changeset
|
346 int size = sizeof(float)*4; |
691 | 347 |
348 light_xyz[0] = light_xyz_stock[0]; | |
349 light_xyz[1] = light_xyz_stock[1]; | |
350 light_xyz[2] = light_xyz_stock[2]; | |
351 light_xyz[3] = light_xyz_stock[3]; | |
352 | |
353 data_update_wait = manager->create_task(DataUpdate); | |
725
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
724
diff
changeset
|
354 data_update_wait->add_inData(light_xyz, size); |
691 | 355 data_update_wait->set_param(0, size); |
356 data_update_wait->set_param(1, LOAD_ID); | |
357 data_update_wait->set_cpu((CPU_TYPE)((int)SPE_0)); | |
358 | |
359 for (int i = 1; i < spe_num; i++) { | |
360 data_update = manager->create_task(DataUpdate); | |
361 data_update->add_inData(light_xyz, sizeof(float)*size); | |
362 data_update->set_param(0, size); | |
363 data_update->set_param(1, LOAD_ID); | |
364 data_update->set_cpu((CPU_TYPE)((int)SPE_0 + i)); | |
365 data_update_wait->wait_for(data_update); | |
366 data_update->spawn(); | |
367 } | |
368 | |
369 data_update_wait->spawn(); | |
370 | |
371 ppack->clear(); | |
372 for (int i = 0; i < spackList_length; i++) { | |
373 SpanPack *spack = &spackList[i]; | |
374 int startx = 1; | |
375 int endx = split_screen_w; | |
376 | |
377 int starty = spack->info.y_top - split_screen_h + 1; | |
378 //int endy = spack->info.y_top; | |
379 int rangey = (starty + split_screen_h - 1 > this->height) | |
380 ? this->height - starty + 1 : split_screen_h; | |
381 | |
382 while (startx < this->width) { | |
383 if (spack->info.size > 0) { | |
384 // Draw SpanPack | |
385 task_draw = manager->create_task(DrawSpan); | |
386 | |
387 task_draw->set_param(0, | |
388 (memaddr)&pixels[(startx-1) + this->width*(starty-1)]); | |
389 task_draw->set_param(1,this->width); | |
390 task_draw->set_param(2,startx); | |
391 task_draw->set_param(3,endx); | |
392 task_draw->set_param(4,rangey); | |
393 | |
394 task_draw->add_inData(spack, sizeof(SpanPack)); | |
395 | |
396 for (int i = 0; i < rangey; i++) { | |
397 task_draw->add_outData( | |
398 &pixels[(startx-1) + this->width*(starty-1 + i) ], | |
399 (endx-startx+1)*sizeof(int)); | |
400 } | |
401 } else { | |
402 // 7.7.3 SL1 Data Cache Range Set to Zero コマンド | |
403 // を使って、DMAでclearするべき... ということは、 | |
404 // それもSPEでやる方が良い? | |
405 memset(&pixels[(startx-1)+this->width*(starty-1)], | |
406 0, (this->width)*sizeof(int)*rangey); | |
407 break; | |
408 } | |
409 | |
410 task_draw->set_cpu(SPE_ANY); | |
411 task_next->wait_for(task_draw); | |
412 task_draw->wait_for(data_update_wait); | |
413 task_draw->spawn(); | |
414 | |
415 startx += split_screen_w; | |
416 endx += split_screen_w; | |
417 | |
418 if (endx > this->width) { | |
419 endx = this->width; | |
420 } | |
421 } | |
422 } | |
423 } | |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
424 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
425 void |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
426 SgChange::run_finish(void) |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
427 { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
428 if (this_time != start_time) { |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
429 printf("%f FPS\n", (((float)frames)/(this_time-start_time))*1000.0); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
430 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
431 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
432 delete sgroot_A; |
691 | 433 //delete sgroot_B; |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
434 quit(); |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
435 } |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
436 |
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
437 /* end */ |