annotate Renderer/Test/SgRootChange.cc @ 996:bac3b0afc3e8 draft

add sdl_test file
author yutaka@charles.cr.ie.u-ryukyu.ac.jp
date Mon, 11 Oct 2010 18:56:51 +0900
parents 4d83a6a958fd
children 3f95f61faef6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
653
7a311860a76e 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 <math.h>
7a311860a76e 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 <stdlib.h>
7a311860a76e 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 "SceneGraphRoot.h"
7a311860a76e 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 "MainLoop.h"
7a311860a76e 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 "SgRootChange.h"
7a311860a76e 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
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
7 static void ball_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
8 static void ball_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, SceneGraphPtr tree);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
9 static void ball_collision_idle(SceneGraphPtr, void *sgroot_, int w, int h, SceneGraphPtr tree);
653
7a311860a76e 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
7a311860a76e 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
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
12 static float vy = 0.0f; // y 方向速度
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
13 static float dt = 1.0/1.0f; // frame rate
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
14
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
15 static float e = -0.8f; // 反発係数
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
16 static float g = 9.8f; // 重力加速度
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
17 //static float v0 = 0.0f; // 初速は 0
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
18
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
19 static float h0; // 初期高さ
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
20 static float ball_radius = 100.0f;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
21
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
22 static float speed = 10.0f;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
23
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
24 static void
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
25 ball_move_idle2(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
26 {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
27 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
28 Pad *pad = sgroot->getController();
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
29
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
30 if (pad->circle.isHold()) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
31 if (pad->left.isHold()) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
32 node->xyz[0] -= speed;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
33 if(node->xyz[0] < ball_radius)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
34 node->xyz[0] = ball_radius;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
35 } else if (pad->right.isHold()) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
36 node->xyz[0] += speed;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
37 if(node->xyz[0] > screen_w - ball_radius)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
38 node->xyz[0] = screen_w - ball_radius;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
39 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
40
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
41 if (pad->up.isHold()) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
42 node->xyz[1] -= speed;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
43 } else if (pad->down.isHold()) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
44 node->xyz[1] += speed;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
45 if(node->xyz[1] > screen_h - ball_radius)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
46 node->xyz[1] = screen_h - ball_radius;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
47 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
48 } else {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
49 node->set_move_collision(ball_move, ball_collision);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
50 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
51 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
52
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
53 static int time = 0;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
54
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
55 static void
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
56 ball_move_idle(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
57 {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
58 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
59 Pad *pad = sgroot->getController();
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
60
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
61 if (pad->circle.isPush()) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
62 node->set_move_collision(ball_move_idle2, ball_collision_idle);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
63 time = 0;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
64 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
65
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
66 time++;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
67
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
68 if (time > 90) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
69 float w = (float)random();
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
70
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
71 w = fmodf(w, screen_w - ball_radius*2);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
72 node->xyz[0] = w + ball_radius;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
73 node->xyz[1] = h0;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
74 node->set_move_collision(ball_move, ball_collision);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
75 time = 0;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
76 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
77 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
78
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
79 static void
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
80 ball_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
81 {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
82 vy += g * dt;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
83 node->xyz[1] += vy * dt;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
84 // node->xyz[0] += 10.0f;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
85 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
86
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
87 static void
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
88 ball_collision_idle(SceneGraphPtr, void *sgroot_, int w, int h, SceneGraphPtr tree)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
89 {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
90 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
91
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
92 static void
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
93 ball_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h,
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
94 SceneGraphPtr tree)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
95 {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
96 if (node->xyz[1] > screen_h - ball_radius) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
97 node->xyz[1] = screen_h - ball_radius;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
98
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
99 vy *= e;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
100 if (vy > -g && vy < 0) {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
101 vy = 0.0;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
102 node->set_move_collision(ball_move_idle, ball_collision_idle);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
103 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
104 }
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
105 }
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
106
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
107 // prototype
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
108 MainLoopPtr
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
109 SgRootChange::init(Viewer *viewer, int screen_w, int screen_h)
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
110 {
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
111 SgChange *sgroot = new SgChange(viewer);
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
112 SceneGraphPtr ball;
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
113 sgroot->run_init();
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
114 srandom(100);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
115
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
116 sgroot->createFromXMLfile("xml_file/Ball.xml");
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
117 ball = sgroot->createSceneGraph("Ball");
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
118 ball->set_move_collision(ball_move, ball_collision);
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
119
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
120 h0 = screen_h/2;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
121 h0 = -1000;
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
122
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
123 ball->xyz[0] = screen_w/2;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
124 ball->xyz[1] = h0;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
125 ball->xyz[2] = 30.0f;
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
126
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
127 sgroot->setSceneData(ball);
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
128
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
129 return sgroot;
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
130 }
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
131
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
132 extern Application *
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
133 application() {
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
134 return new SgRootChange();
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
135 }
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
136
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
137 const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n";
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
138
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
139 extern int init(TaskManager *manager, int argc, char *argv[]);
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
140 extern void task_initialize();
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
141 static void TMend(TaskManager *manager);
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
142
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
143 int
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
144 TMmain(TaskManager *manager, int argc, char *argv[])
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
145 {
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
146 task_initialize();
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
147 manager->set_TMend(TMend);
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 653
diff changeset
148 return init(manager, argc, argv);
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
149
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
150 }
7a311860a76e 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
7a311860a76e 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 void
7a311860a76e 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 TMend(TaskManager *manager)
7a311860a76e 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 {
7a311860a76e 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 printf("test_nogl end\n");
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
156 }
7a311860a76e 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
7a311860a76e 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 /* end */