Mercurial > hg > Members > tkaito > task_dandy
comparison main.cc @ 19:632ce41a842a
testing game task with pad's input
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 26 Aug 2010 03:37:36 +0900 |
parents | aecc2199251e |
children | fd9deaa67de9 |
comparison
equal
deleted
inserted
replaced
18:2c188b2becec | 19:632ce41a842a |
---|---|
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 < 2; i++) { | 38 for (int i = 0; i < ENEMY_NUM; i++) { |
39 charactor[i].root = (void*)sgroot->createSceneGraph(status[i].charano); | 39 charactor[i].root = (void*)sgroot->createSceneGraph(status[i].charano); |
40 charactor[i].score = status[i].score; | 40 charactor[i].score = status[i].score; |
41 charactor[i].vital = status[i].vital; | 41 charactor[i].vital = status[i].vital; |
42 } | 42 } |
43 create_title_back(sgroot, w, h); | 43 create_title_back(sgroot, w, h); |
46 ObjPropertyPtr charactor; | 46 ObjPropertyPtr charactor; |
47 | 47 |
48 MainLoopPtr | 48 MainLoopPtr |
49 dandy::init(Viewer *sgroot, int w, int h) | 49 dandy::init(Viewer *sgroot, int w, int h) |
50 { | 50 { |
51 charactor = (ObjPropertyPtr)sgroot->manager->allocate(sizeof(ObjPropertyPtr)*16); | 51 charactor = (ObjPropertyPtr)sgroot->manager->allocate(sizeof(ObjPropertyPtr)*ENEMY_NUM); |
52 init_charactor(sgroot, w, h); | 52 init_charactor(sgroot, w, h); |
53 return sgroot; | 53 return sgroot; |
54 } | 54 } |
55 | 55 |
56 extern Application * | 56 extern Application * |