mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 11:51:50 +09:00
proper render, except there can be NO transparency in color & spritesheet
This commit is contained in:
242
.idea/workspace.xml
generated
242
.idea/workspace.xml
generated
@@ -7,11 +7,11 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="22c5bc80-996c-4846-b173-7dc8c2096fe3" name="Default" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/libraries/GdxLib.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/GdxLib.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/CONTRIBUTING.md" beforeDir="false" afterPath="$PROJECT_DIR$/CONTRIBUTING.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/FontTestGDX/lib/TerrarumSansBitmap.jar" beforeDir="false" afterPath="$PROJECT_DIR$/FontTestGDX/lib/TerrarumSansBitmap.jar" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/PUA_allocation_chart.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/PUA_allocation_chart.xlsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/demo.PNG" beforeDir="false" afterPath="$PROJECT_DIR$/demo.PNG" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/demotext.txt" beforeDir="false" afterPath="$PROJECT_DIR$/demotext.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/out/" />
|
||||
@@ -32,8 +32,11 @@
|
||||
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="424">
|
||||
<caret line="1366" column="5" selection-start-line="1366" selection-start-column="5" selection-end-line="1366" selection-end-column="5" />
|
||||
<state relative-caret-position="402">
|
||||
<caret line="1433" column="21" selection-start-line="1433" selection-start-column="21" selection-end-line="1433" selection-end-column="21" />
|
||||
<folding>
|
||||
<element signature="e#1207#1689#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -72,7 +75,7 @@
|
||||
<file leaf-file-name="FontTestGDX.kt" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="429">
|
||||
<state relative-caret-position="-195">
|
||||
<caret line="33" column="38" selection-start-line="33" selection-start-column="38" selection-end-line="33" selection-end-column="38" />
|
||||
<folding>
|
||||
<element signature="e#0#384#0" expanded="true" />
|
||||
@@ -81,16 +84,23 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="demo.PNG" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/demo.PNG">
|
||||
<provider selected="true" editor-type-id="images" />
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="533">
|
||||
<caret line="678" column="28" selection-start-line="678" selection-start-column="28" selection-end-line="678" selection-end-column="28" />
|
||||
<state relative-caret-position="597">
|
||||
<caret line="661" column="75" selection-start-line="661" selection-start-column="75" selection-end-line="661" selection-end-column="75" />
|
||||
<folding>
|
||||
<element signature="e#1207#1689#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="PixmapRegionPack.kt" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/PixmapRegionPack.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="624">
|
||||
<caret line="72" column="25" selection-start-line="72" selection-start-column="25" selection-end-line="72" selection-end-column="25" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -107,17 +117,22 @@
|
||||
<file leaf-file-name="demotext.txt" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/demotext.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="416">
|
||||
<caret line="44" column="15" selection-start-line="44" selection-start-column="15" selection-end-line="44" selection-end-column="15" />
|
||||
<state relative-caret-position="1014">
|
||||
<caret line="78" column="53" selection-start-line="78" selection-start-column="53" selection-end-line="78" selection-end-column="53" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="demo.PNG" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/demo.PNG">
|
||||
<provider selected="true" editor-type-id="images" />
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="CONTRIBUTING.md" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/CONTRIBUTING.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
|
||||
<state split_layout="FIRST">
|
||||
<first_editor relative-caret-position="611">
|
||||
<first_editor relative-caret-position="1235">
|
||||
<caret line="95" column="30" selection-start-line="95" selection-start-column="30" selection-end-line="95" selection-end-column="30" />
|
||||
</first_editor>
|
||||
<second_editor>
|
||||
@@ -163,15 +178,6 @@
|
||||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>ArrayList<Int></find>
|
||||
<find>appConfig.height</find>
|
||||
<find>textBuffer</find>
|
||||
<find />
|
||||
<find>lowercase</find>
|
||||
<find>SHEET_DIACRITICAL_MARKS</find>
|
||||
<find>[()]</find>
|
||||
<find>demo.PNG</find>
|
||||
<find>joiner</find>
|
||||
<find>va-</find>
|
||||
<find>'</find>
|
||||
<find>FFFF</find>
|
||||
@@ -193,6 +199,15 @@
|
||||
<find>oldCharSequence</find>
|
||||
<find>charSeq.toCodeP</find>
|
||||
<find>resetH</find>
|
||||
<find>println</find>
|
||||
<find>HashMap</find>
|
||||
<find>drawPixmap</find>
|
||||
<find>RGBA</find>
|
||||
<find>makeShado</find>
|
||||
<find>pixmapHolder</find>
|
||||
<find>isColourCode</find>
|
||||
<find>makeSha</find>
|
||||
<find>toRGBA</find>
|
||||
</findStrings>
|
||||
<replaceStrings>
|
||||
<replace>.141</replace>
|
||||
@@ -219,10 +234,11 @@
|
||||
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/GlyphProps.kt" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
<option value="$PROJECT_DIR$/testtext.txt" />
|
||||
<option value="$PROJECT_DIR$/demotext.txt" />
|
||||
<option value="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" />
|
||||
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/TextureRegionPack.kt" />
|
||||
<option value="$PROJECT_DIR$/CONTRIBUTING.md" />
|
||||
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/PixmapRegionPack.kt" />
|
||||
<option value="$PROJECT_DIR$/demotext.txt" />
|
||||
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" />
|
||||
</list>
|
||||
</option>
|
||||
@@ -238,6 +254,7 @@
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
@@ -279,7 +296,6 @@
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="PackagesPane" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
@@ -348,16 +364,6 @@
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin">
|
||||
<module name="BuildJAR_TerrarumSansBitmap" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
</configuration>
|
||||
<configuration default="true" type="KotlinStandaloneScriptRunConfigurationType" factoryName="Kotlin script">
|
||||
<option name="filePath" />
|
||||
<option name="vmParameters" />
|
||||
@@ -448,6 +454,16 @@
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin">
|
||||
<module name="BuildJAR_TerrarumSansBitmap" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
</configuration>
|
||||
<configuration default="true" type="Remote" factoryName="Remote">
|
||||
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||
<option name="SERVER_MODE" value="false" />
|
||||
@@ -507,20 +523,20 @@
|
||||
<layout>
|
||||
<window_info anchor="right" id="Palette" order="3" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Messages" order="7" weight="0.20779221" />
|
||||
<window_info anchor="right" id="Palette	" order="3" />
|
||||
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
|
||||
<window_info anchor="right" id="Maven Projects" order="3" />
|
||||
<window_info anchor="bottom" id="Messages" order="9" weight="0.20779221" />
|
||||
<window_info anchor="right" id="Palette	" order="5" />
|
||||
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
|
||||
<window_info anchor="right" id="Maven Projects" order="4" />
|
||||
<window_info anchor="bottom" id="Version Control" order="8" />
|
||||
<window_info anchor="bottom" id="Run" order="2" weight="0.2591522" />
|
||||
<window_info anchor="bottom" id="Version Control" order="7" />
|
||||
<window_info anchor="bottom" id="Terminal" order="7" />
|
||||
<window_info id="Designer" order="2" />
|
||||
<window_info content_ui="combo" id="Project" order="0" weight="0.090618335" />
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.08742005" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info id="UI Designer" order="2" />
|
||||
<window_info active="true" anchor="bottom" id="Debug" order="3" visible="true" weight="0.2773655" />
|
||||
<window_info id="Favorites" order="2" side_tool="true" />
|
||||
<window_info id="UI Designer" order="4" />
|
||||
<window_info id="Favorites" order="3" side_tool="true" />
|
||||
<window_info active="true" anchor="bottom" id="Debug" order="3" visible="true" weight="0.24768089" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
|
||||
@@ -528,30 +544,6 @@
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Find" order="1" weight="0.32931355" />
|
||||
</layout>
|
||||
<layout-to-restore>
|
||||
<window_info anchor="right" id="Palette" order="3" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Run" order="2" weight="0.2591522" />
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.12633263" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Version Control" order="9" />
|
||||
<window_info anchor="bottom" id="Find" order="1" weight="0.32931355" />
|
||||
<window_info id="Designer" order="2" />
|
||||
<window_info id="UI Designer" order="3" />
|
||||
<window_info active="true" anchor="bottom" id="Debug" order="3" visible="true" weight="0.2773655" />
|
||||
<window_info anchor="right" id="Palette	" order="4" />
|
||||
<window_info anchor="bottom" id="Terminal" order="7" />
|
||||
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Messages" order="10" weight="0.32745826" />
|
||||
<window_info anchor="right" id="Maven Projects" order="5" />
|
||||
<window_info id="Favorites" order="4" side_tool="true" />
|
||||
</layout-to-restore>
|
||||
</component>
|
||||
<component name="VcsContentAnnotationSettings">
|
||||
<option name="myLimit" value="2678400000" />
|
||||
@@ -566,24 +558,13 @@
|
||||
<option name="FILTER_TARGETS" value="false" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1638">
|
||||
<caret line="134" column="40" selection-start-line="134" selection-start-column="40" selection-end-line="134" selection-end-column="40" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/demotext.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state>
|
||||
<caret selection-end-line="1" selection-end-column="43" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1495">
|
||||
<caret line="145" column="17" selection-start-line="145" selection-start-column="17" selection-end-line="145" selection-end-column="17" />
|
||||
<state relative-caret-position="18122">
|
||||
<caret line="1394" column="67" selection-start-line="1394" selection-start-column="67" selection-end-line="1394" selection-end-column="67" />
|
||||
<folding>
|
||||
<element signature="e#1207#1689#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -859,34 +840,10 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/testtext.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="117">
|
||||
<caret line="9" column="91" selection-start-line="9" selection-start-column="91" selection-end-line="9" selection-end-column="91" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/testing.PNG">
|
||||
<provider selected="true" editor-type-id="images" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/demotext.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="416">
|
||||
<caret line="44" column="15" selection-start-line="44" selection-start-column="15" selection-end-line="44" selection-end-column="15" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/TextureRegionPack.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="338">
|
||||
<caret line="50" column="38" selection-start-line="50" selection-start-column="38" selection-end-line="50" selection-end-column="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/CONTRIBUTING.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
|
||||
<state split_layout="FIRST">
|
||||
<first_editor relative-caret-position="611">
|
||||
<first_editor relative-caret-position="1235">
|
||||
<caret line="95" column="30" selection-start-line="95" selection-start-column="30" selection-end-line="95" selection-end-column="30" />
|
||||
</first_editor>
|
||||
<second_editor>
|
||||
@@ -899,10 +856,27 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="356">
|
||||
<caret line="152" column="16" selection-start-line="152" selection-start-column="16" selection-end-line="152" selection-end-column="16" />
|
||||
<folding>
|
||||
<element signature="e#4947#4948#0" expanded="true" />
|
||||
<element signature="e#4998#4999#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/TextureRegionPack.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="338">
|
||||
<caret line="50" column="38" selection-start-line="50" selection-start-column="38" selection-end-line="50" selection-end-column="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$PROJECT_DIR$/lib/gdx-backend-lwjgl.jar!/com/badlogic/gdx/backends/lwjgl/LwjglApplication.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="501">
|
||||
<caret line="277" column="9" lean-forward="true" selection-start-line="277" selection-start-column="9" selection-end-line="277" selection-end-column="9" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/PixmapRegionPack.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="624">
|
||||
<caret line="72" column="25" selection-start-line="72" selection-start-column="25" selection-end-line="72" selection-end-column="25" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -910,19 +884,19 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="356">
|
||||
<caret line="118" column="15" selection-start-line="118" selection-start-column="15" selection-end-line="118" selection-end-column="15" />
|
||||
<folding>
|
||||
<element signature="e#3882#3883#0" expanded="true" />
|
||||
<element signature="e#3931#3932#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/demo.PNG">
|
||||
<provider selected="true" editor-type-id="images" />
|
||||
<entry file="jar://$PROJECT_DIR$/lib/gdx.jar!/com/badlogic/gdx/graphics/Color.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="262">
|
||||
<caret line="52" column="11" selection-start-line="52" selection-start-column="11" selection-end-line="52" selection-end-column="11" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="429">
|
||||
<state relative-caret-position="-195">
|
||||
<caret line="33" column="38" selection-start-line="33" selection-start-column="38" selection-end-line="33" selection-end-column="38" />
|
||||
<folding>
|
||||
<element signature="e#0#384#0" expanded="true" />
|
||||
@@ -930,10 +904,30 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/demotext.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1014">
|
||||
<caret line="78" column="53" selection-start-line="78" selection-start-column="53" selection-end-line="78" selection-end-column="53" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/testtext.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="117">
|
||||
<caret line="9" column="91" selection-start-line="9" selection-start-column="91" selection-end-line="9" selection-end-column="91" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/demo.PNG">
|
||||
<provider selected="true" editor-type-id="images" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="533">
|
||||
<caret line="678" column="28" selection-start-line="678" selection-start-column="28" selection-end-line="678" selection-end-column="28" />
|
||||
<state relative-caret-position="402">
|
||||
<caret line="1433" column="21" selection-start-line="1433" selection-start-column="21" selection-end-line="1433" selection-end-column="21" />
|
||||
<folding>
|
||||
<element signature="e#1207#1689#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
demo.PNG
BIN
demo.PNG
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 145 KiB |
@@ -76,7 +76,7 @@ How multilingual? Real multilingual!
|
||||
|
||||
ᚱᛂᚴᛋᛂᛋᛏᛋᚮᚾᛔᚢᛏᛚᚮᛋ᛬ᚱᛂᚴᛋᛋᚢᚼᚾᚢᛘᚢᛚᚾᛏᚮ᛬ᛏᚮᛋᛁᚮᚵᛂᚢᛏᚮᚱᛘᛔᚱᛂᚴᛋᛏ᛭ᛋᚢᚼᚾᚢᛋᛘᚮᛁᚵᚾᛁᛂᛏᚮᛑ᛭ᚵᛂᚢᛏᚮᚱ
|
||||
|
||||
Colour-code that supports 65535 opaque or semi-transparent colours via 4 bit ARGB
|
||||
Colour-code that supports 4096 colours via 4 bit RGB
|
||||
|
||||
Щиглецът се яде само пържен в юфка без чушки и хвойна (Bulgarian)
|
||||
Љубазни фењерџија чађавог лица хоће да ми покаже штос (Serbian)
|
||||
|
||||
@@ -189,7 +189,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
private fun isIPA(c: Int) = c in codeRange[SHEET_IPA_VARW]
|
||||
private fun isLatinExtAdd(c: Int) = c in 0x1E00..0x1EFF
|
||||
private fun isBulgarian(c: Int) = c in 0x400..0x45F
|
||||
private fun isColourCode(c: Int) = c in 0x100000..0x10FFFF
|
||||
private fun isColourCode(c: Int) = c == 0x100000 || c in 0x10F000..0x10FFFF
|
||||
private fun isCharsetOverride(c: Int) = c in 0xFFFC0..0xFFFFF
|
||||
private fun isCherokee(c: Int) = c in codeRange[SHEET_TSALAGI_VARW]
|
||||
private fun isInsular(c: Int) = c == 0x1D79 || c in 0xA779..0xA787
|
||||
@@ -288,23 +288,25 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
private val textCache = HashMap<CharSequence, ShittyGlyphLayout>()
|
||||
|
||||
|
||||
private fun getColour(codePoint: Int): Color { // input: 0x10ARGB, out: RGBA8888
|
||||
private fun getColour(codePoint: Int): Int { // input: 0x10F_RGB, out: RGBA8888
|
||||
if (colourBuffer.containsKey(codePoint))
|
||||
return colourBuffer[codePoint]!!
|
||||
|
||||
val a = codePoint.and(0xF000).ushr(12)
|
||||
val r = codePoint.and(0x0F00).ushr(8)
|
||||
val g = codePoint.and(0x00F0).ushr(4)
|
||||
val b = codePoint.and(0x000F)
|
||||
|
||||
val col = Color(r.shl(28) or r.shl(24) or g.shl(20) or g.shl(16) or b.shl(12) or b.shl(8) or a.shl(4) or a)
|
||||
val col = r.shl(28) or r.shl(24) or
|
||||
g.shl(20) or g.shl(16) or
|
||||
b.shl(12) or b.shl(8) or
|
||||
0xFF
|
||||
|
||||
|
||||
colourBuffer[codePoint] = col
|
||||
return col
|
||||
}
|
||||
|
||||
private val colourBuffer = HashMap<Int, Color>()
|
||||
private val colourBuffer = HashMap<Int, Int>()
|
||||
|
||||
private val unihanWidthSheets = arrayOf(
|
||||
SHEET_UNIHAN,
|
||||
@@ -618,7 +620,8 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
|
||||
|
||||
originalColour = batch.color.cpy()
|
||||
var mainCol = originalColour
|
||||
val mainColObj = originalColour
|
||||
var mainCol: Int = originalColour.toRGBA8888().forceOpaque()
|
||||
|
||||
|
||||
//textTexture.begin()
|
||||
@@ -636,12 +639,12 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
pixmapHolder = Pixmap(getWidth(textBuffer), H + (pixmapOffsetY * 2), Pixmap.Format.RGBA8888)
|
||||
|
||||
// TEST: does the new instance of pixmap is all zero?
|
||||
repeat(pixmapHolder?.pixels?.capacity() ?: 0) {
|
||||
/*repeat(pixmapHolder?.pixels?.capacity() ?: 0) {
|
||||
if (pixmapHolder?.pixels?.get() != 0.toByte()) {
|
||||
throw InternalError("pixmap is not all zero, wtf?!")
|
||||
}
|
||||
}
|
||||
pixmapHolder?.pixels?.rewind()
|
||||
pixmapHolder?.pixels?.rewind()*/
|
||||
|
||||
|
||||
|
||||
@@ -656,7 +659,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
|
||||
if (isColourCode(c)) {
|
||||
if (c == 0x100000) {
|
||||
mainCol = originalColour
|
||||
mainCol = originalColour.toRGBA8888().forceOpaque()
|
||||
}
|
||||
else {
|
||||
mainCol = getColour(c)
|
||||
@@ -731,7 +734,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
index++
|
||||
}
|
||||
|
||||
batch.color = mainCol
|
||||
batch.color = mainColObj
|
||||
makeShadow(pixmapHolder)
|
||||
pixmapTextureHolder = Texture(pixmapHolder)
|
||||
batch.draw(pixmapTextureHolder, x.toFloat(), (y - pixmapOffsetY).toFloat())
|
||||
@@ -1391,8 +1394,9 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
private fun makeShadow(pixmap: Pixmap?) {
|
||||
if (pixmap == null) return
|
||||
|
||||
pixmap.blending = Pixmap.Blending.None
|
||||
|
||||
// TODO
|
||||
// TODO when semitransparency is needed (e.g. anti-aliased)
|
||||
// make three more pixmap (pixmap 2 3 4)
|
||||
// translate source image over new pixmap, shift the texture to be a shadow
|
||||
// draw (3, 4) -> 2, px by px s.t. only overwrites RGBA==0 pixels in 2
|
||||
@@ -1403,16 +1407,47 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
// ---------------------------------------------------------------------------
|
||||
// this is under assumption that new pixmap is always all zero
|
||||
// it is possible the blending in the pixmap is bugged
|
||||
//
|
||||
// for now, no semitransparency (in colourcode && spritesheet)
|
||||
|
||||
val jobQueue = arrayOf(
|
||||
1 to 0,
|
||||
0 to 1,
|
||||
1 to 1
|
||||
)
|
||||
|
||||
jobQueue.forEach {
|
||||
for (y in 0 until pixmap.height) {
|
||||
for (x in 0 until pixmap.width) {
|
||||
val pixel = pixmap.getPixel(x, y) // RGBA8888
|
||||
|
||||
|
||||
// in the current version, all colour-coded glyphs are guaranteed
|
||||
// to be opaque
|
||||
if (pixel and 0xFF == 0xFF) {
|
||||
val newPixel = pixmap.getPixel(x + it.first, y + it.second)
|
||||
val newColour = pixel.and(0xFFFFFF00.toInt()) or 0x80
|
||||
|
||||
if (newPixel and 0xFF == 0) {
|
||||
pixmap.drawPixel(x + it.first, y + it.second, newColour)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun Pixmap.drawPixmap(pixmap: Pixmap, xPos: Int, yPos: Int, col: Color) {
|
||||
/***
|
||||
* @param col RGBA8888 representation
|
||||
*/
|
||||
private fun Pixmap.drawPixmap(pixmap: Pixmap, xPos: Int, yPos: Int, col: Int) {
|
||||
for (y in 0 until pixmap.height) {
|
||||
for (x in 0 until pixmap.width) {
|
||||
val pixel = pixmap.getPixel(x, y) // Pixmap uses RGBA8888, while Color uses ARGB. What the fuck?
|
||||
|
||||
val newPixel = pixel colorTimes col.toRGBA8888()
|
||||
val newPixel = pixel colorTimes col
|
||||
|
||||
this.drawPixel(xPos + x, yPos + y, newPixel)
|
||||
}
|
||||
@@ -1425,6 +1460,11 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
(this.b * 255f).toInt().shl(8) or
|
||||
(this.a * 255f).toInt()
|
||||
|
||||
/**
|
||||
* RGBA8888 representation
|
||||
*/
|
||||
private fun Int.forceOpaque() = this.and(0xFFFFFF00.toInt()) or 0xFF
|
||||
|
||||
private infix fun Int.colorTimes(other: Int): Int {
|
||||
val thisBytes = IntArray(4, { this.ushr(it * 8).and(255) })
|
||||
val otherBytes = IntArray(4, { other.ushr(it * 8).and(255) })
|
||||
|
||||
Reference in New Issue
Block a user