code:
info face="ArialMT" size=16 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1
common lineHeight=19 base=26 scaleW=512 scaleH=512 pages=1 packed=0
page id=0 file="arial16.png"
chars count=187
char id=32   x=0     y=0     width=0     height=0     xoffset=0     yoffset=15    xadvance=4     page=0  chnl=0
char id=64   x=0     y=0     width=18     height=17     xoffset=0     yoffset=3    xadvance=16     page=0  chnl=0
char id=124   x=18     y=0     width=4     height=17     xoffset=1     yoffset=3    xadvance=4     page=0  chnl=0
char id=125   x=22     y=0     width=7     height=17     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=123   x=29     y=0     width=7     height=17     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=93   x=36     y=0     width=6     height=17     xoffset=0     yoffset=3    xadvance=4     page=0  chnl=0
char id=91   x=42     y=0     width=6     height=17     xoffset=1     yoffset=3    xadvance=4     page=0  chnl=0
char id=41   x=48     y=0     width=6     height=17     xoffset=1     yoffset=3    xadvance=5     page=0  chnl=0
char id=40   x=54     y=0     width=6     height=17     xoffset=1     yoffset=3    xadvance=5     page=0  chnl=0
char id=106   x=60     y=0     width=7     height=17     xoffset=-1     yoffset=3    xadvance=3     page=0  chnl=0
char id=36   x=67     y=0     width=11     height=16     xoffset=0     yoffset=2    xadvance=8     page=0  chnl=0
char id=38   x=78     y=0     width=13     height=14     xoffset=0     yoffset=3    xadvance=10     page=0  chnl=0
char id=35   x=91     y=0     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=37   x=102     y=0     width=15     height=14     xoffset=1     yoffset=3    xadvance=14     page=0  chnl=0
char id=92   x=117     y=0     width=7     height=14     xoffset=0     yoffset=3    xadvance=4     page=0  chnl=0
char id=47   x=124     y=0     width=7     height=14     xoffset=0     yoffset=3    xadvance=4     page=0  chnl=0
char id=48   x=131     y=0     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=57   x=142     y=0     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=56   x=153     y=0     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=54   x=164     y=0     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=53   x=175     y=0     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=51   x=186     y=0     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=121   x=197     y=0     width=10     height=14     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=113   x=207     y=0     width=10     height=14     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=112   x=217     y=0     width=10     height=14     xoffset=1     yoffset=6    xadvance=8     page=0  chnl=0
char id=103   x=227     y=0     width=10     height=14     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=100   x=237     y=0     width=10     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=98   x=247     y=0     width=10     height=14     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0
char id=85   x=257     y=0     width=12     height=14     xoffset=1     yoffset=3    xadvance=11     page=0  chnl=0
char id=83   x=269     y=0     width=12     height=14     xoffset=0     yoffset=3    xadvance=10     page=0  chnl=0
char id=81   x=281     y=0     width=14     height=14     xoffset=0     yoffset=3    xadvance=12     page=0  chnl=0
char id=79   x=295     y=0     width=14     height=14     xoffset=0     yoffset=3    xadvance=12     page=0  chnl=0
char id=74   x=309     y=0     width=9     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=71   x=318     y=0     width=14     height=14     xoffset=0     yoffset=3    xadvance=12     page=0  chnl=0
char id=67   x=332     y=0     width=13     height=14     xoffset=0     yoffset=3    xadvance=11     page=0  chnl=0
char id=59   x=345     y=0     width=4     height=13     xoffset=1     yoffset=6    xadvance=4     page=0  chnl=0
char id=63   x=349     y=0     width=10     height=13     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=33   x=359     y=0     width=5     height=13     xoffset=1     yoffset=3    xadvance=4     page=0  chnl=0
char id=55   x=364     y=0     width=11     height=13     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=52   x=375     y=0     width=11     height=13     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=50   x=386     y=0     width=10     height=13     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=49   x=396     y=0     width=7     height=13     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0
char id=116   x=403     y=0     width=7     height=13     xoffset=0     yoffset=3    xadvance=4     page=0  chnl=0
char id=108   x=410     y=0     width=4     height=13     xoffset=1     yoffset=3    xadvance=3     page=0  chnl=0
char id=107   x=414     y=0     width=9     height=13     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0
char id=105   x=423     y=0     width=4     height=13     xoffset=1     yoffset=3    xadvance=3     page=0  chnl=0
char id=104   x=427     y=0     width=9     height=13     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0
char id=102   x=436     y=0     width=7     height=13     xoffset=0     yoffset=3    xadvance=4     page=0  chnl=0
char id=90   x=443     y=0     width=12     height=13     xoffset=0     yoffset=3    xadvance=9     page=0  chnl=0
char id=89   x=455     y=0     width=13     height=13     xoffset=0     yoffset=3    xadvance=10     page=0  chnl=0
char id=88   x=468     y=0     width=13     height=13     xoffset=0     yoffset=3    xadvance=10     page=0  chnl=0
char id=87   x=481     y=0     width=17     height=13     xoffset=0     yoffset=3    xadvance=15     page=0  chnl=0
char id=86   x=498     y=0     width=13     height=13     xoffset=0     yoffset=3    xadvance=10     page=0  chnl=0
char id=84   x=0     y=17     width=12     height=13     xoffset=0     yoffset=3    xadvance=9     page=0  chnl=0
char id=82   x=12     y=17     width=13     height=13     xoffset=1     yoffset=3    xadvance=11     page=0  chnl=0
char id=80   x=25     y=17     width=11     height=13     xoffset=1     yoffset=3    xadvance=10     page=0  chnl=0
char id=78   x=36     y=17     width=12     height=13     xoffset=1     yoffset=3    xadvance=11     page=0  chnl=0
char id=77   x=48     y=17     width=14     height=13     xoffset=1     yoffset=3    xadvance=13     page=0  chnl=0
char id=76   x=62     y=17     width=10     height=13     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0
char id=75   x=72     y=17     width=12     height=13     xoffset=1     yoffset=3    xadvance=10     page=0  chnl=0
char id=73   x=84     y=17     width=4     height=13     xoffset=1     yoffset=3    xadvance=4     page=0  chnl=0
char id=72   x=88     y=17     width=12     height=13     xoffset=1     yoffset=3    xadvance=11     page=0  chnl=0
char id=70   x=100     y=17     width=10     height=13     xoffset=1     yoffset=3    xadvance=9     page=0  chnl=0
char id=69   x=110     y=17     width=11     height=13     xoffset=1     yoffset=3    xadvance=10     page=0  chnl=0
char id=68   x=121     y=17     width=12     height=13     xoffset=1     yoffset=3    xadvance=11     page=0  chnl=0
char id=66   x=133     y=17     width=11     height=13     xoffset=1     yoffset=3    xadvance=10     page=0  chnl=0
char id=65   x=144     y=17     width=12     height=13     xoffset=0     yoffset=3    xadvance=10     page=0  chnl=0
char id=117   x=156     y=17     width=8     height=11     xoffset=1     yoffset=6    xadvance=8     page=0  chnl=0
char id=115   x=164     y=17     width=10     height=11     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=111   x=174     y=17     width=11     height=11     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=101   x=185     y=17     width=11     height=11     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=99   x=196     y=17     width=10     height=11     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=97   x=206     y=17     width=11     height=11     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=43   x=217     y=17     width=10     height=10     xoffset=1     yoffset=5    xadvance=9     page=0  chnl=0
char id=62   x=227     y=17     width=11     height=10     xoffset=0     yoffset=5    xadvance=9     page=0  chnl=0
char id=60   x=238     y=17     width=11     height=10     xoffset=0     yoffset=5    xadvance=9     page=0  chnl=0
char id=58   x=249     y=17     width=4     height=10     xoffset=1     yoffset=6    xadvance=4     page=0  chnl=0
char id=122   x=253     y=17     width=10     height=10     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=120   x=263     y=17     width=10     height=10     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=119   x=273     y=17     width=14     height=10     xoffset=0     yoffset=6    xadvance=11     page=0  chnl=0
char id=118   x=287     y=17     width=10     height=10     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=114   x=297     y=17     width=7     height=10     xoffset=1     yoffset=6    xadvance=5     page=0  chnl=0
char id=110   x=304     y=17     width=9     height=10     xoffset=1     yoffset=6    xadvance=8     page=0  chnl=0
char id=109   x=313     y=17     width=14     height=10     xoffset=1     yoffset=6    xadvance=13     page=0  chnl=0
char id=94   x=327     y=17     width=9     height=8     xoffset=0     yoffset=3    xadvance=7     page=0  chnl=0
char id=42   x=336     y=17     width=8     height=7     xoffset=0     yoffset=3    xadvance=6     page=0  chnl=0
char id=61   x=344     y=17     width=10     height=6     xoffset=1     yoffset=7    xadvance=9     page=0  chnl=0
char id=44   x=354     y=17     width=4     height=6     xoffset=1     yoffset=13    xadvance=4     page=0  chnl=0
char id=39   x=358     y=17     width=5     height=6     xoffset=0     yoffset=3    xadvance=3     page=0  chnl=0
char id=34   x=363     y=17     width=7     height=6     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=126   x=370     y=17     width=11     height=4     xoffset=0     yoffset=8    xadvance=9     page=0  chnl=0
char id=96   x=381     y=17     width=6     height=4     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=95   x=387     y=17     width=13     height=3     xoffset=-1     yoffset=17    xadvance=8     page=0  chnl=0
char id=45   x=400     y=17     width=7     height=3     xoffset=0     yoffset=10    xadvance=5     page=0  chnl=0
char id=46   x=407     y=17     width=4     height=3     xoffset=1     yoffset=13    xadvance=4     page=0  chnl=0
char id=133   x=411     y=17     width=8     height=3     xoffset=0     yoffset=13    xadvance=6     page=0  chnl=0
char id=150   x=419     y=17     width=5     height=3     xoffset=0     yoffset=11    xadvance=3     page=0  chnl=0
char id=151   x=424     y=17     width=8     height=3     xoffset=0     yoffset=11    xadvance=6     page=0  chnl=0
char id=152   x=432     y=17     width=7     height=3     xoffset=0     yoffset=2    xadvance=4     page=0  chnl=0
char id=168   x=439     y=17     width=7     height=3     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=175   x=446     y=17     width=13     height=3     xoffset=-1     yoffset=1    xadvance=8     page=0  chnl=0
char id=183   x=459     y=17     width=5     height=3     xoffset=1     yoffset=8    xadvance=5     page=0  chnl=0
char id=130   x=464     y=17     width=4     height=4     xoffset=0     yoffset=13    xadvance=2     page=0  chnl=0
char id=132   x=468     y=17     width=6     height=4     xoffset=0     yoffset=13    xadvance=4     page=0  chnl=0
char id=136   x=474     y=17     width=7     height=4     xoffset=0     yoffset=1    xadvance=4     page=0  chnl=0
char id=145   x=481     y=17     width=4     height=4     xoffset=0     yoffset=4    xadvance=2     page=0  chnl=0
char id=146   x=485     y=17     width=4     height=4     xoffset=0     yoffset=4    xadvance=2     page=0  chnl=0
char id=147   x=489     y=17     width=6     height=4     xoffset=0     yoffset=4    xadvance=4     page=0  chnl=0
char id=148   x=495     y=17     width=6     height=4     xoffset=0     yoffset=4    xadvance=4     page=0  chnl=0
char id=180   x=501     y=17     width=6     height=4     xoffset=1     yoffset=3    xadvance=5     page=0  chnl=0
char id=139   x=0     y=30     width=5     height=6     xoffset=0     yoffset=9    xadvance=2     page=0  chnl=0
char id=149   x=5     y=30     width=5     height=6     xoffset=0     yoffset=9    xadvance=3     page=0  chnl=0
char id=153   x=10     y=30     width=7     height=6     xoffset=0     yoffset=4    xadvance=5     page=0  chnl=0
char id=155   x=17     y=30     width=5     height=6     xoffset=0     yoffset=9    xadvance=2     page=0  chnl=0
char id=172   x=22     y=30     width=10     height=6     xoffset=1     yoffset=7    xadvance=9     page=0  chnl=0
char id=176   x=32     y=30     width=7     height=6     xoffset=1     yoffset=3    xadvance=6     page=0  chnl=0
char id=184   x=39     y=30     width=7     height=6     xoffset=0     yoffset=14    xadvance=5     page=0  chnl=0
char id=156   x=46     y=30     width=12     height=8     xoffset=0     yoffset=8    xadvance=10     page=0  chnl=0
char id=170   x=58     y=30     width=8     height=8     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=178   x=66     y=30     width=7     height=8     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=179   x=73     y=30     width=7     height=8     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=185   x=80     y=30     width=6     height=8     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=186   x=86     y=30     width=8     height=8     xoffset=0     yoffset=3    xadvance=5     page=0  chnl=0
char id=215   x=94     y=30     width=9     height=8     xoffset=1     yoffset=6    xadvance=9     page=0  chnl=0
char id=247   x=103     y=30     width=11     height=8     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0
char id=171   x=114     y=30     width=9     height=9     xoffset=1     yoffset=7    xadvance=8     page=0  chnl=0
char id=187   x=123     y=30     width=9     height=9     xoffset=1     yoffset=7    xadvance=8     page=0  chnl=0
char id=164   x=132     y=30     width=11     height=10     xoffset=0     yoffset=5    xadvance=8     page=0  chnl=0
char id=154   x=143     y=30     width=8     height=11     xoffset=0     yoffset=5    xadvance=6     page=0  chnl=0
char id=177   x=151     y=30     width=11     height=11     xoffset=0     yoffset=5    xadvance=8     page=0  chnl=0
char id=230   x=162     y=30     width=16     height=11     xoffset=0     yoffset=6    xadvance=14     page=0  chnl=0
char id=248   x=178     y=30     width=10     height=11     xoffset=1     yoffset=6    xadvance=9     page=0  chnl=0
char id=128   x=188     y=30     width=11     height=12     xoffset=0     yoffset=4    xadvance=9     page=0  chnl=0
char id=129   x=199     y=30     width=11     height=12     xoffset=0     yoffset=4    xadvance=9     page=0  chnl=0
char id=140   x=210     y=30     width=12     height=12     xoffset=0     yoffset=4    xadvance=10     page=0  chnl=0
char id=141   x=222     y=30     width=11     height=12     xoffset=0     yoffset=4    xadvance=9     page=0  chnl=0
char id=142   x=233     y=30     width=11     height=12     xoffset=0     yoffset=4    xadvance=9     page=0  chnl=0
char id=143   x=244     y=30     width=11     height=12     xoffset=0     yoffset=4    xadvance=9     page=0  chnl=0
char id=144   x=255     y=30     width=11     height=12     xoffset=0     yoffset=4    xadvance=9     page=0  chnl=0
char id=157   x=266     y=30     width=11     height=12     xoffset=0     yoffset=4    xadvance=9     page=0  chnl=0
char id=158   x=277     y=30     width=11     height=12     xoffset=0     yoffset=4    xadvance=9     page=0  chnl=0
char id=165   x=288     y=30     width=11     height=13     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=198   x=299     y=30     width=18     height=13     xoffset=0     yoffset=3    xadvance=16     page=0  chnl=0
char id=208   x=317     y=30     width=13     height=13     xoffset=0     yoffset=3    xadvance=11     page=0  chnl=0
char id=222   x=330     y=30     width=11     height=13     xoffset=1     yoffset=3    xadvance=10     page=0  chnl=0
char id=137   x=341     y=30     width=18     height=14     xoffset=0     yoffset=3    xadvance=15     page=0  chnl=0
char id=161   x=359     y=30     width=5     height=14     xoffset=1     yoffset=6    xadvance=5     page=0  chnl=0
char id=163   x=364     y=30     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=169   x=375     y=30     width=14     height=14     xoffset=0     yoffset=3    xadvance=11     page=0  chnl=0
char id=174   x=389     y=30     width=14     height=14     xoffset=0     yoffset=3    xadvance=11     page=0  chnl=0
char id=181   x=403     y=30     width=9     height=14     xoffset=1     yoffset=6    xadvance=9     page=0  chnl=0
char id=188   x=412     y=30     width=15     height=14     xoffset=0     yoffset=3    xadvance=13     page=0  chnl=0
char id=189   x=427     y=30     width=15     height=14     xoffset=0     yoffset=3    xadvance=13     page=0  chnl=0
char id=190   x=442     y=30     width=15     height=14     xoffset=0     yoffset=3    xadvance=13     page=0  chnl=0
char id=191   x=457     y=30     width=10     height=14     xoffset=1     yoffset=6    xadvance=9     page=0  chnl=0
char id=216   x=467     y=30     width=14     height=14     xoffset=0     yoffset=3    xadvance=12     page=0  chnl=0
char id=223   x=481     y=30     width=11     height=14     xoffset=1     yoffset=3    xadvance=9     page=0  chnl=0
char id=240   x=492     y=30     width=11     height=14     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=134   x=503     y=30     width=7     height=15     xoffset=0     yoffset=4    xadvance=4     page=0  chnl=0
char id=135   x=0     y=45     width=7     height=15     xoffset=0     yoffset=4    xadvance=4     page=0  chnl=0
char id=138   x=7     y=45     width=8     height=15     xoffset=0     yoffset=1    xadvance=6     page=0  chnl=0
char id=195   x=15     y=45     width=13     height=15     xoffset=0     yoffset=1    xadvance=10     page=0  chnl=0
char id=203   x=28     y=45     width=11     height=15     xoffset=1     yoffset=1    xadvance=10     page=0  chnl=0
char id=207   x=39     y=45     width=7     height=15     xoffset=0     yoffset=1    xadvance=4     page=0  chnl=0
char id=131   x=46     y=45     width=10     height=16     xoffset=0     yoffset=4    xadvance=8     page=0  chnl=0
char id=192   x=56     y=45     width=13     height=16     xoffset=0     yoffset=0    xadvance=10     page=0  chnl=0
char id=193   x=69     y=45     width=13     height=16     xoffset=0     yoffset=0    xadvance=10     page=0  chnl=0
char id=194   x=82     y=45     width=13     height=16     xoffset=0     yoffset=0    xadvance=10     page=0  chnl=0
char id=200   x=95     y=45     width=11     height=16     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0
char id=202   x=106     y=45     width=11     height=16     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0
char id=204   x=117     y=45     width=6     height=16     xoffset=-1     yoffset=0    xadvance=4     page=0  chnl=0
char id=205   x=123     y=45     width=5     height=16     xoffset=1     yoffset=0    xadvance=4     page=0  chnl=0
char id=206   x=128     y=45     width=9     height=16     xoffset=-1     yoffset=0    xadvance=4     page=0  chnl=0
char id=213   x=137     y=45     width=14     height=16     xoffset=0     yoffset=1    xadvance=12     page=0  chnl=0
char id=221   x=151     y=45     width=13     height=16     xoffset=0     yoffset=0    xadvance=10     page=0  chnl=0
char id=162   x=164     y=45     width=10     height=17     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=166   x=174     y=45     width=4     height=17     xoffset=1     yoffset=3    xadvance=4     page=0  chnl=0
char id=167   x=178     y=45     width=11     height=17     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=182   x=189     y=45     width=11     height=17     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=210   x=200     y=45     width=14     height=17     xoffset=0     yoffset=0    xadvance=12     page=0  chnl=0
char id=211   x=214     y=45     width=14     height=17     xoffset=0     yoffset=0    xadvance=12     page=0  chnl=0
char id=212   x=228     y=45     width=14     height=17     xoffset=0     yoffset=0    xadvance=12     page=0  chnl=0
char id=217   x=242     y=45     width=12     height=17     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0
char id=218   x=254     y=45     width=12     height=17     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0
char id=219   x=266     y=45     width=12     height=17     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0
char id=253   x=278     y=45     width=10     height=17     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0
char id=254   x=288     y=45     width=10     height=17     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0
char id=255   x=298     y=45     width=10     height=17     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0


code:
order that would edit the paths, add modules or files you need to edit the main project file: ___PROJECTNAME___.mkb

order that would set up options Airplay SDK for this project, you must edit the file: /Data/app.icf

license: mit


code:
#include "AppDelegate.h"

#include "cocos2d.h"
#include "MyScene.h"

USING_NS_CC;

AppDelegate::AppDelegate()
{

}

AppDelegate::~AppDelegate()
{
}

bool AppDelegate::initInstance()
{
    return true;
}

bool AppDelegate::applicationDidFinishLaunching()
{
	// initialize director
	CCDirector *pDirector = CCDirector::sharedDirector();
    pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());

    // enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
	// pDirector->enableRetinaDisplay(true);

	// sets landscape mode
	pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);

	// turn on display FPS
	pDirector->setDisplayFPS(true);

	// set FPS. the default value is 1.0/60 if you don't call this
	pDirector->setAnimationInterval(1.0 / 60);

	// create a scene. it's an autorelease object
	CCScene *pScene = MyScene::scene();

	// run
	pDirector->runWithScene(pScene);

	return true;
}

// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
void AppDelegate::applicationDidEnterBackground()
{
    CCDirector::sharedDirector()->pause();

	// if you use SimpleAudioEngine, it must be pause
	// SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
}

// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground()
{
    CCDirector::sharedDirector()->resume();

	// if you use SimpleAudioEngine, it must resume here
	// SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
}


code:
#ifndef  _APP_DELEGATE_H_
#define  _APP_DELEGATE_H_

#include "CCApplication.h"

/**
@brief	The cocos2d Application.

The reason for implement as private inheritance is to hide some interface call by CCDirector.
*/
class  AppDelegate : private cocos2d::CCApplication
{
public:
	AppDelegate();
	virtual ~AppDelegate();

    /**
    @brief	Implement for initialize OpenGL instance, set source path, etc...
    */
    virtual bool initInstance();

    /**
    @brief	Implement CCDirector and CCScene init code here.
    @return true    Initialize success, app continue.
    @return false   Initialize failed, app terminate.
    */
    virtual bool applicationDidFinishLaunching();

    /**
    @brief  The function be called when the application enter background
    @param  the pointer of the application
    */
    virtual void applicationDidEnterBackground();

    /**
    @brief  The function be called when the application enter foreground
    @param  the pointer of the application
    */
    virtual void applicationWillEnterForeground();
};

#endif // _APP_DELEGATE_H_


code:
// Application main file.

#include "Main.h"
#include "AppDelegate.h"

int main()
{
	AppDelegate* app;
	int nRet = 0;

	app = new AppDelegate;
	nRet = cocos2d::CCApplication::sharedApplication().Run();;
	delete app;
	return nRet;
}


code:
#include "MyScene.h"

USING_NS_CC;

CCScene* MyScene::scene()
{
	// 'scene' is an autorelease object
	CCScene *scene = CCScene::node();

	// 'layer' is an autorelease object
	MyScene *layer = MyScene::node();

	// add layer as a child to scene
	scene->addChild(layer);

	// return the scene
	return scene;
}

// on "init" you need to initialize your instance
bool MyScene::init()
{
	//////////////////////////////
	// 1. super init first
	if ( !CCLayer::init() )
	{
		return false;
	}

	//////////////////////////////
	// 2. add your codes below...

	//////////////////////////////
	return true;
}

void MyScene::menuCloseCallback(CCObject* pSender)
{
	CCDirector::sharedDirector()->end();
}


code:
#ifndef __MY_SCENE_H__
#define __MY_SCENE_H__

#include "cocos2d.h"

class MyScene : public cocos2d::CCLayer
{
public:
	// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
	virtual bool init();

	// there's no 'id' in cpp, so we recommand to return the exactly class pointer
	static cocos2d::CCScene* scene();

	// a selector callback
	virtual void menuCloseCallback(CCObject* pSender);

	// implement the "static node()" method manually
	LAYER_NODE_FUNC(MyScene);
};

#endif // __HELLOWORLD_SCENE_H__


code:
options
{
# path to data of current game

	s3e-data-dir="Data"

# paths to modules of cocos2d-x - uncomment and customize if you need additional modules

	module_path="../../cocos2dx/proj.marmalade/"
#	module_path="../../Box2D/proj.marmalade/"
#	module_path="../../chipmunk/proj.marmalade/"
#	module_path="../../CocosDenshion/proj.marmalade/"

}

includepaths
{
	..
}
subprojects
{
# required module of Marmalade

	IwGL

# required module of cocos2d-x

	cocos2dx

# additional modules of cocos2d-x - uncomment if necessary

#	Box2D
#	chipmunk
#	CocosDenshion
}

files
{
	[Source]
	("Source")
	"*.h"
	"*.cpp"
}


code:
/******************************************************************************/
/*DEFAULT STYLES FOR ALL SECTIONS**********************************************/
/******************************************************************************/
body						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
								color: buttontext;
								background-color: buttonface;
							    margin-top: 0px;
		  		 			    margin-left: 0px;
							    margin-right: 0px;
							    margin-bottom: 0px;
								overflow: auto; }

a:link						  { color: captiontext;
				  				text-decoration: none; }

a:visited					  { color: captiontext;
				  				text-decoration: none; }

a:active					  { color: captiontext;
				  				text-decoration: none; }

a:hover						  { color: captiontext;
				  				text-decoration: underline; }

table						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								width: 100%; }

table.one					  { table-layout: fixed;
								height: 100%;
								width: 100%; }

/*DEFAULT STYLES FOR THE 'INTRODUCTION' TABLE**********************************/
/******************************************************************************/
table.two					  { table-layout: fixed;
								height: 79px;
								width: 100%;
								background-color: window; }

td.image					  { text-align: right; }

/*DEFAULT STYLES FOR THE 'NAVIGATION' TABLE************************************/
/******************************************************************************/
table.linkText				  { line-height: 95%;
                                width: 1.7in;
								height: 2.6em;
								position: relative;
								left: 0.1in;
						 		z-index: 2; }

span						  { position: relative;
								z-index: 3; }

span.horiLine1				  { height: 30px;
								width: 166px;
								position: absolute;
								top: -1px;
								left: -1px;
								bottom: -1px;
								z-index: 2; }

/*DEFAULT STYLES FOR THE ALL BUTTONS AND THE 'BUTTONS' TABLE*******************/
/******************************************************************************/
button						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
								height: 23px;
								cursor: hand; }

.buttons				  	  { width: 100%; }

/*DEFAULT STYLES FOR THE 'CONTENT' TABLE***************************************/
/******************************************************************************/
table.fixedSize			 	  { table-layout: fixed; }

table.content			 	  { table-layout: fixed;
								height: 100%;
								width: 100%; }

ol							  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								margin-top: -1px;
								margin-bottom: 16px; }

ul							  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								margin-top: 3px;
								margin-bottom: 16px; }

li							  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								position: relative;
								left: -15px;
								margin-bottom: 1px; }

span.itemTextTop			  { position: relative; }

span.itemText				  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
								font-weight: normal;
								font-size: 8pt;
								line-height: 9pt;
								position: relative;
								top: -3px; }

span.itemTextIndent			  { position: relative;
								left: 17px;
								top: -3px; }

span.sideBtnHidden			  { width: 100%;
								margin-top: 3px;
								margin-bottom: 0px; }

div.itemTextRadioAa			  { position: relative;
								top: -17px;
								left: 17px;
								margin-bottom: -25px; }

div.itemTextRadioA			  { position: relative;
								top: -19px;
								left: 17px;
								margin-bottom: -25px; }

div.itemTextRadioB			  { position: relative;
								top: -19px;
								left: 25px;
								margin-bottom: -25px; }

div.itemTextRadioIndentA	  { position: relative;
								top: -17px;
								left: 30px;
								margin-bottom: -25px; }

div.itemTextRadioIndentB	  { position: relative;
								top: -17px;
								left: 42px;
								margin-bottom: -25px; }

div.itemTextCheckboxA		  { position: relative;
								top: -17px;
								left: 17px;
								margin-bottom: -23px; }

div.itemTextCheckboxB		  { position: relative;
								top: -18px;
								left: 25px;
								padding-top: 1px;
								margin-bottom: -25px; }

div.itemTextCheckboxIndentB	  { position: relative;
								top: -16px;
								left: 42px;
								margin-bottom: -25px; }

input						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext; }

select						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext; }

.radio						  { position: relative;
								top: -2px;
								left: 4px; }

.radioA				  		  { position: relative;
								top: -1px;
								margin-left: -4px;
								z-index: 2; }

.radioIndent				  { margin-top: -2px;
								margin-left: 17px; }

.radioIndentA				  { margin-top: -2px;
								margin-left: 9px; }

.checkbox					  { position: relative;
								top: -1px;
								margin-left: -4px;
								z-index: 2; }

.checkboxA					  { position: relative;
								top: -2px;
								left: 4px; }

.checkboxIndent				  { position:relative;
								margin-top: -1px;
								margin-left: 21px; }

.comment					  { width: 578px;
								position: relative;
								top: 5px;
								bottom: 6px; }

.commentA					  { width: 398px;
								position: relative;
								top: 5px;
								bottom: 6px; }

.commentB					  { width: 578px;
								position: relative;
								top: 3px;
								bottom: -3px; }

/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN INPUT BOX******************/
input.sideBtn				  { width: 193px;
								position: relative;
								top: 3px; }

/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/
input.sideBtnThreeColumn	  { width: 185px;
								position: relative;
								top: 3px; }

/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/
input.itemTextTwoColumnLong	  { width: 283px;
								position: relative;
								top: 3px; }

/****THIS IS AN INPUT BOX INDENTED UNDER A CHECKBOX SECTION********************/
input.sideBtnIndent			  { width: 175px;
								position: relative;
								top: 3px;
								left: 18px;
								bottom: 6px; }

/****THIS INPUT BOX HAS IS INDENTED UNDER A HEADING AND RULE SECTION***********/
input.sideBtnB				  { width: 185px;
								position: relative;
								top: 3px;
								bottom: 6px; }

input.sideBtnBA				  { width: 175px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S A TABBED WIZARD******/
input.sideBtn2				  { width: 169px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****"..." BUTTON IN A NON-TABBED, 3 COLUMN WIZARD*****************************/
input.sideBtn2ThreeColumn	  { width: 161px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****THIS IS AN INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON******/
input.TwoColumnLongButton	  { width: 259px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S UNDER A CHECKBOX*****/
input.sidebtn2Indent		  { width: 151px;
								position: relative;
								top: 3px;
								left: 18px;
								bottom: 6px; }

/****"..." BUTTON IS UNDER A SECTION IN A TWO COLUMN AND TABBED WIZARD*********/
input.sidebtn21				  { width: 161px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****"..." BUTTON IS UNDER A SECTION IN A THREE COLUMN AND TABBED WIZARD*********/
input.sidebtn21A			  { width: 153px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN SELECTION BOX**************/
select.sidebtn				  { width: 193px;
								position: relative;
								top: 4px;
								bottom: -3px; }

select.sidebtnNoWidth		  { position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS IS THE STANDARD TABBED WIZARD, ONE COLUMN SELECTION BOX**************/
select.sideBtnOneCLong		  { width: 398px;
								position: relative;
								top: 3px; }

/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/
select.sideBtnThreeColumn	  { width: 185px;
								position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/
select.itemTextTwoColumnLong	  { width: 283px;
								position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS SELECTION BOX IS INDENTED UNDER A HEADING AND RULE SECTION***********/
select.sidebtnB				  { width: 164px;
								position: relative;
								top: 4px;
								left: 8px;
								bottom: -3px; }

/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX****************/
select.sidebtn2				  { width: 164px;
								position: relative;
								top: 11px;
								left: 17px;
								bottom: -3px; }

select.sidebtnIndent		  { width: 175px;
								position: relative;
								top: 4px;
								left: 18px;
								bottom: -3px; }

/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX AND HEADING****/
select.sidebtn2AShort		  { width: 168px;
								position: relative;
								top: 4px;
								left: 25px;
								bottom: -3px; }

/****THIS SELECTION BOX IS IN A TABBED, TWO COLUM WIZARD AND FOR < << > >>*****/
select.sidebtn3				  { width: 177px;
								position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/
select.TwoColumnLongButton	  { width: 259px;
								position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/
select.IndentListBoxWithButton	  { width: 283px;
									position: relative;
									top: 4px;
									bottom: -3px;
									left: 18px; }

/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 2 COLUMN AND TABBED WIZARD********/
object.itemtext				  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								width: 193px;
								height: 2em;
								position: relative;
								top: 4px;
								margin-bottom: 0px; }

/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 3 COLUMN AND NON-TABBED WIZARD****/
object.itemtextThreeColumn	  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								width: 185px;
								height: 2em;
								position: relative;
								top: 4px;
								margin-bottom: 0px; }

/****THIS IS THE DEFAULT OBJECT DROP DOWN IN NON-TABBED AND 2 COLUMN WIZARD****/
object.itemTextTwoColumnLong{ font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								width: 283px;
								height: 2em;
								position: relative;
								top: 4px;
								margin-bottom: 0px; }

.dropdowncombo				  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext; }

/****MOVES RADIO TEXT UP A BIT WHEN INLINE*************************************/
span.upABit					  { position: relative;
								top: -2px; }

/****THIS DEFINES A STANDARD BUTTON IN THE CONTENT SECTION*********************/
.buttonClass			 	  { margin-top: 0px;
								margin-bottom: -6px; }

/****THIS DEFINES ADD/REMOVE BUTTONS IN THE CONTENT SECTION********************/
.buttonClass2			 	  { width: 75px;
							padding-top: 1px;
								margin-top: 7px; }

/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION OUT OF THE SPAN TAG****/
.buttonClass3			 	  { height: 19px;
								width: 20px;
								position: relative;
								left: 1px;
								top: 0px; }

/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION WITHIN THE SPAN TAG***/
.buttonClass3Custom		 	  { height: 19px;
								width: 20px;
								position: relative;
								left: 4px;
								top: 3px; }

/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION AND UNDER A CHECKBOX***/
.buttonClass3Indent		 	  { height: 19px;
								width: 20px;
								position: relative;
								top: 0px;
								left: 10px; }

/****THIS DEFINES A ">>" BUTTON IN THE CONTENT SECTION************************/
.buttonClass4			 	  { margin-bottom: 4px;
								width: 25px; }

/****THIS DEFINES ADD/REMOVE BUTTONS HORIZONTALLY IN THE CONTENT SECTION******/
.buttonClass5			 	  { position: relative;
								top: 4px;
								width: 75px; }

/****THIS SETS THE LEFT MARGIN FOR THE REMOVE BUTTON***************************/
#removeBtn				 	  { margin-left: 4px; }

/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/
label.indent				  { margin-left: 18px; }

/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/
label.indent2				  { margin-left: 25px; }

/****THIS MOVES CHECK BOX AND RADIO TEXT UP A BIT******************************/
label.upABit				  { position: relative;
								top: -2px; }

/****THIS BOLDS < << > >> BUTTONS**********************************************/
b.bigFont					  { font-size: 135%; }

/****THESE ARE CUSTOM VERTICAL SPACING ELEMENTS********************************/
p.spacer					  { margin-bottom: -28px; }

p.elementSpacer				  { margin-bottom: -12px; }

p.elementSpacer2			  { margin-bottom: -19px; }

p.elementSpacer3			  { margin-bottom: -3px; }

p.elementSpacer4			  { margin-bottom: 7px; }

p.elementSpacer5			  { margin-bottom: 5px; }

p.elementSpacer6			  { margin-bottom: -24px; }

p.elementSpacer7			  { margin-bottom: -11px; }

p.elementSpacer8			  { margin-bottom: -15px; }

p.elementSpacer9			  { margin-bottom: -7px; }

p.elementSpacer10			  { margin-bottom: 6px; }

p.elementSpacer11			  { margin-bottom: -1px; }

p.elementSpacer12			  { margin-bottom: -17px; }

p.elementSpacer13			  { margin-bottom: -23px; }

p.elementSpacer14			  { margin-bottom: -25px; }

p.elementSpacer15			  { margin-bottom: -13px; }

p.elementSpacer16			  { margin-bottom: -22px; }

p.elementSpacer17			  { margin-bottom: -32px; }

p.elementSpacer18			  { margin-bottom: -14px; }

p.elementSpacer19			  { margin-bottom: -10px; }

p.elementSpacer21			  { margin-bottom: -16px; }

p.elementSpacer22			  { margin-bottom: 3px; }

/*CUSTOM STYLES FOR THE 'CONTENT' FRAME****************************************/
/******************************************************************************/

	/*CUSTOM SPACING FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/
	/**************************************************************************/
	p.elementSpacer20		  { margin-bottom: -13px; }

	/*CUSTOM STYLE FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/
	/**************************************************************************/
	input.sideBtnLoc		  { width: 193px;
								position: relative;
								top: 3px; }

	/*PLACES SPACE BETWEEN ADD/REMOVE BUTTONS**********************************/
	/**************************************************************************/
	span.spacer8			  { width: 1px; }

	/*SETS TEXT BOX TO APPROPRIATE WIDTH IN MFCAppWiz**************************/
	/**************************************************************************/
	#CLASS_NAMES			  { width: 399px; }

	/*MOVES SELECT BOX UP IN CSharpIndexerWiz, Interface, Method,**************/
	/*InterfaceMethod, AND MemFunctionWiz**************************************/
	#PARAMETER_LIST			  { margin-top: -1px; }

	/*MOVES SELECT BOX UP IN CSharpMethodWiz***********************************/
	/**************************************************************************/
	#PARAMETER_LIST1		  { margin-top: -1px; }

	/*SETS SELECTION BOX WIDTH IN CSharpInterfaceMethod AND CSharpMethodWiz****/
	/**************************************************************************/
	#PARAMETER_MODIFIER		  { width: 58px; }

	/*SETS INDENT FOR ATLCustom AND MFCCustom Wizards**************************/
	/**************************************************************************/
	span.itemTextIndent1	  { position: relative;
								left: 8px;
								top: -3px; }

	/*SETS INDENT ON OBJECT FOR CSharpMethodWiz********************************/
	/**************************************************************************/
	span.customObjectIndent	  { margin-left: 8px; }

	/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
	/**************************************************************************/
	span.sidebtn			  { position: relative;
								top: 4px;
								bottom: -3px; }

	/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
	/**************************************************************************/
	span.itemtextspecial	  { position: relative;
								top: -20px;
								left: 9px;
								bottom: -3px; }

	/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
	/**************************************************************************/
	span.sidebtnspecial		  { position: relative;
								top: -2px;
								left: 53px;
								bottom: -3px; }

	/**************************************************************************/

	/*MODIFIED POSITIONING*****************************************************/
	/**************************************************************************/
	/*Position and border change + link to the script file (absolutely needed)!!*/
	table.three					  { table-layout: fixed;
									height: 100%;
									position: absolute;
									left: -1px;
									border-right: solid 2px Window; }

	/*Color change*/
	span.activeLink				  { color: WindowText;
								    text-decoration: none;
									word-wrap: break-word;
								    cursor: hand;
									width: 100%;
									padding-top: 1px;
									padding-bottom: 1px; }

	/*Color change*/
	span.activeLink2			  { color: WindowText;
									text-decoration: underline;
									word-wrap: break-word;
									cursor: hand;
									width: 100%;
									padding-top: 1px;
									padding-bottom: 1px; }

	/*Color change*/
	span.inactiveLink			  { color: GrayText;
									text-decoration: none;
									word-wrap: break-word;
									cursor: default;
									width: 100%;
									padding-top: 1px;
									padding-bottom: 1px; }

	/*Turned off dotted line*/
	span.vertLine1				  { height: 100%;
						 			width: 1px;
									position: absolute;
									top: 0px;
				 					left: -1px;
									bottom: 0px;
									z-index: 2; }

    /*Style for width-control of the left-side links bar */
    .LinkPane                     { width: 1.9in; }

	/*Removed bolding of text*/
	table.linkTextSelected		  { line-height: 95%;
                                    width: 1.7in;
									height: 2.6em;
									position: relative;
									left: 0.1in;
									z-index: 2; }

	/*Removed bolding of text and made width bigger*/
	table.linkTextSelectedIndent  { line-height: 95%;
                                    width: 1.7in;
									height: 2.6em;
									position: relative;
									top: -2px;
									left: 0.2in;
									z-index: 2; }

	/*Changed left margin and position of top of element and made width bigger*/
	table.linkTextIndent		  { line-height: 95%;
                                    width: 1.6in;
									height: 2.6em;
									position: relative;
									top: -2px;
									left: 0.2in;
									z-index: 2; }

	/*Removed background color, changed top, and bottom margins*/
	div.linkSelected			  { height: 2.6em;
									position: relative;
									top: -6px;
									left: 0px;
									right: 0px;
									z-index: 1;
									margin-bottom: -.7em; }

	/*Changed top and bottom margins*/
	div.link					  { height: 2em;
									position: relative;
									top: -6px;
									left: 0px;
									right: 0px;
									z-index: 1;
									margin-bottom: -.7em; }

	/*Comment out
	div.vertLine				  { background: url(Images/DottedVert.gif) repeat;
									height: 125%;
						 			width: 1px;
									position: relative;
									top: -12px;
									left: -1px; }*/

	/*Deleted dotted line*/
	span.vertLine1				  { height: 100%;
						 			width: 1px;
									position: absolute;
									top: 0px;
				 					left: -1px;
									bottom: 0px;
									z-index: 2; }

	/*Changed background color and add alpha*/
	td.three					  { background-color: Window;
									filter: Alpha(Opacity = 25);  }

	/*Removed all background image modification elements and set image to 0 opacity*/
	td.threeCustom				  { filter: Alpha(Opacity = 0); }

	/*Comment out
	td.dottedline				  { background: url(Images/DottedHori.gif) repeat; }*/

	/*Removed border color*/
	div.inlineA					  {	position: relative;
									top: 4px;
									width: 100%;
									height: 1px; }

	/*Changed border color*/
	div.inlineB					  {	position: relative;
									top: -9px;
									margin-bottom: -20px;
									width: 100%;
									height: 1px;
									border-top: solid ThreeDShadow 1px; }

	/*Changed position of element*/
	h4.head						  { font-weight: bold;
				 					font-size: 10pt;
				 					color: windowtext;
									position: absolute;
									top: 16px;
									left: 120px;
									height: 58px; }

	/*Hide element*/
	p.subhead					  { display: none;
									color: windowtext;
									position: relative;
									top: -1.5em;
									left: 1em; }

	/*Changed alignment to right*/
	td.image					  { text-align: left; }

	/*Added item to control positioning of element*/
	div.smallA					  { position: absolute;
									top: 0px;
									left: 12px;
									height: 78px;
									width: 110px;
									vertical-align: bottom; }

	/*Added item to control positioning of element - 1 misspelling in html so dup of above*/
	div.smalA					  { position: absolute;
									top: 0px;
									left: 12px;
									height: 78px;
									width: 110px;
									vertical-align: bottom; }

	/*Added item to control positioning of element*/
	div.small					  { position: absolute;
									top: 0px;
									left: 12px;
									height: 78px;
									width: 110px;
									vertical-align: bottom; }

	/*Added all positioning informaiton*/
	img.smallest			  	  { background-color: activecaption;
									position: relative;
									bottom: 1px; }

	/*Added item to control positioning of element*/
	img.small					  { position: relative;
									bottom: 1px; }

	/*Add height specification*/
	td.rule						  { background-color: window;
									height: 1px; }

	/*Info for new button*/
	#PreviousBtn				  { position: relative;
									right: -79px; }
	/*Info for new button*/
	#NextBtn					  { position: relative;
									right: -79px; }

	/*Reposition button*/
	#FinishBtn					  { position: relative;
									right: -79px; }

	/*Reposition button*/
	#CancelBtn					  { position: relative;
									right: -79px; }

	/*Hide button*/
	#HelpBtn					  { display: none; }

	/**************************************************************************/


code:
<?xml version="1.0" encoding="gb2312"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="9.00"
	Name="CCAppWiz.win32"
	ProjectGUID="{104F4414-0DA5-4982-A413-766DD1698469}"
	RootNamespace="CCXAppWiz.win32"
	Keyword="CustomAppWizProj"
	TargetFrameworkVersion="196613"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="10"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			ConfigurationType="10"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Template Files"
			Filter="txt"
			>
			<Filter
				Name="win32"
				>
				<File
					RelativePath=".\Templates\1033\win32\main.cpp"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\win32\main.h"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\win32\resource.h"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\win32\root.rc"
					>
				</File>
				<Filter
					Name="res"
					>
					<File
						RelativePath=".\Templates\1033\win32\res\root.ico"
						>
					</File>
				</Filter>
			</Filter>
			<Filter
				Name="Classes"
				>
				<File
					RelativePath=".\Templates\1033\Classes\AppDelegate.cpp"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\Classes\AppDelegate.h"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\Classes\HelloWorldScene.cpp"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\Classes\HelloWorldScene.h"
					>
				</File>
				<Filter
					Name="cocos2dx_support"
					>
					<File
						RelativePath="..\..\..\lua\cocos2dx_support\LuaCocos2d.cpp"
						>
					</File>
					<File
						RelativePath="..\..\..\lua\cocos2dx_support\LuaCocos2d.h"
						>
					</File>
					<File
						RelativePath="..\..\..\lua\cocos2dx_support\LuaEngine.cpp"
						>
					</File>
					<File
						RelativePath="..\..\..\lua\cocos2dx_support\LuaEngine.h"
						>
					</File>
					<File
						RelativePath="..\..\..\lua\cocos2dx_support\LuaEngineImpl.cpp"
						>
					</File>
					<File
						RelativePath="..\..\..\lua\cocos2dx_support\LuaEngineImpl.h"
						>
					</File>
				</Filter>
			</Filter>
		</Filter>
		<Filter
			Name="HTML Files"
			Filter="htm"
			>
			<File
				RelativePath=".\HTML\1033\default.htm"
				DeploymentContent="true"
				>
			</File>
			<File
				RelativePath=".\HTML\1033\features.htm"
				DeploymentContent="true"
				>
			</File>
		</Filter>
		<Filter
			Name="Image Files"
			Filter="bmp"
			>
		</Filter>
		<Filter
			Name="Script Files"
			Filter="js"
			>
			<File
				RelativePath=".\Scripts\1033\default.js"
				>
			</File>
		</Filter>
		<Filter
			Name="Miscellaneous Files"
			Filter="vsz;vsdir;ico;vcproj;csproj;css;inf"
			>
			<File
				RelativePath=".\CCAppWiz.win32.ico"
				>
			</File>
			<File
				RelativePath=".\CCAppWiz.win32.vsdir"
				>
			</File>
			<File
				RelativePath=".\CCAppWiz.win32.vsz"
				>
			</File>
			<File
				RelativePath=".\default.vcproj"
				>
			</File>
			<File
				RelativePath=".\1033\NewStyles.css"
				>
			</File>
			<File
				RelativePath=".\Templates\1033\Templates.inf"
				>
			</File>
		</Filter>
		<File
			RelativePath=".\Images\Background_Cocos2d-x.gif"
			>
		</File>
		<File
			RelativePath=".\Images\Cocos2d-x.gif"
			>
		</File>
		<File
			RelativePath=".\1033\Images\DottedHori.gif"
			>
		</File>
		<File
			RelativePath=".\1033\Images\DottedVert.gif"
			>
		</File>
		<File
			RelativePath=".\1033\Images\spacer.gif"
			>
		</File>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>


code: CCAppWiz.win32.vsz| |Cocos2d-win32 Application |1|An application that uses Cocos2d-x library for win32 platform.| |6777|4096|#1154


code:
VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine

Param="WIZARD_VERSION = "
Param="WIZARD_NAME = Cocos2d-win32"
Param="ABSOLUTE_PATH = ."
Param="FALLBACK_LCID = 1033"


code:
		<TITLE>'Cocos2d-win32 Application Wizard'</TITLE>
		<META NAME="vs_targetSchema" CONTENT="http://schemas.microsoft.com/intellisense/ie5">
		<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">

		</OBJECT>

		<SYMBOL NAME='WIZARD_DIALOG_TITLE' TYPE="text" VALUE="Cocos2d-win32 Application Wizard"></SYMBOL>

		<SYMBOL NAME='SOURCE_FILTER' TYPE="text" VALUE="cpp;c;cxx;def;odl;idl;hpj;bat;asm"></SYMBOL>
		<SYMBOL NAME="INCLUDE_FILTER" TYPE="text" VALUE="h;hpp;hxx;hm;inl;inc"></SYMBOL>
		<SYMBOL NAME="RESOURCE_FILTER" TYPE="text" VALUE="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest"></SYMBOL>

		<SYMBOL NAME="CC_CURRENT_YEAR" TYPE="text" VALUE="2003"></SYMBOL>

		<SYMBOL NAME='CC_USE_BOX2D' TYPE="checkbox" VALUE="true"></SYMBOL>
		<SYMBOL NAME='CC_USE_CHIPMUNK' TYPE="checkbox" VALUE="false"></SYMBOL>
	    <SYMBOL NAME='CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE' TYPE="checkbox" VALUE="true"></SYMBOL>
	    <SYMBOL NAME='CC_USE_LUA' TYPE="checkbox" VALUE="false"></SYMBOL>
		<SYMBOL NAME='CC_HAS_MAIN_FORM' TYPE="checkbox" VALUE="true"></SYMBOL>

		<SYMBOL NAME='WTL_COMBO_VIEW_TYPE' TYPE="select-one" VALUE='WTL_VIEWTYPE_GENERIC'></SYMBOL>

			<COLGROUP>
				<COL WIDTH="178">
				<COL>

							<COLGROUP>
								<COL WIDTH="12">
								<COL>
								<COL WIDTH="12">

Welcome to the Cocos2d-win32 Application Wizard

This wizard generates a cocos2d-win32 application project
   											with the properties you specify.

							<COLGROUP>
								<COL WIDTH="12">
								<COL WIDTH="166">
								<COL WIDTH="1">

														 Overview

															Features

							<COLGROUP>
								<COL WIDTH="100%">

										<COL WIDTH="12"><COL WIDTH="398"><COL WIDTH="12">

													These are the current project settings:

													Click Finish from any window to accept the current settings.

													Learn more form

                                                    Cocos2d-x Application Wizard for Visual Studio User Guide
                                                    .

                                                    Recommend to save the new project  to cocos2d-x source's root directory,
                                                    otherwise,  modify the include directory and library directory menually.

											<COLGROUP>
												<COL WIDTH="12">
												<COL>
												<COL WIDTH="75">
												<COL WIDTH="4">
												<COL WIDTH="75">
												<COL WIDTH="4">
												<COL WIDTH="75">
												<COL WIDTH="12">

														<BUTTON CLASS="BUTTONS" ID="FinishBtn" ACCESSKEY="F" onClick="OnFinish(document);" type="button">
															Finish</BUTTON>

														<BUTTON CLASS="BUTTONS" ID="CancelBtn" ACCESSKEY="C" onClick="window.external.Finish(document, 'cancel');" type="button">
															Cancel</BUTTON>

														<BUTTON CLASS="BUTTONS" ID="HelpBtn" ACCESSKEY="H" onClick="window.external.OnHelp('vc.appwiz.custom.overview');" type="button">
															Help</BUTTON>


code:
		<TITLE>'Cocos2d-win32 Application Wizard'</TITLE>
		<META NAME="vs_targetSchema" CONTENT="http://schemas.microsoft.com/intellisense/ie5">
		<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">

			<COLGROUP>
				<COL WIDTH="178">
				<COL>

							<COLGROUP>
								<COL WIDTH="12">
								<COL>
								<COL WIDTH="12">

											Features

Specify features for the cocos2d-x application.

							<COLGROUP>
								<COL WIDTH="12">
								<COL WIDTH="166">
								<COL WIDTH="1">

															Overview

															Features

							<COLGROUP>
								<COL WIDTH="100%">

											<COLGROUP>
												<COL WIDTH="12">
												<COL WIDTH="193">
												<COL WIDTH="12">
												<COL WIDTH="193">
												<COL WIDTH="12">
												<COL WIDTH="193">
												<COL WIDTH="12">

														Select physical engine:

															<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_BOX2D" ACCESSKEY="B" TITLE="Application uses box2D." value="ON" NAME="CC_USE_BOX2D" onClick="OnUseBox2D();">

																	Box2D

															<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_CHIPMUNK" ACCESSKEY="C" TITLE="Application uses Chipmunk." value="ON" NAME="CC_USE_CHIPMUNK" onClick="OnUseChipmunk();">

																	Chipmunk

														Select audio engine:

															<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE" ACCESSKEY="S" TITLE="Application uses CocosDenshion's SimpleAudioEngine." value="ON" NAME="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE onClick="OnUseCocosDenshionSimpleAudioEngine();">

																	Simple Audio Engine in Cocos Denshion

														Select Lua support:

															<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_LUA" ACCESSKEY="S" TITLE="Application uses liblua." value="ON" NAME="CC_USE_LUA onClick="OnUseLua();">

																	Support Lua

											<COLGROUP>
												<COL WIDTH="12">
												<COL>
												<COL WIDTH="75">
												<COL WIDTH="4">
												<COL WIDTH="75">
												<COL WIDTH="4">
												<COL WIDTH="75">
												<COL WIDTH="12">

														<BUTTON CLASS="BUTTONS" ID="FinishBtn" ACCESSKEY="F" onClick="OnFinish(document);" type="button">
															Finish</BUTTON>

														<BUTTON CLASS="BUTTONS" ID="CancelBtn" ACCESSKEY="C" onClick="window.external.Finish(document, 'cancel');" type="button">
															Cancel</BUTTON>

														<BUTTON CLASS="BUTTONS" ID="HelpBtn" ACCESSKEY="H" onClick="window.external.OnHelp('vc.appwiz.custom.overview');" type="button">
															Help</BUTTON>


code:
function LogInfo(strInfo) {
    var FileSys = new ActiveXObject("Scripting.FileSystemObject");
    var strLogPath = "\\CCApplicationWizardLog.txt"
    var file = FileSys.OpenTextFile(strLogPath, 8, true);
    file.WriteLine(strInfo);
    file.Close();
}

function OnFinish(selProj, selObj) {
    try {
        // Create symbols based on the project name
        var strProjectPath = wizard.FindSymbol('PROJECT_PATH');
        var strProjectName = wizard.FindSymbol('PROJECT_NAME');

        //         var WizardVersion = wizard.FindSymbol('WIZARD_VERSION');
        //         if(WizardVersion >= 8.0)
        //         {
        //         }

        // Create symbols based on the project name
        var strSafeProjectName = CreateSafeName(strProjectName);
        wizard.AddSymbol("SAFE_PROJECT_NAME", strSafeProjectName);
        wizard.AddSymbol("NICE_SAFE_PROJECT_NAME", strSafeProjectName.substr(0, 1).toUpperCase() + strSafeProjectName.substr(1))
        wizard.AddSymbol("UPPERCASE_SAFE_PROJECT_NAME", strSafeProjectName.toUpperCase());

        // Set current year symbol
        var d = new Date();
        var nYear = 0;
        nYear = d.getFullYear();
        wizard.AddSymbol("CC_CURRENT_YEAR", nYear);
        wizard.AddSymbol("CC_CURRENT_DATE", d.toString());

        // Create project and configurations
        selProj = CreateCustomProject(strProjectName, strProjectPath);
        AddConfigurations(selProj, strProjectName);
        AddFilters(selProj);

        var InfFile = CreateCustomInfFile();
        AddFilesToCustomProj(selProj, strProjectName, strProjectPath, InfFile);
        AddPchSettings(selProj);
        InfFile.Delete();

        selProj.Object.Save();
    }
    catch (e) {
        if (e.description.length != 0)
            SetErrorInfo(e);
        return e.number;
    }
}

function CreateCustomProject(strProjectName, strProjectPath) {
    try {
        var strProjTemplatePath = wizard.FindSymbol('PROJECT_TEMPLATE_PATH');
        var strProjTemplate = '';
        var WizardVersion = wizard.FindSymbol('WIZARD_VERSION');
        if(WizardVersion >= 10.0)
            strProjTemplate = strProjTemplatePath + '\\default.vcxproj';
        else
            strProjTemplate = strProjTemplatePath + '\\default.vcproj';

        var Solution = dte.Solution;
        var strSolutionName = "";
        if (wizard.FindSymbol("CLOSE_SOLUTION")) {
            Solution.Close();
            strSolutionName = wizard.FindSymbol("VS_SOLUTION_NAME");
            if (strSolutionName.length) {
                var strSolutionPath = strProjectPath.substr(0, strProjectPath.length - strProjectName.length);
                Solution.Create(strSolutionPath, strSolutionName);
            }
        }

        // Create vcproj.user file
        var FileSys = new ActiveXObject("Scripting.FileSystemObject");
        var strUserTarget = "";
        if(WizardVersion >= 10.0)
            strUserTarget = strProjectName + ".win32.vcxproj.user";
        else
            strUserTarget = strProjectName + ".win32.vcproj.user";

        var strUserPath = FileSys.BuildPath(strProjectPath, strUserTarget);

        var astrParentPath = new Array();
        astrParentPath[0] = strProjectPath;
        while (astrParentPath.length) {
            var strPath = astrParentPath.pop();
            var strParentPath = FileSys.GetParentFolderName(strPath);

            if (!FileSys.FolderExists(strParentPath)) {
                astrParentPath.push(strPath);
                astrParentPath.push(strParentPath);
                continue;
            }
            else {
                FileSys.CreateFolder(strPath);
            }
        }

        var file = FileSys.OpenTextFile(strUserPath, 2, true);
        var strUserValue = "";
        if(WizardVersion >= 10.0)
            strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"
                 + "<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n"
                 + "  <PropertyGroup>\r\n"
                 + "    <ShowAllFiles>true</ShowAllFiles>\r\n"
                 + "    <LocalDebuggerWorkingDirectory Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(ProjectDir)Resources</LocalDebuggerWorkingDirectory>\r\n"
                 + "    <LocalDebuggerWorkingDirectory Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(ProjectDir)Resources</LocalDebuggerWorkingDirectory>\r\n"
                 + "    <DebuggerFlavor Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">WindowsLocalDebugger</DebuggerFlavor>\r\n"
                 + "    <DebuggerFlavor Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">WindowsLocalDebugger</DebuggerFlavor>\r\n"
                 + "  </PropertyGroup>\r\n"
                 + "</Project>";
        else
            strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"
                 + "<VisualStudioUserFile\r\n"
                 + "	ProjectType=\"Visual C++\"\r\n"
                 + "	Version=\"9.00\"\r\n"
                 + "	ShowAllFiles=\"true\"\r\n"
                 + "	>\r\n"
                 + "	<Configurations>\r\n"
                 + "		<Configuration\r\n"
			     + "			Name=\"Debug|Win32\"\r\n"
			     + "			>\r\n"
			     + "			<DebugSettings\r\n"
			     + "				WorkingDirectory=\"$(ProjectDir)Resources\\\"\r\n"
			     + "			/>\r\n"
		         + "		</Configuration>\r\n"
		         + "		<Configuration\r\n"
			     + "			Name=\"Release|Win32\"\r\n"
			     + "			>\r\n"
			     + "			<DebugSettings\r\n"
			     + "				WorkingDirectory=\"$(ProjectDir)Resources\\\"\r\n"
			     + "			/>\r\n"
		         + "		</Configuration>\r\n"
			     + "    </Configurations>\r\n"
                 + "</VisualStudioUserFile>";
        file.WriteLine(strUserValue);
        file.Close();

        // Create project file
        var strProjectNameWithExt = '';
        if(WizardVersion >= 10.0)
            strProjectNameWithExt = strProjectName + '.win32.vcxproj';
        else
            strProjectNameWithExt = strProjectName + '.win32.vcproj';

        var oTarget = wizard.FindSymbol("TARGET");
        var prj;
        if (wizard.FindSymbol("WIZARD_TYPE") == vsWizardAddSubProject)  // vsWizardAddSubProject
        {
            var prjItem = oTarget.AddFromTemplate(strProjTemplate, strProjectNameWithExt);
            prj = prjItem.SubProject;
        }
        else {
            prj = oTarget.AddFromTemplate(strProjTemplate, strProjectPath, strProjectNameWithExt);
        }
        return prj;
    }
    catch (e) {
        throw e;
    }
}

function AddFilters(proj) {
    try {
        // Add the folders to your project
        var strSrcFilter = wizard.FindSymbol('SOURCE_FILTER');
        var group = proj.Object.AddFilter('source');
        group.Filter = strSrcFilter;

        strSrcFilter = wizard.FindSymbol('INCLUDE_FILTER');
        group = proj.Object.AddFilter('include');
        group.Filter = strSrcFilter;

        strSrcFilter = wizard.FindSymbol('RESOURCE_FILTER');
        group = proj.Object.AddFilter('resource');
        group.Filter = strSrcFilter;
    }
    catch (e) {
        throw e;
    }
}

// Configurations data
var nNumConfigs = 2;

var astrConfigName = new Array();
astrConfigName[0] = "Debug";
astrConfigName[1] = "Release";

function AddConfigurations(proj, strProjectName) {
    try {
        var nCntr;
        for (nCntr = 0; nCntr < nNumConfigs; nCntr++) {
            // Check if it's Debug configuration
            var bDebug = false;
            if (astrConfigName[nCntr].search("Debug") != -1)
                bDebug = true;

            // General settings
            var config = proj.Object.Configurations(astrConfigName[nCntr]);

            //             if(wizard.FindSymbol("CC_USE_UNICODE"))
            config.CharacterSet = charSetUnicode;
            //             else
            //                config.CharacterSet = charSetMBCS;

            var WizardVersion = wizard.FindSymbol('WIZARD_VERSION');
            if(WizardVersion >= 10.0) {
                config.OutputDirectory = '$(SolutionDir)$(Configuration).win32\\'
                config.IntermediateDirectory = '$(Configuration).win32\\';
            } else {
                config.OutputDirectory = '$(SolutionDir)$(ConfigurationName).win32'
                config.IntermediateDirectory = '$(ConfigurationName).win32';
            }

            // Compiler settings
            var CLTool = config.Tools('VCCLCompilerTool');

            // Additional Inlcude Directories
            var strAddIncludeDir = '.;.\\win32;.\\Classes';
            strAddIncludeDir += ';..\\cocos2dx;..\\cocos2dx\\include';
            strAddIncludeDir += ';..\\cocos2dx\\platform';
            strAddIncludeDir += ';..\\cocos2dx\\platform\\third_party\\win32\\OGLES';

            if (wizard.FindSymbol('CC_USE_BOX2D')) {
                strAddIncludeDir += ';..\\';
            }
            if (wizard.FindSymbol('CC_USE_CHIPMUNK')) {
                strAddIncludeDir += ';..\\chipmunk\\include\\chipmunk';
            }
            if (wizard.FindSymbol('CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
                strAddIncludeDir += ';..\\CocosDenshion\\Include';
            }
            if (wizard.FindSymbol('CC_USE_LUA')) {
                strAddIncludeDir += ';..\\lua\\cocos2dx_support';
                strAddIncludeDir += ';..\\lua\\tolua';
                strAddIncludeDir += ';..\\lua\\lua';
            }
            CLTool.AdditionalIncludeDirectories = strAddIncludeDir;

            CLTool.UsePrecompiledHeader = pchNone;  // pchUseUsingSpecific;
            CLTool.WarningLevel = warningLevel_3;
            if (bDebug) {
                CLTool.RuntimeLibrary = rtMultiThreadedDebugDLL;
                CLTool.MinimalRebuild = true;
                CLTool.DebugInformationFormat = debugEditAndContinue;
                CLTool.BasicRuntimeChecks = runtimeBasicCheckAll;
                CLTool.Optimization = optimizeDisabled;
            }
            else {
                CLTool.RuntimeLibrary = rtMultiThreadedDLL;
                CLTool.ExceptionHandling = false;
                CLTool.DebugInformationFormat = debugDisabled;
            }

            var strDefines = GetPlatformDefine(config);
            strDefines += "_WINDOWS;STRICT;";
            if (bDebug)
                strDefines += "_DEBUG;COCOS2D_DEBUG=1;";
            else
                strDefines += "NDEBUG";
            CLTool.PreprocessorDefinitions = strDefines;

            // Disable special warning
            CLTool.DisableSpecificWarnings = "4251";

            // Linker settings
            var LinkTool = config.Tools('VCLinkerTool');
            LinkTool.SubSystem = subSystemWindows;
            LinkTool.TargetMachine = machineX86;
            if (bDebug) {
                LinkTool.LinkIncremental = linkIncrementalYes;
                LinkTool.GenerateDebugInformation = true;
            }
            else {
                LinkTool.LinkIncremental = linkIncrementalNo;
            }

            // Additional Library Directories
            var strAddDepends = 'libcocos2d.lib libgles_cm.lib';
            if (wizard.FindSymbol('CC_USE_BOX2D')) {
                strAddDepends += ' libBox2d.lib';
            }
            if (wizard.FindSymbol('CC_USE_CHIPMUNK')) {
                strAddDepends += ' libchipmunk.lib';
            }
            if (wizard.FindSymbol('CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
                strAddDepends += ' libCocosDenshion.lib';
            }
            if (wizard.FindSymbol('CC_USE_LUA')) {
                strAddDepends += ' liblua.lib';
            }
            LinkTool.AdditionalLibraryDirectories = '$(OutDir)';
            LinkTool.AdditionalDependencies = strAddDepends;

            // Resource settings
            var RCTool = config.Tools("VCResourceCompilerTool");
            RCTool.Culture = rcEnglishUS;
            RCTool.AdditionalIncludeDirectories = "$(IntDir)";
            if (bDebug)
                RCTool.PreprocessorDefinitions = "_DEBUG";
            else
                RCTool.PreprocessorDefinitions = "NDEBUG";

            // MIDL settings
            var MidlTool = config.Tools("VCMidlTool");
            MidlTool.MkTypLibCompatible = false;
            if (IsPlatformWin32(config))
                MidlTool.TargetEnvironment = midlTargetWin32;
            if (bDebug)
                MidlTool.PreprocessorDefinitions = "_DEBUG";
            else
                MidlTool.PreprocessorDefinitions = "NDEBUG";
            MidlTool.HeaderFileName = strProjectName + ".h";
            MidlTool.InterfaceIdentifierFileName = strProjectName + "_i.c";
            MidlTool.ProxyFileName = strProjectName + "_p.c";
            MidlTool.GenerateStublessProxies = true;
            MidlTool.TypeLibraryName = "$(IntDir)/" + strProjectName + ".tlb";
            MidlTool.DLLDataFileName = "";

            // Post-build settings
//            var PostBuildTool = config.Tools("VCPostBuildEventTool");
//            PostBuildTool.Description = "Performing copy resource from Resource to OutDir...";
//            PostBuildTool.CommandLine = "xcopy /E /Q /Y \"$(ProjectDir)Resource\\*.*\" \"$(OutDir)\"";
        }
    }
    catch (e) {
        throw e;
    }
}

function AddPchSettings(proj) {
    try {
        //         var files = proj.Object.Files;
        //         var fStdafx = files("StdAfx.cpp");
        //
        //         var nCntr;
        //         for(nCntr = 0; nCntr < nNumConfigs; nCntr++)
        //         {
        //             var config = fStdafx.FileConfigurations(astrConfigName[nCntr]);
        //             config.Tool.UsePrecompiledHeader = pchCreateUsingSpecific;
        //         }
    }
    catch (e) {
        throw e;
    }
}

function DelFile(fso, strWizTempFile) {
    try {
        if (fso.FileExists(strWizTempFile)) {
            var tmpFile = fso.GetFile(strWizTempFile);
            tmpFile.Delete();
        }
    }
    catch (e) {
        throw e;
    }
}

function CreateCustomInfFile() {
    try {
        var fso, TemplatesFolder, TemplateFiles, strTemplate;
        fso = new ActiveXObject('Scripting.FileSystemObject');

        var TemporaryFolder = 2;
        var tfolder = fso.GetSpecialFolder(TemporaryFolder);

        var strWizTempFile = tfolder.Path + "\\" + fso.GetTempName();

        var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');
        var strInfFile = strTemplatePath + '\\Templates.inf';
        wizard.RenderTemplate(strInfFile, strWizTempFile);

        var WizTempFile = fso.GetFile(strWizTempFile);

        return WizTempFile;
    }
    catch (e) {
        throw e;
    }
}

function GetTargetName(strName, strProjectName) {
    try {
        var strTarget = strName;

        var nIndex = strName.indexOf("root");

        if (nIndex >= 0) {
            strTarget = strName.substring(0, nIndex) + strProjectName + strName.substring(nIndex + 4, strName.length);
        }

        var strTemp = "../../../../../lua";
        nIndex = strTarget.indexOf(strTemp);
        if (nIndex >= 0) {
            strTarget = "Classes" + strTarget.substring(nIndex + strTemp.length, strTarget.length);
        }

        return strTarget;
    }
    catch (e) {
        throw e;
    }
}

function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) {
    try {
        var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');

        var strTpl = '';
        var strName = '';

        var strTextStream = InfFile.OpenAsTextStream(1, -2);
        while (!strTextStream.AtEndOfStream) {
            strTpl = strTextStream.ReadLine();
            if (strTpl != '') {
                strName = strTpl;
                var strTarget = GetTargetName(strName, strProjectName);
                var strTemplate = strTemplatePath + '\\' + strTpl;
                var strFile = strProjectPath + '\\' + strTarget;

                var bCopyOnly = true;  //"true" will only copy the file from strTemplate to strTarget without rendering/adding to the project
                var strExt = strName.substr(strName.lastIndexOf("."));
                if (strExt == ".h" || strExt == ".cpp" || strExt == ".c" || strExt == ".rc")
                    bCopyOnly = false;
                wizard.RenderTemplate(strTemplate, strFile, bCopyOnly);

                // don't add these files to the project
                if (strTarget == strProjectName + ".h" ||
                   strTarget == strProjectName + "ps.mk" ||
                   strTarget == strProjectName + "ps.def")
                    continue;

                proj.Object.AddFile(strFile);
            }
        }
        strTextStream.Close();
    }
    catch (e) {
        throw e;
    }
}


code:
#include "AppDelegate.h"

#include "cocos2d.h"
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
#include "SimpleAudioEngine.h"
using namespace CocosDenshion;
[! endif]

[! if CC_USE_LUA]
#include "CCLuaEngine.h"
[! else]
#include "HelloWorldScene.h"
[! endif]

#include "CCEGLView.h"

USING_NS_CC;

AppDelegate::AppDelegate()
{
}

AppDelegate::~AppDelegate()
{
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
    SimpleAudioEngine::end();
[! endif]
}

bool AppDelegate::initInstance()
{
    bool bRet = false;
    do
    {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)

		// Initialize OpenGLView instance, that release by CCDirector when application terminate.
		// The HelloWorld is designed as HVGA.
		CCEGLView * pMainWnd = new CCEGLView();
		CC_BREAK_IF(! pMainWnd
				|| ! pMainWnd->Create(TEXT("cocos2d: Hello World"), 480, 320));

#endif  // CC_PLATFORM_WIN32

#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)

        // OpenGLView initialized in testsAppDelegate.mm on ios platform, nothing need to do here.

#endif  // CC_PLATFORM_IOS

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)

		// OpenGLView initialized in HelloWorld/android/jni/helloworld/main.cpp
		// the default setting is to create a fullscreen view
		// if you want to use auto-scale, please enable view->create(320,480) in main.cpp
		// if the resources under '/sdcard" or other writeable path, set it.
		// warning: the audio source should in assets/
		// cocos2d::CCFileUtils::setResourcePath("/sdcard");

#endif  // CC_PLATFORM_ANDROID

#if (CC_TARGET_PLATFORM == CC_PLATFORM_WOPHONE)

		// Initialize OpenGLView instance, that release by CCDirector when application terminate.
		// The HelloWorld is designed as HVGA.
		CCEGLView* pMainWnd = new CCEGLView(this);
		CC_BREAK_IF(! pMainWnd || ! pMainWnd->Create(320,480, WM_WINDOW_ROTATE_MODE_CW));

#ifndef _TRANZDA_VM_
		// on wophone emulator, we copy resources files to Work7/NEWPLUS/TDA_DATA/Data/ folder instead of zip file
		cocos2d::CCFileUtils::setResource("HelloWorld.zip");
#endif

#endif  // CC_PLATFORM_WOPHONE
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE)
		// MaxAksenov said it's NOT a very elegant solution. I agree, haha
		CCDirector::sharedDirector()->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)

		// Initialize OpenGLView instance, that release by CCDirector when application terminate.
		// The HelloWorld is designed as HVGA.
		CCEGLView * pMainWnd = new CCEGLView();
		CC_BREAK_IF(! pMainWnd
				|| ! pMainWnd->Create("cocos2d: Hello World", 800, 480,480, 320));

		CCFileUtils::setResourcePath("../Resource/");

#endif  // CC_PLATFORM_LINUX

#if (CC_TARGET_PLATFORM == CC_PLATFORM_BADA)

		CCEGLView * pMainWnd = new CCEGLView();
		CC_BREAK_IF(! pMainWnd|| ! pMainWnd->Create(this, 480, 320));
		pMainWnd->setDeviceOrientation(Osp::Ui::ORIENTATION_LANDSCAPE);
		CCFileUtils::setResourcePath("/Res/");

#endif  // CC_PLATFORM_BADA

#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX)
		CCEGLView * pMainWnd = new CCEGLView();
		CC_BREAK_IF(! pMainWnd|| ! pMainWnd->Create(480, 320));
		CCFileUtils::setResourcePath("./app/native/Resource");
#endif // CC_PLATFORM_QNX
		bRet = true;
	} while (0);
	return bRet;
}

bool AppDelegate::applicationDidFinishLaunching()
{
    // initialize director
    CCDirector *pDirector = CCDirector::sharedDirector();
    pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());

	// enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
//     pDirector->enableRetinaDisplay(true);

    // turn on display FPS
    pDirector->setDisplayFPS(true);

    // set FPS. the default value is 1.0/60 if you don't call this
    pDirector->setAnimationInterval(1.0 / 60);

[! if CC_USE_LUA]
    // register lua engine
    CCScriptEngineProtocol* pEngine = CCLuaEngine::engine();
    CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine);

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
    unsigned long size;
    char *pFileContent = (char*)CCFileUtils::getFileData("hello.lua", "r", &size);

    if (pFileContent)
    {
        // copy the file contents and add '\0' at the end, or the lua parser can not parse it
        char *pCodes = new char[size + 1];
        pCodes[size] = '\0';
        memcpy(pCodes, pFileContent, size);
        delete[] pFileContent;

        pEngine->executeString(pCodes);
        delete []pCodes;
    }
#endif

#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE)
    string path = CCFileUtils::fullPathFromRelativePath("hello.lua");
    pEngine->addSearchPath(path.substr(0, path.find_last_of("/")).c_str());
    pEngine->executeScriptFile(path.c_str());
#endif
[! else]
    // create a scene. it's an autorelease object
    CCScene *pScene = HelloWorld::scene();

    // run
    pDirector->runWithScene(pScene);
[! endif]
    return true;
}

// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
void AppDelegate::applicationDidEnterBackground()
{
    CCDirector::sharedDirector()->pause();
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]

    SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
[! endif]
}

// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground()
{
    CCDirector::sharedDirector()->resume();
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]

    SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
[! endif]
}


code:
#ifndef __APP_DELEGATE_H__
#define __APP_DELEGATE_H__

#include "CCApplication.h"

/**
@brief	The cocos2d Application.

The reason for implement as private inheritance is to hide some interface call by CCDirector.
*/
class  AppDelegate : private cocos2d::CCApplication
{
public:
    AppDelegate();
    virtual ~AppDelegate();

    /**
    @brief	Implement for initialize OpenGL instance, set source path, etc...
    */
    virtual bool initInstance();

    /**
    @brief	Implement CCDirector and CCScene init code here.
    @return true    Initialize success, app continue.
    @return false   Initialize failed, app terminate.
    */
    virtual bool applicationDidFinishLaunching();

    /**
    @brief  The function be called when the application enter background
    @param  the pointer of the application
    */
    virtual void applicationDidEnterBackground();

    /**
    @brief  The function be called when the application enter foreground
    @param  the pointer of the application
    */
    virtual void applicationWillEnterForeground();
};

#endif  // __APP_DELEGATE_H__


code:
#include "HelloWorldScene.h"

using namespace cocos2d;

CCScene* HelloWorld::scene()
{
    CCScene * scene = NULL;
    do
    {
        // 'scene' is an autorelease object
        scene = CCScene::node();
        CC_BREAK_IF(! scene);

        // 'layer' is an autorelease object
        HelloWorld *layer = HelloWorld::node();
        CC_BREAK_IF(! layer);

        // add layer as a child to scene
        scene->addChild(layer);
    } while (0);

    // return the scene
    return scene;
}

// on "init" you need to initialize your instance
bool HelloWorld::init()
{
    bool bRet = false;
    do
    {
        //////////////////////////////////////////////////////////////////////////
        // super init first
        //////////////////////////////////////////////////////////////////////////

        CC_BREAK_IF(! CCLayer::init());

        //////////////////////////////////////////////////////////////////////////
        // add your codes below...
        //////////////////////////////////////////////////////////////////////////

        // 1. Add a menu item with "X" image, which is clicked to quit the program.

        // Create a "close" menu item with close icon, it's an auto release object.
        CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(
            "CloseNormal.png",
            "CloseSelected.png",
            this,
            menu_selector(HelloWorld::menuCloseCallback));
        CC_BREAK_IF(! pCloseItem);

        // Place the menu item bottom-right conner.
        pCloseItem->setPosition(ccp(CCDirector::sharedDirector()->getWinSize().width - 20, 20));

        // Create a menu with the "close" menu item, it's an auto release object.
        CCMenu* pMenu = CCMenu::menuWithItems(pCloseItem, NULL);
        pMenu->setPosition(CCPointZero);
        CC_BREAK_IF(! pMenu);

        // Add the menu to HelloWorld layer as a child layer.
        this->addChild(pMenu, 1);

        // 2. Add a label shows "Hello World".

        // Create a label and initialize with string "Hello World".
        CCLabelTTF* pLabel = CCLabelTTF::labelWithString("Hello World", "Thonburi", 64);
        CC_BREAK_IF(! pLabel);

        // Get window size and place the label upper.
        CCSize size = CCDirector::sharedDirector()->getWinSize();
        pLabel->setPosition(ccp(size.width / 2, size.height - 20));

        // Add the label to HelloWorld layer as a child layer.
        this->addChild(pLabel, 1);

        // 3. Add add a splash screen, show the cocos2d splash image.
        CCSprite* pSprite = CCSprite::spriteWithFile("HelloWorld.png");
        CC_BREAK_IF(! pSprite);

        // Place the sprite on the center of the screen
        pSprite->setPosition(ccp(size.width/2, size.height/2));

        // Add the sprite to HelloWorld layer as a child layer.
        this->addChild(pSprite, 0);

        bRet = true;
    } while (0);

    return bRet;
}

void HelloWorld::menuCloseCallback(CCObject* pSender)
{
    // "close" menu item clicked
    CCDirector::sharedDirector()->end();
}


code:
#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#include "cocos2d.h"
[! if CC_USE_BOX2D]

#include "Box2D/Box2D.h"
[! endif]
[! if CC_USE_CHIPMUNK]

#include "chipmunk.h"
[! endif]
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]

#include "SimpleAudioEngine.h"
[! endif]

class HelloWorld : public cocos2d::CCLayer
{
public:
    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();

    // there's no 'id' in cpp, so we recommand to return the exactly class pointer
    static cocos2d::CCScene* scene();

    // a selector callback
    virtual void menuCloseCallback(CCObject* pSender);

    // implement the "static node()" method manually
    LAYER_NODE_FUNC(HelloWorld);
};

#endif  // __HELLOWORLD_SCENE_H__


code:
-- avoid memory leak
collectgarbage("setpause", 100)
collectgarbage("setstepmul", 5000)

local cclog = function(...)
    print(string.format(...))
end

require "hello2"
cclog("result is " .. myadd(3, 5))

---------------

local winSize = CCDirector:sharedDirector():getWinSize()

-- add the moving dog
local function creatDog()
    local frameWidth = 105
    local frameHeight = 95

    -- create dog animate
    local textureDog = CCTextureCache:sharedTextureCache():addImage("dog.png")
    local rect = CCRectMake(0, 0, frameWidth, frameHeight)
    local frame0 = CCSpriteFrame:frameWithTexture(textureDog, rect)
    rect = CCRectMake(frameWidth, 0, frameWidth, frameHeight)
    local frame1 = CCSpriteFrame:frameWithTexture(textureDog, rect)

    local spriteDog = CCSprite:spriteWithSpriteFrame(frame0)
    spriteDog.isPaused = false
    spriteDog:setPosition(0, winSize.height / 4 * 3)

    local animFrames = CCMutableArray_CCSpriteFrame__:new(2)
    animFrames:addObject(frame0)
    animFrames:addObject(frame1)

    local animation = CCAnimation:animationWithFrames(animFrames, 0.5)
    local animate = CCAnimate:actionWithAnimation(animation, false);
    spriteDog:runAction(CCRepeatForever:actionWithAction(animate))

    -- moving dog at every frame
    local function tick()
        if spriteDog.isPaused then return end
        local x, y = spriteDog:getPosition()
        if x > winSize.width then
            x = 0
        else
            x = x + 1
        end
        spriteDog:setPositionX(x)
    end

    CCScheduler:sharedScheduler():scheduleScriptFunc(tick, 0, false)

    return spriteDog
end

-- create farm
local function createLayerFram()
    local layerFarm = CCLayer:node()

    -- add in farm background
    local bg = CCSprite:spriteWithFile("farm.jpg")
    bg:setPosition(winSize.width / 2 + 80, winSize.height / 2)
    layerFarm:addChild(bg)

    -- add land sprite
    for i = 0, 3 do
        for j = 0, 1 do
            local spriteLand = CCSprite:spriteWithFile("land.png")
            spriteLand:setPosition(200 + j * 180 - i % 2 * 90, 10 + i * 95 / 2)
            layerFarm:addChild(spriteLand)
        end
    end

    -- add crop
    local textureCrop = CCTextureCache:sharedTextureCache():addImage("crop.png")
    local frameCrop = CCSpriteFrame:frameWithTexture(textureCrop, CCRectMake(0, 0, 105, 95))
    for i = 0, 3 do
        for j = 0, 1 do
            local spriteCrop = CCSprite:spriteWithSpriteFrame(frameCrop);
            spriteCrop:setPosition(10 + 200 + j * 180 - i % 2 * 90, 30 + 10 + i * 95 / 2)
            layerFarm:addChild(spriteCrop)
        end
    end

    -- add moving dog
    local spriteDog = creatDog()
    layerFarm:addChild(spriteDog)

    -- handing touch events
    local touchBeginPoint = nil

    local function onTouchBegan(x, y)
        cclog("onTouchBegan: %0.2f, %0.2f", x, y)
        touchBeginPoint = {x = x, y = y}
        spriteDog.isPaused = true
        -- CCTOUCHBEGAN event must return true
        return true
    end

    local function onTouchMoved(x, y)
        cclog("onTouchMoved: %0.2f, %0.2f", x, y)
        if touchBeginPoint then
            local cx, cy = layerFarm:getPosition()
            layerFarm:setPosition(cx + x - touchBeginPoint.x,
                                  cy + y - touchBeginPoint.y)
            touchBeginPoint = {x = x, y = y}
        end
    end

    local function onTouchEnded(x, y)
        cclog("onTouchEnded")
        touchBeginPoint = nil
        spriteDog.isPaused = false
    end

    local function onTouch(eventType, x, y)
        if eventType == CCTOUCHBEGAN then
            return onTouchBegan(x, y)
        elseif eventType == CCTOUCHMOVED then
            return onTouchMoved(x, y)
        else
            return onTouchEnded(x, y)
        end
    end

    layerFarm:registerScriptTouchHandler(onTouch)
    layerFarm:setIsTouchEnabled(true)

    return layerFarm
end

-- create menu
local function createLayerMenu()
    local layerMenu = CCLayer:node()

    local menuPopup, menuTools, effectID

    local function menuCallbackClosePopup()
        -- stop test sound effect
        SimpleAudioEngine:sharedEngine():stopEffect(effectID)
        menuPopup:setIsVisible(false)
    end

    local function menuCallbackOpenPopup()
        -- loop test sound effect
        effectID = SimpleAudioEngine:sharedEngine():playEffect("effect1.wav")
        menuPopup:setIsVisible(true)
    end

    -- add a popup menu
    local menuPopupItem = CCMenuItemImage:itemFromNormalImage("menu2.png", "menu2.png")
    menuPopupItem:setPosition(0, 0)
    menuPopupItem:registerScriptHandler(menuCallbackClosePopup)
    menuPopup = CCMenu:menuWithItem(menuPopupItem)
    menuPopup:setPosition(winSize.width / 2, winSize.height / 2)
    menuPopup:setIsVisible(false)
    layerMenu:addChild(menuPopup)

    -- add the left-bottom "tools" menu to invoke menuPopup
    local menuToolsItem = CCMenuItemImage:itemFromNormalImage("menu1.png", "menu1.png")
    menuToolsItem:setPosition(0, 0)
    menuToolsItem:registerScriptHandler(menuCallbackOpenPopup)
    menuTools = CCMenu:menuWithItem(menuToolsItem)
    menuTools:setPosition(30, 40)
    layerMenu:addChild(menuTools)

    return layerMenu
end

-- play background music, preload effect
SimpleAudioEngine:sharedEngine():playBackgroundMusic("background.mp3", true);
SimpleAudioEngine:sharedEngine():preloadEffect("effect1.wav");

-- run
local sceneGame = CCScene:node()
sceneGame:addChild(createLayerFram())
sceneGame:addChild(createLayerMenu())
CCDirector:sharedDirector():runWithScene(sceneGame)


code:
function myadd(x, y)
    return x + y
end


code:
win32/res/root.ico
win32/root.rc
win32/resource.h

win32/main.h
win32/main.cpp

Classes/AppDelegate.h
Classes/AppDelegate.cpp

[! if CC_USE_LUA]
../../../../../lua/cocos2dx_support/LuaCocos2d.cpp
../../../../../lua/cocos2dx_support/LuaCocos2d.h
../../../../../lua/cocos2dx_support/CCLuaEngine.cpp
../../../../../lua/cocos2dx_support/CCLuaEngine.h
../../../../../lua/cocos2dx_support/Cocos2dxLuaLoader.h
../../../../../lua/cocos2dx_support/Cocos2dxLuaLoader.cpp
../../../../../lua/cocos2dx_support/tolua_fix.c
../../../../../lua/cocos2dx_support/tolua_fix.h
[! else]
Classes/HelloWorldScene.h
Classes/HelloWorldScene.cpp
[! endif]

[! if CC_USE_LUA]
Resources/Default.png
Resources/crop.png
Resources/farm.jpg
Resources/land.png
Resources/menu2.png
Resources/Icon.png
Resources/dog.png
Resources/hello.lua
Resources/hello2.lua
Resources/menu1.png
[! else]
Resources/CloseSelected.png
Resources/CloseNormal.png
Resources/HelloWorld.png
[! endif]


code:
#include "main.h"

#include "AppDelegate.h"

int APIENTRY _tWinMain(HINSTANCE hInstance,
					   HINSTANCE hPrevInstance,
					   LPTSTR    lpCmdLine,
					   int       nCmdShow)
{
	UNREFERENCED_PARAMETER(hPrevInstance);
	UNREFERENCED_PARAMETER(lpCmdLine);

    // create the application instance
    AppDelegate app;

    return cocos2d::CCApplication::sharedApplication().run();
}


code:
#ifndef __MAIN_H__
#define __MAIN_H__

#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers

// Windows Header Files:
#include <windows.h>
#include <tchar.h>

// C RunTime Header Files
#include "CCStdC.h"

#endif	// __WINMAIN_H__


code:
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by [!output PROJECT_NAME].RC
//

[!if WTL_COM_SERVER]
#define IDS_PROJNAME				100
#define IDR_[!output UPPERCASE_SAFE_PROJECT_NAME]	100
[!endif]

#define ID_FILE_NEW_WINDOW			32771

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE	201
#define _APS_NEXT_CONTROL_VALUE		1000
#define _APS_NEXT_SYMED_VALUE		101
#define _APS_NEXT_COMMAND_VALUE		32775
#endif
#endif


code:
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE
BEGIN
    "resource.h\0"
END

#endif    // APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON                    "res\\[!output PROJECT_NAME].ico"

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904B0"
        BEGIN
            VALUE "CompanyName", "\0"
            VALUE "FileDescription", "[!output PROJECT_NAME] Module\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "[!output PROJECT_NAME]\0"
            VALUE "LegalCopyright", "Copyright [!output WTL_CURRENT_YEAR]\0"
            VALUE "OriginalFilename", "[!output PROJECT_NAME].exe\0"
            VALUE "ProductName", "[!output PROJECT_NAME] Module\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x0409, 0x04B0
    END
END

/////////////////////////////////////////////////////////////////////////////
#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)


code:
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject ProjectType="Visual C++" Version="9.00">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration Name="Debug|Win32"></Configuration>
		<Configuration Name="Release|Win32"></Configuration>
	</Configurations>
</VisualStudioProject>