summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 9837004)
raw | patch | inline | side by side (from parent 1: 9837004)
author | fred-boy <fred-boy@protonmail.com> | |
Sun, 22 Apr 2018 09:37:18 +0000 (16:37 +0700) | ||
committer | fred-boy <fred-boy@protonmail.com> | |
Sun, 22 Apr 2018 09:37:18 +0000 (16:37 +0700) |
13 files changed:
diff --git a/android/assets/buttons.png b/android/assets/buttons.png
new file mode 100644 (file)
index 0000000..8528014
Binary files /dev/null and b/android/assets/buttons.png differ
index 0000000..8528014
Binary files /dev/null and b/android/assets/buttons.png differ
index 586fb370f062e23c54f536bb2befa94bf0c2f030..e653d74d38fd34e39dcfafeb1e7254633a04d590 100644 (file)
--- a/android/assets/font.fnt
+++ b/android/assets/font.fnt
-info face="Minecraft Regular" size=18 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2
-common lineHeight=19 base=15 scaleW=512 scaleH=512 pages=1 packed=0
+info face="Minecraft Regular" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2
+common lineHeight=33 base=26 scaleW=512 scaleH=512 pages=1 packed=0
page id=0 file="font.png"
chars count=95
char id=10 x=0 y=0 width=0 height=0 xoffset=0 yoffset=0 xadvance=0 page=0 chnl=0
-char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=17 xadvance=7 page=0 chnl=0
-char id=33 x=472 y=0 width=4 height=15 xoffset=-1 yoffset=4 xadvance=4 page=0 chnl=0
-char id=34 x=349 y=17 width=9 height=8 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=35 x=114 y=17 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=36 x=92 y=17 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=37 x=103 y=17 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=38 x=125 y=17 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=39 x=358 y=17 width=6 height=8 xoffset=-1 yoffset=4 xadvance=6 page=0 chnl=0
-char id=40 x=491 y=0 width=10 height=15 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=41 x=501 y=0 width=9 height=15 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=42 x=379 y=17 width=9 height=7 xoffset=-1 yoffset=8 xadvance=9 page=0 chnl=0
-char id=43 x=327 y=17 width=11 height=11 xoffset=-1 yoffset=6 xadvance=11 page=0 chnl=0
-char id=44 x=364 y=17 width=4 height=7 xoffset=-1 yoffset=14 xadvance=4 page=0 chnl=0
-char id=45 x=405 y=17 width=11 height=4 xoffset=-1 yoffset=10 xadvance=11 page=0 chnl=0
-char id=46 x=388 y=17 width=4 height=6 xoffset=-1 yoffset=13 xadvance=4 page=0 chnl=0
-char id=47 x=57 y=17 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=48 x=461 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=49 x=362 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=50 x=373 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=51 x=384 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=52 x=395 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=53 x=406 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=54 x=417 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=55 x=428 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=56 x=439 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=57 x=450 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=58 x=180 y=17 width=4 height=13 xoffset=-1 yoffset=6 xadvance=4 page=0 chnl=0
-char id=59 x=487 y=0 width=4 height=15 xoffset=-1 yoffset=6 xadvance=4 page=0 chnl=0
-char id=60 x=35 y=17 width=9 height=15 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=61 x=338 y=17 width=11 height=9 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=62 x=44 y=17 width=9 height=15 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=63 x=476 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=64 x=68 y=17 width=13 height=15 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=0
-char id=65 x=11 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=66 x=22 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=67 x=33 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=68 x=44 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=69 x=55 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=70 x=66 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=71 x=77 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=72 x=88 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=73 x=99 y=0 width=7 height=15 xoffset=-1 yoffset=4 xadvance=7 page=0 chnl=0
-char id=74 x=106 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=75 x=117 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=76 x=128 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=77 x=139 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=78 x=150 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=79 x=161 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=80 x=172 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=81 x=183 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=82 x=194 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=83 x=205 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=84 x=216 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=85 x=227 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=86 x=238 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=87 x=249 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=88 x=260 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=89 x=271 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=90 x=282 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=91 x=0 y=17 width=8 height=15 xoffset=-1 yoffset=4 xadvance=7 page=0 chnl=0
-char id=92 x=81 y=17 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=93 x=8 y=17 width=8 height=15 xoffset=-1 yoffset=4 xadvance=8 page=0 chnl=0
-char id=94 x=368 y=17 width=11 height=7 xoffset=-1 yoffset=5 xadvance=11 page=0 chnl=0
-char id=95 x=405 y=17 width=11 height=4 xoffset=-1 yoffset=17 xadvance=11 page=0 chnl=0
-char id=97 x=184 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=98 x=293 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=99 x=195 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=100 x=304 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=101 x=206 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=102 x=315 y=0 width=9 height=15 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=103 x=136 y=17 width=11 height=13 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=104 x=324 y=0 width=11 height=15 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=105 x=335 y=0 width=4 height=15 xoffset=-1 yoffset=4 xadvance=4 page=0 chnl=0
-char id=106 x=0 y=0 width=11 height=17 xoffset=-1 yoffset=4 xadvance=11 page=0 chnl=0
-char id=107 x=339 y=0 width=9 height=15 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=108 x=348 y=0 width=6 height=15 xoffset=-1 yoffset=4 xadvance=6 page=0 chnl=0
-char id=109 x=217 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=110 x=228 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=111 x=239 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=112 x=147 y=17 width=11 height=13 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=113 x=158 y=17 width=11 height=13 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=114 x=250 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=115 x=261 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=116 x=354 y=0 width=8 height=15 xoffset=-1 yoffset=4 xadvance=8 page=0 chnl=0
-char id=117 x=272 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=118 x=283 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=119 x=294 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=120 x=305 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=121 x=169 y=17 width=11 height=13 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=122 x=316 y=17 width=11 height=11 xoffset=-1 yoffset=8 xadvance=11 page=0 chnl=0
-char id=123 x=16 y=17 width=10 height=15 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=124 x=53 y=17 width=4 height=15 xoffset=-1 yoffset=4 xadvance=4 page=0 chnl=0
-char id=125 x=26 y=17 width=9 height=15 xoffset=-1 yoffset=4 xadvance=9 page=0 chnl=0
-char id=126 x=392 y=17 width=13 height=6 xoffset=-1 yoffset=4 xadvance=13 page=0 chnl=0
+char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=31 xadvance=13 page=0 chnl=0
+char id=33 x=504 y=0 width=6 height=24 xoffset=-1 yoffset=9 xadvance=6 page=0 chnl=0
+char id=34 x=384 y=51 width=15 height=12 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=35 x=0 y=51 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=36 x=470 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=37 x=488 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=38 x=18 y=51 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=39 x=399 y=51 width=9 height=12 xoffset=-1 yoffset=9 xadvance=9 page=0 chnl=0
+char id=40 x=291 y=27 width=15 height=24 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=41 x=306 y=27 width=15 height=24 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=42 x=432 y=51 width=15 height=12 xoffset=-1 yoffset=15 xadvance=16 page=0 chnl=0
+char id=43 x=348 y=51 width=18 height=18 xoffset=-1 yoffset=12 xadvance=19 page=0 chnl=0
+char id=44 x=408 y=51 width=6 height=12 xoffset=-1 yoffset=24 xadvance=6 page=0 chnl=0
+char id=45 x=475 y=51 width=18 height=6 xoffset=-1 yoffset=17 xadvance=19 page=0 chnl=0
+char id=46 x=469 y=51 width=6 height=8 xoffset=-1 yoffset=25 xadvance=6 page=0 chnl=0
+char id=47 x=412 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=48 x=249 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=49 x=87 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=50 x=105 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=51 x=123 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=52 x=141 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=53 x=159 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=54 x=177 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=55 x=195 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=56 x=213 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=57 x=231 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=58 x=108 y=51 width=6 height=21 xoffset=-1 yoffset=12 xadvance=6 page=0 chnl=0
+char id=59 x=285 y=27 width=6 height=24 xoffset=-1 yoffset=12 xadvance=6 page=0 chnl=0
+char id=60 x=376 y=27 width=15 height=24 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=61 x=366 y=51 width=18 height=15 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=62 x=391 y=27 width=15 height=24 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=63 x=267 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=64 x=430 y=27 width=22 height=24 xoffset=-1 yoffset=9 xadvance=22 page=0 chnl=0
+char id=65 x=18 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=66 x=36 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=67 x=54 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=68 x=72 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=69 x=90 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=70 x=108 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=71 x=126 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=72 x=144 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=73 x=162 y=0 width=12 height=24 xoffset=-1 yoffset=9 xadvance=13 page=0 chnl=0
+char id=74 x=174 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=75 x=192 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=76 x=210 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=77 x=228 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=78 x=246 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=79 x=264 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=80 x=282 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=81 x=300 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=82 x=318 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=83 x=336 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=84 x=354 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=85 x=372 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=86 x=390 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=87 x=408 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=88 x=426 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=89 x=444 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=90 x=462 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=91 x=321 y=27 width=12 height=24 xoffset=-1 yoffset=9 xadvance=13 page=0 chnl=0
+char id=92 x=452 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=93 x=333 y=27 width=13 height=24 xoffset=-1 yoffset=9 xadvance=13 page=0 chnl=0
+char id=94 x=414 y=51 width=18 height=12 xoffset=-1 yoffset=8 xadvance=19 page=0 chnl=0
+char id=95 x=475 y=51 width=18 height=6 xoffset=-1 yoffset=30 xadvance=19 page=0 chnl=0
+char id=97 x=114 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=98 x=480 y=0 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=99 x=132 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=100 x=0 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=101 x=150 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=102 x=18 y=27 width=15 height=24 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=103 x=36 y=51 width=18 height=21 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=104 x=33 y=27 width=18 height=24 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=105 x=498 y=0 width=6 height=24 xoffset=-1 yoffset=9 xadvance=6 page=0 chnl=0
+char id=106 x=0 y=0 width=18 height=27 xoffset=-1 yoffset=9 xadvance=19 page=0 chnl=0
+char id=107 x=51 y=27 width=15 height=24 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=108 x=66 y=27 width=9 height=24 xoffset=-1 yoffset=9 xadvance=9 page=0 chnl=0
+char id=109 x=168 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=110 x=186 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=111 x=204 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=112 x=54 y=51 width=18 height=21 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=113 x=72 y=51 width=18 height=21 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=114 x=222 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=115 x=240 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=116 x=75 y=27 width=12 height=24 xoffset=-1 yoffset=9 xadvance=13 page=0 chnl=0
+char id=117 x=258 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=118 x=276 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=119 x=294 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=120 x=312 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=121 x=90 y=51 width=18 height=21 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=122 x=330 y=51 width=18 height=18 xoffset=-1 yoffset=15 xadvance=19 page=0 chnl=0
+char id=123 x=346 y=27 width=15 height=24 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=124 x=406 y=27 width=6 height=24 xoffset=-1 yoffset=9 xadvance=6 page=0 chnl=0
+char id=125 x=361 y=27 width=15 height=24 xoffset=-1 yoffset=9 xadvance=16 page=0 chnl=0
+char id=126 x=447 y=51 width=22 height=9 xoffset=-1 yoffset=8 xadvance=22 page=0 chnl=0
kernings count=0
index e489797ac4f8583a22a0e108869f5663bf1c5162..d4e818594adca0ff83cafdfafa2363e9d99116e5 100644 (file)
Binary files a/android/assets/font.png and b/android/assets/font.png differ
Binary files a/android/assets/font.png and b/android/assets/font.png differ
diff --git a/core/src/ru/deadsoftware/cavecraft/Assets.java b/core/src/ru/deadsoftware/cavecraft/Assets.java
index 427ebc66bf2efc23ea32812d36e0bb0e6a4396b2..6a992ef067cd5eaf1f2c95e0dc13acc22bb00bb3 100644 (file)
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
+import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
public static final int BLOCK_TEXTURES = 18;
+ private static GlyphLayout layout;
+
public static BitmapFont minecraftFont;
public static Sprite gameLogo;
- public static Texture charTexture;
+ public static Texture menuButtonTexture;
+ public static TextureRegion[] menuButton = new TextureRegion[3];
+
+ public static Texture playerTexture;
public static Sprite[][] playerSprite = new Sprite[2][4];
public static Texture pigTexture;
public static TextureRegion touchSpace;
private static void loadPlayer() {
- charTexture = new Texture(Gdx.files.internal("mobs/char.png"));
+ playerTexture = new Texture(Gdx.files.internal("mobs/char.png"));
//LOOK TO LEFT
//head
- playerSprite[0][0] = new Sprite(new TextureRegion(charTexture, 0,0,12,12));
+ playerSprite[0][0] = new Sprite(new TextureRegion(playerTexture, 0,0,12,12));
playerSprite[0][0].flip(false,true);
//body
- playerSprite[0][1] = new Sprite(new TextureRegion(charTexture, 0,13,12,12));
+ playerSprite[0][1] = new Sprite(new TextureRegion(playerTexture, 0,13,12,12));
playerSprite[0][1].flip(false,true);
//hand
- playerSprite[0][2] = new Sprite(new TextureRegion(charTexture, 25,5,20,20));
+ playerSprite[0][2] = new Sprite(new TextureRegion(playerTexture, 25,5,20,20));
playerSprite[0][2].flip(false,true);
//leg
- playerSprite[0][3] = new Sprite(new TextureRegion(charTexture, 25,27,20,20));
+ playerSprite[0][3] = new Sprite(new TextureRegion(playerTexture, 25,27,20,20));
playerSprite[0][3].flip(false,true);
//LOOK TO RIGHT
//head
- playerSprite[1][0] = new Sprite(new TextureRegion(charTexture, 13,0,12,12));
+ playerSprite[1][0] = new Sprite(new TextureRegion(playerTexture, 13,0,12,12));
playerSprite[1][0].flip(false,true);
//body
- playerSprite[1][1] = new Sprite(new TextureRegion(charTexture, 13,13,12,12));
+ playerSprite[1][1] = new Sprite(new TextureRegion(playerTexture, 13,13,12,12));
playerSprite[1][1].flip(false,true);
//hand
- playerSprite[1][2] = new Sprite(new TextureRegion(charTexture, 37,5,20,20));
+ playerSprite[1][2] = new Sprite(new TextureRegion(playerTexture, 37,5,20,20));
playerSprite[1][2].flip(false,true);
//leg
- playerSprite[1][3] = new Sprite(new TextureRegion(charTexture, 37,27,20,20));
+ playerSprite[1][3] = new Sprite(new TextureRegion(playerTexture, 37,27,20,20));
playerSprite[1][3].flip(false,true);
}
public static void load() {
minecraftFont = new BitmapFont(Gdx.files.internal("font.fnt"), true);
+ minecraftFont.getData().setScale(.375f);
+
+ layout = new GlyphLayout();
+
gameLogo = new Sprite(new Texture(Gdx.files.internal("gamelogo.png")));
gameLogo.flip(false, true);
+ menuButtonTexture = new Texture(Gdx.files.internal("buttons.png"));
+ for (int i=0; i<3; i++) {
+ menuButton[i] = new TextureRegion(menuButtonTexture, 0, 20*i, 200, 20);
+ menuButton[i].flip(false, true);
+ }
+
loadPlayer();
loadPig();
creativeScroll = new TextureRegion(creativeTexture, 3, 137, 12, 15);
creativeScroll.flip(false, true);
- touchGui = new Texture(Gdx.files.internal("touch_gui.png"));
- for (int i=0; i<4; i++) {
- touchArrows[i] = new TextureRegion(touchGui, i*26, 0, 26,26);
- touchArrows[i].flip(false, true);
+ if (CaveGame.TOUCH) {
+ touchGui = new Texture(Gdx.files.internal("touch_gui.png"));
+ for (int i = 0; i < 4; i++) {
+ touchArrows[i] = new TextureRegion(touchGui, i * 26, 0, 26, 26);
+ touchArrows[i].flip(false, true);
+ }
+ touchLMB = new TextureRegion(touchGui, 0, 26, 26, 26);
+ touchLMB.flip(false, true);
+ touchRMB = new TextureRegion(touchGui, 52, 26, 26, 26);
+ touchRMB.flip(false, true);
+ touchToggleMode = new TextureRegion(touchGui, 26, 26, 26, 26);
+ touchToggleMode.flip(false, true);
+ touchSpace = new TextureRegion(touchGui, 0, 52, 104, 26);
+ touchSpace.flip(false, true);
}
- touchLMB = new TextureRegion(touchGui, 0, 26, 26,26);
- touchLMB.flip(false, true);
- touchRMB = new TextureRegion(touchGui, 52, 26, 26,26);
- touchRMB.flip(false, true);
- touchToggleMode = new TextureRegion(touchGui, 26, 26, 26, 26);
- touchToggleMode.flip(false, true);
- touchSpace = new TextureRegion(touchGui, 0, 52, 104, 26);
- touchSpace.flip(false, true);
terrain = new Texture(Gdx.files.internal("terrain.png"));
for (int i=0; i<BLOCK_TEXTURES; i++) {
}
}
+ public static int getStringWidth(String s){
+ layout.setText(minecraftFont,s);
+ return (int)layout.width;
+ }
+
+ public static int getStringHeight(String s){
+ layout.setText(minecraftFont,s);
+ return (int)layout.height;
+ }
+
}
diff --git a/core/src/ru/deadsoftware/cavecraft/GameScreen.java b/core/src/ru/deadsoftware/cavecraft/GameScreen.java
index 6daa039bdb5043143300029941094c1b18a10ff5..accd1e59cc6ffd25fac1a3f47ae4fd8170e74eca 100644 (file)
private GameProc gameProc;
private Renderer renderer;
+ private MenuRenderer menuRenderer;
public GameScreen() {
Assets.load();
Items.load();
gameProc = new GameProc();
- renderer = new MenuRenderer();
- Gdx.input.setInputProcessor(new InputHandlerMenu());
+ menuRenderer = new MenuRenderer(CaveGame.TOUCH?320:480);
+ renderer = menuRenderer;
+ Gdx.input.setInputProcessor(new InputHandlerMenu(menuRenderer));
}
public static int getWidth() {
case RESTART:
gameProc = new GameProc();
+ renderer = gameProc.renderer;
Gdx.input.setInputProcessor(new InputHandlerGame(gameProc));
CaveGame.STATE = GameState.GAME_PLAY;
break;
+
+ case GOTO_MENU:
+ renderer = menuRenderer;
+ Gdx.input.setInputProcessor(new InputHandlerMenu(menuRenderer));
+ CaveGame.STATE = GameState.MENU_MAIN;
+ break;
}
renderer.render();
}
public void resize(int width, int height) {
switch (CaveGame.STATE) {
case MENU_MAIN:
- renderer = new MenuRenderer();
+ menuRenderer = new MenuRenderer(CaveGame.TOUCH?320:480);
+ renderer = menuRenderer;
break;
case GAME_PLAY: case GAME_CREATIVE_INV:
gameProc.resetRenderer();
+ renderer = gameProc.renderer;
break;
}
}
diff --git a/core/src/ru/deadsoftware/cavecraft/GameState.java b/core/src/ru/deadsoftware/cavecraft/GameState.java
index d8be71ab9655859791276a47bf2cf1665efd5547..8f110642fc404386ff51b978678f684f67cef300 100644 (file)
public enum GameState {
RESTART,
+ GOTO_MENU,
MENU_MAIN,
GAME_PLAY,
GAME_CREATIVE_INV
diff --git a/core/src/ru/deadsoftware/cavecraft/InputHandlerMenu.java b/core/src/ru/deadsoftware/cavecraft/InputHandlerMenu.java
index fe3cb4d93d8092b38aa15d5bfdac35756d7c9f3f..75aa9a9d14f6db0a7358de12008a8ab47386d5dc 100644 (file)
package ru.deadsoftware.cavecraft;
import com.badlogic.gdx.InputProcessor;
+import ru.deadsoftware.cavecraft.menu.MenuRenderer;
+import ru.deadsoftware.cavecraft.menu.objects.Button;
public class InputHandlerMenu implements InputProcessor{
+ private MenuRenderer renderer;
+
+ public InputHandlerMenu(MenuRenderer renderer) {
+ this.renderer = renderer;
+ }
+
@Override
public boolean keyDown(int keycode) {
return false;
}
@Override
- public boolean touchDown(int screenX, int screenY, int pointer, int button) {
+ public boolean touchDown(int screenX, int screenY, int pointer, int mb) {
return false;
}
@Override
- public boolean touchUp(int screenX, int screenY, int pointer, int button) {
+ public boolean touchUp(int screenX, int screenY, int pointer, int mb) {
+ screenX *= renderer.getWidth()/GameScreen.getWidth();
+ screenY *= renderer.getHeight()/GameScreen.getHeight();
+ for (Button button : renderer.buttons) {
+ if (button.getRect().contains(screenX, screenY)) renderer.buttonClicked(button);
+ }
return false;
}
diff --git a/core/src/ru/deadsoftware/cavecraft/Renderer.java b/core/src/ru/deadsoftware/cavecraft/Renderer.java
index 635af8573895ddb5c4ed75e2c66db2423cb4bd60..581145aa5cbad7fe2932766aa2733d5270f019e6 100644 (file)
public SpriteBatch spriteBatch;
public Renderer() {
+ this(GameScreen.getWidth(), GameScreen.getHeight());
}
public Renderer(float width, float height) {
camera = new OrthographicCamera();
- shapeRenderer = new ShapeRenderer();
- spriteBatch = new SpriteBatch();
camera.setToOrtho(true, width, height);
+ shapeRenderer = new ShapeRenderer();
shapeRenderer.setProjectionMatrix(camera.combined);
+ spriteBatch = new SpriteBatch();
spriteBatch.setProjectionMatrix(camera.combined);
}
public float getHeight() {return camera.viewportHeight;}
+ public void setFontColor(int r, int g, int b) {
+ Assets.minecraftFont.setColor(r/255f, g/255f, b/255f, 1f);
+ }
+
+ public void drawString(String str, float x, float y) {
+ Assets.minecraftFont.draw(spriteBatch, str, x, y);
+ }
+
public abstract void render();
}
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameInput.java b/core/src/ru/deadsoftware/cavecraft/game/GameInput.java
index 3e72368c319ef927efe0492d639a38d86b5d35ba..f05f56376d3524625ef798a10b49b34dcb12651d 100644 (file)
case Input.Keys.N:
CaveGame.STATE = GameState.RESTART;
+ break;
+
+ case Input.Keys.ESCAPE: case Input.Keys.BACK:
+ CaveGame.STATE = GameState.GOTO_MENU;
+ break;
}
}
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameProc.java b/core/src/ru/deadsoftware/cavecraft/game/GameProc.java
index 2cdc302291cac2ec1c3faf961c5a8285cd261b13..b100ddc77251572ddee3e4e54d8cde36ce5e2542 100644 (file)
public GameProc() {
world = new GameWorld(1024,256);
- renderer = new GameRenderer(this);
+ if (CaveGame.TOUCH) {
+ renderer = new GameRenderer(this,320,
+ 320*((float)GameScreen.getHeight()/GameScreen.getWidth()));
+ } else {
+ renderer = new GameRenderer(this,480,
+ 480*((float)GameScreen.getHeight()/GameScreen.getWidth()));
+ }
physics = new GamePhysics(this);
player = new Player(world.getSpawnPoint());
mobs = new Array<Mob>();
}
public void resetRenderer() {
- renderer = new GameRenderer(this);
+ if (CaveGame.TOUCH) {
+ renderer = new GameRenderer(this,320,
+ 320*((float)GameScreen.getHeight()/GameScreen.getWidth()));
+ } else {
+ renderer = new GameRenderer(this,480,
+ 480*((float)GameScreen.getHeight()/GameScreen.getWidth()));
+ }
}
private boolean isAutoselectable(int x, int y) {
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java b/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java
index e64ed135335265ce1d48948e10af7c1c0e7cac11..a1a4c66bd93cd9a6489f0a545929d8fce1fab475 100644 (file)
private GameProc gameProc;
- public OrthographicCamera fontCam;
- SpriteBatch fontBatch;
-
- public GameRenderer(GameProc gameProc) {
+ public GameRenderer(GameProc gameProc,float width, float heigth) {
+ super(width,heigth);
Gdx.gl.glClearColor(0f,.6f,.6f,1f);
this.gameProc = gameProc;
- camera = new OrthographicCamera();
- if (!CaveGame.TOUCH) {
- camera.setToOrtho(true, 480,
- 480 * ((float) GameScreen.getHeight() / GameScreen.getWidth()));
- } else {
- camera.setToOrtho(true, 320,
- 320 * ((float) GameScreen.getHeight() / GameScreen.getWidth()));
- }
- shapeRenderer = new ShapeRenderer();
- shapeRenderer.setProjectionMatrix(camera.combined);
- shapeRenderer.setAutoShapeType(true);
- spriteBatch = new SpriteBatch();
- spriteBatch.setProjectionMatrix(camera.combined);
-
- fontCam = new OrthographicCamera();
- fontCam.setToOrtho(true, GameScreen.getWidth(), GameScreen.getHeight());
- fontBatch = new SpriteBatch();
- fontBatch.setProjectionMatrix(fontCam.combined);
- }
-
- private void setFontColor(int r, int g, int b) {
- Assets.minecraftFont.setColor(r/255f, g/255f, b/255f, 1f);
- }
-
- private void drawString(String str, float x, float y) {
- Assets.minecraftFont.draw(fontBatch, str, x, y);
}
private void drawWorldBackground() {
drawCreative();
break;
}
- spriteBatch.end();
- if (CaveGame.TOUCH) {
- spriteBatch.begin();
- drawTouchGui();
- spriteBatch.end();
- }
+ if (CaveGame.TOUCH) drawTouchGui();
- fontBatch.begin();
setFontColor(255,255,255);
drawString("CaveCraft "+CaveGame.VERSION, 0, 0);
- drawString("FPS: "+GameScreen.FPS, 0, 20);
- drawString("X: "+(int)(gameProc.player.position.x/16), 0, 40);
- drawString("Y: "+(gameProc.world.getHeight()-(int)(gameProc.player.position.y/16)), 0, 60);
- drawString("Seed: "+WorldGen.getSeed(), 0, 80);
- drawString("Mobs: "+gameProc.mobs.size, 0, 100);
- fontBatch.end();
+ drawString("FPS: "+GameScreen.FPS, 0, 12);
+ drawString("X: "+(int)(gameProc.player.position.x/16), 0, 24);
+ drawString("Y: "+(gameProc.world.getHeight()-(int)(gameProc.player.position.y/16)), 0, 36);
+ drawString("Seed: "+WorldGen.getSeed(), 0, 48);
+ drawString("Mobs: "+gameProc.mobs.size, 0, 60);
+
+ spriteBatch.end();
}
}
diff --git a/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java b/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java
index 0f8011d2bac8184e66f5ac1433883255e6fcca57..76f2355760cbf15245cfb5b8fad6bbc526839f63 100644 (file)
package ru.deadsoftware.cavecraft.menu;
-import ru.deadsoftware.cavecraft.Assets;
-import ru.deadsoftware.cavecraft.GameScreen;
-import ru.deadsoftware.cavecraft.Items;
-import ru.deadsoftware.cavecraft.Renderer;
+import com.badlogic.gdx.Gdx;
+import com.badlogic.gdx.utils.Array;
+import ru.deadsoftware.cavecraft.*;
+import ru.deadsoftware.cavecraft.menu.objects.Button;
public class MenuRenderer extends Renderer {
- public MenuRenderer() {
- super(480,480*((float) GameScreen.getHeight()/GameScreen.getWidth()));
+ public Array<Button> buttons;
+
+ public MenuRenderer(int width) {
+ super(width,width*((float) GameScreen.getHeight()/GameScreen.getWidth()));
+ buttons = new Array<Button>();
+ buttons.add(new Button("Play", getWidth()/2-100, getHeight()/4));
+ buttons.add(new Button("Quit", getWidth()/2-100, getHeight()/4+30));
+ }
+
+ public void buttonClicked(Button button) {
+ if (button.getLabel().toLowerCase().equals("play")) {
+ CaveGame.STATE = GameState.RESTART;
+ } else if (button.getLabel().toLowerCase().equals("quit")) {
+ Gdx.app.exit();
+ }
+ }
+
+ private void drawButton(Button button) {
+ spriteBatch.draw(Assets.menuButton[button.getType()], button.getX(), button.getY());
+ drawString(button.getLabel(),
+ (button.getX()+button.getWidth()/2)-Assets.getStringWidth(button.getLabel())/2,
+ (button.getY()+button.getHeight()/2)-Assets.getStringHeight(button.getLabel())/2);
}
@Override
for (int y=0; y<=getHeight(); y++)
spriteBatch.draw(Items.BLOCKS.get("dirt").getTexture(),x*16,y*16);
spriteBatch.draw(Assets.gameLogo, getWidth()/2-Assets.gameLogo.getWidth()/2, 0);
+ for (Button button : buttons) {
+ if (button.getRect().contains(Gdx.input.getX()*getWidth()/GameScreen.getWidth(),
+ Gdx.input.getY()*getHeight()/GameScreen.getHeight()) && button.getType()>0) {
+ button.setType(2);
+ } else {
+ button.setType(1);
+ }
+ drawButton(button);
+ }
+ drawString("CaveCraft "+CaveGame.VERSION,0,
+ getHeight()-Assets.getStringHeight("CaveCraft "+CaveGame.VERSION)*2);
spriteBatch.end();
}
}
diff --git a/core/src/ru/deadsoftware/cavecraft/menu/objects/Button.java b/core/src/ru/deadsoftware/cavecraft/menu/objects/Button.java
index a2835fc90899a41d000c93a772ab5156e4961668..b6810a704547ddda85a72200e8559a94473b0c04 100644 (file)
package ru.deadsoftware.cavecraft.menu.objects;
+import com.badlogic.gdx.math.Rectangle;
+
public class Button {
+
+ private Rectangle rect;
+ private String label;
+ private int type;
+
+ public Button(String label, float x, float y, float width, float heigth, int type) {
+ this.label = label;
+ rect = new Rectangle(x, y, width, heigth);
+ this.type = type;
+ }
+
+ public Button(String label, float x, float y, float width, float heigth) {
+ this(label, x, y, width, heigth, 1);
+ }
+
+ public Button(String label, float x, float y) {
+ this(label, x, y, 200, 20, 1);
+ }
+
+ public Rectangle getRect() {
+ return rect;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public float getX() {
+ return rect.x;
+ }
+
+ public float getY() {
+ return rect.y;
+ }
+
+ public float getWidth() {
+ return rect.width;
+ }
+
+ public float getHeight() {
+ return rect.height;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public void setType(int type) {
+ this.type = type;
+ }
+
}