diff --git a/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontBase.class b/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontBase.class index c1149d0ff..cfdf4620d 100644 Binary files a/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontBase.class and b/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontBase.class differ diff --git a/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontWhite.class b/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontWhite.class index 45fdd9edd..ec45ca5bf 100644 Binary files a/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontWhite.class and b/out/production/Terrarum_renewed/com/Torvald/ImageFont/GameFontWhite.class differ diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/CreatureBuildFactory.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/CreatureBuildFactory.class index 469be9b19..cd002dbd0 100644 Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/CreatureBuildFactory.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/CreatureBuildFactory.class differ diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class index 40ed0e3d4..a7bfba223 100644 Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class differ diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class index 0e83bb6ce..ba2f07e0f 100644 Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class differ diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/propdata.csv b/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/propdata.csv index d9606412b..f0a04671c 100644 --- a/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/propdata.csv +++ b/out/production/Terrarum_renewed/com/Torvald/Terrarum/TileProperties/propdata.csv @@ -32,7 +32,7 @@ "27";"TILE_SNOW" ; "8205"; "6"; "0"; "N/A"; "1"; "1"; "0"; "27"; "0";"16" "28";"TILE_ICE_FRAGILE" ; "3282"; "1"; "0"; "N/A"; "1"; "0"; "0"; "28"; "0";"16" "29";"TILE_ICE_NATURAL" ; "6564"; "25"; "0"; "N/A"; "1"; "1"; "0"; "29"; "0"; "8" - "30";"TILE_ICE_CLEAR_MAGICAL" ; "8205"; "25"; "0"; "N/A"; "1"; "1"; "4967"; "30"; "0"; "8" + "30";"TILE_ICE_CLEAR_MAGICAL" ; "8205"; "25"; "0"; "N/A"; "1"; "1";"14949"; "30"; "0"; "8" # see scandinavian name set female of this tile id! "31";"TILE_PLATFORM_STONE" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "31"; "0";"16" "32";"TILE_PLATFORM_WOODEN" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "32"; "0";"16" diff --git a/res/graphics/fonts/ascii_majuscule.png b/res/graphics/fonts/ascii_majuscule.png index 643da469b..f4f09c045 100644 Binary files a/res/graphics/fonts/ascii_majuscule.png and b/res/graphics/fonts/ascii_majuscule.png differ diff --git a/res/graphics/fonts/fullwidth_forms.png b/res/graphics/fonts/fullwidth_forms.png new file mode 100644 index 000000000..2f53e26a3 Binary files /dev/null and b/res/graphics/fonts/fullwidth_forms.png differ diff --git a/src/com/Torvald/ImageFont/GameFontBase.java b/src/com/Torvald/ImageFont/GameFontBase.java index f0b86ca3a..9cbf2b0af 100644 --- a/src/com/Torvald/ImageFont/GameFontBase.java +++ b/src/com/Torvald/ImageFont/GameFontBase.java @@ -20,6 +20,7 @@ public class GameFontBase implements Font { static SpriteSheet uniHan; static SpriteSheet cyrilic; static SpriteSheet cyrilicEF; + static SpriteSheet fullwidthForms; static final int JUNG_COUNT = 21; static final int JONG_COUNT = 28; @@ -44,6 +45,7 @@ public class GameFontBase implements Font { static final int SHEET_UNIHAN = 8; static final int SHEET_CYRILIC_EM = 9; static final int SHEET_CYRILIC_EF = 10; + static final int SHEET_FW_UNI = 11; static SpriteSheet[] sheetKey; static final Character[] asciiEFList = { @@ -136,6 +138,10 @@ public class GameFontBase implements Font { return (Arrays.asList(cyrilecEFList).contains(c)); } + private boolean isFullwidthUni(char c) { + return (c >= 0xFF00 && c < 0xFF60); + } + private int asciiEFindexX(char c) { return (Arrays.asList(asciiEFList).indexOf(c) % 16); } @@ -200,6 +206,14 @@ public class GameFontBase implements Font { return (Arrays.asList(cyrilecEFList).indexOf(c) / 16); } + private int fullwidthUniIndexX(char c) { + return (c - 0xFF00) % 16; + } + + private int fullwidthUniIndexY(char c) { + return (c - 0xFF00) / 16; + } + @Override public int getWidth(String s) { return getWidthSubstr(s, s.length()); @@ -234,7 +248,7 @@ public class GameFontBase implements Font { len += W_LATIN_NARROW; else if (c == SHEET_KANA || c == SHEET_HANGUL || c == SHEET_CJK_PUNCT) len += W_CJK; - else if (c == SHEET_UNIHAN) + else if (c == SHEET_UNIHAN || c == SHEET_FW_UNI) len += W_UNIHAN; else len += W_LATIN_WIDE; @@ -292,7 +306,7 @@ public class GameFontBase implements Font { Math.round(x + getWidthSubstr(s, i + 1) - glyphW ) - , Math.round((H - H_HANGUL) / 2 + y) + , Math.round((H - H_UNIHAN) / 2 + y) , uniHanIndexX(ch) , uniHanIndexY(ch) ); @@ -350,6 +364,10 @@ public class GameFontBase implements Font { sheetX = cyrilicEFindexX(ch); sheetY = cyrilicEFindexY(ch); break; + case SHEET_FW_UNI: + sheetX = fullwidthUniIndexX(ch); + sheetY = fullwidthUniIndexY(ch); + break; default: sheetX = ch % 16; sheetY = ch / 16; @@ -363,7 +381,8 @@ public class GameFontBase implements Font { // Interchar: pull punct right next to hangul to the left + ((i > 0 && isHangul(s.charAt(i - 1))) ? -3 : 0) , Math.round(y) - - ((prevInstance == SHEET_CJK_PUNCT) ? 1 : 0) + + ((prevInstance == SHEET_CJK_PUNCT) ? -1 : + (prevInstance == SHEET_FW_UNI) ? (H - H_HANGUL) / 2 : 0) , sheetX , sheetY ); @@ -399,6 +418,7 @@ public class GameFontBase implements Font { else if (isCyrilic(c)) return SHEET_CYRILIC_EM; // fixed width punctuations else if (isCJKPunct(c)) return SHEET_CJK_PUNCT; + else if (isFullwidthUni(c)) return SHEET_FW_UNI; else return SHEET_ASCII_EM; // fallback } diff --git a/src/com/Torvald/ImageFont/GameFontWhite.java b/src/com/Torvald/ImageFont/GameFontWhite.java index 945bc3e36..afe89c218 100644 --- a/src/com/Torvald/ImageFont/GameFontWhite.java +++ b/src/com/Torvald/ImageFont/GameFontWhite.java @@ -58,6 +58,10 @@ public class GameFontWhite extends GameFontBase { "./res/graphics/fonts/cyrilic_ef.png" , W_LATIN_NARROW, H ); + fullwidthForms = new SpriteSheet( + "./res/graphics/fonts/fullwidth_forms.png" + , W_UNIHAN, H_UNIHAN + ); SpriteSheet[] shk = { asciiSheet @@ -71,6 +75,7 @@ public class GameFontWhite extends GameFontBase { , uniHan , cyrilic , cyrilicEF + , fullwidthForms }; sheetKey = shk; } diff --git a/src/com/Torvald/Terrarum/Actors/Player.java b/src/com/Torvald/Terrarum/Actors/Player.java index ca4d7a9fe..54f04d80a 100644 --- a/src/com/Torvald/Terrarum/Actors/Player.java +++ b/src/com/Torvald/Terrarum/Actors/Player.java @@ -25,11 +25,12 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac int jumpCounter = 0; int walkPowerCounter = 0; - private final int MAX_JUMP_LENGTH = 15; + private final int MAX_JUMP_LENGTH = 17; // use 17; in internal frames /** * experimental value. */ - private final float JUMP_ACCELERATION_MOD = 180f / 10000f; + // private final float JUMP_ACCELERATION_MOD = ???f / 10000f; //quadratic mode + private final float JUMP_ACCELERATION_MOD = 170f / 10000f; //linear mode private final int WALK_FRAMES_TO_MAX_ACCEL = 6; public float readonly_totalX = 0, readonly_totalY = 0; @@ -45,9 +46,9 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac private int prevVMoveKey = -1; private final int KEY_NULL = -1; - static final float ACCEL_MULT_IN_FLIGHT = 0.45f; - static final float WALK_STOP_ACCEL = 0.2f; - static final float WALK_ACCEL_BASE = 0.2f; + static final float ACCEL_MULT_IN_FLIGHT = 0.22f; + static final float WALK_STOP_ACCEL = 0.32f; + static final float WALK_ACCEL_BASE = 0.32f; private boolean noClip = false; @@ -433,7 +434,8 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac // increment jump counter if (jumpCounter < len) jumpCounter += 1; - + // quadratic time (convex) mode + /* float sumT = (jumpCounter * (jumpCounter + 1)) / 2f; float timedJumpCharge = ((len + 1) / 2f) - (sumT / len); if (timedJumpCharge < 0) timedJumpCharge = 0; @@ -443,6 +445,20 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac super.setVeloY(super.getVeloY() - jumpAcc ); + */ + + // linear time mode + float init = (len + 1) / 2f; + float timedJumpCharge = init - (init / len) * jumpCounter; + if (timedJumpCharge < 0) timedJumpCharge = 0; + + float jumpAcc = pwr * timedJumpCharge * JUMP_ACCELERATION_MOD; + + super.setVeloY(super.getVeloY() + - jumpAcc + ); + + // concave mode? } // for mob AI: diff --git a/work_files/Jump power by pressing time 2 linear.gcx b/work_files/Jump power by pressing time 2 linear.gcx new file mode 100755 index 000000000..4624a986f Binary files /dev/null and b/work_files/Jump power by pressing time 2 linear.gcx differ