Skip to content

Commit

Permalink
legacy alphabet real
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Jul 26, 2023
1 parent 2397948 commit a1a356f
Show file tree
Hide file tree
Showing 6 changed files with 2,664 additions and 1,190 deletions.
Binary file modified assets/images/alphabet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,630 changes: 1,057 additions & 573 deletions assets/images/alphabet.xml

Large diffs are not rendered by default.

Binary file modified assets/images/alphabetOld.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,567 changes: 970 additions & 597 deletions assets/images/alphabetOld.xml

Large diffs are not rendered by default.

62 changes: 42 additions & 20 deletions source/meta/data/alphabet/Alphabet.hx
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,15 @@ class AlphaCharacter extends FlxSprite
'm' => null, 'n' => null, 'o' => null, 'p' => null, 'q' => null, 'r' => null,
's' => null, 't' => null, 'u' => null, 'v' => null, 'w' => null, 'x' => null,
'y' => null, 'z' => null,

//additional alphabet
'á' => null, 'é' => null, 'í' => null, 'ó' => null, 'ú' => null,
'à' => null, 'è' => null, 'ì' => null, 'ò' => null, 'ù' => null,
'â' => null, 'ê' => null, 'î' => null, 'ô' => null, 'û' => null,
'ã' => null, 'ë' => null, 'ï' => null, 'õ' => null, 'ü' => null,
'ä' => null, 'ö' => null, 'å' => null, 'ø' => null, 'æ' => null,
'ñ' => null, 'ç' => {offsetsBold: [0, -11]}, 'š' => null, 'ž' => null, 'ý' => null, 'ÿ' => null,
'ß' => null,

//numbers
'0' => null, '1' => null, '2' => null, '3' => null, '4' => null,
Expand All @@ -408,35 +417,40 @@ class AlphaCharacter extends FlxSprite
'&' => {offsetsBold: [0, 2]},
'(' => {offsetsBold: [0, 5]},
')' => {offsetsBold: [0, 5]},
'*' => {offsets: [0, 28]},
'+' => {offsets: [0, 7], offsetsBold: [0, -12]},
'-' => {offsets: [0, 16], offsetsBold: [0, -30]},
'<' => {offsetsBold: [0, 4]},
'>' => {offsetsBold: [0, 4]},
'\'' => {anim: 'apostrophe', offsets: [0, 32]},
'"' => {anim: 'quote', offsets: [0, 32], offsetsBold: [0, 0]},
'!' => {anim: 'exclamation', offsetsBold: [0, 10]},
'?' => {anim: 'question', offsetsBold: [0, 4]}, //also used for "unknown"
'.' => {anim: 'period', offsetsBold: [0, -44]},
'' => {anim: 'start quote', offsets: [0, 24], offsetsBold: [0, -5]},
'' => {anim: 'end quote', offsets: [0, 24], offsetsBold: [0, -5]},

//symbols with no bold
'*' => {offsets: [0, 28], offsetsBold: [0, 40]},
'+' => {offsets: [0, 7], offsetsBold: [0, 12]},
'-' => {offsets: [0, 16], offsetsBold: [0, 30]},
'<' => {offsetsBold: [0, -2]},
'>' => {offsetsBold: [0, -2]},
'\'' => {anim: 'apostrophe', offsets: [0, 32], offsetsBold: [0, 40]},
'"' => {anim: 'quote', offsets: [0, 32], offsetsBold: [0, 40]},
'!' => {anim: 'exclamation'},
'?' => {anim: 'question'}, //also used for "unknown"
'.' => {anim: 'period'},
'' => {anim: 'start quote', offsets: [0, 24], offsetsBold: [0, 40]},
'' => {anim: 'end quote', offsets: [0, 24], offsetsBold: [0, 40]},
'_' => null,
'#' => null,
'$' => null,
'%' => null,
':' => {offsets: [0, 2]},
';' => {offsets: [0, -2]},
':' => {offsets: [0, 2], offsetsBold: [0, 8]},
';' => {offsets: [0, -2], offsetsBold: [0, 4]},
'@' => null,
'[' => null,
']' => {offsets: [0, -1]},
'^' => {offsets: [0, 28]},
',' => {anim: 'comma', offsets: [0, -6]},
'^' => {offsets: [0, 28], offsetsBold: [0, 38]},
',' => {anim: 'comma', offsets: [0, -6], offsetsBold: [0, -4]},
'\\' => {anim: 'back slash', offsets: [0, 0]},
'/' => {anim: 'forward slash', offsets: [0, 0]},
'|' => null,
'~' => {offsets: [0, 16]}
'~' => {offsets: [0, 16], offsetsBold: [0, 20]},

//additional symbols
'¡' => {anim: 'inverted exclamation', offsets: [0, -20], offsetsBold: [0, -20]},
'¿' => {anim: 'inverted question', offsets: [0, -20], offsetsBold: [0, -20]},
'{' => null,
'}' => null,
'' => {anim: 'bullet', offsets: [0, 18], offsetsBold: [0, 20]}
];

var parent:Alphabet;
Expand Down Expand Up @@ -510,7 +524,11 @@ class AlphaCharacter extends FlxSprite
public static function isTypeAlphabet(c:String) // thanks kade
{
var ascii = StringTools.fastCodeAt(c, 0);
return (ascii >= 65 && ascii <= 90) || (ascii >= 97 && ascii <= 122);
return (ascii >= 65 && ascii <= 90)
|| (ascii >= 97 && ascii <= 122)
|| (ascii >= 192 && ascii <= 214)
|| (ascii >= 216 && ascii <= 246)
|| (ascii >= 248 && ascii <= 255);
}

private function set_image(name:String)
Expand Down Expand Up @@ -545,6 +563,10 @@ class AlphaCharacter extends FlxSprite
{
offset.y += -(110 - height);
}
else
{
offset.y += -(70 - height);
}
}

var prevY:Float = 0;
Expand Down
Loading

2 comments on commit a1a356f

@Joalor64GH
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also latin support

@moxie-coder
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

real

Please sign in to comment.