From 06d6a9630cb5821ffe634d66d403e3e7509db0c6 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Fri, 31 Jan 2020 20:27:53 +0400 Subject: [PATCH] Add new font --- android/assets/Retro_Font.fnt | 102 ++++++++++++++++++ android/assets/Retro_Font.png | Bin 0 -> 2879 bytes .../com/me/asteroids/screens/GameScreen.java | 6 +- .../me/asteroids/desktop/DesktopLauncher.java | 5 +- 4 files changed, 108 insertions(+), 5 deletions(-) create mode 100644 android/assets/Retro_Font.fnt create mode 100644 android/assets/Retro_Font.png diff --git a/android/assets/Retro_Font.fnt b/android/assets/Retro_Font.fnt new file mode 100644 index 0000000..6df3179 --- /dev/null +++ b/android/assets/Retro_Font.fnt @@ -0,0 +1,102 @@ +info face="Retro Gaming" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-1,-1 +common lineHeight=42 base=32 scaleW=256 scaleH=256 pages=1 packed=0 +page id=0 file="Retro_Font.png" +chars count=97 +char id=0 x=0 y=0 width=15 height=43 xoffset=4 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=10 x=0 y=0 width=15 height=43 xoffset=4 yoffset=-1 xadvance=20 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=246 y=69 width=8 height=26 xoffset=2 yoffset=7 xadvance=11 page=0 chnl=0 +char id=34 x=218 y=173 width=17 height=11 xoffset=2 yoffset=7 xadvance=20 page=0 chnl=0 +char id=35 x=22 y=147 width=31 height=26 xoffset=2 yoffset=7 xadvance=34 page=0 chnl=0 +char id=36 x=15 y=0 width=22 height=38 xoffset=2 yoffset=1 xadvance=25 page=0 chnl=0 +char id=37 x=0 y=147 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=38 x=53 y=147 width=26 height=26 xoffset=2 yoffset=7 xadvance=29 page=0 chnl=0 +char id=39 x=242 y=147 width=8 height=11 xoffset=2 yoffset=7 xadvance=11 page=0 chnl=0 +char id=40 x=238 y=95 width=14 height=26 xoffset=2 yoffset=7 xadvance=17 page=0 chnl=0 +char id=41 x=110 y=121 width=14 height=26 xoffset=2 yoffset=7 xadvance=17 page=0 chnl=0 +char id=42 x=193 y=173 width=25 height=17 xoffset=2 yoffset=10 xadvance=28 page=0 chnl=0 +char id=43 x=174 y=173 width=19 height=17 xoffset=2 yoffset=11 xadvance=22 page=0 chnl=0 +char id=44 x=0 y=190 width=11 height=11 xoffset=-1 yoffset=25 xadvance=11 page=0 chnl=0 +char id=45 x=77 y=190 width=14 height=5 xoffset=2 yoffset=17 xadvance=17 page=0 chnl=0 +char id=46 x=69 y=190 width=8 height=8 xoffset=2 yoffset=25 xadvance=11 page=0 chnl=0 +char id=47 x=180 y=121 width=23 height=26 xoffset=2 yoffset=7 xadvance=26 page=0 chnl=0 +char id=48 x=66 y=121 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=49 x=114 y=95 width=14 height=26 xoffset=2 yoffset=7 xadvance=17 page=0 chnl=0 +char id=50 x=128 y=95 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=51 x=150 y=95 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=52 x=172 y=95 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=53 x=194 y=95 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=54 x=216 y=95 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=55 x=0 y=121 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=56 x=22 y=121 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=57 x=44 y=121 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=58 x=124 y=147 width=8 height=20 xoffset=2 yoffset=13 xadvance=11 page=0 chnl=0 +char id=59 x=79 y=147 width=11 height=23 xoffset=-1 yoffset=13 xadvance=11 page=0 chnl=0 +char id=60 x=90 y=147 width=17 height=23 xoffset=2 yoffset=10 xadvance=20 page=0 chnl=0 +char id=61 x=33 y=190 width=17 height=11 xoffset=2 yoffset=16 xadvance=20 page=0 chnl=0 +char id=62 x=107 y=147 width=17 height=23 xoffset=2 yoffset=10 xadvance=20 page=0 chnl=0 +char id=63 x=88 y=121 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=64 x=203 y=121 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=65 x=62 y=0 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=66 x=84 y=0 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=67 x=106 y=0 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=68 x=128 y=0 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=69 x=150 y=0 width=23 height=26 xoffset=2 yoffset=7 xadvance=26 page=0 chnl=0 +char id=70 x=173 y=0 width=23 height=26 xoffset=2 yoffset=7 xadvance=26 page=0 chnl=0 +char id=71 x=196 y=0 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=72 x=218 y=0 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=73 x=0 y=43 width=19 height=26 xoffset=2 yoffset=7 xadvance=22 page=0 chnl=0 +char id=74 x=19 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=75 x=41 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=76 x=63 y=43 width=20 height=26 xoffset=2 yoffset=7 xadvance=23 page=0 chnl=0 +char id=77 x=83 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=78 x=105 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=79 x=127 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=80 x=149 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=81 x=171 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=82 x=193 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=83 x=215 y=43 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=84 x=0 y=69 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=85 x=22 y=69 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=86 x=44 y=69 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=87 x=66 y=69 width=25 height=26 xoffset=2 yoffset=7 xadvance=28 page=0 chnl=0 +char id=88 x=91 y=69 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=89 x=113 y=69 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=90 x=135 y=69 width=23 height=26 xoffset=2 yoffset=7 xadvance=26 page=0 chnl=0 +char id=91 x=124 y=121 width=14 height=26 xoffset=2 yoffset=7 xadvance=17 page=0 chnl=0 +char id=92 x=225 y=121 width=23 height=26 xoffset=2 yoffset=7 xadvance=26 page=0 chnl=0 +char id=93 x=138 y=121 width=14 height=26 xoffset=2 yoffset=7 xadvance=17 page=0 chnl=0 +char id=94 x=11 y=190 width=22 height=11 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=95 x=91 y=190 width=17 height=5 xoffset=2 yoffset=28 xadvance=20 page=0 chnl=0 +char id=96 x=235 y=173 width=14 height=11 xoffset=2 yoffset=7 xadvance=17 page=0 chnl=0 +char id=97 x=132 y=147 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=98 x=158 y=69 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=99 x=154 y=147 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=100 x=180 y=69 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=101 x=176 y=147 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=102 x=237 y=43 width=17 height=26 xoffset=2 yoffset=7 xadvance=20 page=0 chnl=0 +char id=103 x=202 y=69 width=22 height=26 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=104 x=224 y=69 width=22 height=26 xoffset=2 yoffset=7 xadvance=25 page=0 chnl=0 +char id=105 x=240 y=0 width=8 height=26 xoffset=2 yoffset=7 xadvance=11 page=0 chnl=0 +char id=106 x=45 y=0 width=17 height=29 xoffset=2 yoffset=7 xadvance=20 page=0 chnl=0 +char id=107 x=0 y=95 width=20 height=26 xoffset=2 yoffset=7 xadvance=23 page=0 chnl=0 +char id=108 x=20 y=95 width=11 height=26 xoffset=2 yoffset=7 xadvance=14 page=0 chnl=0 +char id=109 x=198 y=147 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=110 x=220 y=147 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=111 x=0 y=173 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=112 x=31 y=95 width=22 height=26 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=113 x=53 y=95 width=22 height=26 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=114 x=22 y=173 width=20 height=17 xoffset=2 yoffset=16 xadvance=23 page=0 chnl=0 +char id=115 x=42 y=173 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=116 x=75 y=95 width=17 height=26 xoffset=2 yoffset=7 xadvance=20 page=0 chnl=0 +char id=117 x=64 y=173 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=118 x=86 y=173 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=119 x=108 y=173 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=120 x=130 y=173 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=121 x=92 y=95 width=22 height=26 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=122 x=152 y=173 width=22 height=17 xoffset=2 yoffset=16 xadvance=25 page=0 chnl=0 +char id=123 x=152 y=121 width=14 height=26 xoffset=2 yoffset=7 xadvance=17 page=0 chnl=0 +char id=124 x=37 y=0 width=8 height=32 xoffset=2 yoffset=7 xadvance=11 page=0 chnl=0 +char id=125 x=166 y=121 width=14 height=26 xoffset=2 yoffset=7 xadvance=17 page=0 chnl=0 +char id=126 x=50 y=190 width=19 height=11 xoffset=2 yoffset=13 xadvance=22 page=0 chnl=0 +kernings count=0 diff --git a/android/assets/Retro_Font.png b/android/assets/Retro_Font.png new file mode 100644 index 0000000000000000000000000000000000000000..e05f28feeb724c39fe531cf3b80c6e97d95f1418 GIT binary patch literal 2879 zcmb_eiC!0U2zH5pqCB?jkG>HMpe*mab@Q%xo}jDYw1F4G8dExGv-Mz_viw)X!F6Lh zTkQRgYp7`MAUNRHQW~YywHEau=PY>-SW>Fndi4P+VemvK;j6t{Lp06qcIbr!m)sqa zl zc35ArQ`{2a$h};}j0{go7f3drZ0ft0;WAt{WiuLlFDp)Crnl`yf+F0GGsVP%1QEUq zo0@&gVQlj1mcxE%F$TV*k7r-+0I%(A_cr|gmxgXV(|JunOOsW9zq(}l!JUykdWU3O zh*Fh(Qssb>S2=4X+;(X^ew8|!z2>*z{5NtdG8o*>?&?<_Q}*e#DG`d0YG>+8k$fay z?@`N?n#eNfsRY*F7Rh431_JesGm9R`PcG~K)r}8FaP&Z}3I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yb21aoM^zvJqybRROdXb#5|AJ-ONp{Nq epI@uuqzaBYxk~Pr?80Tzowx1STDHaS`2PT{K})*; literal 0 HcmV?d00001 diff --git a/core/src/com/me/asteroids/screens/GameScreen.java b/core/src/com/me/asteroids/screens/GameScreen.java index ac08f61..01bd4cd 100644 --- a/core/src/com/me/asteroids/screens/GameScreen.java +++ b/core/src/com/me/asteroids/screens/GameScreen.java @@ -56,8 +56,8 @@ public class GameScreen extends Screen implements Listener { @Override public void setup() { - batch = new SpriteBatch(); - font = new BitmapFont(); + batch = graphics.getUISpriteBatch(); + font = new BitmapFont(Gdx.files.internal("Retro_Font.fnt")); engine = new Engine(); @@ -113,7 +113,7 @@ public class GameScreen extends Screen implements Listener { @Override public void dispose() { - + font.dispose(); } private class EventListener implements Listener { diff --git a/desktop/src/com/me/asteroids/desktop/DesktopLauncher.java b/desktop/src/com/me/asteroids/desktop/DesktopLauncher.java index c7ad0f4..1c80689 100644 --- a/desktop/src/com/me/asteroids/desktop/DesktopLauncher.java +++ b/desktop/src/com/me/asteroids/desktop/DesktopLauncher.java @@ -8,9 +8,10 @@ public class DesktopLauncher { public static void main (String[] arg) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); config.title = "Asteroids"; - config.resizable = false; + config.resizable = true; +// config.fullscreen = false; config.width = 800; - config.height = 600; + config.height = 400; new LwjglApplication(new Asteroids(), config); } }