comparison main.cc @ 7:c015109a6041

schedule add. 10% done.
author tkaito
date Tue, 29 Jun 2010 04:25:32 +0900
parents 661ec1e92042
children 7c60ef3fca5b
comparison
equal deleted inserted replaced
6:661ec1e92042 7:c015109a6041
24 24
25 #define ENEMY_STATUS(charano,score,hardness) {charano,score,hardness} 25 #define ENEMY_STATUS(charano,score,hardness) {charano,score,hardness}
26 const state status[50] = ENEMY_STATUS_TABLE; 26 const state status[50] = ENEMY_STATUS_TABLE;
27 27
28 void 28 void
29 init_charactor(Viewer *sgroot, ObjPropertyPtr charactor) 29 init_charactor(Viewer *sgroot)
30 { 30 {
31 sgroot->createFromXMLfile("xml/mydandy.xml"); 31 sgroot->createFromXMLfile("xml/mydandy.xml");
32 sgroot->createFromXMLfile("xml/gameover.xml"); 32 sgroot->createFromXMLfile("xml/gameover.xml");
33 sgroot->createFromXMLfile("xml/greencrab.xml"); 33 sgroot->createFromXMLfile("xml/greencrab.xml");
34 sgroot->createFromXMLfile("xml/bluebullet.xml"); 34 sgroot->createFromXMLfile("xml/bluebullet.xml");
35 sgroot->createFromXMLfile("xml/redbullet.xml"); 35 sgroot->createFromXMLfile("xml/redbullet.xml");
36 sgroot->createFromXMLfile("xml/title2.xml"); 36 sgroot->createFromXMLfile("xml/title2.xml");
37 37
38 for (int i = 0; i < ENEMY_NUM; i++) { 38 for (int i = 0; i < ENEMY_NUM; i++) {
39 charactor[0].root = (void*)sgroot->createSceneGraph(status[1].charano); 39 charactor[0].root = (void*)sgroot->createSceneGraph(status[0].charano);
40 charactor[0].score = status[1].score; 40 charactor[0].score = status[0].score;
41 charactor[0].vital = status[1].vital; 41 charactor[0].vital = status[0].vital;
42 } 42 }
43 43
44 } 44 }
45 45
46 ObjPropertyPtr charactor;
47
46 MainLoopPtr 48 MainLoopPtr
47 dandy::init(Viewer *sgroot, int w, int h) 49 dandy::init(Viewer *sgroot, int w, int h)
48 { 50 {
49 ObjPropertyPtr charactor = (ObjPropertyPtr)sgroot->manager->allocate(sizeof(ObjPropertyPtr)*16); 51 charactor = (ObjPropertyPtr)sgroot->manager->allocate(sizeof(ObjPropertyPtr)*16);
50 init_charactor(sgroot, charactor); 52 init_charactor(sgroot);
51 create_title(sgroot, w, h, charactor); 53 create_back(sgroot, w, h);
52 54
53 return sgroot; 55 return sgroot;
54 } 56 }
55
56 57
57 extern Application * 58 extern Application *
58 application() { 59 application() {
59 return new dandy(); 60 return new dandy();
60 } 61 }