Mercurial > hg > Members > tkaito > dandy
comparison viewer.cc @ 3:dca6d5d2ef46
stage 1 add
author | tkaito |
---|---|
date | Sun, 06 Jun 2010 05:23:51 +0900 |
parents | 5a888b557a41 |
children |
comparison
equal
deleted
inserted
replaced
2:69b4108bf4e8 | 3:dca6d5d2ef46 |
---|---|
10 static void object_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, SceneGraphPtr tree); | 10 static void object_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, SceneGraphPtr tree); |
11 //static void object_collision_idle(SceneGraphPtr, void *sgroot_, int w, int h, SceneGraphPtr tree); | 11 //static void object_collision_idle(SceneGraphPtr, void *sgroot_, int w, int h, SceneGraphPtr tree); |
12 static void object_move_translation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h); | 12 static void object_move_translation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h); |
13 | 13 |
14 | 14 |
15 char *light_sysswitch = "off"; | 15 int light_sysswitch = 1; |
16 int light_num = 4; | 16 int light_num = 4; |
17 | 17 |
18 void LightSysSwitch(Viewer *sgroot) { | 18 void LightSysSwitch(Viewer *sgroot) { |
19 if (strcmp(light_sysswitch,"on") == 0) { | 19 if (light_sysswitch == 1) { |
20 sgroot->OnLightSysSwitch(); | 20 sgroot->OnLightSysSwitch(); |
21 } else if (strcmp(light_sysswitch,"off") == 0) { | 21 } else if (light_sysswitch == 0) { |
22 sgroot->OffLightSysSwitch(); | 22 sgroot->OffLightSysSwitch(); |
23 } | 23 } |
24 } | 24 } |
25 | |
26 | |
27 | |
28 | 25 |
29 static void | 26 static void |
30 object_move_rotation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h) | 27 object_move_rotation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h) |
31 { | 28 { |
32 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; | 29 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; |
157 if (strcmp(argv[i],"-sg") == 0 && i+1<=argc) { | 154 if (strcmp(argv[i],"-sg") == 0 && i+1<=argc) { |
158 xmlfile = argv[i+1]; | 155 xmlfile = argv[i+1]; |
159 } else if (strcmp(argv[i],"-name") == 0 && i+1<=argc) { | 156 } else if (strcmp(argv[i],"-name") == 0 && i+1<=argc) { |
160 parts[parts_cnt++] = argv[i+1]; | 157 parts[parts_cnt++] = argv[i+1]; |
161 } else if (strcmp(argv[i],"-lightsys") == 0 && i+1<=argc) { | 158 } else if (strcmp(argv[i],"-lightsys") == 0 && i+1<=argc) { |
162 light_sysswitch = argv[i+1]; | 159 if (strcmp(argv[i],"on") == 0) { |
160 light_sysswitch = 1; | |
161 } else if (strcmp(argv[i],"off") == 0) { | |
162 light_sysswitch = 0; | |
163 } | |
163 } else if (strcmp(argv[i],"-lightnum") == 0 && i+1<=argc) { | 164 } else if (strcmp(argv[i],"-lightnum") == 0 && i+1<=argc) { |
164 light_num = atoi(argv[i+1]); | 165 light_num = atoi(argv[i+1]); |
165 } | 166 } |
166 } | 167 } |
167 return init(manager, argc, argv); | 168 return init(manager, argc, argv); |