Mercurial > hg > old > magoroku_racing
comparison Magoroku.cc @ 116:ed702e49cc6c
conpile
author | e085768 |
---|---|
date | Thu, 16 Jun 2011 04:05:33 +0900 |
parents | 31dd5c07f7c1 |
children | 9e4100c5d7ec |
comparison
equal
deleted
inserted
replaced
115:31dd5c07f7c1 | 116:ed702e49cc6c |
---|---|
94 } | 94 } |
95 | 95 |
96 | 96 |
97 //Magoroku の初期化など | 97 //Magoroku の初期化など |
98 /* timer */ | 98 /* timer */ |
99 static int start_time,time_count; | 99 //static int start_time,time_count; |
100 static int RUNNIG=0; | 100 //static int RUNNIG=0; |
101 char raptime[10]; | 101 //char raptime[10]; |
102 | 102 |
103 static int ranking = 0; | 103 //static int ranking = 0; |
104 static LIGHT l; | 104 //static LIGHT l; |
105 static int i=0; | 105 //static int i=0; |
106 | |
107 // schedule.ccで使用してる | 106 // schedule.ccで使用してる |
108 void linda_env_init( void ); | 107 void linda_env_init( void ); |
109 | 108 |
110 | 109 |
111 extern int init(TaskManager *manager, int argc, char *argv[]); | 110 extern int init(TaskManager *manager, int argc, char *argv[]); |
127 HTaskPtr | 126 HTaskPtr |
128 Magoroku::application_task(HTaskPtr next, Viewer* viewer){ | 127 Magoroku::application_task(HTaskPtr next, Viewer* viewer){ |
129 | 128 |
130 // magoroku_racing | 129 // magoroku_racing |
131 game_main(); | 130 game_main(); |
132 | 131 |
132 /* | |
133 // Dandy | 133 // Dandy |
134 printf("gamef = %d\n",gamef); | 134 printf("gamef = %d\n",gamef); |
135 switch (gamef) { | 135 switch (gamef) { |
136 case 0: gamef= magoroku_main_init(gamef); break; | 136 case 0: gamef= magoroku_main_init(gamef); break; |
137 case 1: gamef= gamesyokika(gamef); break; | 137 case 1: gamef= gamesyokika(gamef); break; |
138 case 2: gamef= opening(gamef); break; | 138 case 2: gamef= opening(gamef); break; |
139 case 3: gamef= magoroku_main_loop(gamef); break; | 139 case 3: gamef= magoroku_main_loop(gamef); break; |
140 case 4: gamef= magoroku_closing(gamef); break; | 140 case 4: gamef= magoroku_closing(gamef); break; |
141 } | 141 } |
142 | 142 */ |
143 return next; | 143 return next; |
144 }; | 144 }; |
145 | 145 |
146 | 146 |
147 static void | 147 static void |
148 task_init() | 148 task_init() |
149 { | 149 { |
150 } | 150 printf("task_init\n"); |
151 } | |
152 | |
153 FILE *main_fp; | |
151 | 154 |
152 int | 155 int |
153 TMmain(TaskManager *manager,int argc, char *argv[]) | 156 TMmain(TaskManager *manager,int argc, char *argv[]) |
154 { | 157 { |
158 main_fp = fopen("/dev/stdout", "w"); | |
159 if (!main_fp) { | |
160 perror("main"); | |
161 } | |
162 | |
163 printf("trace_TMmain\n"); | |
164 | |
155 for(int i = 1; i<argc ; i++) { | 165 for(int i = 1; i<argc ; i++) { |
156 if (strcmp(argv[i],"-t")) { | 166 if (strcmp(argv[i],"-t")) { |
157 if (i+1<argc && argv[i+1]) { | 167 if (i+1<argc && argv[i+1]) { |
158 i++; | 168 i++; |
159 } | 169 } |
174 TMend(TaskManager *manager) | 184 TMend(TaskManager *manager) |
175 { | 185 { |
176 printf("game end\n"); | 186 printf("game end\n"); |
177 } | 187 } |
178 | 188 |
179 static int light_sysswitch = 0; | 189 //static int light_sysswitch = 0; |
180 static int light_num = 4; | 190 //static int light_num = 4; |
181 | 191 |
182 | 192 |
193 // ceriumuで同じ変数名があるから _2 って付け足しました | |
194 /* | |
183 static void | 195 static void |
184 LightSysSwitch(Viewer *sgroot) { | 196 LightSysSwitch_2(Viewer *sgroot) { |
185 if (light_sysswitch == 1) { | 197 if (light_sysswitch == 1) { |
186 sgroot->OnLightSysSwitch(); | 198 sgroot->OnLightSysSwitch(); |
187 for (int i = 0; i < light_num; i++) { | 199 for (int i = 0; i < light_num; i++) { |
188 SceneGraphPtr light = sgroot->getLight(i); | 200 SceneGraphPtr light = sgroot->getLight(i); |
189 sgroot->OnLightSwitch(i); | 201 sgroot->OnLightSwitch(i); |
193 } | 205 } |
194 } else if (light_sysswitch == 0) { | 206 } else if (light_sysswitch == 0) { |
195 sgroot->OffLightSysSwitch(); | 207 sgroot->OffLightSysSwitch(); |
196 } | 208 } |
197 } | 209 } |
210 */ |