diff --git a/CMakeLists.txt b/CMakeLists.txt index 226a0e6..b8ab053 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,11 @@ endfunction() add_subdirectory(engine) # この章のデモ / this chapter's demo -add_executable(game demo/main.cc) +add_executable(game + demo/main.cc + demo/title_scene.cc + demo/playground_scene.cc + demo/pause_scene.cc) target_link_libraries(game PRIVATE engine) enable_warnings(game) set_working_directory(game) diff --git a/assets/LICENSE.txt b/assets/LICENSE.txt index 57842d5..08280e5 100644 --- a/assets/LICENSE.txt +++ b/assets/LICENSE.txt @@ -20,5 +20,173 @@ models/barrel.glb 樽(PBRのテクスチャ付き) / a barrel wit textures/leaves.png 葉(アルファ付き) / leaves with alpha (chapter 23) sprites/hero.png ピクセルアートの主人公(16×16、7コマ) / pixel-art hero (16×16, 7 frames) (chapter 25) sprites/objects.png/.atlas タイル・コイン・宝石・スライムなど / tiles, coins, gems, slime... (chapter 25) -sprites/objects_nopad.* 隙間なしのタイル(にじみの例) / tiles without gaps (the bleeding example) (chapter 25) -sprites/pixfont.png 3×5のピクセルフォント / a 3×5 pixel font (chapter 25) +fonts/pixfont.png, pixel5.fnt 3×5のピクセルフォント / a 3×5 pixel font (chapters 25-26) +fonts/mono16.png/.fnt ビットマップフォント16 px(アンチエイリアス) / bitmap font, 16 px, antialiased (chapter 26) +fonts/pixel12.png/.fnt ビットマップフォント12 px(1ビット、ピクセルアート用) / bitmap font, 12 px, 1-bit, for pixel art (chapter 26) + +フォントの画像(fonts/mono16.png、fonts/pixel12.png)について / About the font images (fonts/mono16.png, fonts/pixel12.png): +これらは次の2つのフォントから文字を画像にしたもの(フォントのファイル自体は含まない) / they contain glyph images +rasterized from the two fonts below (the font files themselves are not included): + * ASCIIの文字と×・÷ / the ASCII characters and × ÷: DejaVu Sans Mono 2.37 (https://dejavu-fonts.github.io/), + under the Bitstream Vera Fonts license (full notice 1 below). + * 日本語の文字(かな・カナ・記号・漢字の一部) / the Japanese characters (kana, punctuation and a kanji subset): + Noto Sans CJK JP Regular (https://github.com/notofonts/noto-cjk), under the SIL Open Font License, + Version 1.1 (full text 2 below). +これらの画像を配るときは、このファイルも一緒に配ること / ship this file together with these images. + + +============================================================================== +1. DejaVu Sans Mono: Bitstream Vera Fonts license +============================================================================== + +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. + +Bitstream Vera Fonts Copyright +------------------------------ + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is +a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated +documentation files (the "Font Software"), to reproduce and distribute the +Font Software, including without limitation the rights to use, copy, merge, +publish, distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to the +following conditions: + +The above copyright and trademark notices and this permission notice shall +be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional glyphs or characters may be added to the Fonts, only if the fonts +are renamed to names not containing either the words "Bitstream" or the word +"Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream +Vera" names. + +The Font Software may be sold as part of a larger software package but no +copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME +FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING +ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE +FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome +Foundation, and Bitstream Inc., shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this Font Software +without prior written authorization from the Gnome Foundation or Bitstream +Inc., respectively. For further information, contact: fonts at gnome dot +org. + + +============================================================================== +2. Noto Sans CJK JP: SIL Open Font License, Version 1.1 +============================================================================== + +Copyright © 2014-2021 Adobe (http://www.adobe.com/). +Noto is a trademark of Google Inc. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE + +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font +creation efforts of academic and linguistic communities, and to provide +a free and open framework in which fonts may be shared and improved in +partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply to +any document created using the fonts or their derivatives. + +DEFINITIONS + +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components +as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, +deleting, or substituting -- in part or in whole -- any of the +components of the Original Version, by changing formats or by porting +the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer +or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS + +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in +Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the +corresponding Copyright Holder. This restriction only applies to the +primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, must +be distributed entirely under this license, and must not be distributed +under any other license. The requirement for fonts to remain under this +license does not apply to any document created using the Font Software. + +TERMINATION + +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/mono16.fnt b/assets/fonts/mono16.fnt new file mode 100644 index 0000000..062d3e0 --- /dev/null +++ b/assets/fonts/mono16.fnt @@ -0,0 +1,558 @@ +info face="DejaVu Sans Mono + Noto Sans CJK JP" size=16 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=2,2 +common lineHeight=20 base=15 scaleW=512 scaleH=512 pages=1 packed=0 +page id=0 file="mono16.png" +chars count=554 +char id=32 x=1 y=1 width=0 height=0 xoffset=0 yoffset=15 xadvance=10 page=0 chnl=15 +char id=33 x=3 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=34 x=15 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=35 x=27 y=1 width=10 height=11 xoffset=0 yoffset=4 xadvance=10 page=0 chnl=15 +char id=36 x=39 y=1 width=10 height=14 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=37 x=51 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=38 x=63 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=39 x=75 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=40 x=87 y=1 width=10 height=14 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=41 x=99 y=1 width=10 height=14 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=42 x=111 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=43 x=123 y=1 width=10 height=8 xoffset=0 yoffset=7 xadvance=10 page=0 chnl=15 +char id=44 x=135 y=1 width=10 height=5 xoffset=0 yoffset=13 xadvance=10 page=0 chnl=15 +char id=45 x=147 y=1 width=10 height=5 xoffset=0 yoffset=10 xadvance=10 page=0 chnl=15 +char id=46 x=159 y=1 width=10 height=2 xoffset=0 yoffset=13 xadvance=10 page=0 chnl=15 +char id=47 x=171 y=1 width=10 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=48 x=183 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=49 x=195 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=50 x=207 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=51 x=219 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=52 x=231 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=53 x=243 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=54 x=255 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=55 x=267 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=56 x=279 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=57 x=291 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=58 x=303 y=1 width=10 height=8 xoffset=0 yoffset=7 xadvance=10 page=0 chnl=15 +char id=59 x=315 y=1 width=10 height=11 xoffset=0 yoffset=7 xadvance=10 page=0 chnl=15 +char id=60 x=327 y=1 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=61 x=339 y=1 width=10 height=7 xoffset=0 yoffset=8 xadvance=10 page=0 chnl=15 +char id=62 x=351 y=1 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=63 x=363 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=64 x=375 y=1 width=10 height=14 xoffset=0 yoffset=4 xadvance=10 page=0 chnl=15 +char id=65 x=387 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=66 x=399 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=67 x=411 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=68 x=423 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=69 x=435 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=70 x=447 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=71 x=459 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=72 x=471 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=73 x=483 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=74 x=495 y=1 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=75 x=1 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=76 x=13 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=77 x=25 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=78 x=37 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=79 x=49 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=80 x=61 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=81 x=73 y=17 width=10 height=14 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=82 x=85 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=83 x=97 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=84 x=109 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=85 x=121 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=86 x=133 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=87 x=145 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=88 x=157 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=89 x=169 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=90 x=181 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=91 x=193 y=17 width=10 height=14 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=92 x=205 y=17 width=10 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=93 x=217 y=17 width=10 height=14 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=94 x=229 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=95 x=241 y=17 width=10 height=4 xoffset=0 yoffset=15 xadvance=10 page=0 chnl=15 +char id=96 x=253 y=17 width=10 height=13 xoffset=0 yoffset=2 xadvance=10 page=0 chnl=15 +char id=97 x=265 y=17 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=98 x=277 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=99 x=289 y=17 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=100 x=301 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=101 x=313 y=17 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=102 x=325 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=103 x=337 y=17 width=10 height=12 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=104 x=349 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=105 x=361 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=106 x=373 y=17 width=10 height=15 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=107 x=385 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=108 x=397 y=17 width=10 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=109 x=409 y=17 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=110 x=421 y=17 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=111 x=433 y=17 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=112 x=445 y=17 width=10 height=12 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=113 x=457 y=17 width=10 height=12 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=114 x=469 y=17 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=115 x=481 y=17 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=116 x=493 y=17 width=10 height=11 xoffset=0 yoffset=4 xadvance=10 page=0 chnl=15 +char id=117 x=1 y=34 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=118 x=13 y=34 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=119 x=25 y=34 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=120 x=37 y=34 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=121 x=49 y=34 width=10 height=12 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=122 x=61 y=34 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=123 x=73 y=34 width=10 height=15 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=124 x=85 y=34 width=10 height=16 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=125 x=97 y=34 width=10 height=15 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15 +char id=126 x=109 y=34 width=10 height=6 xoffset=0 yoffset=9 xadvance=10 page=0 chnl=15 +char id=12353 x=121 y=34 width=16 height=12 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12354 x=139 y=34 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12355 x=157 y=34 width=16 height=11 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12356 x=175 y=34 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12357 x=193 y=34 width=16 height=13 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12358 x=211 y=34 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12359 x=229 y=34 width=16 height=13 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12360 x=247 y=34 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12361 x=265 y=34 width=16 height=13 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12362 x=283 y=34 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12363 x=301 y=34 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12364 x=319 y=34 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12365 x=337 y=34 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12366 x=355 y=34 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12367 x=373 y=34 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12368 x=391 y=34 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12369 x=409 y=34 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12370 x=427 y=34 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12371 x=445 y=34 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12372 x=463 y=34 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12373 x=481 y=34 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12374 x=1 y=52 width=16 height=17 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=15 +char id=12375 x=19 y=52 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12376 x=37 y=52 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12377 x=55 y=52 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12378 x=73 y=52 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12379 x=91 y=52 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12380 x=109 y=52 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12381 x=127 y=52 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12382 x=145 y=52 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12383 x=163 y=52 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12384 x=181 y=52 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12385 x=199 y=52 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12386 x=217 y=52 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12387 x=235 y=52 width=16 height=10 xoffset=0 yoffset=6 xadvance=16 page=0 chnl=15 +char id=12388 x=253 y=52 width=16 height=12 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12389 x=271 y=52 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12390 x=289 y=52 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12391 x=307 y=52 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12392 x=325 y=52 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12393 x=343 y=52 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12394 x=361 y=52 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12395 x=379 y=52 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12396 x=397 y=52 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12397 x=415 y=52 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12398 x=433 y=52 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12399 x=451 y=52 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12400 x=469 y=52 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12401 x=487 y=52 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12402 x=1 y=71 width=16 height=14 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12403 x=19 y=71 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12404 x=37 y=71 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12405 x=55 y=71 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12406 x=73 y=71 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12407 x=91 y=71 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12408 x=109 y=71 width=16 height=11 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12409 x=127 y=71 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12410 x=145 y=71 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12411 x=163 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12412 x=181 y=71 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12413 x=199 y=71 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12414 x=217 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12415 x=235 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12416 x=253 y=71 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12417 x=271 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12418 x=289 y=71 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12419 x=307 y=71 width=16 height=13 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12420 x=325 y=71 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12421 x=343 y=71 width=16 height=13 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12422 x=361 y=71 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12423 x=379 y=71 width=16 height=13 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12424 x=397 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12425 x=415 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12426 x=433 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12427 x=451 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12428 x=469 y=71 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12429 x=487 y=71 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12430 x=1 y=89 width=16 height=13 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12431 x=19 y=89 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12432 x=37 y=89 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12433 x=55 y=89 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12434 x=73 y=89 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12435 x=91 y=89 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12436 x=109 y=89 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12437 x=127 y=89 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12438 x=145 y=89 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12445 x=163 y=89 width=16 height=11 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12446 x=181 y=89 width=16 height=12 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12449 x=199 y=89 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12450 x=217 y=89 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12451 x=235 y=89 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12452 x=253 y=89 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12453 x=271 y=89 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12454 x=289 y=89 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12455 x=307 y=89 width=16 height=10 xoffset=0 yoffset=6 xadvance=16 page=0 chnl=15 +char id=12456 x=325 y=89 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12457 x=343 y=89 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12458 x=361 y=89 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12459 x=379 y=89 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12460 x=397 y=89 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12461 x=415 y=89 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12462 x=433 y=89 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12463 x=451 y=89 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12464 x=469 y=89 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12465 x=487 y=89 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12466 x=1 y=107 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12467 x=19 y=107 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12468 x=37 y=107 width=16 height=17 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=15 +char id=12469 x=55 y=107 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12470 x=73 y=107 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12471 x=91 y=107 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12472 x=109 y=107 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12473 x=127 y=107 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12474 x=145 y=107 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12475 x=163 y=107 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12476 x=181 y=107 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12477 x=199 y=107 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12478 x=217 y=107 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12479 x=235 y=107 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12480 x=253 y=107 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12481 x=271 y=107 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12482 x=289 y=107 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12483 x=307 y=107 width=16 height=11 xoffset=0 yoffset=6 xadvance=16 page=0 chnl=15 +char id=12484 x=325 y=107 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12485 x=343 y=107 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12486 x=361 y=107 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12487 x=379 y=107 width=16 height=17 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=15 +char id=12488 x=397 y=107 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12489 x=415 y=107 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12490 x=433 y=107 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12491 x=451 y=107 width=16 height=11 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12492 x=469 y=107 width=16 height=14 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12493 x=487 y=107 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12494 x=1 y=126 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12495 x=19 y=126 width=16 height=12 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12496 x=37 y=126 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12497 x=55 y=126 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12498 x=73 y=126 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12499 x=91 y=126 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12500 x=109 y=126 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12501 x=127 y=126 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12502 x=145 y=126 width=16 height=17 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=15 +char id=12503 x=163 y=126 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12504 x=181 y=126 width=16 height=11 xoffset=0 yoffset=4 xadvance=16 page=0 chnl=15 +char id=12505 x=199 y=126 width=16 height=12 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12506 x=217 y=126 width=16 height=12 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12507 x=235 y=126 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12508 x=253 y=126 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12509 x=271 y=126 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12510 x=289 y=126 width=16 height=14 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12511 x=307 y=126 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12512 x=325 y=126 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12513 x=343 y=126 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12514 x=361 y=126 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12515 x=379 y=126 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12516 x=397 y=126 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12517 x=415 y=126 width=16 height=10 xoffset=0 yoffset=6 xadvance=16 page=0 chnl=15 +char id=12518 x=433 y=126 width=16 height=12 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12519 x=451 y=126 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12520 x=469 y=126 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12521 x=487 y=126 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12522 x=1 y=145 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12523 x=19 y=145 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12524 x=37 y=145 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12525 x=55 y=145 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12526 x=73 y=145 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12527 x=91 y=145 width=16 height=14 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12528 x=109 y=145 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12529 x=127 y=145 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12530 x=145 y=145 width=16 height=14 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12531 x=163 y=145 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12532 x=181 y=145 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12533 x=199 y=145 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12534 x=217 y=145 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12535 x=235 y=145 width=16 height=17 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=15 +char id=12536 x=253 y=145 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12537 x=271 y=145 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12538 x=289 y=145 width=16 height=17 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=15 +char id=12540 x=307 y=145 width=16 height=8 xoffset=0 yoffset=7 xadvance=16 page=0 chnl=15 +char id=12541 x=325 y=145 width=16 height=9 xoffset=0 yoffset=6 xadvance=16 page=0 chnl=15 +char id=12542 x=343 y=145 width=16 height=12 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12289 x=361 y=145 width=16 height=5 xoffset=0 yoffset=12 xadvance=16 page=0 chnl=15 +char id=12290 x=379 y=145 width=16 height=6 xoffset=0 yoffset=11 xadvance=16 page=0 chnl=15 +char id=12539 x=397 y=145 width=16 height=8 xoffset=0 yoffset=7 xadvance=16 page=0 chnl=15 +char id=12300 x=415 y=145 width=16 height=14 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12301 x=433 y=145 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=12302 x=451 y=145 width=16 height=14 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12303 x=469 y=145 width=16 height=12 xoffset=0 yoffset=5 xadvance=16 page=0 chnl=15 +char id=65288 x=487 y=145 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=65289 x=1 y=164 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=12304 x=19 y=164 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12305 x=37 y=164 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=12316 x=55 y=164 width=16 height=9 xoffset=0 yoffset=6 xadvance=16 page=0 chnl=15 +char id=8230 x=73 y=164 width=16 height=7 xoffset=0 yoffset=8 xadvance=16 page=0 chnl=15 +char id=65281 x=91 y=164 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=65311 x=109 y=164 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=65306 x=127 y=164 width=16 height=12 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=65291 x=145 y=164 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=65293 x=163 y=164 width=16 height=7 xoffset=0 yoffset=8 xadvance=16 page=0 chnl=15 +char id=215 x=181 y=164 width=10 height=9 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15 +char id=247 x=193 y=164 width=10 height=8 xoffset=0 yoffset=7 xadvance=10 page=0 chnl=15 +char id=65309 x=205 y=164 width=16 height=9 xoffset=0 yoffset=6 xadvance=16 page=0 chnl=15 +char id=65285 x=223 y=164 width=16 height=12 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=65286 x=241 y=164 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=65283 x=259 y=164 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=65290 x=277 y=164 width=16 height=13 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=12288 x=295 y=164 width=0 height=0 xoffset=0 yoffset=15 xadvance=16 page=0 chnl=15 +char id=38283 x=297 y=164 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=22987 x=315 y=164 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=32066 x=333 y=164 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20102 x=351 y=164 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=19968 x=369 y=164 width=16 height=7 xoffset=0 yoffset=8 xadvance=16 page=0 chnl=15 +char id=26178 x=387 y=164 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20572 x=405 y=164 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27490 x=423 y=164 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20877 x=441 y=164 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=32154 x=459 y=164 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=34892 x=477 y=164 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24471 x=495 y=164 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=28857 x=1 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26368 x=19 y=183 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=39640 x=37 y=183 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27531 x=55 y=183 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27231 x=73 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20307 x=91 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21147 x=109 y=183 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21629 x=127 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21213 x=145 y=183 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21033 x=163 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25943 x=181 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21271 x=199 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24341 x=217 y=183 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20998 x=235 y=183 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27425 x=253 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38754 x=271 y=183 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=25147 x=289 y=183 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=36984 x=307 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25246 x=325 y=183 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27770 x=343 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23450 x=361 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35373 x=379 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38899 x=397 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=37327 x=415 y=183 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=36895 x=433 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24230 x=451 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38291 x=469 y=183 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=31186 x=487 y=183 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22238 x=1 y=202 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=20154 x=19 y=202 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=25973 x=37 y=202 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21619 x=55 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26041 x=73 y=202 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23453 x=91 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=31665 x=109 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=37749 x=127 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25161 x=145 y=202 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=26449 x=163 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30010 x=181 y=202 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=26862 x=199 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=36947 x=217 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22478 x=235 y=202 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=29579 x=253 y=202 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=23019 x=271 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21191 x=289 y=202 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=32773 x=307 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21091 x=325 y=202 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30462 x=343 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24339 x=361 y=202 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=30690 x=379 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=34220 x=397 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=33609 x=415 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=37329 x=433 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=37504 x=451 y=202 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=37509 x=469 y=202 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30707 x=487 y=202 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=26408 x=1 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27700 x=19 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=28779 x=37 y=221 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=39080 x=55 y=221 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=22303 x=73 y=221 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20809 x=91 y=221 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38343 x=109 y=221 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=25915 x=127 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25731 x=145 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38450 x=163 y=221 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24481 x=181 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=39764 x=199 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27861 x=217 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25216 x=235 y=221 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24517 x=253 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27578 x=271 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24489 x=289 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27602 x=307 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30496 x=325 y=221 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=27494 x=343 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22120 x=361 y=221 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=20855 x=379 y=221 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=25345 x=397 y=221 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=29289 x=415 y=221 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35013 x=433 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20633 x=451 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=36023 x=469 y=221 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=22770 x=487 y=221 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24215 x=1 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23487 x=19 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23627 x=37 y=240 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=35441 x=55 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=32862 x=73 y=240 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=35211 x=91 y=240 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26469 x=109 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20837 x=127 y=240 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=20986 x=145 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=19978 x=163 y=240 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=19979 x=181 y=240 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=24038 x=199 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21491 x=217 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21069 x=235 y=240 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24460 x=253 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26481 x=271 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35199 x=289 y=240 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=21335 x=307 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25276 x=325 y=240 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38626 x=343 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25163 x=361 y=240 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=36275 x=379 y=240 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=38957 x=397 y=240 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=30446 x=415 y=240 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=21475 x=433 y=240 width=16 height=14 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=15 +char id=32819 x=451 y=240 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=24515 x=469 y=240 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27671 x=487 y=240 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20803 x=1 y=259 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=22825 x=19 y=259 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=22320 x=37 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23665 x=55 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24029 x=73 y=259 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=28023 x=91 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=31354 x=109 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26143 x=127 y=259 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=26376 x=145 y=259 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=26085 x=163 y=259 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=24180 x=181 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20170 x=199 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26397 x=217 y=259 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26172 x=235 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22812 x=253 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=36196 x=271 y=259 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38738 x=289 y=259 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=40644 x=307 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=32209 x=325 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30333 x=343 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=40658 x=361 y=259 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=33394 x=379 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22823 x=397 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23567 x=415 y=259 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20302 x=433 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38263 x=451 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30701 x=469 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26032 x=487 y=259 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21476 x=1 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22810 x=19 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23569 x=37 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26089 x=55 y=278 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=36933 x=73 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24375 x=91 y=278 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24369 x=109 y=278 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=37325 x=127 y=278 width=16 height=15 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=36605 x=145 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=33391 x=163 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24746 x=181 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27491 x=199 y=278 width=16 height=14 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=20840 x=217 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=37096 x=235 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21322 x=253 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25968 x=271 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23383 x=289 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25991 x=307 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35501 x=325 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26360 x=343 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35328 x=361 y=278 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=35486 x=379 y=278 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=33521 x=397 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26412 x=415 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20013 x=433 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22269 x=451 y=278 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=21517 x=469 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30058 x=487 y=278 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21495 x=1 y=297 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=31532 x=19 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=31456 x=37 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35352 x=55 y=297 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=37682 x=73 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20445 x=91 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23384 x=109 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=36796 x=127 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21066 x=145 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38500 x=163 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30011 x=181 y=297 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=34920 x=199 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=31034 x=217 y=297 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=25805 x=235 y=297 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20316 x=253 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35500 x=271 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26126 x=289 y=297 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=36938 x=307 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38627 x=325 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26131 x=343 y=297 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=26222 x=361 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=36890 x=379 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=31777 x=397 y=297 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21336 x=415 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=32244 x=433 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=32722 x=451 y=297 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=23550 x=469 y=297 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25126 x=487 y=297 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35430 x=1 y=316 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21512 x=19 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=36000 x=37 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=28310 x=55 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23436 x=73 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25104 x=91 y=316 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21151 x=109 y=316 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22833 x=127 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24565 x=145 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27515 x=163 y=316 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=29983 x=181 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30772 x=199 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20498 x=217 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24618 x=235 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20027 x=253 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20844 x=271 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20210 x=289 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=26053 x=307 y=316 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20882 x=325 y=316 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=38522 x=343 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=19990 x=361 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=30028 x=379 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22259 x=397 y=316 width=16 height=15 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=37489 x=415 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27934 x=433 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=31391 x=451 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=22612 x=469 y=316 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38272 x=487 y=316 width=16 height=16 xoffset=0 yoffset=2 xadvance=16 page=0 chnl=15 +char id=27211 x=1 y=335 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23478 x=19 y=335 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=23460 x=37 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38542 x=55 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=27573 x=73 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=31348 x=91 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=33853 x=109 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25342 x=127 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=20351 x=145 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25448 x=163 y=335 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=21463 x=181 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=28193 x=199 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=25506 x=217 y=335 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=35519 x=235 y=335 width=16 height=17 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=38598 x=253 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 +char id=24403 x=271 y=335 width=16 height=16 xoffset=0 yoffset=1 xadvance=16 page=0 chnl=15 diff --git a/assets/fonts/mono16.png b/assets/fonts/mono16.png new file mode 100644 index 0000000..a36b433 Binary files /dev/null and b/assets/fonts/mono16.png differ diff --git a/assets/fonts/pixel12.fnt b/assets/fonts/pixel12.fnt new file mode 100644 index 0000000..7e8f5de --- /dev/null +++ b/assets/fonts/pixel12.fnt @@ -0,0 +1,558 @@ +info face="DejaVu Sans Mono + Noto Sans CJK JP" size=12 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=0 aa=1 padding=1,1,1,1 spacing=2,2 +common lineHeight=16 base=12 scaleW=512 scaleH=256 pages=1 packed=0 +page id=0 file="pixel12.png" +chars count=554 +char id=32 x=1 y=1 width=0 height=0 xoffset=0 yoffset=12 xadvance=7 page=0 chnl=15 +char id=33 x=3 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=34 x=12 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=35 x=21 y=1 width=7 height=8 xoffset=0 yoffset=4 xadvance=7 page=0 chnl=15 +char id=36 x=30 y=1 width=7 height=11 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=37 x=39 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=38 x=48 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=39 x=57 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=40 x=66 y=1 width=7 height=11 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=41 x=75 y=1 width=7 height=11 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=42 x=84 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=43 x=93 y=1 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=44 x=102 y=1 width=7 height=3 xoffset=0 yoffset=10 xadvance=7 page=0 chnl=15 +char id=45 x=111 y=1 width=7 height=4 xoffset=0 yoffset=8 xadvance=7 page=0 chnl=15 +char id=46 x=120 y=1 width=7 height=2 xoffset=0 yoffset=10 xadvance=7 page=0 chnl=15 +char id=47 x=129 y=1 width=7 height=10 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=48 x=138 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=49 x=147 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=50 x=156 y=1 width=8 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=51 x=166 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=52 x=175 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=53 x=184 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=54 x=193 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=55 x=202 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=56 x=211 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=57 x=220 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=58 x=229 y=1 width=7 height=6 xoffset=0 yoffset=6 xadvance=7 page=0 chnl=15 +char id=59 x=238 y=1 width=7 height=7 xoffset=0 yoffset=6 xadvance=7 page=0 chnl=15 +char id=60 x=247 y=1 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=61 x=256 y=1 width=7 height=5 xoffset=0 yoffset=7 xadvance=7 page=0 chnl=15 +char id=62 x=265 y=1 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=63 x=274 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=64 x=283 y=1 width=7 height=10 xoffset=0 yoffset=4 xadvance=7 page=0 chnl=15 +char id=65 x=292 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=66 x=301 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=67 x=310 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=68 x=319 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=69 x=328 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=70 x=337 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=71 x=346 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=72 x=355 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=73 x=364 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=74 x=373 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=75 x=382 y=1 width=8 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=76 x=392 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=77 x=401 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=78 x=410 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=79 x=419 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=80 x=428 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=81 x=437 y=1 width=7 height=11 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=82 x=446 y=1 width=8 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=83 x=456 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=84 x=465 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=85 x=474 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=86 x=483 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=87 x=492 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=88 x=501 y=1 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=89 x=1 y=14 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=90 x=10 y=14 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=91 x=19 y=14 width=7 height=11 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=92 x=28 y=14 width=7 height=10 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=93 x=37 y=14 width=7 height=11 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=94 x=46 y=14 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=95 x=55 y=14 width=7 height=3 xoffset=0 yoffset=12 xadvance=7 page=0 chnl=15 +char id=96 x=64 y=14 width=7 height=10 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=97 x=73 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=98 x=82 y=14 width=7 height=10 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=99 x=91 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=100 x=100 y=14 width=7 height=10 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=101 x=109 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=102 x=118 y=14 width=7 height=10 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=103 x=127 y=14 width=7 height=10 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=104 x=136 y=14 width=7 height=10 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=105 x=145 y=14 width=7 height=10 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=106 x=154 y=14 width=7 height=13 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=107 x=163 y=14 width=7 height=10 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=108 x=172 y=14 width=7 height=10 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=109 x=181 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=110 x=190 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=111 x=199 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=112 x=208 y=14 width=7 height=10 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=113 x=217 y=14 width=7 height=10 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=114 x=226 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=115 x=235 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=116 x=244 y=14 width=7 height=9 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=15 +char id=117 x=253 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=118 x=262 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=119 x=271 y=14 width=8 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=120 x=281 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=121 x=290 y=14 width=7 height=10 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=122 x=299 y=14 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=123 x=308 y=14 width=7 height=11 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=124 x=317 y=14 width=7 height=12 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=125 x=326 y=14 width=7 height=11 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15 +char id=126 x=335 y=14 width=7 height=5 xoffset=0 yoffset=7 xadvance=7 page=0 chnl=15 +char id=12353 x=344 y=14 width=12 height=10 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12354 x=358 y=14 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12355 x=372 y=14 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12356 x=386 y=14 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12357 x=400 y=14 width=12 height=10 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12358 x=414 y=14 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12359 x=428 y=14 width=12 height=10 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12360 x=442 y=14 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12361 x=456 y=14 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12362 x=470 y=14 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12363 x=484 y=14 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12364 x=498 y=14 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12365 x=1 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12366 x=15 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12367 x=29 y=29 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12368 x=43 y=29 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12369 x=57 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12370 x=71 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12371 x=85 y=29 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12372 x=99 y=29 width=12 height=12 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12373 x=113 y=29 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12374 x=127 y=29 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12375 x=141 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12376 x=155 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12377 x=169 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12378 x=183 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12379 x=197 y=29 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12380 x=211 y=29 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12381 x=225 y=29 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12382 x=239 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12383 x=253 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12384 x=267 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12385 x=281 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12386 x=295 y=29 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12387 x=309 y=29 width=12 height=7 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15 +char id=12388 x=323 y=29 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12389 x=337 y=29 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12390 x=351 y=29 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12391 x=365 y=29 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12392 x=379 y=29 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12393 x=393 y=29 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12394 x=407 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12395 x=421 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12396 x=435 y=29 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12397 x=449 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12398 x=463 y=29 width=12 height=10 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12399 x=477 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12400 x=491 y=29 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12401 x=1 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12402 x=15 y=45 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12403 x=29 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12404 x=43 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12405 x=57 y=45 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12406 x=71 y=45 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12407 x=85 y=45 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12408 x=99 y=45 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12409 x=113 y=45 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12410 x=127 y=45 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12411 x=141 y=45 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12412 x=155 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12413 x=169 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12414 x=183 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12415 x=197 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12416 x=211 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12417 x=225 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12418 x=239 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12419 x=253 y=45 width=12 height=10 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12420 x=267 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12421 x=281 y=45 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12422 x=295 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12423 x=309 y=45 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12424 x=323 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12425 x=337 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12426 x=351 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12427 x=365 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12428 x=379 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12429 x=393 y=45 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12430 x=407 y=45 width=12 height=10 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12431 x=421 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12432 x=435 y=45 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12433 x=449 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12434 x=463 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12435 x=477 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12436 x=491 y=45 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12437 x=1 y=59 width=12 height=10 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12438 x=15 y=59 width=12 height=10 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12445 x=29 y=59 width=12 height=8 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12446 x=43 y=59 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12449 x=57 y=59 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12450 x=71 y=59 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12451 x=85 y=59 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12452 x=99 y=59 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12453 x=113 y=59 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12454 x=127 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12455 x=141 y=59 width=12 height=7 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15 +char id=12456 x=155 y=59 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12457 x=169 y=59 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12458 x=183 y=59 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12459 x=197 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12460 x=211 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12461 x=225 y=59 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12462 x=239 y=59 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12463 x=253 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12464 x=267 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12465 x=281 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12466 x=295 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12467 x=309 y=59 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12468 x=323 y=59 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12469 x=337 y=59 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12470 x=351 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12471 x=365 y=59 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12472 x=379 y=59 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12473 x=393 y=59 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12474 x=407 y=59 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12475 x=421 y=59 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12476 x=435 y=59 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12477 x=449 y=59 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12478 x=463 y=59 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12479 x=477 y=59 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12480 x=491 y=59 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12481 x=1 y=74 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12482 x=15 y=74 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12483 x=29 y=74 width=12 height=8 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15 +char id=12484 x=43 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12485 x=57 y=74 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12486 x=71 y=74 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12487 x=85 y=74 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12488 x=99 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12489 x=113 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12490 x=127 y=74 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12491 x=141 y=74 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12492 x=155 y=74 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12493 x=169 y=74 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12494 x=183 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12495 x=197 y=74 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12496 x=211 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12497 x=225 y=74 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12498 x=239 y=74 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12499 x=253 y=74 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12500 x=267 y=74 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12501 x=281 y=74 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12502 x=295 y=74 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12503 x=309 y=74 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12504 x=323 y=74 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12505 x=337 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12506 x=351 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12507 x=365 y=74 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12508 x=379 y=74 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12509 x=393 y=74 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12510 x=407 y=74 width=12 height=10 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12511 x=421 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12512 x=435 y=74 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12513 x=449 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12514 x=463 y=74 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12515 x=477 y=74 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12516 x=491 y=74 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12517 x=1 y=89 width=12 height=7 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15 +char id=12518 x=15 y=89 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12519 x=29 y=89 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12520 x=43 y=89 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12521 x=57 y=89 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12522 x=71 y=89 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12523 x=85 y=89 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12524 x=99 y=89 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12525 x=113 y=89 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12526 x=127 y=89 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12527 x=141 y=89 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12528 x=155 y=89 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12529 x=169 y=89 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12530 x=183 y=89 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12531 x=197 y=89 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12532 x=211 y=89 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12533 x=225 y=89 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12534 x=239 y=89 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12535 x=253 y=89 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12536 x=267 y=89 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12537 x=281 y=89 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12538 x=295 y=89 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=12540 x=309 y=89 width=12 height=7 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15 +char id=12541 x=323 y=89 width=12 height=8 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12542 x=337 y=89 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=12289 x=351 y=89 width=12 height=4 xoffset=0 yoffset=9 xadvance=12 page=0 chnl=15 +char id=12290 x=365 y=89 width=12 height=4 xoffset=0 yoffset=9 xadvance=12 page=0 chnl=15 +char id=12539 x=379 y=89 width=12 height=7 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15 +char id=12300 x=393 y=89 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12301 x=407 y=89 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=12302 x=421 y=89 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12303 x=435 y=89 width=12 height=9 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15 +char id=65288 x=449 y=89 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=65289 x=463 y=89 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12304 x=477 y=89 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12305 x=491 y=89 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=12316 x=1 y=104 width=12 height=7 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15 +char id=8230 x=15 y=104 width=12 height=6 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=15 +char id=65281 x=29 y=104 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=65311 x=43 y=104 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=65306 x=57 y=104 width=12 height=9 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=15 +char id=65291 x=71 y=104 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=65293 x=85 y=104 width=12 height=5 xoffset=0 yoffset=7 xadvance=12 page=0 chnl=15 +char id=215 x=99 y=104 width=7 height=7 xoffset=0 yoffset=5 xadvance=7 page=0 chnl=15 +char id=247 x=108 y=104 width=7 height=6 xoffset=0 yoffset=6 xadvance=7 page=0 chnl=15 +char id=65309 x=117 y=104 width=12 height=7 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15 +char id=65285 x=131 y=104 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=65286 x=145 y=104 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=65283 x=159 y=104 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=65290 x=173 y=104 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=12288 x=187 y=104 width=0 height=0 xoffset=0 yoffset=12 xadvance=12 page=0 chnl=15 +char id=38283 x=189 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=22987 x=203 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=32066 x=217 y=104 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=20102 x=231 y=104 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=19968 x=245 y=104 width=12 height=6 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=15 +char id=26178 x=259 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20572 x=273 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27490 x=287 y=104 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20877 x=301 y=104 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=32154 x=315 y=104 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=34892 x=329 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24471 x=343 y=104 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=28857 x=357 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26368 x=371 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=39640 x=385 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27531 x=399 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27231 x=413 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20307 x=427 y=104 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21147 x=441 y=104 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21629 x=455 y=104 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=21213 x=469 y=104 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=21033 x=483 y=104 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25943 x=497 y=104 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=21271 x=1 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24341 x=15 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20998 x=29 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27425 x=43 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38754 x=57 y=120 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=25147 x=71 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36984 x=85 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25246 x=99 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27770 x=113 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23450 x=127 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35373 x=141 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38899 x=155 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=37327 x=169 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36895 x=183 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24230 x=197 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38291 x=211 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=31186 x=225 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=22238 x=239 y=120 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=20154 x=253 y=120 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=25973 x=267 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21619 x=281 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26041 x=295 y=120 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=23453 x=309 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=31665 x=323 y=120 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=37749 x=337 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25161 x=351 y=120 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=26449 x=365 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30010 x=379 y=120 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=26862 x=393 y=120 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=36947 x=407 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=22478 x=421 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=29579 x=435 y=120 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=23019 x=449 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21191 x=463 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=32773 x=477 y=120 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21091 x=491 y=120 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30462 x=1 y=135 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24339 x=15 y=135 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=30690 x=29 y=135 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=34220 x=43 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=33609 x=57 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=37329 x=71 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=37504 x=85 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=37509 x=99 y=135 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30707 x=113 y=135 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=26408 x=127 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27700 x=141 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=28779 x=155 y=135 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=39080 x=169 y=135 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=22303 x=183 y=135 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20809 x=197 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38343 x=211 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25915 x=225 y=135 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25731 x=239 y=135 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=38450 x=253 y=135 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=24481 x=267 y=135 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=39764 x=281 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27861 x=295 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25216 x=309 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24517 x=323 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27578 x=337 y=135 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=24489 x=351 y=135 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=27602 x=365 y=135 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30496 x=379 y=135 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=27494 x=393 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=22120 x=407 y=135 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20855 x=421 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25345 x=435 y=135 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=29289 x=449 y=135 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35013 x=463 y=135 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20633 x=477 y=135 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36023 x=491 y=135 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=22770 x=1 y=151 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=24215 x=15 y=151 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23487 x=29 y=151 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23627 x=43 y=151 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=35441 x=57 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=32862 x=71 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35211 x=85 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26469 x=99 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20837 x=113 y=151 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=20986 x=127 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=19978 x=141 y=151 width=12 height=11 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=19979 x=155 y=151 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=24038 x=169 y=151 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=21491 x=183 y=151 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=21069 x=197 y=151 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=24460 x=211 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26481 x=225 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35199 x=239 y=151 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=21335 x=253 y=151 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=25276 x=267 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38626 x=281 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25163 x=295 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36275 x=309 y=151 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=38957 x=323 y=151 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=30446 x=337 y=151 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=21475 x=351 y=151 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=32819 x=365 y=151 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=24515 x=379 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27671 x=393 y=151 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=20803 x=407 y=151 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=22825 x=421 y=151 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=22320 x=435 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23665 x=449 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24029 x=463 y=151 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=28023 x=477 y=151 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=31354 x=491 y=151 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26143 x=1 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26376 x=15 y=167 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=26085 x=29 y=167 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=24180 x=43 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20170 x=57 y=167 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=26397 x=71 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26172 x=85 y=167 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=22812 x=99 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36196 x=113 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38738 x=127 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=40644 x=141 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=32209 x=155 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30333 x=169 y=167 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=40658 x=183 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=33394 x=197 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=22823 x=211 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23567 x=225 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20302 x=239 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38263 x=253 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30701 x=267 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26032 x=281 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21476 x=295 y=167 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=22810 x=309 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23569 x=323 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26089 x=337 y=167 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=36933 x=351 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24375 x=365 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24369 x=379 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=37325 x=393 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36605 x=407 y=167 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=33391 x=421 y=167 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=24746 x=435 y=167 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=27491 x=449 y=167 width=12 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=20840 x=463 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=37096 x=477 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21322 x=491 y=167 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25968 x=1 y=183 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=23383 x=15 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25991 x=29 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35501 x=43 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26360 x=57 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35328 x=71 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35486 x=85 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=33521 x=99 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26412 x=113 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20013 x=127 y=183 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=22269 x=141 y=183 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=21517 x=155 y=183 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=30058 x=169 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21495 x=183 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=31532 x=197 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=31456 x=211 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35352 x=225 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=37682 x=239 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20445 x=253 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23384 x=267 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36796 x=281 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21066 x=295 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38500 x=309 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30011 x=323 y=183 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=34920 x=337 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=31034 x=351 y=183 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=25805 x=365 y=183 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=20316 x=379 y=183 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35500 x=393 y=183 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=26126 x=407 y=183 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=36938 x=421 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38627 x=435 y=183 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=26131 x=449 y=183 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=26222 x=463 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36890 x=477 y=183 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=31777 x=491 y=183 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=21336 x=1 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=32244 x=15 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=32722 x=29 y=199 width=12 height=12 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=23550 x=43 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25126 x=57 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35430 x=71 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21512 x=85 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=36000 x=99 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=28310 x=113 y=199 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=23436 x=127 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25104 x=141 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=21151 x=155 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=22833 x=169 y=199 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=24565 x=183 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27515 x=197 y=199 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=29983 x=211 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30772 x=225 y=199 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=20498 x=239 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=24618 x=253 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20027 x=267 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20844 x=281 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20210 x=295 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=26053 x=309 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=20882 x=323 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38522 x=337 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=19990 x=351 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=30028 x=365 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=22259 x=379 y=199 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=37489 x=393 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27934 x=407 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=31391 x=421 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=22612 x=435 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38272 x=449 y=199 width=12 height=11 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15 +char id=27211 x=463 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23478 x=477 y=199 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=23460 x=491 y=199 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38542 x=1 y=214 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=27573 x=15 y=214 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=31348 x=29 y=214 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=33853 x=43 y=214 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25342 x=57 y=214 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=20351 x=71 y=214 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=25448 x=85 y=214 width=12 height=14 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=21463 x=99 y=214 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=28193 x=113 y=214 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=25506 x=127 y=214 width=12 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=35519 x=141 y=214 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 +char id=38598 x=155 y=214 width=12 height=13 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 +char id=24403 x=169 y=214 width=12 height=12 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 diff --git a/assets/fonts/pixel12.png b/assets/fonts/pixel12.png new file mode 100644 index 0000000..76e89a0 Binary files /dev/null and b/assets/fonts/pixel12.png differ diff --git a/assets/fonts/pixel5.fnt b/assets/fonts/pixel5.fnt new file mode 100644 index 0000000..76a9457 --- /dev/null +++ b/assets/fonts/pixel5.fnt @@ -0,0 +1,94 @@ +info face="pixfont 3x5" size=5 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=0 aa=0 padding=0,0,0,0 spacing=1,1 +common lineHeight=6 base=5 scaleW=64 scaleH=24 pages=1 packed=0 +page id=0 file="pixfont.png" +chars count=90 +char id=32 x=0 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=33 x=4 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=34 x=8 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=35 x=12 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=36 x=16 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=37 x=20 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=38 x=24 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=39 x=28 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=40 x=32 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=41 x=36 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=42 x=40 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=43 x=44 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=44 x=48 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=45 x=52 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=46 x=56 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=47 x=60 y=0 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=48 x=0 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=49 x=4 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=50 x=8 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=51 x=12 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=52 x=16 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=53 x=20 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=54 x=24 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=55 x=28 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=56 x=32 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=57 x=36 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=58 x=40 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=59 x=44 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=60 x=48 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=61 x=52 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=62 x=56 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=63 x=60 y=6 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=64 x=0 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=65 x=4 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=66 x=8 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=67 x=12 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=68 x=16 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=69 x=20 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=70 x=24 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=71 x=28 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=72 x=32 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=73 x=36 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=74 x=40 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=75 x=44 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=76 x=48 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=77 x=52 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=78 x=56 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=79 x=60 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=80 x=0 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=81 x=4 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=82 x=8 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=83 x=12 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=84 x=16 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=85 x=20 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=86 x=24 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=87 x=28 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=88 x=32 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=89 x=36 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=90 x=40 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=91 x=44 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=92 x=48 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=93 x=52 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=94 x=56 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=95 x=60 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=97 x=4 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=98 x=8 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=99 x=12 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=100 x=16 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=101 x=20 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=102 x=24 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=103 x=28 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=104 x=32 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=105 x=36 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=106 x=40 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=107 x=44 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=108 x=48 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=109 x=52 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=110 x=56 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=111 x=60 y=12 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=112 x=0 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=113 x=4 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=114 x=8 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=115 x=12 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=116 x=16 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=117 x=20 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=118 x=24 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=119 x=28 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=120 x=32 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=121 x=36 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 +char id=122 x=40 y=18 width=3 height=5 xoffset=0 yoffset=0 xadvance=4 page=0 chnl=15 diff --git a/assets/sprites/pixfont.png b/assets/fonts/pixfont.png similarity index 100% rename from assets/sprites/pixfont.png rename to assets/fonts/pixfont.png diff --git a/assets/sprites/objects_nopad.atlas b/assets/sprites/objects_nopad.atlas deleted file mode 100644 index a83c359..0000000 --- a/assets/sprites/objects_nopad.atlas +++ /dev/null @@ -1,7 +0,0 @@ -# the same tiles WITHOUT gaps (bleeding demo, chapter 25; generated by the author's own script) -image objects_nopad.png -sprite grass 0 0 16 16 -sprite dirt 16 0 16 16 -sprite brick 32 0 16 16 -sprite stone 48 0 16 16 -sprite crate 64 0 16 16 diff --git a/assets/sprites/objects_nopad.png b/assets/sprites/objects_nopad.png deleted file mode 100644 index 7491d03..0000000 Binary files a/assets/sprites/objects_nopad.png and /dev/null differ diff --git a/demo/demo.hh b/demo/demo.hh new file mode 100644 index 0000000..412a30c --- /dev/null +++ b/demo/demo.hh @@ -0,0 +1,113 @@ +// 第26章のデモ:どのシーンからも使う共有データと、3つのシーン +// The chapter 26 demo: the shared data every scene uses, and the three scenes +#pragma once + +#include "engine/animation.hh" +#include "engine/camera2d.hh" +#include "engine/font.hh" +#include "engine/game_loop.hh" +#include "engine/input.hh" +#include "engine/pixel_canvas.hh" +#include "engine/rng.hh" +#include "engine/scene.hh" +#include "engine/sprite_batch.hh" +#include "engine/sprite_sheet.hh" + +#include + +// ゲーム全体で一つ。mainが作り、シーンは参照で持つ(エンジンのSceneは中身を知らない) +// One per game. main creates it and the scenes keep a reference (the engine's Scene knows nothing about it) +struct Demo { + Window &window; + Input &input; + GameLoop &loop; + SpriteBatch &batch; + const Font &ui; // mono16:画面の解像度の文字 / text at screen resolution + const Font &pixel; // pixel12:キャンバスの中の文字 / text inside the canvas + const SpriteSheet &hero; + const SpriteSheet &objects; + const AnimationClip &idle, &walk, &coinSpin; + Camera2D world; // 320×180のキャンバス / the 320 × 180 canvas + Camera2D screen; // 1280×720のUI / the 1280 × 720 UI + Viewport uiViewport; // UIの描く場所(マウスの変換にも) / where the UI goes (also for the mouse) + Rng rng{26}; + bool interpolate = true; +}; + +// タイトル:スペース・Enter・クリックで始める、Escで終わる / the title: Space, Enter or a click starts, Esc quits +class TitleScene : public Scene { +public: + explicit TitleScene(Demo &demo) : d(demo) {} + void enter() override; + void update(float dt) override; + void draw(float alpha) override; + void drawUi(float alpha) override; + +private: + Demo &d; + float time = 0.0f; + Animator heroAnim, coinAnim; + float heroX = -16.0f, heroPrevX = -16.0f; +}; + +// 遊び場:主人公を動かし、箱にぶつかり、コインを拾う。HUDにFPSと更新の回数 +// The playground: move the hero, bump into boxes, collect coins. The HUD shows FPS and update counts +class PlaygroundScene : public Scene { +public: + explicit PlaygroundScene(Demo &demo); + void enter() override; + void pause() override; + void resume() override; + void update(float dt) override; + void draw(float alpha) override; + void drawUi(float alpha) override; + +private: + struct Coin { + Vec2 position; + float phase; + }; + struct Particle { + Vec2 position, velocity; + float life; + Vec4 color; + }; + struct Popup { + Vec2 position; + float life; + }; + void placeCoin(Coin &coin); + bool blocked(const Rect &r) const; + + Demo &d; + std::vector walls, crates, solids; + Rect player; // 当たり判定の箱(足元) / the collision box (the feet) + Vec2 playerPrev; // 前のステップの位置(補間用) / last step's position (for interpolation) + bool facingLeft = false; + Animator heroAnim; + Rect saw; + float sawPrevX = 0.0f, sawDir = 1.0f; + std::vector coins; + std::vector particles; + std::vector popups; + int collected = 0, hits = 0; + float time = 0.0f, hurt = 0.0f; + bool showBoxes = false; +}; + +// 一時停止:上に重ねるシーン(isOverlay)。下の遊び場は描かれるが、更新されない +// The pause menu: an overlay scene (isOverlay). The playground below is drawn but not updated +class PauseScene : public Scene { +public: + explicit PauseScene(Demo &demo) : d(demo) {} + bool isOverlay() const override { return true; } + void update(float dt) override; + void draw(float /*alpha*/) override {} + void drawUi(float alpha) override; + +private: + Rect itemRect(int i) const; + Demo &d; + float time = 0.0f; + int selected = 0; +}; diff --git a/demo/main.cc b/demo/main.cc index d806725..9116b95 100644 --- a/demo/main.cc +++ b/demo/main.cc @@ -1,427 +1,86 @@ -// 第25章:2Dレンダリングとスプライト -// Chapter 25: 2D rendering and sprites +// 第26章:テキスト・ゲームループ・シーン(ゲームの道具箱) +// Chapter 26: text, game loops and scenes (the game toolkit) // -// 操作 / Controls: -// 1 / 2 / 3 場面:ピクセルアート(320×180のキャンバス) / 10 000スプライト / フィルタリングの比較 -// scene: pixel art (a 320 × 180 canvas) / 10 000 sprites / filtering comparison -// ← → / A D 主人公を歩かせる(場面1。押さなければ自動で歩く) / walk the hero (scene 1; walks by itself otherwise) -// T 並べ替え:なし ⇔ テクスチャごと(場面2:描画コール 約10 000 ⇔ 2) / sorting: none ⇔ by texture -// (scene 2: about 10 000 ⇔ 2 draw calls) -// U 頂点の送り方:glNamedBufferSubData ⇔ 永続マップ / vertex upload: glNamedBufferSubData ⇔ persistent -// mapping -// = / - スプライトの数を2倍・半分に(場面2) / twice / half as many sprites (scene 2) -// P アニメーションを止める・動かす / pause / resume the animation -// Esc 終了 / quit +// タイトル → 遊び場 → 一時停止(スタックに載せる重ねたシーン)。切り替えはフェード付き +// Title → playground → pause (an overlay pushed on the stack), with fades between them // -// 2Dの約束(エンジン全体):仮想ピクセル、y下向き、左上が原点、正の回転は時計回り。色はsRGBの値のまま混ぜる -// The 2D conventions (engine-wide): virtual pixels, y down, origin at the top left, positive rotation is clockwise. -// Colors are blended as sRGB-encoded values -#include "engine/animation.hh" -#include "engine/camera2d.hh" -#include "engine/pixel_canvas.hh" -#include "engine/sprite_batch.hh" -#include "engine/sprite_sheet.hh" +// 操作 / Controls: +// タイトル / title Space・Enter・クリックで開始、Escで終了 / Space, Enter or a click starts, Esc quits +// 遊び場 / playground ← → ↑ ↓ / WASD 移動 / move B 当たり判定の箱 / collision boxes +// I 補間のオン・オフ / interpolation on / off U 更新 60 Hz ⇔ 10 Hz / update rate +// P / Esc 一時停止 / pause +// 一時停止 / pause ↑ ↓ / W S 選ぶ / select Space・Enter・クリック 決定 / confirm P / Esc 再開 / resume +#include "demo.hh" + #include "engine/window.hh" -#include -#include -#include -#include #include +#include #include -#include -#include -#include - -// 第25章のHUD:3×5のピクセルフォント(格子のシート、ASCII 32〜95)で文字を描く。第26章でFontクラスになる -// The chapter 25 HUD: text drawn with the 3 × 5 pixel font (a grid sheet, ASCII 32-95). Chapter 26 turns this into -// the Font class -static void drawPixelText(SpriteBatch &batch, const SpriteSheet &font, std::string_view text, Vec2 position, - float scale, Vec4 color, float layer = 100.0f) { - Vec2 pen = position; - for (char c : text) { - if (c == '\n') { - pen = {position.x, pen.y + 6.0f * scale}; - continue; - } - if (c >= 'a' && c <= 'z') c = static_cast(c - 'a' + 'A'); // 大文字だけ / capitals only - int index = c - 32; - if (index > 0 && index < font.count()) { - Sprite s = font.sprite(index, pen, {0.0f, 0.0f}, scale); - s.color = color; - s.layer = layer; - batch.draw(s); - } - pen.x += 4.0f * scale; // 送り幅:3ピクセル+隙間1 / advance: 3 pixels + 1 gap - } -} - -// drawPixelTextが覆う大きさ(一番長い行 × 行数。最後の文字の後の隙間は数えない):HUDの箱を文字に合わせる -// The size drawPixelText covers (the longest line × the lines, without the gap after the last character): fits the -// HUD box to its text -static Vec2 pixelTextSize(std::string_view text, float scale) { - int column = 0, widest = 0, lines = 1; - for (char c : text) { - if (c == '\n') { - ++lines; - column = 0; - continue; - } - widest = std::max(widest, ++column); - } - return Vec2{4.0f * static_cast(widest) - 1.0f, 6.0f * static_cast(lines) - 1.0f} * scale; -} - -// 乱数(第26章でRngクラスになる) / random numbers (chapter 26 turns this into the Rng class) -static float random01(std::uint32_t &state) { - state = state * 1664525u + 1013904223u; - return static_cast(state >> 8) / 16777216.0f; -} - -// 場面2の一枚:位置・速さ・回転・どのシートのどのコマか / one sprite of scene 2: position, velocity, spin, which -// sheet and frame -struct Mover { - Vec2 position, velocity; - float angle, spin; - int kind; // 0 = 主人公(hero.png)、1 = コイン(objects.png) / 0 = hero (hero.png), 1 = coin (objects.png) - float phase; // アニメーションのずれ / animation offset -}; - -static std::vector makeMovers(int count, Vec2 area) { - std::vector movers; - std::uint32_t seed = 25; - for (int i = 0; i < count; ++i) { - Mover m; - m.position = {random01(seed) * area.x, random01(seed) * area.y}; - float a = 6.2831853f * random01(seed), speed = 40.0f + 120.0f * random01(seed); - m.velocity = {speed * std::cos(a), speed * std::sin(a)}; - m.angle = 6.2831853f * random01(seed); - m.spin = (random01(seed) - 0.5f) * 4.0f; - // 交互に別のテクスチャ:並べ替えなしだと1枚ごとに描画コールが要る / alternate textures: without sorting every - // sprite needs its own draw call - m.kind = i % 2; - m.phase = random01(seed); - movers.push_back(m); - } - return movers; -} int main() { Window window; - if (!window.create(1280, 720, "OpenGL Tutorial - Chapter 25")) return 1; + if (!window.create(1280, 720, "OpenGL Tutorial - Chapter 26")) return 1; - // 二つのスプライトバッチ:頂点の送り方だけが違う(Uで切り替え) / two sprite batches that differ only in how - // vertices are uploaded (U switches) - std::optional subDataBatch = SpriteBatch::create({.upload = SpriteUpload::SubData}); - std::optional persistentBatch = SpriteBatch::create({.upload = SpriteUpload::Persistent}); - // ピクセルアートはGL_NEAREST。比較用にGL_LINEARでも読む / pixel art uses GL_NEAREST; also loaded with GL_LINEAR for - // the comparison + std::optional batch = SpriteBatch::create(); + // 画面の解像度の文字(アンチエイリアス)と、キャンバスの中の文字(1ビット、GL_NEAREST) + // Text at screen resolution (antialiased) and text inside the canvas (1-bit, GL_NEAREST) + std::optional ui = Font::load("assets/fonts/mono16.fnt"); + std::optional pixel = Font::load("assets/fonts/pixel12.fnt", TextureFilter::Nearest); std::optional hero = SpriteSheet::loadGrid("assets/sprites/hero.png", 16, 16, 1, 1); - std::optional heroLinear = - SpriteSheet::loadGrid("assets/sprites/hero.png", 16, 16, 1, 1, TextureFilter::Linear); std::optional objects = SpriteSheet::loadAtlas("assets/sprites/objects.atlas"); - std::optional objectsLinear = SpriteSheet::loadAtlas("assets/sprites/objects.atlas", TextureFilter::Linear); - std::optional noPadLinear = SpriteSheet::loadAtlas("assets/sprites/objects_nopad.atlas", TextureFilter::Linear); - std::optional font = SpriteSheet::loadGrid("assets/sprites/pixfont.png", 4, 6); - if (!subDataBatch || !persistentBatch || !hero || !heroLinear || !objects || !objectsLinear || !noPadLinear || !font) - return 1; - - // 主人公のクリップ:コマの番号はhero.pngの並び(0〜1 待機、2〜5 歩き、6 ジャンプ) - // The hero's clips: frame numbers follow hero.png (0-1 idle, 2-5 walk, 6 jump) + if (!batch || !ui || !pixel || !hero || !objects) return 1; hero->addClip({.name = "idle", .frames = {0, 0, 0, 0, 0, 0, 1}, .fps = 6.0f}); hero->addClip({.name = "walk", .frames = {2, 3, 4, 5}, .fps = 10.0f}); - const AnimationClip *idleClip = hero->clip("idle"); - const AnimationClip *walkClip = hero->clip("walk"); - const AnimationClip *coinClip = objects->clip("coin_spin"); - const AnimationClip *slimeClip = objects->clip("slime_bounce"); - if (!idleClip || !walkClip || !coinClip || !slimeClip) return 1; - - // 場面1:320×180の仮想解像度(1280×720にちょうど4倍) / scene 1: a 320 × 180 virtual resolution (exactly 4× in 1280 × 720) + const AnimationClip *coinSpin = objects->clip("coin_spin"); + if (!coinSpin) return 1; + + // 入力:ウィンドウのコールバックを引き受け、行動に名前を付ける(キーを変えたくなったらここだけ直す) + // Input: takes over the window's callbacks; actions get names (to change the keys, edit only this) + Input input; + input.attach(window); + input.bind("left", {InputBinding::key(GLFW_KEY_LEFT), InputBinding::key(GLFW_KEY_A)}); + input.bind("right", {InputBinding::key(GLFW_KEY_RIGHT), InputBinding::key(GLFW_KEY_D)}); + input.bind("up", {InputBinding::key(GLFW_KEY_UP), InputBinding::key(GLFW_KEY_W)}); + input.bind("down", {InputBinding::key(GLFW_KEY_DOWN), InputBinding::key(GLFW_KEY_S)}); + input.bind("confirm", {InputBinding::key(GLFW_KEY_SPACE), InputBinding::key(GLFW_KEY_ENTER)}); + + // 固定ステップ:更新は1/60秒ごと、1フレームに最大5回 / fixed step: an update every 1/60 s, at most 5 per frame + GameLoop loop({.step = 1.0 / 60.0, .maxSteps = 5}); PixelCanvas canvas(320, 180); - Camera2D canvasCamera = Camera2D::screen(canvas.size()); - // 場面2・3:ウィンドウのピクセルそのまま / scenes 2 and 3: plain window pixels - Camera2D screenCamera = Camera2D::screen({1280.0f, 720.0f}); - // 場面3のキャンバス比較用:48×48の小さなキャンバス / for scene 3's canvas comparison: a small 48 × 48 canvas - PixelCanvas smallCanvas(48, 48); - Camera2D smallCamera = Camera2D::screen(smallCanvas.size()); - - int scene = 0, spriteCount = 10000; - bool sortByTexture = true, persistent = false, paused = false; - std::vector movers = makeMovers(spriteCount, {1280.0f, 720.0f}); - window.onKey = [&](int key, int action, int /*mods*/) { - if (action != GLFW_PRESS) return; - if (key == GLFW_KEY_ESCAPE) window.close(); - if (key >= GLFW_KEY_1 && key <= GLFW_KEY_3) scene = key - GLFW_KEY_1; - if (key == GLFW_KEY_T) sortByTexture = !sortByTexture; - if (key == GLFW_KEY_U) persistent = !persistent; - if (key == GLFW_KEY_P) paused = !paused; - if (key == GLFW_KEY_EQUAL || key == GLFW_KEY_MINUS) { - spriteCount = key == GLFW_KEY_EQUAL ? std::min(spriteCount * 2, 160000) : std::max(spriteCount / 2, 10); - movers = makeMovers(spriteCount, {1280.0f, 720.0f}); - printf("sprites: %d\n", spriteCount); - } - }; + Demo demo{.window = window, .input = input, .loop = loop, .batch = *batch, .ui = *ui, .pixel = *pixel, + .hero = *hero, .objects = *objects, .idle = *hero->clip("idle"), .walk = *hero->clip("walk"), + .coinSpin = *coinSpin, .world = Camera2D::screen(canvas.size()), + .screen = Camera2D::screen({1280.0f, 720.0f}), .uiViewport = {}}; - // 主人公(場面1) / the hero (scene 1) - Animator heroAnim; - heroAnim.play(walkClip); - Vec2 heroPos = {60.0f, 144.0f}; // 足元 / feet - float heroDir = 1.0f; - Animator coinAnim, slimeAnim; - coinAnim.play(coinClip); - slimeAnim.play(slimeClip); + SceneManager scenes; + scenes.push(std::make_unique(demo)); - float time = 0.0f; - double lastTime = window.time(); - auto lastFrame = std::chrono::steady_clock::now(); - float frameMs = 0.0f; int frame = 0; - while (!window.shouldClose()) { - double now = window.time(); - float dt = static_cast(now - lastTime); - lastTime = now; - window.pollEvents(); - // 本当の時間(CPU):1フレームにかかったミリ秒(なめらかに) / real time (CPU): milliseconds per frame (smoothed) - auto wall = std::chrono::steady_clock::now(); - float ms = std::chrono::duration(wall - lastFrame).count(); - lastFrame = wall; - frameMs = frame == 0 ? ms : 0.9f * frameMs + 0.1f * ms; - if (paused) dt = 0.0f; - time += dt; - - SpriteBatch &batch = persistent ? *persistentBatch : *subDataBatch; - coinAnim.update(dt); - slimeAnim.update(dt); - - if (scene == 0) { - //------------------------------------------------------------------ - // 場面1:ピクセルアート。320×180のキャンバスに描いて、整数倍で画面へ - // Scene 1: pixel art. Drawn into the 320 × 180 canvas, then scaled by a whole number onto the screen - //------------------------------------------------------------------ - float input = 0.0f; - if (window.keyDown(GLFW_KEY_LEFT) || window.keyDown(GLFW_KEY_A)) input -= 1.0f; - if (window.keyDown(GLFW_KEY_RIGHT) || window.keyDown(GLFW_KEY_D)) input += 1.0f; - if (input != 0.0f) heroDir = input; - else if (heroPos.x > 290.0f) heroDir = -1.0f; // 自動で往復 / walks back and forth by itself - else if (heroPos.x < 30.0f) heroDir = 1.0f; - heroPos.x = std::clamp(heroPos.x + heroDir * 40.0f * dt, 8.0f, 312.0f); - heroAnim.play(dt > 0.0f ? walkClip : idleClip); - heroAnim.update(dt); - - canvas.begin(hexColor(0x8fd3ffff)); - batch.begin(canvasCamera.matrix(), SpriteSort::Layer); - // 雲:ゆっくり流れる(奥、layer 0) / clouds drift slowly (at the back, layer 0) - int cloud = objects->find("cloud"); - for (int i = 0; i < 3; ++i) { - float x = std::fmod(40.0f + 130.0f * static_cast(i) + 6.0f * time, 380.0f) - 40.0f; - Sprite s = objects->sprite(cloud, {std::round(x), 18.0f + 14.0f * static_cast(i % 2)}); - batch.draw(s); - } - // 地面:草の列と土の列。layer 1 / the ground: a row of grass and a row of dirt. Layer 1 - int grass = objects->find("grass"), dirt = objects->find("dirt"), brick = objects->find("brick"); - int crate = objects->find("crate"), stone = objects->find("stone"); - for (int x = 0; x < 20; ++x) { - Sprite g = objects->sprite(grass, {16.0f * static_cast(x), 144.0f}); - g.layer = 1.0f; - batch.draw(g); - for (float y : {160.0f, 176.0f}) { - Sprite d = objects->sprite(dirt, {16.0f * static_cast(x), y}); - d.layer = 1.0f; - batch.draw(d); - } - } - // レンガの足場と木箱 / a brick ledge and crates - for (int x = 0; x < 4; ++x) { - Sprite b = objects->sprite(brick, {176.0f + 16.0f * static_cast(x), 96.0f}); - b.layer = 1.0f; - batch.draw(b); - } - for (Vec2 p : {Vec2{24.0f, 128.0f}, Vec2{40.0f, 128.0f}, Vec2{32.0f, 112.0f}}) { - Sprite c = objects->sprite(crate, p); - c.layer = 1.0f; - batch.draw(c); - } - for (int y = 0; y < 3; ++y) { - Sprite s = objects->sprite(stone, {256.0f, 96.0f + 16.0f * static_cast(y)}); - s.layer = 1.0f; - batch.draw(s); - } - // 回る丸のこ(回転は中心の周り:origin = (0.5, 0.5)) / a spinning saw blade (rotates about its center: - // origin = (0.5, 0.5)) - Sprite saw = objects->sprite(objects->find("saw"), {264.0f, 84.0f}, {0.5f, 0.5f}); - saw.rotation = 3.0f * time; - saw.layer = 2.0f; - batch.draw(saw); - // コイン(アニメーション)と宝石・ハート・花 / coins (animated), a gem, a heart and flowers - for (int i = 0; i < 4; ++i) { - Sprite c = objects->sprite(coinAnim.frame(), {76.0f + 16.0f * static_cast(i), 112.0f}); - c.layer = 2.0f; - batch.draw(c); - } - Sprite gem = objects->sprite(objects->find("gem"), {150.0f, 118.0f + std::round(2.0f * std::sin(3.0f * time))}); - gem.layer = 2.0f; - batch.draw(gem); - Sprite heart = objects->sprite(objects->find("heart"), {170.0f, 120.0f}); - heart.layer = 2.0f; - batch.draw(heart); - for (float x : {96.0f, 152.0f, 228.0f, 300.0f}) { - Sprite f = objects->sprite(objects->find("flower"), {x, 136.0f}); - f.layer = 2.0f; - batch.draw(f); - } - // スライム2匹(同じクリップ、片方は左右反転) / two slimes (the same clip, one mirrored) - for (int i = 0; i < 2; ++i) { - Sprite s = objects->sprite(slimeAnim.frame(), {200.0f + 90.0f * static_cast(i), 128.0f}); - s.flipX = i == 1; - s.layer = 2.0f; - batch.draw(s); - } - // 色を掛けた主人公:赤、半透明、影(黒) / tinted heroes: red, half transparent, a black silhouette - const Vec4 tints[] = {hexColor(0xff7070ff), {1.0f, 1.0f, 1.0f, 0.45f}, hexColor(0x000000b0)}; - for (int i = 0; i < 3; ++i) { - Sprite s = hero->sprite(0, {192.0f + 20.0f * static_cast(i), 96.0f}, {0.5f, 1.0f}); - s.color = tints[i]; - s.layer = 2.0f; - batch.draw(s); - } - // 主人公:足元(下の中心)が基準。左へ歩くときは左右反転 / the hero: the pivot is the feet (bottom center). - // Mirrored when walking left - Sprite h = hero->sprite(heroAnim.frame(), {std::round(heroPos.x), heroPos.y}, {0.5f, 1.0f}); - h.flipX = heroDir < 0.0f; - h.layer = 3.0f; - batch.draw(h); - batch.end(); - SpriteStats stats = batch.stats(); - // HUD(同じキャンバス、別のbegin/end) / the HUD (same canvas, a separate begin/end) - batch.begin(canvasCamera.matrix()); - char hud[128]; - snprintf(hud, sizeof hud, "SCENE 1: PIXEL ART 320X180 X4\nSPRITES %d DRAW CALLS %d", stats.sprites, stats.drawCalls); - Vec2 hudSize = pixelTextSize(hud, 1.0f); - batch.drawRect({2.0f, 2.0f, hudSize.x + 4.0f, hudSize.y + 4.0f}, hexColor(0x1b172699)); // 2ピクセルの余白 / 2 px margin - drawPixelText(batch, *font, hud, {4.0f, 4.0f}, 1.0f, kWhite); - batch.end(); - canvas.present(window.width(), window.height()); - } else if (scene == 1) { - //------------------------------------------------------------------ - // 場面2:たくさんのスプライトを一つのバッチで / Scene 2: many sprites in one batch - //------------------------------------------------------------------ - for (Mover &m : movers) { - m.position += m.velocity * dt; - if (m.position.x < 0.0f || m.position.x > 1280.0f) m.velocity.x = -m.velocity.x; - if (m.position.y < 0.0f || m.position.y > 720.0f) m.velocity.y = -m.velocity.y; - m.angle += m.spin * dt; - } - Framebuffer::bindDefault(window.width(), window.height()); - glClearColor(0.07f, 0.08f, 0.13f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - auto start = std::chrono::steady_clock::now(); - batch.begin(screenCamera.matrix(), sortByTexture ? SpriteSort::Texture : SpriteSort::None); - for (const Mover &m : movers) { - // 主人公は歩き、コインは回る。コマはそれぞれの時間のずれで / heroes walk, coins spin, each with its own offset - int heroFrame = 2 + static_cast((time + m.phase) * 10.0f) % 4; - int coinFrame = coinClip->frames[static_cast((time + m.phase) * 8.0f) % 4]; - Sprite s = m.kind == 0 ? hero->sprite(heroFrame, m.position, {0.5f, 0.5f}, 2.0f) - : objects->sprite(coinFrame, m.position, {0.5f, 0.5f}, 2.0f); - s.rotation = m.angle; - batch.draw(s); - } - batch.end(); - float batchMs = std::chrono::duration(std::chrono::steady_clock::now() - start).count(); - SpriteStats stats = batch.stats(); - batch.begin(screenCamera.matrix()); - char hud[256]; - snprintf(hud, sizeof hud, - "SCENE 2: %d SPRITES IN ONE BATCH\nDRAW CALLS %d SORT %s (T) UPLOAD %s (U)\n" - "BATCH %.1f MS FRAME %.1f MS (CPU)", - stats.sprites, stats.drawCalls, sortByTexture ? "BY TEXTURE" : "NONE", - persistent ? "PERSISTENT MAP" : "SUBDATA", static_cast(batchMs), static_cast(frameMs)); - Vec2 hudSize = pixelTextSize(hud, 4.0f); - batch.drawRect({8.0f, 8.0f, hudSize.x + 16.0f, hudSize.y + 16.0f}, hexColor(0x000000c0)); // 余白8 / 8 px margin - drawPixelText(batch, *font, hud, {16.0f, 16.0f}, 4.0f, hexColor(0xffe08aff)); - batch.end(); - if (frame % 60 == 2) - printf("scene 2: %d sprites, %d draw calls (%s, %s), batch %.1f ms\n", stats.sprites, stats.drawCalls, - sortByTexture ? "by texture" : "unsorted", persistent ? "persistent" : "subdata", - static_cast(batchMs)); - } else { - //------------------------------------------------------------------ - // 場面3:フィルタリング:GL_NEAREST ⇔ GL_LINEAR、整数倍 ⇔ 半端な倍率と回転、直接 ⇔ キャンバス、隙間 ⇔ にじみ - // Scene 3: filtering: GL_NEAREST ⇔ GL_LINEAR, whole ⇔ fractional scale and rotation, direct ⇔ canvas, - // gaps ⇔ bleeding - //------------------------------------------------------------------ - heroAnim.play(walkClip); - heroAnim.update(dt); - float angle = 0.35f * std::sin(0.8f * time); - // 小さなキャンバスに回る主人公と丸のこ(48×48の本物のピクセル) / a turning hero and saw in the small canvas - // (real 48 × 48 pixels) - smallCanvas.begin(hexColor(0x2a3350ff)); - batch.begin(smallCamera.matrix()); - Sprite small = hero->sprite(heroAnim.frame(), {24.0f, 22.0f}, {0.5f, 0.5f}, 2.0f); - small.rotation = angle; - batch.draw(small); - Sprite smallSaw = objects->sprite(objects->find("saw"), {38.0f, 38.0f}, {0.5f, 0.5f}); - smallSaw.rotation = 2.0f * time; - batch.draw(smallSaw); - batch.end(); - - Framebuffer::bindDefault(window.width(), window.height()); - glClearColor(0.10f, 0.11f, 0.16f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - batch.begin(screenCamera.matrix()); - const Vec4 label = hexColor(0xffe08aff), panel = hexColor(0x2a3350ff); - // 上の段:×12(整数)と×7.5で回転、それぞれGL_NEARESTとGL_LINEAR / top row: ×12 (whole) and ×7.5 rotated, each - // with GL_NEAREST and GL_LINEAR - const char *names[] = {"NEAREST X12", "LINEAR X12", "NEAREST X7.5 TURNED", "LINEAR X7.5 TURNED"}; - for (int i = 0; i < 4; ++i) { - float x0 = 20.0f + 315.0f * static_cast(i); - batch.drawRect({x0, 40.0f, 300.0f, 280.0f}, panel); - drawPixelText(batch, *font, names[i], {x0 + 8.0f, 48.0f}, 3.0f, label); - const SpriteSheet &sheet = i % 2 == 0 ? *hero : *heroLinear; - Sprite s = sheet.sprite(0, {x0 + 150.0f, 190.0f}, {0.5f, 0.5f}, i < 2 ? 12.0f : 7.5f); - if (i >= 2) s.rotation = angle; - batch.draw(s); - } - // 中の段:直接(画面の細かいピクセルで回る) ⇔ キャンバス(48×48を6倍) / middle row: direct (turns with the - // screen's fine pixels) ⇔ canvas (48 × 48 enlarged 6×) - batch.drawRect({20.0f, 340.0f, 300.0f, 330.0f}, panel); - drawPixelText(batch, *font, "DIRECT X6", {28.0f, 348.0f}, 3.0f, label); - Sprite direct = hero->sprite(heroAnim.frame(), {20.0f + 6.0f * 24.0f + 6.0f, 380.0f + 6.0f * 22.0f}, {0.5f, 0.5f}, 12.0f); - direct.rotation = angle; - batch.draw(direct); - Sprite directSaw = objects->sprite(objects->find("saw"), {26.0f + 6.0f * 38.0f, 380.0f + 6.0f * 38.0f}, {0.5f, 0.5f}, 6.0f); - directSaw.rotation = 2.0f * time; - batch.draw(directSaw); - batch.drawRect({335.0f, 340.0f, 300.0f, 330.0f}, panel); - drawPixelText(batch, *font, "CANVAS X6", {343.0f, 348.0f}, 3.0f, label); - // FBOの色テクスチャは下の行がv = 0(GLの約束):y下向きの2DではflipYで描く - // An FBO's color texture has its bottom row at v = 0 (the GL convention): draw it with flipY in y-down 2D - Sprite canvasSprite = {.texture = &smallCanvas.framebuffer().color(), .position = {341.0f, 380.0f}, - .size = {288.0f, 288.0f}, .flipY = true}; - batch.draw(canvasSprite); - // 右下:タイルをGL_LINEARで×3.3に。隙間(縁の複製)あり ⇔ なし / bottom right: tiles at ×3.3 with GL_LINEAR, with - // gaps (extruded edges) ⇔ without - for (int k = 0; k < 2; ++k) { - float y0 = 340.0f + 170.0f * static_cast(k); - batch.drawRect({650.0f, y0, 610.0f, 160.0f}, panel); - drawPixelText(batch, *font, k == 0 ? "LINEAR X3.3, 1 PX EXTRUDED GAPS" : "LINEAR X3.3, NO GAPS: BLEEDING", - {658.0f, y0 + 8.0f}, 3.0f, label); - const SpriteSheet &sheet = k == 0 ? *objectsLinear : *noPadLinear; - const char *tiles[] = {"grass", "dirt", "brick", "stone", "crate"}; - for (int t = 0; t < 10; ++t) { - int index = sheet.find(tiles[t / 2]); - batch.draw(sheet.sprite(index, {660.0f + 52.8f * static_cast(t) + 0.3f, y0 + 45.0f + 0.4f}, {0.0f, 0.0f}, 3.3f)); - batch.draw(sheet.sprite(index, {660.0f + 52.8f * static_cast(t) + 0.3f, y0 + 45.0f + 52.8f + 0.4f}, {0.0f, 0.0f}, 3.3f)); - } - } - batch.end(); - } - - if (frame++ % 120 == 1) { - char title[128]; - snprintf(title, sizeof title, "OpenGL Tutorial - Chapter 25 - scene %d - %d draw calls", scene + 1, batch.stats().drawCalls); - window.setTitle(title); - } - window.swapBuffers(); - } + loop.run( + window, input, + [&](float dt) { + scenes.update(dt); + if (scenes.empty()) window.close(); // 最後のシーンが外れたら終わり / quit when the last scene is gone + }, + [&](float alpha) { + // 1. 世界:320×180のキャンバスに描き、整数倍で画面へ / 1. the world: into the 320 × 180 canvas, then scaled by + // a whole number onto the screen + canvas.begin(hexColor(0x1b1726ff)); + scenes.draw(alpha); + canvas.present(window.width(), window.height()); + // 2. UI:1280×720の仮想画面をウィンドウに合わせる(ここでは1倍) / 2. the UI: the 1280 × 720 virtual screen + // fitted to the window (1× here) + demo.uiViewport = letterbox(window.width(), window.height(), demo.screen.viewSize, false); + demo.uiViewport.apply(); + scenes.drawUi(alpha); + // 3. フェード(全部の上に) / 3. the fade (on top of everything) + scenes.drawFade(*batch, demo.screen.matrix(), demo.screen.viewSize); + // 60フレームごとに1行(frame = 描いたフレームの数、このフレームを含む) / a line every 60 frames (frame = the + // number of frames drawn, this one included) + if (++frame % 60 == 30) + printf("frame %d: %zu scene(s), steps %d, alpha %.2f, fps %.1f\n", frame, scenes.size(), + loop.stats().steps, static_cast(loop.stats().alpha), static_cast(loop.stats().fps)); + }); return 0; } diff --git a/demo/pause_scene.cc b/demo/pause_scene.cc new file mode 100644 index 0000000..f0fc40b --- /dev/null +++ b/demo/pause_scene.cc @@ -0,0 +1,58 @@ +// 一時停止のメニュー:上に重ねるシーン / the pause menu: an overlay scene +#include "demo.hh" + +#include "engine/collision.hh" + +#include +#include + +static const char *const kItems[] = {"再開 / Resume", "タイトルへ / Back to title"}; + +Rect PauseScene::itemRect(int i) const { return Rect::fromCentre({640.0f, 380.0f + 60.0f * static_cast(i)}, {520.0f, 48.0f}); } + +void PauseScene::update(float dt) { + time += dt; + Input &in = d.input; + // マウス:ウィンドウの座標 → UIの座標(レターボックスの位置と倍率) / the mouse: window → UI coordinates (the + // letterbox's offset and scale) + Vec2 mouse = d.screen.toWorld(d.uiViewport.toView(in.mousePosition())); + bool choose = false; + for (int i = 0; i < 2; ++i) + if (contains(itemRect(i), mouse) && in.mousePressed(GLFW_MOUSE_BUTTON_LEFT)) { + selected = i; + choose = true; + } + if (!choose) { + if (in.actionPressed("up")) selected = std::max(0, selected - 1); + if (in.actionPressed("down")) selected = std::min(1, selected + 1); + if (in.pressed(GLFW_KEY_ESCAPE) || in.pressed(GLFW_KEY_P)) { + scenes().pop(); // すぐに戻る(フェードなし) / back at once (no fade) + return; + } + choose = in.actionPressed("confirm"); + } + if (!choose) return; + if (selected == 0) scenes().pop(); + // 全部外してタイトルだけに。フェード付き / clear everything and leave only the title, with a fade + else scenes().replaceAll(std::make_unique(d), {.duration = 0.8f}); +} + +void PauseScene::drawUi(float /*alpha*/) { + SpriteBatch &b = d.batch; + // 0.25秒かけて暗くする(シーン自身の演出:SceneManagerのフェードとは別) / darkens over 0.25 s (the scene's own + // effect, separate from the SceneManager's fade) + float t = std::min(1.0f, time / 0.25f); + b.begin(d.screen.matrix()); + b.drawRect({0.0f, 0.0f, 1280.0f, 720.0f}, {0.03f, 0.02f, 0.06f, 0.65f * t}); + b.drawRect(Rect::fromCentre({640.0f, 360.0f}, {600.0f, 300.0f}), {0.11f, 0.09f, 0.16f, 0.95f * t}); + b.drawRectOutline(Rect::fromCentre({640.0f, 360.0f}, {600.0f, 300.0f}), {0.95f, 0.76f, 0.31f, t}, 3.0f); + d.ui.draw(b, "一時停止 / PAUSED", {640.0f, 245.0f}, + {.color = {1.0f, 0.96f, 0.84f, t}, .scale = 3.0f, .align = TextAlign::Centre}); + for (int i = 0; i < 2; ++i) { + Rect r = itemRect(i); + if (i == selected) b.drawRect(r, {0.95f, 0.76f, 0.31f, 0.9f * t}); + Vec4 color = i == selected ? Vec4{0.1f, 0.08f, 0.15f, t} : Vec4{0.85f, 0.85f, 0.9f, t}; + d.ui.draw(b, kItems[i], {640.0f, r.y + 8.0f}, {.color = color, .scale = 2.0f, .align = TextAlign::Centre}); + } + b.end(); +} diff --git a/demo/playground_scene.cc b/demo/playground_scene.cc new file mode 100644 index 0000000..731b7e1 --- /dev/null +++ b/demo/playground_scene.cc @@ -0,0 +1,226 @@ +// 遊び場:固定ステップの更新、行動への入力の割り当て、AABBの当たり判定、乱数 +// The playground: fixed-step updates, input actions, AABB collision, random numbers +#include "demo.hh" + +#include "engine/collision.hh" + +#include +#include +#include +#include + +constexpr float kTile = 16.0f; +constexpr float kSpeed = 90.0f; // ピクセル毎秒 / pixels per second + +// 壁と木箱の配置(20 × 11タイル、#=レンガの壁、C=木箱) / where walls and crates are (20 × 11 tiles, # = brick +// wall, C = crate) +static const char *const kLevel[] = { + "####################", + "#..................#", + "#....C.........CC..#", + "#....CC............#", + "#..................#", + "#...........CC.....#", + "#............C.....#", + "#..................#", + "#........C.........#", + "#..................#", + "####################", +}; + +PlaygroundScene::PlaygroundScene(Demo &demo) : d(demo) { + for (int row = 0; row < 11; ++row) + for (int col = 0; col < 20; ++col) { + Rect r = {kTile * static_cast(col), kTile * static_cast(row), kTile, kTile}; + if (kLevel[row][col] == '#') walls.push_back(r); + if (kLevel[row][col] == 'C') crates.push_back(r); + } + solids = walls; + solids.insert(solids.end(), crates.begin(), crates.end()); + // 当たり判定は絵(16×16)より小さい足元の箱:壁の隙間を通りやすい / the collision box is a foot box smaller than the + // picture (16 × 16): it passes gaps more easily + player = {40.0f, 70.0f, 10.0f, 8.0f}; + playerPrev = player.position(); + saw = Rect::fromCentre({60.0f, 9.0f * kTile + 4.0f}, {12.0f, 12.0f}); + sawPrevX = saw.x; +} + +void PlaygroundScene::enter() { + heroAnim.play(&d.idle); + coins.resize(5); + for (Coin &c : coins) placeCoin(c); +} + +// 一時停止のシーンが上に載った:更新が止まるので、前の位置 = 今の位置にしておく(でないと補間で震える) +// The pause scene went on top: updates stop, so make the previous position = the current one (otherwise the +// interpolation would make things shake) +void PlaygroundScene::pause() { + playerPrev = player.position(); + sawPrevX = saw.x; +} + +void PlaygroundScene::resume() { printf("playground: resumed\n"); } + +bool PlaygroundScene::blocked(const Rect &r) const { + for (const Rect &s : solids) + if (overlaps(r, s)) return true; + return overlaps(r, player); +} + +// 空いているタイルの真ん中にコインを置く(乱数、種26なので毎回同じ並び) / puts a coin in the middle of a free tile +// (random, seed 26: the same sequence on every run) +void PlaygroundScene::placeCoin(Coin &coin) { + for (int tries = 0; tries < 100; ++tries) { + int col = d.rng.range(1, 18), row = d.rng.range(1, 9); + Rect cell = {kTile * static_cast(col), kTile * static_cast(row), kTile, kTile}; + if (blocked(cell)) continue; + coin = {cell.centre(), d.rng.unit()}; + return; + } +} + +void PlaygroundScene::update(float dt) { + time += dt; + Input &in = d.input; + if (in.pressed(GLFW_KEY_ESCAPE) || in.pressed(GLFW_KEY_P)) { + scenes().push(std::make_unique(d)); + return; + } + if (in.pressed(GLFW_KEY_B)) showBoxes = !showBoxes; + if (in.pressed(GLFW_KEY_I)) d.interpolate = !d.interpolate; + if (in.pressed(GLFW_KEY_U)) { + // 更新の速さ:60 Hz ⇔ 10 Hz(補間の効き目がよく分かる) / update rate 60 Hz ⇔ 10 Hz (shows what interpolation does) + d.loop.setStep(d.loop.step() < 0.05 ? 0.1 : 1.0 / 60.0); + } + + // 主人公:行動の軸(左右・上下)で動き、壁と木箱に沿って滑る / the hero: moves by the action axes and slides along + // walls and crates + playerPrev = player.position(); + Vec2 move = {in.axis("left", "right"), in.axis("up", "down")}; + if (move.x != 0.0f) facingLeft = move.x < 0.0f; + moveAndSlide(player, normalize(move) * (kSpeed * dt), solids); + heroAnim.play(move.x != 0.0f || move.y != 0.0f ? &d.walk : &d.idle); + heroAnim.update(dt); + + // 丸のこ:左右に往復。主人公に当たったらMTVで押し出す(ただし押し出した先が壁なら戻す) + // The saw: goes back and forth. When it hits the hero, the hero is pushed out by the MTV (undone if that would put + // the hero inside a wall) + sawPrevX = saw.x; + saw.x += sawDir * 70.0f * dt; + if (saw.right() > 19.0f * kTile || saw.left() < kTile) sawDir = -sawDir; + if (std::optional push = penetration(player, saw)) { + Vec2 knock = *push + normalize(*push) * 6.0f; // 少し余分に弾く / bounce a little further + moveAndSlide(player, knock, solids); + if (hurt <= 0.0f) ++hits; + hurt = 0.5f; + } + hurt = std::max(0.0f, hurt - dt); + + // コイン:重なったら拾う。紙吹雪(乱数の向きと速さ)と「+1」を出し、別の場所に置き直す + // Coins: collected on overlap. Confetti (random directions and speeds) and a "+1", then the coin moves elsewhere + for (Coin &c : coins) { + Rect box = Rect::fromCentre(c.position, {10.0f, 10.0f}); + if (!overlaps(player, box)) continue; + ++collected; + for (int i = 0; i < 16; ++i) { + Vec4 color = d.rng.chance(0.5f) ? hexColor(0xf2c14eff) : hexColor(0xffec96ff); + particles.push_back({c.position, d.rng.direction() * d.rng.range(30.0f, 90.0f), d.rng.range(0.3f, 0.7f), color}); + } + popups.push_back({c.position - Vec2{0.0f, 8.0f}, 0.8f}); + placeCoin(c); + } + for (Particle &p : particles) { + p.position += p.velocity * dt; + p.velocity.y += 160.0f * dt; // 落ちる / gravity + p.life -= dt; + } + std::erase_if(particles, [](const Particle &p) { return p.life <= 0.0f; }); + for (Popup &p : popups) { + p.position.y -= 20.0f * dt; + p.life -= dt; + } + std::erase_if(popups, [](const Popup &p) { return p.life <= 0.0f; }); +} + +void PlaygroundScene::draw(float alpha) { + // 補間:前のステップと今のステップの間のalphaの所に描く。Iで切ると、更新の瞬間の位置に飛び飛びに描く + // Interpolation: draw at alpha between the previous and the current step. With I off, things jump to each update's + // position + float a = d.interpolate ? alpha : 1.0f; + Vec2 p = lerp(playerPrev, player.position(), a); + float sawX = sawPrevX + (saw.x - sawPrevX) * a; + + SpriteBatch &b = d.batch; + b.begin(d.world.matrix(), SpriteSort::Layer); + int stone = d.objects.find("stone"), brick = d.objects.find("brick"), crate = d.objects.find("crate"); + for (int row = 0; row < 12; ++row) + for (int col = 0; col < 20; ++col) { + bool wall = row >= 11 || kLevel[row][col] == '#'; + Sprite s = d.objects.sprite(wall ? brick : stone, {kTile * static_cast(col), kTile * static_cast(row)}); + if (!wall) s.color = hexColor(0xb8bccaff); // 床は少し暗く / the floor a little darker + b.draw(s); + } + for (const Rect &c : crates) { + Sprite s = d.objects.sprite(crate, c.position()); + s.layer = 1.0f; + b.draw(s); + } + for (const Coin &c : coins) { + int frame = d.coinSpin.frames[static_cast((time + c.phase) * d.coinSpin.fps) % d.coinSpin.frames.size()]; + Sprite s = d.objects.sprite(frame, c.position, {0.5f, 0.5f}); + s.position.y += std::round(1.5f * std::sin(4.0f * time + 6.0f * c.phase)); + s.layer = 1.0f; + b.draw(s); + } + Sprite sawSprite = d.objects.sprite(d.objects.find("saw"), Vec2{sawX, saw.y} + 0.5f * saw.size(), {0.5f, 0.5f}); + sawSprite.rotation = 8.0f * time; + sawSprite.layer = 2.0f; + b.draw(sawSprite); + // 主人公の絵は足元の箱の下の中央に合わせる。当たった直後は赤く点滅 / the hero's picture is aligned to the bottom + // center of the foot box. Flashes red right after a hit + Sprite h = d.hero.sprite(heroAnim.frame(), {std::round(p.x + 0.5f * player.w), std::round(p.y + player.h)}, {0.5f, 1.0f}); + h.flipX = facingLeft; + h.layer = 3.0f; + if (hurt > 0.0f && std::fmod(hurt, 0.2f) > 0.1f) h.color = hexColor(0xff6060ff); + b.draw(h); + for (const Particle &pt : particles) { + Vec4 c = pt.color; + c.w = std::min(1.0f, pt.life * 4.0f); + b.drawRect({std::round(pt.position.x), std::round(pt.position.y), 2.0f, 2.0f}, c, 4.0f); + } + // キャンバスの中の文字(1ビットのpixel12) / text inside the canvas (the 1-bit pixel12) + for (const Popup &pp : popups) + d.pixel.draw(b, "+1", pp.position, + {.color = {1.0f, 0.93f, 0.55f, std::min(1.0f, pp.life * 3.0f)}, .align = TextAlign::Centre, + .layer = 5.0f, .shadow = hexColor(0x1b1726ff)}); + if (showBoxes) { + // 当たり判定の箱を見せる(B) / show the collision boxes (B) + for (const Rect &s : solids) b.drawRectOutline(s, hexColor(0x40a0ffb0), 1.0f, 6.0f); + b.drawRectOutline(Rect{p.x, p.y, player.w, player.h}, hexColor(0x40ff60ff), 1.0f, 6.0f); + b.drawRectOutline(Rect{sawX, saw.y, saw.w, saw.h}, hexColor(0xff4040ff), 1.0f, 6.0f); + for (const Coin &c : coins) b.drawRectOutline(Rect::fromCentre(c.position, {10.0f, 10.0f}), hexColor(0xffe040ff), 1.0f, 6.0f); + } + b.end(); +} + +void PlaygroundScene::drawUi(float /*alpha*/) { + SpriteBatch &b = d.batch; + const GameLoopStats &st = d.loop.stats(); + char line[256]; + snprintf(line, sizeof line, "FPS %.0f steps/frame %d alpha %.2f update %.0f Hz (U) interpolation %s (I)", + static_cast(st.fps), st.steps, static_cast(st.alpha), 1.0 / d.loop.step(), + d.interpolate ? "on" : "off"); + b.begin(d.screen.matrix()); + b.drawRect({0.0f, 0.0f, 1280.0f, 30.0f}, hexColor(0x1b1726d0)); + TextStyle hud = {.color = hexColor(0xfff4d6ff), .shadow = hexColor(0x000000ff)}; + d.ui.draw(b, line, {12.0f, 6.0f}, hud); + snprintf(line, sizeof line, "コイン / coins %d 当たり / hits %d", collected, hits); + hud.align = TextAlign::Right; + hud.color = hexColor(0xf2c14eff); + d.ui.draw(b, line, {1268.0f, 6.0f}, hud); + b.drawRect({0.0f, 690.0f, 1280.0f, 30.0f}, hexColor(0x1b1726d0)); + hud.align = TextAlign::Centre; + hud.color = hexColor(0xc8cce0ff); + d.ui.draw(b, "arrows / WASD: move B: boxes I: interpolation U: 60 / 10 Hz P / Esc: pause", {640.0f, 696.0f}, hud); + b.end(); +} diff --git a/demo/title_scene.cc b/demo/title_scene.cc new file mode 100644 index 0000000..1d67513 --- /dev/null +++ b/demo/title_scene.cc @@ -0,0 +1,76 @@ +// タイトル画面 / the title screen +#include "demo.hh" + +#include +#include + +void TitleScene::enter() { + heroAnim.play(&d.walk); + coinAnim.play(&d.coinSpin); +} + +void TitleScene::update(float dt) { + time += dt; + heroAnim.update(dt); + coinAnim.update(dt); + heroPrevX = heroX; + heroX += 40.0f * dt; + if (heroX > 336.0f) heroPrevX = heroX = -16.0f; // 右から出たら左へ戻す(補間しない) / wrap around (no interpolation) + + // 始める:遊び場と入れ替え、0.8秒のフェード(暗くなって0.4秒で入れ替わり、0.4秒で明るくなる) + // Start: replace with the playground, with a 0.8 s fade (0.4 s to black, switch, 0.4 s back) + if (d.input.actionPressed("confirm") || d.input.mousePressed(GLFW_MOUSE_BUTTON_LEFT)) + scenes().replace(std::make_unique(d), {.duration = 0.8f}); + // スタックが空になればmainが終わらせる / main quits once the stack is empty + if (d.input.pressed(GLFW_KEY_ESCAPE)) scenes().pop(); +} + +void TitleScene::draw(float alpha) { + SpriteBatch &b = d.batch; + b.begin(d.world.matrix(), SpriteSort::Layer); + b.drawRect({0.0f, 0.0f, 320.0f, 180.0f}, hexColor(0x8fd3ffff), -1.0f); + int cloud = d.objects.find("cloud"); + for (int i = 0; i < 4; ++i) { + float x = std::fmod(20.0f + 95.0f * static_cast(i) + 5.0f * time, 380.0f) - 40.0f; + b.draw(d.objects.sprite(cloud, {std::round(x), 14.0f + 20.0f * static_cast(i % 2)})); + } + int grass = d.objects.find("grass"), dirt = d.objects.find("dirt"); + for (int x = 0; x < 20; ++x) { + Sprite g = d.objects.sprite(grass, {16.0f * static_cast(x), 148.0f}); + Sprite s = d.objects.sprite(dirt, {16.0f * static_cast(x), 164.0f}); + g.layer = s.layer = 1.0f; + b.draw(g); + b.draw(s); + } + for (int i = 0; i < 5; ++i) { + Sprite c = d.objects.sprite(coinAnim.frame(), {112.0f + 20.0f * static_cast(i), 128.0f}); + c.layer = 2.0f; + b.draw(c); + } + // 描画は前と今の位置の間(alpha):更新が60 Hzでも画面のフレームに合わせて滑らか + // Drawn between the previous and the current position (alpha): smooth at any frame rate with 60 Hz updates + float x = d.interpolate ? heroPrevX + (heroX - heroPrevX) * alpha : heroX; + Sprite h = d.hero.sprite(heroAnim.frame(), {std::round(x), 148.0f}, {0.5f, 1.0f}); + h.layer = 3.0f; + b.draw(h); + b.end(); +} + +void TitleScene::drawUi(float /*alpha*/) { + SpriteBatch &b = d.batch; + b.begin(d.screen.matrix()); + // 文字の後ろに半透明の帯:明るい空の上でも読める / a translucent band behind the text: readable over the bright sky + b.drawRect({0.0f, 110.0f, 1280.0f, 330.0f}, hexColor(0x1b172699)); + const Vec4 shadow = hexColor(0x1b1726ff); + d.ui.draw(b, "2D GAME TOOLKIT", {640.0f, 140.0f}, + {.color = hexColor(0xf2c14eff), .scale = 4.0f, .align = TextAlign::Centre, .shadow = shadow}); + d.ui.draw(b, "2Dゲームの道具箱(第26章) / Chapter 26", {640.0f, 240.0f}, + {.color = hexColor(0xfff4d6ff), .scale = 2.0f, .align = TextAlign::Centre, .shadow = shadow}); + // 点滅:時間で透明度を変える / blinking: the opacity follows the time + float blink = 0.55f + 0.45f * std::cos(4.0f * time); + d.ui.draw(b, "PRESS SPACE / スペースキーで開始", {640.0f, 330.0f}, + {.color = {1.0f, 1.0f, 1.0f, blink}, .scale = 2.0f, .align = TextAlign::Centre, .shadow = shadow}); + d.ui.draw(b, "Esc: quit / 終了", {640.0f, 395.0f}, + {.color = hexColor(0xc8cce0ff), .scale = 1.0f, .align = TextAlign::Centre, .shadow = shadow}); + b.end(); +} diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index f847830..01a9cac 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -40,7 +40,14 @@ add_library(engine STATIC src/pixel_canvas.cc src/sprite_batch.cc src/sprite_sheet.cc - src/animation.cc) + src/animation.cc + # 第26章:ゲームの道具 / chapter 26: the game toolkit + src/font.cc + src/input.cc + src/game_loop.cc + src/scene.cc + src/collision.cc + src/rng.cc) # PUBLIC:エンジンを使う側(ゲーム)にも include/、linalg.hh、GLAD、GLFWが見える # PUBLIC: whoever links the engine (the games) also sees include/, linalg.hh, GLAD and GLFW diff --git a/engine/include/engine/collision.hh b/engine/include/engine/collision.hh new file mode 100644 index 0000000..6cbfcfa --- /dev/null +++ b/engine/include/engine/collision.hh @@ -0,0 +1,40 @@ +// 2Dの当たり判定(第26章):軸に平行な箱(AABB = Rect)同士 / 2D collision (chapter 26): axis-aligned boxes (AABB = +// Rect) against each other +#pragma once + +#include "engine/rect.hh" + +#include +#include + +// 重なっているか。辺が接しているだけなら重ならない / do they overlap? Merely touching edges do not count +bool overlaps(const Rect &a, const Rect &b); +// 点が中にあるか(左・上の辺は含み、右・下の辺は含まない) / is the point inside (left/top edges included, +// right/bottom excluded)? +bool contains(const Rect &r, Vec2 point); + +// 最小移動ベクトル(MTV):aをこれだけ動かせばbから離れる。重なりの浅い方の軸に沿う。重なっていなければnullopt +// The minimum translation vector (MTV): move a by this and it no longer overlaps b. Along the axis of the shallower +// overlap. nullopt if they do not overlap +std::optional penetration(const Rect &a, const Rect &b); + +// 動く箱の掃引テスト:movingがdeltaだけ動く間にtargetに当たるか。time = 0〜1(deltaの何割で当たるか)、 +// normal = 当たった面の向き(targetの外向き)。最初から重なっていればtime = 0、normal = (0, 0) +// Swept test: does `moving` hit `target` while moving by delta? time = 0..1 (the fraction of delta at contact), +// normal = the face that was hit (pointing out of target). Already overlapping: time = 0, normal = (0, 0) +struct SweepHit { + float time = 0.0f; + Vec2 normal; +}; +std::optional sweep(const Rect &moving, Vec2 delta, const Rect &target); + +// 箱をdeltaだけ動かす:まずx、次にyの順に動かし、固い箱(solids)に当たったらその軸だけ止める(壁に沿って滑る)。 +// 1回の移動が箱より大きいとすり抜けることがある(速い物はsweepか、細かく分けて動かす) +// Moves a box by delta: first along x, then along y; hitting a solid stops only that axis (the box slides along +// walls). A move larger than the boxes can tunnel through (use sweep, or split fast moves into smaller ones) +struct MoveResult { + bool hitX = false, hitY = false; + bool hitLeft = false, hitRight = false, hitTop = false, hitBottom = false; // どちら側が当たったか / which side + // touched +}; +MoveResult moveAndSlide(Rect &box, Vec2 delta, std::span solids); diff --git a/engine/include/engine/font.hh b/engine/include/engine/font.hh new file mode 100644 index 0000000..4346036 --- /dev/null +++ b/engine/include/engine/font.hh @@ -0,0 +1,76 @@ +// ビットマップフォント(第26章):文字の画像を並べたアトラス+BMFontのテキスト形式の説明(.fnt) +// Bitmap fonts (chapter 26): an atlas of glyph images + a description in the BMFont text format (.fnt) +#pragma once + +#include "engine/rect.hh" +#include "engine/sprite_batch.hh" +#include "engine/sprite_sheet.hh" +#include "engine/texture.hh" + +#include +#include +#include +#include +#include +#include + +// 一文字の画像と置き方(ピクセル) / one glyph's image and placement (pixels) +struct Glyph { + Rect pixels; // アトラスの中の長方形 / rectangle in the atlas + Vec2 offset; // 行の左上から画像の左上まで / from the line's top left to the image's top left + float advance; // 次の文字までの幅 / distance to the next character +}; + +enum class TextAlign { Left, Centre, Right }; + +struct TextStyle { + Vec4 color = kWhite; + float scale = 1.0f; // 1 = アトラスのピクセルのまま / 1 = the atlas's own pixels + TextAlign align = TextAlign::Left; // 行ごとに:positionが左端・中央・右端 / per line: position is the left edge, + // center or right edge + float layer = 0.0f; // SpriteSort::Layer用 / for SpriteSort::Layer + Vec4 shadow = {0.0f, 0.0f, 0.0f, 0.0f}; // 影の色(アルファ0 = 影なし) / shadow color (alpha 0 = no shadow) + Vec2 shadowOffset = {1.0f, 1.0f}; // 影のずれ(scale倍される) / shadow offset (multiplied by scale) + // 文字をワールドの整数座標にそろえる:拡大率1でピクセルにぴったり乗り、ぼけない / snap glyphs to whole world units: + // at scale 1 they sit exactly on pixels and stay sharp + bool snap = true; +}; + +// UTF-8の文字列から一文字(コードポイント)を読み、iを進める。壊れたバイトはU+FFFD +// Reads one character (code point) from a UTF-8 string and advances i. Broken bytes give U+FFFD +char32_t decodeUtf8(std::string_view text, size_t &i); + +// ビットマップフォント(RAII、コピー不可・移動可)。文字はSpriteBatchで一枚ずつスプライトとして描く +// A bitmap font (RAII, non-copyable, movable). Each character is drawn as one sprite through the SpriteBatch +class Font { +public: + // .fntを読み、page行の画像(.fntと同じフォルダ)を読む。ピクセルフォントはTextureFilter::Nearestで + // Loads the .fnt and the image named by its page line (in the same folder). Use TextureFilter::Nearest for pixel + // fonts + static std::optional load(const std::string &fntPath, TextureFilter filter = TextureFilter::Linear); + + // 文字列の大きさ:幅 = 一番長い行、高さ = 行数 × lineHeight(× scale) / the size of a string: width = the widest + // line, height = lines × lineHeight (× scale) + Vec2 measure(std::string_view utf8, float scale = 1.0f) const; + // positionは1行目の上端(y下向き)。alignで横の基準が変わる。\nで改行 + // position is the top of the first line (y down); align changes the horizontal reference. \n starts a new line + void draw(SpriteBatch &batch, std::string_view utf8, Vec2 position, const TextStyle &style = {}) const; + + // なければnullptr / nullptr if missing + const Glyph *glyph(char32_t c) const; + float lineHeight() const { return lineGap; } + float base() const { return baseline; } // 行の上端からベースラインまで / from the line's top to the baseline + const Texture2D &texture() const { return image; } + +private: + Font() = default; + float lineWidth(std::string_view utf8, size_t start) const; + const Glyph &glyphOrFallback(char32_t c) const; + + Texture2D image; + std::array ascii = {}; // 速く引けるように / fast lookup + std::array hasAscii = {}; + std::unordered_map others; + float lineGap = 0.0f, baseline = 0.0f; + mutable std::unordered_set warned; // ない文字は一度だけ警告 / warn once per missing character +}; diff --git a/engine/include/engine/game_loop.hh b/engine/include/engine/game_loop.hh new file mode 100644 index 0000000..fa8dbfb --- /dev/null +++ b/engine/include/engine/game_loop.hh @@ -0,0 +1,66 @@ +// 固定ステップのゲームループ(第26章):更新は決まった間隔(既定1/60秒)で、描画はできるだけ速く +// The fixed-timestep game loop (chapter 26): updates at a fixed interval (1/60 s by default), drawing as often as +// possible +#pragma once + +#include "engine/input.hh" +#include "engine/window.hh" + +#include +#include + +struct GameLoopSettings { + double step = 1.0 / 60.0; // 更新1回の時間(秒) / seconds per update + // 1フレームで追いつく更新の上限。超えた分の時間は捨てる(遅いPCで「死のスパイラル」にならないように) + // The most updates run in one frame to catch up; time beyond that is dropped (no "spiral of death" on slow PCs) + int maxSteps = 5; + // これより長いフレーム(デバッガーで止めた等)は、この長さだったことにする / longer frames (e.g. stopped in a + // debugger) count as this long + double maxFrame = 0.25; + // フレームの時間がステップの整数倍にこれだけ近ければ、ちょうどにする(60 Hzの画面で16.4〜16.9 msを16.67 msに)。 + // 揺れで更新が0回・2回と交互になるのを防ぐ。貯金がステップにこれだけ足りないときも更新する(maxStepsで + // 捨てるときも1ステップと数える) + // Snap a frame's duration to a whole number of steps when it is this close (16.4-16.9 ms become 16.67 ms on a + // 60 Hz screen); stops jitter from alternating 0 and 2 updates. An accumulator this close to a step also updates + // (and counts as a whole step when time is dropped at maxSteps) + double snapTolerance = 0.0002; +}; + +struct GameLoopStats { + int steps = 0; // 前のフレームの更新の回数 / updates in the last frame + long long totalSteps = 0; // 始めてからの更新の回数 / updates since the start + float alpha = 0.0f; // 前のフレームの補間の割合 / the last frame's interpolation factor + float fps = 0.0f; // 1秒あたりのフレーム数(0.5秒ごとに計算) / frames per second (computed every 0.5 s) + double droppedSeconds = 0.0; // maxSteps・maxFrameで捨てた時間の合計 / total time dropped by maxSteps / maxFrame +}; + +// 固定ステップのループ:経過時間を「貯金」(accumulator)に足し、stepずつ引きながら更新する。残りの割合が +// alpha(0〜1):描画では前の状態と今の状態の間をalphaで補間すると、更新と描画の速さが違っても滑らかに動く +// The fixed-step loop: elapsed time goes into an accumulator, and every update takes `step` out of it. What is left, +// as a fraction of a step, is alpha (0..1): drawing between the previous and the current state with alpha keeps motion +// smooth even when updates and frames run at different rates +class GameLoop { +public: + explicit GameLoop(const GameLoopSettings &settings = {}) : config(settings) {} + + // ウィンドウが閉じるまで:イベント → update(step)を0回以上(毎回の後にinput.endStep()) → draw(alpha) → 表示 + // Until the window closes: events → update(step) zero or more times (input.endStep() after each) → draw(alpha) → + // present + void run(Window &window, Input &input, const std::function &update, + const std::function &draw); + + // 1フレーム分の計算だけ(runが使う。自分でループを書くときにも):frameSecondsを足し、今回の更新の回数を返す + // One frame's arithmetic only (run uses it; also for a hand-written loop): adds frameSeconds and returns how many + // updates to run now + int advance(double frameSeconds); + float alpha() const { return static_cast(std::clamp(accumulator / config.step, 0.0, 1.0)); } + + double step() const { return config.step; } + void setStep(double seconds) { config.step = seconds; } + const GameLoopStats &stats() const { return info; } + +private: + GameLoopSettings config; + GameLoopStats info; + double accumulator = 0.0; +}; diff --git a/engine/include/engine/input.hh b/engine/include/engine/input.hh new file mode 100644 index 0000000..2319a45 --- /dev/null +++ b/engine/include/engine/input.hh @@ -0,0 +1,89 @@ +// 入力の状態(第26章):キーとマウスボタンの「押した・押している・離した」と、行動(アクション)への割り当て +// Input state (chapter 26): pressed / held / released for keys and mouse buttons, plus mapping them to actions +#pragma once + +#include "engine/mathx.hh" +#include "engine/window.hh" + +#include +#include +#include +#include +#include +#include + +// 行動に割り当てるもの:キー(GLFW_KEY_…)かマウスボタン(GLFW_MOUSE_BUTTON_…) +// What an action is bound to: a key (GLFW_KEY_...) or a mouse button (GLFW_MOUSE_BUTTON_...) +struct InputBinding { + enum class Device { Key, MouseButton } device = Device::Key; + int code = 0; + + static InputBinding key(int k) { return {Device::Key, k}; } + static InputBinding mouse(int button) { return {Device::MouseButton, button}; } +}; + +// 入力(コピー・移動不可:Windowのコールバックがthisを持つ)。使い方: +// Input input; input.attach(window); // ウィンドウのonKey・onMouseButton・onScrollを引き受ける +// … 更新の中で input.pressed(GLFW_KEY_SPACE)、input.actionHeld("left") … +// input.endStep(); // 更新1ステップの後(GameLoopが呼ぶ) +// 「押した」「離した」はイベント(コールバック)で覚えておき、次の更新ステップで一度だけtrueになる: +// 1フレームの間に押して離しても取りこぼさず、更新がないフレームでも消えない。 +// Input (neither copyable nor movable: the Window's callbacks hold `this`). Usage: +// Input input; input.attach(window); // takes over the window's onKey, onMouseButton and onScroll +// ... in the update: input.pressed(GLFW_KEY_SPACE), input.actionHeld("left") ... +// input.endStep(); // after each update step (GameLoop calls it) +// "Pressed" and "released" are recorded from events (callbacks) and are true during exactly one update step: a tap +// shorter than a frame is not lost, and frames without an update step do not drop it. +class Input { +public: + Input() = default; + Input(const Input &) = delete; + Input &operator=(const Input &) = delete; + + void attach(Window &window); + // 「押した」「離した」とホイールを消す。更新1ステップの後に呼ぶ / clears pressed, released and the scroll; call it + // after each update step + void endStep(); + + // キー(GLFW_KEY_…) / keys (GLFW_KEY_...) + bool held(int key) const { return valid(key) && keys[static_cast(key)].down; } + bool pressed(int key) const { return valid(key) && keys[static_cast(key)].pressed; } + bool released(int key) const { return valid(key) && keys[static_cast(key)].released; } + // マウス(GLFW_MOUSE_BUTTON_…、位置はウィンドウのピクセルで左上が原点) / the mouse (GLFW_MOUSE_BUTTON_...; the + // position is in window pixels, origin top left) + bool mouseHeld(int button) const { return validButton(button) && buttons[static_cast(button)].down; } + bool mousePressed(int button) const { return validButton(button) && buttons[static_cast(button)].pressed; } + bool mouseReleased(int button) const { return validButton(button) && buttons[static_cast(button)].released; } + Vec2 mousePosition() const; + float scroll() const { return scrollSum; } // 前のステップからの回転量 / scrolled since the last step + + // 行動("left"、"jump"…)。同じ名前に何度もbindすると割り当てが増える / actions ("left", "jump"...). Binding the + // same name again adds more bindings + void bind(std::string_view action, std::initializer_list bindings); + bool actionHeld(std::string_view action) const; + bool actionPressed(std::string_view action) const; + bool actionReleased(std::string_view action) const; + // -1〜1:negativeが押されていれば-1、positiveなら+1、両方なら0 / -1..1: -1 while negative is held, +1 for + // positive, 0 for both + float axis(std::string_view negative, std::string_view positive) const; + +private: + struct State { + bool down = false, pressed = false, released = false; + }; + struct Action { + std::string name; + std::vector bindings; + }; + static bool valid(int key) { return key >= 0 && key <= GLFW_KEY_LAST; } + static bool validButton(int b) { return b >= 0 && b <= GLFW_MOUSE_BUTTON_LAST; } + static void apply(State &s, int action); + const Action *find(std::string_view name) const; + const State &state(const InputBinding &b) const; + + Window *window = nullptr; + std::array keys = {}; + std::array buttons = {}; + float scrollSum = 0.0f; + std::vector actions; +}; diff --git a/engine/include/engine/rng.hh b/engine/include/engine/rng.hh new file mode 100644 index 0000000..26a9dfe --- /dev/null +++ b/engine/include/engine/rng.hh @@ -0,0 +1,49 @@ +// 乱数(第26章):種(シード)を決めれば毎回同じ並び。std::mt19937の包み / random numbers (chapter 26): the same +// sequence for the same seed. A wrapper around std::mt19937 +#pragma once + +#include "engine/mathx.hh" + +#include +#include +#include +#include + +// std::mt19937の出す数は規格で決まっている(どのコンパイラでも同じ)。でもstd::uniform_int_distributionなどの +// 分布は実装ごとに違う:同じ種でもMSVCとGCCで別の結果になる。リプレイやテストのために、範囲への変換は自分で書く +// The numbers std::mt19937 produces are fixed by the standard (identical with every compiler), but distributions +// such as std::uniform_int_distribution differ per implementation: the same seed gives different results with MSVC +// and GCC. For replays and tests we write the mapping to ranges ourselves +class Rng { +public: + explicit Rng(std::uint32_t seed = 1) : engine(seed) {} + void seed(std::uint32_t s) { engine.seed(s); } + + std::uint32_t next() { return static_cast(engine()); } // 32ビット / 32 bits + // [0, 1):上の24ビットだけ使う(floatの仮数に収まる) / [0, 1): uses the top 24 bits (they fit a float's mantissa) + float unit() { return static_cast(next() >> 8) * (1.0f / 16777216.0f); } + // [lo, hi)。丸めでhiちょうどになることがある(例:range(100, 101)でunit()が1に近いとき)ので、そのときはhiの一つ手前の + // float / [lo, hi). Rounding can land exactly on hi (e.g. range(100, 101) with unit() close to 1): then it returns + // the float just below hi + float range(float lo, float hi) { + float r = lo + (hi - lo) * unit(); + return r >= hi && hi > lo ? std::nextafter(hi, lo) : r; + } + // [lo, hi](両端を含む)。棄却法で偏りなし / [lo, hi] (both included). Unbiased, by rejection + int range(int lo, int hi); + // 確率pでtrue / true with probability p + bool chance(float p) { return unit() < p; } + // 長さ1のランダムな向き / a random direction of length 1 + Vec2 direction(); + + // 配列から一つ選ぶ(空でないこと) / picks one element (the span must not be empty) + template + const T &pick(std::span items) { + return items[static_cast(range(0, static_cast(items.size()) - 1))]; + } + + std::mt19937 &raw() { return engine; } // std::shuffleなどに / for std::shuffle and friends + +private: + std::mt19937 engine; +}; diff --git a/engine/include/engine/scene.hh b/engine/include/engine/scene.hh new file mode 100644 index 0000000..e73e7bb --- /dev/null +++ b/engine/include/engine/scene.hh @@ -0,0 +1,109 @@ +// シーン(第26章):タイトル・ゲーム本体・一時停止…を別々のクラスにして、スタックで切り替える +// Scenes (chapter 26): the title, the game itself, the pause menu... as separate classes, switched with a stack +#pragma once + +#include "engine/mathx.hh" +#include "engine/sprite_batch.hh" + +#include +#include + +class SceneManager; + +// シーンの基底クラス。必要なフックだけ上書きする。ゲームの共有データ(バッチ、フォント、入力…)は +// 各ゲームが自分のコンストラクターで渡す(エンジンは中身を知らない) +// The scene base class; override the hooks you need. A game's shared data (batch, fonts, input...) is passed in by +// each game through its own constructors (the engine does not know what it is) +class Scene { +public: + virtual ~Scene() = default; + + virtual void enter() {} // スタックに載った / was put on the stack + virtual void exit() {} // スタックから外される直前 / is about to be removed from the stack + virtual void pause() {} // 上に別のシーンが載った / another scene was pushed on top + virtual void resume() {} // 上のシーンが外れて、また一番上になった / the scene above was popped; on top again + // 固定ステップの更新(一番上のシーンだけ) / the fixed-step update (top scene only) + virtual void update(float dt) = 0; + // 描画:世界(キャンバスなど)とUI(画面の解像度の文字など)の2回。下から上の順に呼ばれる + // Drawing in two passes: the world (into a canvas, say) and the UI (text at screen resolution, say). Called bottom + // to top + virtual void draw(float alpha) = 0; + virtual void drawUi(float /*alpha*/) {} + // trueなら下のシーンも描かれる(一時停止のメニューなど、上に重ねるシーン) / true: the scenes below are drawn too + // (overlays such as a pause menu) + virtual bool isOverlay() const { return false; } + +protected: + // このシーンを持つマネージャー:scenes().push(…)などで切り替えを頼む / the manager that owns this scene: ask it for + // changes with scenes().push(...) etc. + SceneManager &scenes() const { return *owner; } + +private: + friend class SceneManager; + SceneManager *owner = nullptr; +}; + +// 切り替えの演出:duration秒かけてcolorに塗りつぶし(フェードアウト)、切り替えて、元に戻す(フェードイン)。 +// duration = 0なら一瞬で切り替える +// A transition: fade to `color` over half of `duration` (fade out), switch, and fade back (fade in). +// duration = 0 switches at once +struct Transition { + float duration = 0.0f; + Vec4 color = {0.0f, 0.0f, 0.0f, 1.0f}; +}; + +// シーンのスタック。push・pop・replaceは「頼む」だけで、今の更新が終わってから(フェードならフェードアウトの後で) +// 実行される:update()の途中でシーンが消えることはない +// The scene stack. push, pop and replace only *request* a change; it happens after the current update (after the +// fade out, with a fade): a scene is never deleted in the middle of its own update() +class SceneManager { +public: + SceneManager() = default; + SceneManager(const SceneManager &) = delete; + SceneManager &operator=(const SceneManager &) = delete; + + void push(std::unique_ptr scene, Transition transition = {}); + void pop(Transition transition = {}); + void replace(std::unique_ptr scene, Transition transition = {}); // 一番上を入れ替える / swaps the top + void replaceAll(std::unique_ptr scene, Transition transition = {}); // 全部外して載せる / clears, then pushes + + // 切り替えを進め、一番上のシーンを更新する(フェードアウトの間は誰も更新しない) + // Advances changes and fades, and updates the top scene (nobody is updated during a fade out) + void update(float dt); + // 一番上から下へ、覆い隠さないシーン(isOverlay)が続く所まで遡って、下から順に描く。フェードアウトの間は + // alpha = 1(止まった今の状態)で描く + // Draws from the lowest visible scene up: below the top scene for as long as the scenes above are overlays. + // During a fade out the scenes are drawn with alpha = 1 (the frozen current state) + void draw(float alpha); + void drawUi(float alpha); + // 画面全体をフェードの色で塗る(UIの後に)。viewSizeはcameraMatrixの仮想画面の大きさ + // Covers the screen with the fade color (after the UI). viewSize is the virtual screen of cameraMatrix + void drawFade(SpriteBatch &batch, const Mat4 &cameraMatrix, Vec2 viewSize) const; + + // 0 = 塗りなし 〜 1 = 全部フェードの色 / 0 = no cover .. 1 = completely the fade color + float fadeAmount() const; + bool transitioning() const { return phase != Phase::None || !pending.empty(); } + bool empty() const { return stack.empty() && pending.empty(); } + size_t size() const { return stack.size(); } + Scene *top() const { return stack.empty() ? nullptr : stack.back().get(); } + +private: + enum class Op { Push, Pop, Replace, ReplaceAll }; + struct Request { + Op op; + std::unique_ptr scene; + Transition transition; + }; + enum class Phase { None, Out, In }; + + void request(Op op, std::unique_ptr scene, Transition transition); + void apply(Request &r); + size_t firstVisible() const; + float drawAlpha(float alpha) const; + + std::vector> stack; + std::vector pending; + Phase phase = Phase::None; + float phaseTime = 0.0f; + Transition current; +}; diff --git a/engine/src/collision.cc b/engine/src/collision.cc new file mode 100644 index 0000000..c528cbc --- /dev/null +++ b/engine/src/collision.cc @@ -0,0 +1,85 @@ +#include "engine/collision.hh" + +#include +#include +#include + +bool overlaps(const Rect &a, const Rect &b) { + return a.left() < b.right() && b.left() < a.right() && a.top() < b.bottom() && b.top() < a.bottom(); +} + +bool contains(const Rect &r, Vec2 p) { return p.x >= r.left() && p.x < r.right() && p.y >= r.top() && p.y < r.bottom(); } + +std::optional penetration(const Rect &a, const Rect &b) { + if (!overlaps(a, b)) return std::nullopt; + // 左右・上下それぞれ、どちらへ押し出すと近いか / for each axis, which way out is shorter + float pushLeft = b.left() - a.right(), pushRight = b.right() - a.left(); // < 0 と > 0 + float pushUp = b.top() - a.bottom(), pushDown = b.bottom() - a.top(); + float dx = -pushLeft < pushRight ? pushLeft : pushRight; + float dy = -pushUp < pushDown ? pushUp : pushDown; + // 浅い方の軸だけで押し出す / push out along the shallower axis only + if (std::fabs(dx) < std::fabs(dy)) return Vec2{dx, 0.0f}; + return Vec2{0.0f, dy}; +} + +std::optional sweep(const Rect &moving, Vec2 delta, const Rect &target) { + if (overlaps(moving, target)) return SweepHit{0.0f, {0.0f, 0.0f}}; + // targetをmovingの大きさだけ太らせると(ミンコフスキー和)、movingの左上の点が動く線分と箱の交差になる + // Growing target by moving's size (a Minkowski sum) turns this into a ray (moving's top-left point) against a box + Rect grown = {target.x - moving.w, target.y - moving.h, target.w + moving.w, target.h + moving.h}; + constexpr float kInf = std::numeric_limits::infinity(); + float enter = -kInf, leave = kInf; + Vec2 normal; + // スラブ法:軸ごとに入る時間と出る時間 / the slab method: entry and exit time per axis + for (int axis = 0; axis < 2; ++axis) { + float p = axis == 0 ? moving.x : moving.y, d = axis == 0 ? delta.x : delta.y; + float lo = axis == 0 ? grown.left() : grown.top(), hi = axis == 0 ? grown.right() : grown.bottom(); + if (d == 0.0f) { + if (p <= lo || p >= hi) return std::nullopt; // この軸で一度も重ならない / never overlaps on this axis + continue; + } + float t0 = (lo - p) / d, t1 = (hi - p) / d; + if (t0 > t1) std::swap(t0, t1); + if (t0 > enter) { + enter = t0; + normal = axis == 0 ? Vec2{d > 0.0f ? -1.0f : 1.0f, 0.0f} : Vec2{0.0f, d > 0.0f ? -1.0f : 1.0f}; + } + leave = std::min(leave, t1); + } + // enter == leaveは角をかすめるだけ(接するが重ならない):overlapsと同じく当たりではない + // enter == leave only grazes a corner (touching, never overlapping): like overlaps, not a hit + if (enter >= leave || enter < 0.0f || enter > 1.0f) return std::nullopt; + return SweepHit{enter, normal}; +} + +MoveResult moveAndSlide(Rect &box, Vec2 delta, std::span solids) { + MoveResult result; + // x:動いてから、重なった固い箱の手前に戻す / x: move, then back out of every solid it now overlaps + box.x += delta.x; + for (const Rect &s : solids) { + if (!overlaps(box, s)) continue; + if (delta.x > 0.0f) { + box.x = s.left() - box.w; + result.hitRight = true; + } else if (delta.x < 0.0f) { + box.x = s.right(); + result.hitLeft = true; + } + result.hitX = true; + } + // y:同じように(y下向き:正 = 下へ、下で当たる = 地面に立った) / y: the same (y down: positive = downwards; hitting + // below = standing on the ground) + box.y += delta.y; + for (const Rect &s : solids) { + if (!overlaps(box, s)) continue; + if (delta.y > 0.0f) { + box.y = s.top() - box.h; + result.hitBottom = true; + } else if (delta.y < 0.0f) { + box.y = s.bottom(); + result.hitTop = true; + } + result.hitY = true; + } + return result; +} diff --git a/engine/src/font.cc b/engine/src/font.cc new file mode 100644 index 0000000..d94b424 --- /dev/null +++ b/engine/src/font.cc @@ -0,0 +1,191 @@ +#include "engine/font.hh" + +#include "engine/file_util.hh" + +#include +#include +#include +#include +#include + +char32_t decodeUtf8(std::string_view s, size_t &i) { + auto byte = [&](size_t k) { return static_cast(s[k]); }; + unsigned char b0 = byte(i++); + if (b0 < 0x80) return b0; // ASCII + // 先頭バイトの上のビットで長さが決まる:110xxxxx = 2、1110xxxx = 3、11110xxx = 4バイト + // The leading byte's top bits give the length: 110xxxxx = 2, 1110xxxx = 3, 11110xxx = 4 bytes + int extra = (b0 & 0xE0) == 0xC0 ? 1 : (b0 & 0xF0) == 0xE0 ? 2 : (b0 & 0xF8) == 0xF0 ? 3 : -1; + if (extra < 0 || i + static_cast(extra) > s.size()) return 0xFFFD; + char32_t c = b0 & (0x3F >> extra); + for (int k = 0; k < extra; ++k) { + unsigned char b = byte(i); + if ((b & 0xC0) != 0x80) return 0xFFFD; // 続きのバイトは10xxxxxx / continuation bytes are 10xxxxxx + c = (c << 6) | (b & 0x3F); + ++i; + } + return c; +} + +// BMFontの1行の key=value を読む(file="…" の引用符も) / reads the key=value pairs of one BMFont line (also quoted +// file="...") +static std::unordered_map parseFields(const std::string &line) { + std::unordered_map fields; + size_t i = line.find(' '); + while (i != std::string::npos && i < line.size()) { + while (i < line.size() && line[i] == ' ') ++i; + size_t eq = line.find('=', i); + if (eq == std::string::npos) break; + std::string key = line.substr(i, eq - i); + size_t end; + std::string value; + if (eq + 1 < line.size() && line[eq + 1] == '"') { + end = line.find('"', eq + 2); + if (end == std::string::npos) end = line.size(); + value = line.substr(eq + 2, end - eq - 2); + ++end; + } else { + end = line.find(' ', eq + 1); + value = line.substr(eq + 1, end == std::string::npos ? std::string::npos : end - eq - 1); + } + fields[key] = value; + i = end; + } + return fields; +} + +std::optional Font::load(const std::string &fntPath, TextureFilter filter) { + std::optional text = readTextFile(fntPath); + if (!text) { + fprintf(stderr, "%s: 読めない / cannot read (プロジェクトのルートから実行した? / running from the project root?)\n", + fntPath.c_str()); + return std::nullopt; + } + Font font; + std::string pageFile; + std::istringstream lines(*text); + std::string line; + int lineNumber = 0, glyphs = 0; + while (std::getline(lines, line)) { + ++lineNumber; + if (!line.empty() && line.back() == '\r') line.pop_back(); + std::string tag = line.substr(0, line.find(' ')); + auto f = parseFields(line); + auto number = [&](const char *key) { + auto it = f.find(key); + return it == f.end() ? 0.0f : std::strtof(it->second.c_str(), nullptr); + }; + if (tag == "common") { + font.lineGap = number("lineHeight"); + font.baseline = number("base"); + if (number("pages") > 1) fprintf(stderr, "%s: 最初のページだけ使う / only the first page is used\n", fntPath.c_str()); + } else if (tag == "page") { + if (number("id") == 0) pageFile = f["file"]; + } else if (tag == "char") { + if (f.find("id") == f.end()) { + fprintf(stderr, "%s:%d: idのないchar / char without id\n", fntPath.c_str(), lineNumber); + return std::nullopt; + } + char32_t id = static_cast(std::strtoul(f["id"].c_str(), nullptr, 10)); + Glyph g{{number("x"), number("y"), number("width"), number("height")}, + {number("xoffset"), number("yoffset")}, number("xadvance")}; + if (id < 128) { + font.ascii[id] = g; + font.hasAscii[id] = true; + } else { + font.others[id] = g; + } + ++glyphs; + } + // info, chars, kerning… は使わない(等幅フォントなのでカーニングなし) / info, chars, kerning... are not used + // (monospaced fonts need no kerning) + } + if (pageFile.empty() || glyphs == 0 || font.lineGap <= 0.0f) { + fprintf(stderr, "%s: BMFontのテキスト形式ではない? / not a BMFont text file? (page, char, common lineHeight)\n", + fntPath.c_str()); + return std::nullopt; + } + size_t slash = fntPath.find_last_of("/\\"); + std::string folder = slash == std::string::npos ? "" : fntPath.substr(0, slash + 1); + std::optional texture = loadSpriteTexture(folder + pageFile, filter); + if (!texture) return std::nullopt; + font.image = std::move(*texture); + return font; +} + +const Glyph *Font::glyph(char32_t c) const { + if (c < 128) return hasAscii[c] ? &ascii[c] : nullptr; + auto it = others.find(c); + return it == others.end() ? nullptr : &it->second; +} + +const Glyph &Font::glyphOrFallback(char32_t c) const { + if (const Glyph *g = glyph(c)) return *g; + if (warned.insert(c).second) fprintf(stderr, "フォントにない文字 / character not in the font: U+%04X\n", static_cast(c)); + // 代わりに「?」(それもなければ空白の幅) / a "?" instead (or the width of a space if even that is missing) + if (const Glyph *q = glyph(U'?')) return *q; + static const Glyph empty{{0, 0, 0, 0}, {0, 0}, 0}; + return empty; +} + +float Font::lineWidth(std::string_view s, size_t i) const { + float width = 0.0f; + while (i < s.size()) { + char32_t c = decodeUtf8(s, i); + if (c == U'\n') break; + width += glyphOrFallback(c).advance; + } + return width; +} + +Vec2 Font::measure(std::string_view s, float scale) const { + float widest = 0.0f; + int lines = 1; + size_t i = 0; + widest = lineWidth(s, 0); + while (i < s.size()) { + if (decodeUtf8(s, i) == U'\n') { + ++lines; + widest = std::max(widest, lineWidth(s, i)); + } + } + return Vec2{widest, lineGap * static_cast(lines)} * scale; +} + +void Font::draw(SpriteBatch &batch, std::string_view s, Vec2 position, const TextStyle &style) const { + // 影は同じ文字をずらして先に描く(同じlayerの中で先 = 奥) / the shadow is the same text drawn first, offset (first + // within the same layer = behind) + if (style.shadow.w > 0.0f) { + TextStyle shadowStyle = style; + shadowStyle.shadow.w = 0.0f; + shadowStyle.color = style.shadow; + draw(batch, s, position + style.shadowOffset * style.scale, shadowStyle); + } + auto lineStart = [&](size_t i) { + float w = lineWidth(s, i) * style.scale; + float x = style.align == TextAlign::Left ? position.x : style.align == TextAlign::Centre ? position.x - 0.5f * w + : position.x - w; + return style.snap ? std::round(x) : x; + }; + float y = style.snap ? std::round(position.y) : position.y; + float x = lineStart(0); + size_t i = 0; + while (i < s.size()) { + char32_t c = decodeUtf8(s, i); + if (c == U'\n') { + y += lineGap * style.scale; + x = lineStart(i); + continue; + } + const Glyph &g = glyphOrFallback(c); + if (g.pixels.w > 0.0f && g.pixels.h > 0.0f) { + float w = static_cast(image.width()), h = static_cast(image.height()); + batch.draw({.texture = &image, + .position = {x + g.offset.x * style.scale, y + g.offset.y * style.scale}, + .size = g.pixels.size() * style.scale, + .uv = {g.pixels.x / w, g.pixels.y / h, g.pixels.w / w, g.pixels.h / h}, + .color = style.color, + .layer = style.layer}); + } + x += g.advance * style.scale; + } +} diff --git a/engine/src/game_loop.cc b/engine/src/game_loop.cc new file mode 100644 index 0000000..c6f86f2 --- /dev/null +++ b/engine/src/game_loop.cc @@ -0,0 +1,64 @@ +#include "engine/game_loop.hh" + +#include + +int GameLoop::advance(double frameSeconds) { + if (frameSeconds > config.maxFrame) { + info.droppedSeconds += frameSeconds - config.maxFrame; + frameSeconds = config.maxFrame; + } + if (frameSeconds < 0.0) frameSeconds = 0.0; + // ステップの整数倍に近ければそろえる / snap to a whole number of steps when close + double multiple = std::round(frameSeconds / config.step); + if (multiple >= 1.0 && std::fabs(frameSeconds - multiple * config.step) < config.snapTolerance) + frameSeconds = multiple * config.step; + + accumulator += frameSeconds; + int steps = 0; + // 貯金がステップにほんの少し足りないだけ(浮動小数点の誤差:0.0333…×3 = 0.0999…)なら更新する。 + // 残りがわずかに負になっても、alpha()は0に切り詰める + // Also update when the accumulator is only a hair short of a step (floating-point error: 0.0333... × 3 = + // 0.0999...). If what is left goes slightly negative, alpha() clamps it to 0 + while (accumulator > config.step - config.snapTolerance && steps < config.maxSteps) { + accumulator -= config.step; + ++steps; + } + // 上限に達しても丸ごとのステップが残っていれば捨てる(追いつけない分)。上と同じ許容差で数えるので、 + // ほんの少し足りないだけの分も1ステップとして捨てる / whole steps still left at the limit are dropped (they cannot + // be caught up), counted with the same tolerance as above: one that is only a hair short is dropped too + if (steps == config.maxSteps && accumulator > config.step - config.snapTolerance) { + double whole = std::floor((accumulator + config.snapTolerance) / config.step); + info.droppedSeconds += whole * config.step; + accumulator -= whole * config.step; + } + info.steps = steps; + info.totalSteps += steps; + info.alpha = alpha(); + return steps; +} + +void GameLoop::run(Window &window, Input &input, const std::function &update, + const std::function &draw) { + double last = window.time(); + double fpsStart = last; + int fpsFrames = 0; + while (!window.shouldClose()) { + window.pollEvents(); // ここでInputのコールバックが呼ばれる / Input's callbacks run here + double now = window.time(); + int steps = advance(now - last); + last = now; + for (int i = 0; i < steps; ++i) { + update(static_cast(config.step)); + input.endStep(); // 「押した」は1ステップだけ / "pressed" lasts one step + } + draw(alpha()); + window.swapBuffers(); + + ++fpsFrames; + if (now - fpsStart >= 0.5) { + info.fps = static_cast(fpsFrames / (now - fpsStart)); + fpsStart = now; + fpsFrames = 0; + } + } +} diff --git a/engine/src/input.cc b/engine/src/input.cc new file mode 100644 index 0000000..9f2084d --- /dev/null +++ b/engine/src/input.cc @@ -0,0 +1,81 @@ +#include "engine/input.hh" + +void Input::apply(State &s, int action) { + if (action == GLFW_PRESS) { + s.down = true; + s.pressed = true; + } else if (action == GLFW_RELEASE) { + s.down = false; + s.released = true; + } + // GLFW_REPEAT(押しっぱなしの自動連打)は無視 / GLFW_REPEAT (auto-repeat while held) is ignored +} + +void Input::attach(Window &w) { + window = &w; + w.onKey = [this](int key, int action, int /*mods*/) { + if (valid(key)) apply(keys[static_cast(key)], action); + }; + w.onMouseButton = [this](int button, int action, int /*mods*/) { + if (validButton(button)) apply(buttons[static_cast(button)], action); + }; + w.onScroll = [this](double /*dx*/, double dy) { scrollSum += static_cast(dy); }; +} + +void Input::endStep() { + for (State &s : keys) s.pressed = s.released = false; + for (State &s : buttons) s.pressed = s.released = false; + scrollSum = 0.0f; +} + +Vec2 Input::mousePosition() const { + return window ? Vec2{static_cast(window->mouseX()), static_cast(window->mouseY())} : Vec2{}; +} + +void Input::bind(std::string_view action, std::initializer_list bindings) { + for (Action &a : actions) + if (a.name == action) { + a.bindings.insert(a.bindings.end(), bindings); + return; + } + actions.push_back({std::string(action), std::vector(bindings)}); +} + +const Input::Action *Input::find(std::string_view name) const { + for (const Action &a : actions) + if (a.name == name) return &a; + return nullptr; +} + +const Input::State &Input::state(const InputBinding &b) const { + static const State none; + if (b.device == InputBinding::Device::Key) return valid(b.code) ? keys[static_cast(b.code)] : none; + return validButton(b.code) ? buttons[static_cast(b.code)] : none; +} + +bool Input::actionHeld(std::string_view name) const { + if (const Action *a = find(name)) + for (const InputBinding &b : a->bindings) + if (state(b).down) return true; + return false; +} + +bool Input::actionPressed(std::string_view name) const { + if (const Action *a = find(name)) + for (const InputBinding &b : a->bindings) + if (state(b).pressed) return true; + return false; +} + +// 離した:どれかを離して、もう何も押していない(AとLEFTの両方を押していたら、両方離したとき) +// Released: one binding was released and none is held any more (with both A and LEFT held: when both are up) +bool Input::actionReleased(std::string_view name) const { + bool any = false; + if (const Action *a = find(name)) + for (const InputBinding &b : a->bindings) any = any || state(b).released; + return any && !actionHeld(name); +} + +float Input::axis(std::string_view negative, std::string_view positive) const { + return (actionHeld(positive) ? 1.0f : 0.0f) - (actionHeld(negative) ? 1.0f : 0.0f); +} diff --git a/engine/src/rng.cc b/engine/src/rng.cc new file mode 100644 index 0000000..64ab0dd --- /dev/null +++ b/engine/src/rng.cc @@ -0,0 +1,22 @@ +#include "engine/rng.hh" + +#include +#include + +int Rng::range(int lo, int hi) { + if (hi < lo) std::swap(lo, hi); + // 幅n。2^32をnで割った余りの分だけ大きい数を捨てると、どの値も同じ確率になる(% nだけだと小さい値が少し多い) + // Width n. Throwing away the top (2^32 mod n) values makes every result equally likely (plain % n slightly favors + // small values) + std::uint64_t n = static_cast(static_cast(hi) - lo) + 1; + std::uint64_t limit = (std::uint64_t{1} << 32) - ((std::uint64_t{1} << 32) % n); + std::uint64_t x; + do x = next(); + while (x >= limit); + return static_cast(static_cast(lo) + static_cast(x % n)); +} + +Vec2 Rng::direction() { + float a = range(0.0f, 2.0f * PI); + return {std::cos(a), std::sin(a)}; +} diff --git a/engine/src/scene.cc b/engine/src/scene.cc new file mode 100644 index 0000000..eefa08a --- /dev/null +++ b/engine/src/scene.cc @@ -0,0 +1,106 @@ +#include "engine/scene.hh" + +#include +#include + +void SceneManager::request(Op op, std::unique_ptr scene, Transition transition) { + pending.push_back({op, std::move(scene), transition}); +} + +void SceneManager::push(std::unique_ptr scene, Transition t) { request(Op::Push, std::move(scene), t); } +void SceneManager::pop(Transition t) { request(Op::Pop, nullptr, t); } +void SceneManager::replace(std::unique_ptr scene, Transition t) { request(Op::Replace, std::move(scene), t); } +void SceneManager::replaceAll(std::unique_ptr scene, Transition t) { + request(Op::ReplaceAll, std::move(scene), t); +} + +void SceneManager::apply(Request &r) { + auto removeTop = [&] { + stack.back()->exit(); + stack.pop_back(); + }; + if (r.op == Op::Pop || r.op == Op::Replace) { + if (!stack.empty()) removeTop(); + if (r.op == Op::Pop && !stack.empty()) stack.back()->resume(); + } + if (r.op == Op::ReplaceAll) + while (!stack.empty()) removeTop(); + if (r.scene) { + if (r.op == Op::Push && !stack.empty()) stack.back()->pause(); + r.scene->owner = this; + stack.push_back(std::move(r.scene)); + stack.back()->enter(); + } +} + +void SceneManager::update(float dt) { + if (phase == Phase::Out) { + // フェードアウト中:誰も更新しない。半分の時間で切り替えてフェードインへ / fading out: no updates. Switch at half + // time and fade in + phaseTime += dt; + if (phaseTime >= 0.5f * current.duration) { + apply(pending.front()); + pending.erase(pending.begin()); + phase = Phase::In; + phaseTime = 0.0f; + } + return; + } + if (phase == Phase::In) { + phaseTime += dt; + if (phaseTime >= 0.5f * current.duration) phase = Phase::None; + } + if (Scene *s = top()) s->update(dt); + // 頼まれた切り替え:フェードなしなら今すぐ全部、フェード付きならフェードアウトを始める + // Requested changes: without a fade apply them now, with a fade start fading out + while (!pending.empty() && phase == Phase::None) { + if (pending.front().transition.duration > 0.0f) { + current = pending.front().transition; + phase = Phase::Out; + phaseTime = 0.0f; + break; + } + apply(pending.front()); + pending.erase(pending.begin()); + } +} + +size_t SceneManager::firstVisible() const { + size_t i = stack.size() - 1; + while (i > 0 && stack[i]->isOverlay()) --i; + return i; +} + +void SceneManager::draw(float alpha) { + if (stack.empty()) return; + for (size_t i = firstVisible(); i < stack.size(); ++i) stack[i]->draw(drawAlpha(alpha)); +} + +void SceneManager::drawUi(float alpha) { + if (stack.empty()) return; + for (size_t i = firstVisible(); i < stack.size(); ++i) stack[i]->drawUi(drawAlpha(alpha)); +} + +float SceneManager::fadeAmount() const { + if (phase == Phase::None || current.duration <= 0.0f) return 0.0f; + float t = std::clamp(phaseTime / (0.5f * current.duration), 0.0f, 1.0f); + return phase == Phase::Out ? t : 1.0f - t; +} + +float SceneManager::drawAlpha(float alpha) const { + // フェードアウト中は誰も更新されない:止まった今の状態(alpha = 1)を描く。前と今の間の補間を続けると、 + // alphaが変わるたびに動いていたものが前後に揺れる / during a fade out nobody is updated: draw the frozen current + // state (alpha = 1). Interpolating on between previous and current would make moving things shuffle back and forth + // as alpha changes + return phase == Phase::Out ? 1.0f : alpha; +} + +void SceneManager::drawFade(SpriteBatch &batch, const Mat4 &cameraMatrix, Vec2 viewSize) const { + float amount = fadeAmount(); + if (amount <= 0.0f) return; + Vec4 c = current.color; + c.w *= amount; + batch.begin(cameraMatrix); + batch.drawRect({0.0f, 0.0f, viewSize.x, viewSize.y}, c); + batch.end(); +}