Skip to content

Commit 1b73f68

Browse files
committed
Make PSPOskConstants.cpp not binary anymore
1 parent 9f42ef6 commit 1b73f68

File tree

7 files changed

+1267
-1215
lines changed

7 files changed

+1267
-1215
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
*.xml text
1212

1313
# To avoid mucking up the utf-8 characters.
14-
Core/Dialog/PSPOskDialog.cpp binary
14+
Core/Dialog/PSPOskConstants.cpp binary

Core/Core.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@
564564
<ClCompile Include="Debugger\WebSocket\SteppingBroadcaster.cpp" />
565565
<ClCompile Include="Debugger\WebSocket\SteppingSubscriber.cpp" />
566566
<ClCompile Include="Debugger\WebSocket\WebSocketUtils.cpp" />
567+
<ClCompile Include="Dialog\PSPOskConstants.cpp" />
567568
<ClCompile Include="FileSystems\BlobFileSystem.cpp" />
568569
<ClCompile Include="FrameTiming.cpp" />
569570
<ClCompile Include="HLE\AtracCtx.cpp" />
@@ -1174,6 +1175,7 @@
11741175
<ClInclude Include="Debugger\WebSocket\GameBroadcaster.h" />
11751176
<ClInclude Include="Debugger\WebSocket\LogBroadcaster.h" />
11761177
<ClInclude Include="Debugger\WebSocket\SteppingBroadcaster.h" />
1178+
<ClInclude Include="Dialog\PSPOskConstants.h" />
11771179
<ClInclude Include="FileSystems\BlobFileSystem.h" />
11781180
<ClInclude Include="FrameTiming.h" />
11791181
<ClInclude Include="HLE\AtracCtx.h" />

Core/Core.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,9 @@
13151315
<ClCompile Include="HLE\AtracCtx2.cpp">
13161316
<Filter>HLE\Libraries</Filter>
13171317
</ClCompile>
1318+
<ClCompile Include="Dialog\PSPOskConstants.cpp">
1319+
<Filter>Dialog</Filter>
1320+
</ClCompile>
13181321
</ItemGroup>
13191322
<ItemGroup>
13201323
<ClInclude Include="ELF\ElfReader.h">
@@ -2109,6 +2112,9 @@
21092112
<ClInclude Include="HLE\AtracCtx2.h">
21102113
<Filter>HLE\Libraries</Filter>
21112114
</ClInclude>
2115+
<ClInclude Include="Dialog\PSPOskConstants.h">
2116+
<Filter>Dialog</Filter>
2117+
</ClInclude>
21122118
</ItemGroup>
21132119
<ItemGroup>
21142120
<None Include="..\LICENSE.TXT" />

Core/Dialog/PSPOskConstants.cpp

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// Copyright (c) 2012- PPSSPP Project.
2+
3+
// This program is free software: you can redistribute it and/or modify
4+
// it under the terms of the GNU General Public License as published by
5+
// the Free Software Foundation, version 2.0 or later versions.
6+
7+
// This program is distributed in the hope that it will be useful,
8+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
// GNU General Public License 2.0 for more details.
11+
12+
// A copy of the GPL 2.0 should have been included with the program.
13+
// If not, see http://www.gnu.org/licenses/
14+
15+
// Official git repository and contact information can be found at
16+
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17+
18+
#include <cstdint>
19+
20+
#include "Core/Dialog/PSPOskConstants.h"
21+
22+
// Japanese (Kana) diacritics
23+
const wchar_t diacritics[2][103] =
24+
{
25+
{L"かがきぎくぐけげこごさざしじすずせぜそぞただちぢつづてでとどはばぱばひびぴびふぶぷぶへべぺべほぼぽぼウヴカガキギクグケゲコゴサザシジスズセゼソゾタダチヂツヅテデトドハバパバヒビピビフブプブヘベペベホボポボ"},
26+
{L"はぱばぱひぴびぴふぷぶぷへぺべぺほぽぼぽハパバパヒピビピフプブプヘペベペホポボポ"}
27+
};
28+
29+
// Korean (Hangul) consonant
30+
const wchar_t kor_cons[20] = L"ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎ";
31+
32+
// Korean (Hangul) vowels, Some vowels are not used, they will be spaces
33+
const wchar_t kor_vowel[22] = L"ㅏㅐㅑㅒㅓㅔㅕㅖㅗ ㅛㅜ ㅠㅡ ㅣ";
34+
35+
// Korean (Hangul) vowel Combination key
36+
const uint8_t kor_vowelCom[21] = {0,8,9,1,8,10,20,8,11,4,13,14,5,13,15,20,13,16,20,18,19};
37+
38+
// Korean (Hangul) last consonant(diacritics)
39+
const wchar_t kor_lcons[28] = L"ㄱㄲㄳㄴㄵㄶㄷㄹㄺㄻㄼㄽㄾㄿㅀㅁㅂㅄㅅㅆㅇㅈㅊㅋㅌㅍㅎ";
40+
41+
// Korean (Hangul) last consonant Combination key
42+
const uint8_t kor_lconsCom[33] = {18,0,2,21,3,4,26,3,5,0,7,8,15,7,9,16,7,10,18,7,11,24,7,12,25,7,13,26,7,14,18,16,17};
43+
44+
// Korean (Hangul) last consonant Separation key
45+
const uint8_t kor_lconsSpr[33] = {2,1,9,4,4,12,5,4,18,8,8,0,9,8,6,10,8,7,11,8,9,12,8,16,13,8,17,14,8,18,17,17,9};
46+
47+
const char16_t oskKeys[OSK_KEYBOARD_COUNT][6][14] =
48+
{
49+
{
50+
// Latin Lowercase
51+
{u"1234567890-+"},
52+
{u"qwertyuiop[]"},
53+
{u"asdfghjkl;@~"},
54+
{u"zxcvbnm,./?\\"},
55+
},
56+
{
57+
// Latin Uppercase
58+
{u"!@#$%^&*()_+"},
59+
{u"QWERTYUIOP{}"},
60+
{u"ASDFGHJKL:\"`"},
61+
{u"ZXCVBNM<>/?|"},
62+
},
63+
{
64+
// Hiragana
65+
{u"あかさたなはまやらわぁゃっ"},
66+
{u"いきしちにひみ り ぃ  "},
67+
{u"うくすつぬふむゆるをぅゅ゛"},
68+
{u"えけせてねへめ れ ぇ ゜"},
69+
{u"おこそとのほもよろんぉょー"},
70+
{u"・。、「」『』〜 "},
71+
},
72+
{
73+
// Katakana
74+
{u"アカサタナハマヤラワァャッ"},
75+
{u"イキシチニヒミ リ ィ  "},
76+
{u"ウクスツヌフムユルヲゥュ゛"},
77+
{u"エケセテネヘメ レ ェ ゜"},
78+
{u"オコソトノホモヨロンォョー"},
79+
{u"・。、「」『』〜 "},
80+
},
81+
{
82+
// Korean(Hangul)
83+
{u"1234567890-+"},
84+
{u"ㅃㅉㄸㄲㅆ!@#$%^&"},
85+
{u"ㅂㅈㄷㄱㅅㅛㅕㅑㅐㅔ[]"},
86+
{u"ㅁㄴㅇㄹㅎㅗㅓㅏㅣ;@~"},
87+
{u"ㅋㅌㅊㅍㅠㅜㅡ<>/?|"},
88+
},
89+
{
90+
// Russian Lowercase
91+
{u"1234567890-+"},
92+
{u"йцукенгшщзхъ"},
93+
{u"фывапролджэё"},
94+
{u"ячсмитьбю/?|"},
95+
},
96+
{
97+
// Russian Uppercase
98+
{u"!@#$%^&*()_+"},
99+
{u"ЙЦУКЕНГШЩЗХЪ"},
100+
{u"ФЫВАПРОЛДЖЭЁ"},
101+
{u"ЯЧСМИТЬБЮ/?|"},
102+
},
103+
{
104+
// Latin Full-width Lowercase
105+
{ u"1234567890-+" },
106+
{ u"qwertyuiop[]" },
107+
{ u"asdfghjkl;@~" },
108+
{ u"zxcvbnm,./?¥¥" },
109+
},
110+
{
111+
// Latin Full-width Uppercase
112+
{ u"!@#$%^&*()_+" },
113+
{ u"QWERTYUIOP{}" },
114+
{ u"ASDFGHJKL:¥”‘" },
115+
{ u"ZXCVBNM<>/?|" },
116+
},
117+
};
118+

Core/Dialog/PSPOskConstants.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#pragma once
2+
3+
// Internal enum, not from PSP.
4+
enum OskKeyboardDisplay {
5+
OSK_KEYBOARD_LATIN_LOWERCASE,
6+
OSK_KEYBOARD_LATIN_UPPERCASE,
7+
OSK_KEYBOARD_HIRAGANA,
8+
OSK_KEYBOARD_KATAKANA,
9+
OSK_KEYBOARD_KOREAN,
10+
OSK_KEYBOARD_RUSSIAN_LOWERCASE,
11+
OSK_KEYBOARD_RUSSIAN_UPPERCASE,
12+
OSK_KEYBOARD_LATIN_FW_LOWERCASE,
13+
OSK_KEYBOARD_LATIN_FW_UPPERCASE,
14+
// TODO: Something to do native?
15+
OSK_KEYBOARD_COUNT
16+
};

0 commit comments

Comments
 (0)