annotate Renderer/Test/ball_bound.cc @ 1029:22d7263cec2d

copy script add.
author tkaito
date Mon, 15 Nov 2010 22:39:25 +0900
parents 4f77768d7a7f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include <math.h>
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include <stdlib.h>
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include "SceneGraphRoot.h"
511
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 510
diff changeset
4 #include "MainLoop.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 510
diff changeset
5 #include "ball_bound.h"
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
524
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
7
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 // prototype
656
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
9 static void ball_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
10 static void ball_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, SceneGraphPtr tree);
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
11 static void ball_collision_idle(SceneGraphPtr, void *sgroot_, int w, int h, SceneGraphPtr tree);
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 static float vy = 0.0f; // y 方向速度
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 static float dt = 1.0/1.0f; // frame rate
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 static float e = -0.8f; // 反発係数
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 static float g = 9.8f; // 重力加速度
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 //static float v0 = 0.0f; // 初速は 0
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 static float h0; // 初期高さ
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 static float ball_radius = 100.0f;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 static float speed = 10.0f;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 static void
656
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
27 ball_move_idle2(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 {
656
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
29 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 Pad *pad = sgroot->getController();
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 if (pad->circle.isHold()) {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 if (pad->left.isHold()) {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 node->xyz[0] -= speed;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 if(node->xyz[0] < ball_radius)
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 node->xyz[0] = ball_radius;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 } else if (pad->right.isHold()) {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 node->xyz[0] += speed;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 if(node->xyz[0] > screen_w - ball_radius)
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 node->xyz[0] = screen_w - ball_radius;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 if (pad->up.isHold()) {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 node->xyz[1] -= speed;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 } else if (pad->down.isHold()) {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 node->xyz[1] += speed;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 if(node->xyz[1] > screen_h - ball_radius)
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 node->xyz[1] = screen_h - ball_radius;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 } else {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 node->set_move_collision(ball_move, ball_collision);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 static int time = 0;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 static void
656
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
58 ball_move_idle(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 {
656
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
60 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 Pad *pad = sgroot->getController();
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 if (pad->circle.isPush()) {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 node->set_move_collision(ball_move_idle2, ball_collision_idle);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 time = 0;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 time++;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 if (time > 90) {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 float w = (float)random();
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 w = fmodf(w, screen_w - ball_radius*2);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 node->xyz[0] = w + ball_radius;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 node->xyz[1] = h0;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 node->set_move_collision(ball_move, ball_collision);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 time = 0;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 static void
656
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
82 ball_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 {
1029
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
84 vy += g * dt;
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
85 node->xyz[1] += vy * dt;
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 // node->xyz[0] += 10.0f;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 static void
656
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
90 ball_collision_idle(SceneGraphPtr, void *sgroot_, int w, int h, SceneGraphPtr tree)
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 static void
656
d0b8860c17f8 remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 562
diff changeset
95 ball_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h,
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 SceneGraphPtr tree)
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 {
1029
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
98 if (node->xyz[1] > screen_h - ball_radius) {
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
99 node->xyz[1] = screen_h - ball_radius;
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
100
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
101 vy *= e;
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
102 if (vy > -g && vy < 0) {
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
103 vy = 0.0;
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
104 node->set_move_collision(ball_move_idle, ball_collision_idle);
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
105 }
22d7263cec2d copy script add.
tkaito
parents: 728
diff changeset
106 }
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108
510
97e1b0346597 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 508
diff changeset
109 MainLoopPtr
557
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
110 ball_bound::init(Viewer *sgroot, int screen_w, int screen_h)
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 SceneGraphPtr ball;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 // 固定した値で srandom すると、毎回同じ、random() 列が生成される
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 // random な値が欲しいなら、man random に方法が書いてあります。
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 srandom(100);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117
557
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
118 sgroot->createFromXMLfile("xml_file/Ball.xml");
510
97e1b0346597 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 508
diff changeset
119
562
a5fda4e51498 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 557
diff changeset
120 ball = sgroot->createSceneGraph("Ball");
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 ball->set_move_collision(ball_move, ball_collision);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 h0 = screen_h/2;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 h0 = -1000;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 ball->xyz[0] = screen_w/2;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 //ball->xyz[0] = 0.0f;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 ball->xyz[1] = h0;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 ball->xyz[2] = 30.0f;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130
557
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
131 sgroot->setSceneData(ball);
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
132
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
133 return sgroot;
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
134 }
510
97e1b0346597 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 508
diff changeset
135
557
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
136 extern Application *
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
137 application() {
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
138 return new ball_bound();
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 }
510
97e1b0346597 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 508
diff changeset
140
557
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
141 const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n";
ec72b601b71f fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 524
diff changeset
142
524
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
143 extern int init(TaskManager *manager, int argc, char *argv[]);
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
144 extern void task_initialize();
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
145 static void TMend(TaskManager *manager);
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
146
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
147 int
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
148 TMmain(TaskManager *manager, int argc, char *argv[])
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
149 {
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
150 task_initialize();
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
151 manager->set_TMend(TMend);
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
152 return init(manager, argc, argv);
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
153
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
154 }
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
155
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
156 void
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
157 TMend(TaskManager *manager)
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
158 {
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
159 printf("test_nogl end\n");
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
160 }
0f180d46db89 Cerium no error.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 512
diff changeset
161
510
97e1b0346597 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 508
diff changeset
162 /* end */