aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-11-07 20:49:01 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-11-07 20:49:01 +0000
commit17614ea059162f432f7feba5f39329667a335fa6 (patch)
treeaa95668867bf58d6bd708bfcb5b3f9db38dc59f8 /unicode/src/screens
parente520f12663f97a3ca7e609d0d6f6bf91dc88e675 (diff)
downloadusdx-17614ea059162f432f7feba5f39329667a335fa6.tar.gz
usdx-17614ea059162f432f7feba5f39329667a335fa6.tar.xz
usdx-17614ea059162f432f7feba5f39329667a335fa6.zip
- WideStringUpperCase moved to UUnicodeUtils.pas
- WideCharUpperCase removed as single characters (code-point) can be represented by two WideChars (surrogates). Convert to UCS4 instead (one code-point <-> one UCS4Char). - UCS4 functions added to UUUnicodeUtils - string replaced with UTF8String (although it's just a typedef) to mark UTF8 strings. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1507 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode/src/screens')
-rw-r--r--unicode/src/screens/UScreenEdit.pas9
-rw-r--r--unicode/src/screens/UScreenEditConvert.pas50
-rw-r--r--unicode/src/screens/UScreenEditHeader.pas22
-rw-r--r--unicode/src/screens/UScreenEditSub.pas43
-rw-r--r--unicode/src/screens/UScreenLevel.pas5
-rw-r--r--unicode/src/screens/UScreenMain.pas5
-rw-r--r--unicode/src/screens/UScreenOptions.pas15
-rw-r--r--unicode/src/screens/UScreenOptionsAdvanced.pas15
-rw-r--r--unicode/src/screens/UScreenOptionsGame.pas16
-rw-r--r--unicode/src/screens/UScreenOptionsGraphics.pas8
-rw-r--r--unicode/src/screens/UScreenOptionsLyrics.pas7
-rw-r--r--unicode/src/screens/UScreenOptionsRecord.pas3
-rw-r--r--unicode/src/screens/UScreenOptionsSound.pas15
-rw-r--r--unicode/src/screens/UScreenOptionsThemes.pas12
-rw-r--r--unicode/src/screens/UScreenPartyNewRound.pas32
-rw-r--r--unicode/src/screens/UScreenPartyOptions.pas23
-rw-r--r--unicode/src/screens/UScreenPartyScore.pas19
-rw-r--r--unicode/src/screens/UScreenPartyWin.pas17
-rw-r--r--unicode/src/screens/UScreenPopup.pas20
-rw-r--r--unicode/src/screens/UScreenScore.pas20
-rw-r--r--unicode/src/screens/UScreenSing.pas17
-rw-r--r--unicode/src/screens/UScreenSong.pas53
-rw-r--r--unicode/src/screens/UScreenSongMenu.pas24
-rw-r--r--unicode/src/screens/UScreenStatDetail.pas9
-rw-r--r--unicode/src/screens/UScreenStatMain.pas25
-rw-r--r--unicode/src/screens/UScreenTop5.pas20
26 files changed, 330 insertions, 174 deletions
diff --git a/unicode/src/screens/UScreenEdit.pas b/unicode/src/screens/UScreenEdit.pas
index f141edee..14d45213 100644
--- a/unicode/src/screens/UScreenEdit.pas
+++ b/unicode/src/screens/UScreenEdit.pas
@@ -51,7 +51,12 @@ type
implementation
-uses UGraphic, UMusic, USkins, SysUtils;
+uses
+ UGraphic,
+ UMusic,
+ USkins,
+ UUnicodeUtils,
+ SysUtils;
function TScreenEdit.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -59,7 +64,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenEditConvert.pas b/unicode/src/screens/UScreenEditConvert.pas
index 8cc6c59d..712817c3 100644
--- a/unicode/src/screens/UScreenEditConvert.pas
+++ b/unicode/src/screens/UScreenEditConvert.pas
@@ -33,17 +33,18 @@ interface
{$I switches.inc}
-uses UMenu,
- SDL,
- {$IFDEF UseMIDIPort}
- MidiFile,
- MidiOut,
- {$ENDIF}
- ULog,
- USongs,
- USong,
- UMusic,
- UThemes;
+uses
+ UMenu,
+ SDL,
+ {$IFDEF UseMIDIPort}
+ MidiFile,
+ MidiOut,
+ {$ENDIF}
+ ULog,
+ USongs,
+ USong,
+ UMusic,
+ UThemes;
type
TNote = record
@@ -93,7 +94,7 @@ type
MidiEvent: pMidiEvent;
MidiOut: TMidiOutput;
{$ENDIF}
-
+
Song: TSong;
Lines: TLines;
BPM: real;
@@ -106,7 +107,7 @@ type
{$IFDEF UseMIDIPort}
procedure MidiFile1MidiEvent(event: PMidiEvent);
{$ENDIF}
-
+
function SelectedNumber: integer;
constructor Create; override;
procedure onShow; override;
@@ -116,15 +117,18 @@ type
end;
implementation
-uses UGraphic,
- SysUtils,
- UDrawTexture,
- TextGL,
- UFiles,
- UMain,
- UIni,
- gl,
- USkins;
+
+uses
+ SysUtils,
+ gl,
+ UGraphic,
+ UDrawTexture,
+ TextGL,
+ UFiles,
+ UMain,
+ UIni,
+ USkins,
+ UUnicodeUtils;
function TScreenEditConvert.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -132,7 +136,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenEditHeader.pas b/unicode/src/screens/UScreenEditHeader.pas
index edced1fa..616c523b 100644
--- a/unicode/src/screens/UScreenEditHeader.pas
+++ b/unicode/src/screens/UScreenEditHeader.pas
@@ -33,11 +33,12 @@ interface
{$I switches.inc}
-uses UMenu,
- SDL,
- USongs,
- USong,
- UThemes;
+uses
+ UMenu,
+ SDL,
+ USongs,
+ USong,
+ UThemes;
type
TScreenEditHeader = class(TMenu)
@@ -79,7 +80,14 @@ type
implementation
-uses UGraphic, UMusic, SysUtils, UFiles, USkins, UTexture;
+uses
+ UGraphic,
+ UMusic,
+ SysUtils,
+ UFiles,
+ USkins,
+ UTexture,
+ UUnicodeUtils;
function TScreenEditHeader.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
var
@@ -88,7 +96,7 @@ begin
Result := true;
If (PressedDown) Then begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenEditSub.pas b/unicode/src/screens/UScreenEditSub.pas
index 167d94b4..4189ec74 100644
--- a/unicode/src/screens/UScreenEditSub.pas
+++ b/unicode/src/screens/UScreenEditSub.pas
@@ -33,25 +33,25 @@ interface
{$I switches.inc}
uses
- UMenu,
- UMusic,
- SDL,
- SysUtils,
- UFiles,
- UTime,
- USongs,
- USong,
- UIni,
- ULog,
- UTexture,
- UMenuText,
- UEditorLyrics,
- Math,
- gl,
- {$IFDEF UseMIDIPort}
- MidiOut,
- {$ENDIF}
- UThemes;
+ UMenu,
+ UMusic,
+ SDL,
+ SysUtils,
+ UFiles,
+ UTime,
+ USongs,
+ USong,
+ UIni,
+ ULog,
+ UTexture,
+ UMenuText,
+ UEditorLyrics,
+ Math,
+ gl,
+ {$IFDEF UseMIDIPort}
+ MidiOut,
+ {$ENDIF}
+ UThemes;
type
TScreenEditSub = class(TMenu)
@@ -130,7 +130,8 @@ uses
UDraw,
UMain,
USkins,
- ULanguage;
+ ULanguage,
+ UUnicodeUtils;
// Method for input parsing. If False is returned, GetNextWindow
// should be checked to know the next window to load;
@@ -150,7 +151,7 @@ begin
If (PressedDown) then begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenLevel.pas b/unicode/src/screens/UScreenLevel.pas
index a632cf78..c0c856dd 100644
--- a/unicode/src/screens/UScreenLevel.pas
+++ b/unicode/src/screens/UScreenLevel.pas
@@ -51,7 +51,8 @@ uses UGraphic,
UMain,
UIni,
USong,
- UTexture;
+ UTexture,
+ UUnicodeUtils;
function TScreenLevel.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -59,7 +60,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenMain.pas b/unicode/src/screens/UScreenMain.pas
index 2a2d0613..ed8e2170 100644
--- a/unicode/src/screens/UScreenMain.pas
+++ b/unicode/src/screens/UScreenMain.pas
@@ -72,7 +72,8 @@ uses
UParty,
UDLLManager,
UScreenCredits,
- USkins;
+ USkins,
+ UUnicodeUtils;
function TScreenMain.ParseInput(PressedKey: cardinal; CharCode: widechar;
PressedDown: boolean): boolean;
@@ -87,7 +88,7 @@ begin
if (PressedDown) then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := False;
diff --git a/unicode/src/screens/UScreenOptions.pas b/unicode/src/screens/UScreenOptions.pas
index 10eba591..30f69987 100644
--- a/unicode/src/screens/UScreenOptions.pas
+++ b/unicode/src/screens/UScreenOptions.pas
@@ -34,7 +34,14 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, SysUtils, UDisplay, UMusic, UFiles, UIni, UThemes;
+ SDL,
+ SysUtils,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UFiles,
+ UIni,
+ UThemes;
type
TScreenOptions = class(TMenu)
@@ -52,7 +59,9 @@ type
implementation
-uses UGraphic;
+uses
+ UGraphic,
+ UUnicodeUtils;
function TScreenOptions.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -60,7 +69,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenOptionsAdvanced.pas b/unicode/src/screens/UScreenOptionsAdvanced.pas
index 8960640d..bbfb7813 100644
--- a/unicode/src/screens/UScreenOptionsAdvanced.pas
+++ b/unicode/src/screens/UScreenOptionsAdvanced.pas
@@ -34,7 +34,13 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
+ SDL,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UFiles,
+ UIni,
+ UThemes;
type
TScreenOptionsAdvanced = class(TMenu)
@@ -46,7 +52,10 @@ type
implementation
-uses UGraphic, SysUtils;
+uses
+ UGraphic,
+ UUnicodeUtils,
+ SysUtils;
function TScreenOptionsAdvanced.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -54,7 +63,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenOptionsGame.pas b/unicode/src/screens/UScreenOptionsGame.pas
index e634419b..07249591 100644
--- a/unicode/src/screens/UScreenOptionsGame.pas
+++ b/unicode/src/screens/UScreenOptionsGame.pas
@@ -34,7 +34,14 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes, USongs;
+ SDL,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UFiles,
+ UIni,
+ UThemes,
+ USongs;
type
TScreenOptionsGame = class(TMenu)
@@ -48,7 +55,10 @@ type
implementation
-uses UGraphic, SysUtils;
+uses
+ UGraphic,
+ UUnicodeUtils,
+ SysUtils;
function TScreenOptionsGame.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -56,7 +66,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenOptionsGraphics.pas b/unicode/src/screens/UScreenOptionsGraphics.pas
index 2e2b4f0e..bd233597 100644
--- a/unicode/src/screens/UScreenOptionsGraphics.pas
+++ b/unicode/src/screens/UScreenOptionsGraphics.pas
@@ -52,7 +52,11 @@ type
implementation
-uses UGraphic, UMain, SysUtils, TypInfo;
+uses
+ UGraphic,
+ UMain,
+ UUnicodeUtils,
+ SysUtils;
function TScreenOptionsGraphics.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -60,7 +64,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenOptionsLyrics.pas b/unicode/src/screens/UScreenOptionsLyrics.pas
index b5228a52..c237bf83 100644
--- a/unicode/src/screens/UScreenOptionsLyrics.pas
+++ b/unicode/src/screens/UScreenOptionsLyrics.pas
@@ -52,7 +52,10 @@ type
implementation
-uses UGraphic, SysUtils;
+uses
+ UGraphic,
+ UUnicodeUtils,
+ SysUtils;
function TScreenOptionsLyrics.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -60,7 +63,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenOptionsRecord.pas b/unicode/src/screens/UScreenOptionsRecord.pas
index b622f56c..144ae0cf 100644
--- a/unicode/src/screens/UScreenOptionsRecord.pas
+++ b/unicode/src/screens/UScreenOptionsRecord.pas
@@ -126,6 +126,7 @@ uses
UFiles,
UDisplay,
UIni,
+ UUnicodeUtils,
ULog;
function TScreenOptionsRecord.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
@@ -134,7 +135,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenOptionsSound.pas b/unicode/src/screens/UScreenOptionsSound.pas
index 80210f63..17cef0a4 100644
--- a/unicode/src/screens/UScreenOptionsSound.pas
+++ b/unicode/src/screens/UScreenOptionsSound.pas
@@ -34,7 +34,13 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
+ SDL,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UFiles,
+ UIni,
+ UThemes;
type
TScreenOptionsSound = class(TMenu)
@@ -47,7 +53,10 @@ type
implementation
-uses UGraphic, SysUtils;
+uses
+ UGraphic,
+ UUnicodeUtils,
+ SysUtils;
function TScreenOptionsSound.ParseInput(PressedKey: cardinal;
CharCode: widechar; PressedDown: boolean): boolean;
@@ -56,7 +65,7 @@ begin
if (PressedDown) then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := False;
diff --git a/unicode/src/screens/UScreenOptionsThemes.pas b/unicode/src/screens/UScreenOptionsThemes.pas
index ec6fe014..07e948df 100644
--- a/unicode/src/screens/UScreenOptionsThemes.pas
+++ b/unicode/src/screens/UScreenOptionsThemes.pas
@@ -57,10 +57,12 @@ type
implementation
-uses UMain,
- UGraphic,
- USkins,
- SysUtils;
+uses
+ UMain,
+ UGraphic,
+ USkins,
+ UUnicodeUtils,
+ SysUtils;
function TScreenOptionsThemes.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -68,7 +70,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenPartyNewRound.pas b/unicode/src/screens/UScreenPartyNewRound.pas
index 01de9df7..1b83b6e4 100644
--- a/unicode/src/screens/UScreenPartyNewRound.pas
+++ b/unicode/src/screens/UScreenPartyNewRound.pas
@@ -34,7 +34,13 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
+ SDL,
+ SysUtils,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UFiles,
+ UThemes;
type
TScreenPartyNewRound = class(TMenu)
@@ -101,15 +107,17 @@ type
implementation
-uses UGraphic,
- UMain,
- UIni,
- UTexture,
- UParty,
- UDLLManager,
- ULanguage,
- USong,
- ULog;
+uses
+ UGraphic,
+ UMain,
+ UIni,
+ UTexture,
+ UParty,
+ UDLLManager,
+ ULanguage,
+ USong,
+ ULog,
+ UUnicodeUtils;
function TScreenPartyNewRound.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -117,7 +125,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
@@ -214,7 +222,7 @@ var
I: Integer;
function GetTeamPlayers(const Num: Byte): String;
var
- Players: Array of String;
+ Players: array of UTF8String;
//J: Byte;
begin // to-do : Party
if (Num-1 >= {PartySession.Teams.NumTeams}0) then
diff --git a/unicode/src/screens/UScreenPartyOptions.pas b/unicode/src/screens/UScreenPartyOptions.pas
index fafae0e0..9bd47836 100644
--- a/unicode/src/screens/UScreenPartyOptions.pas
+++ b/unicode/src/screens/UScreenPartyOptions.pas
@@ -34,7 +34,13 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
+ SDL,
+ SysUtils,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UFiles,
+ UThemes;
type
TScreenPartyOptions = class(TMenu)
@@ -71,7 +77,18 @@ const
implementation
-uses UGraphic, UMain, UIni, UTexture, ULanguage, UParty, USong, UDLLManager, UPlaylist, USongs;
+uses
+ UGraphic,
+ UMain,
+ UIni,
+ UTexture,
+ ULanguage,
+ UParty,
+ USong,
+ UDLLManager,
+ UPlaylist,
+ USongs,
+ UUnicodeUtils;
function TScreenPartyOptions.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
var
@@ -82,7 +99,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenPartyScore.pas b/unicode/src/screens/UScreenPartyScore.pas
index bd54d55e..a7ebadf5 100644
--- a/unicode/src/screens/UScreenPartyScore.pas
+++ b/unicode/src/screens/UScreenPartyScore.pas
@@ -34,7 +34,12 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, SysUtils, UThemes;
+ SDL,
+ SysUtils,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UThemes;
type
TScreenPartyScore = class(TMenu)
@@ -71,7 +76,15 @@ type
implementation
-uses UGraphic, UMain, UParty, UScreenSingModi, ULanguage, UTexture, USkins;
+uses
+ UGraphic,
+ UMain,
+ UParty,
+ UScreenSingModi,
+ ULanguage,
+ UTexture,
+ USkins,
+ UUnicodeUtils;
function TScreenPartyScore.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -79,7 +92,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenPartyWin.pas b/unicode/src/screens/UScreenPartyWin.pas
index 6b4a55c0..6e56a1a8 100644
--- a/unicode/src/screens/UScreenPartyWin.pas
+++ b/unicode/src/screens/UScreenPartyWin.pas
@@ -34,7 +34,12 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, SysUtils, UThemes;
+ SDL,
+ SysUtils,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UThemes;
type
TScreenPartyWin = class(TMenu)
@@ -64,7 +69,13 @@ type
implementation
-uses UGraphic, UMain, UParty, UScreenSingModi, ULanguage;
+uses
+ UGraphic,
+ UMain,
+ UParty,
+ UScreenSingModi,
+ ULanguage,
+ UUnicodeUtils;
function TScreenPartyWin.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -72,7 +83,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenPopup.pas b/unicode/src/screens/UScreenPopup.pas
index bf4752b9..8fcb7f2f 100644
--- a/unicode/src/screens/UScreenPopup.pas
+++ b/unicode/src/screens/UScreenPopup.pas
@@ -34,7 +34,12 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UMusic, UFiles, SysUtils, UThemes;
+ SDL,
+ SysUtils,
+ UMenu,
+ UMusic,
+ UFiles,
+ UThemes;
type
TScreenPopupCheck = class(TMenu)
@@ -70,7 +75,16 @@ var
implementation
-uses UGraphic, UMain, UIni, UTexture, ULanguage, UParty, UPlaylist, UDisplay;
+uses
+ UGraphic,
+ UMain,
+ UIni,
+ UTexture,
+ ULanguage,
+ UParty,
+ UPlaylist,
+ UDisplay,
+ UUnicodeUtils;
function TScreenPopupCheck.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -78,7 +92,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenScore.pas b/unicode/src/screens/UScreenScore.pas
index ee94d345..c7f0d8f1 100644
--- a/unicode/src/screens/UScreenScore.pas
+++ b/unicode/src/screens/UScreenScore.pas
@@ -154,21 +154,23 @@ type
implementation
-uses UGraphic,
- UScreenSong,
- UMenuStatic,
- UTime,
- UMain,
- UIni,
- ULog,
- ULanguage;
+uses
+ UGraphic,
+ UScreenSong,
+ UMenuStatic,
+ UTime,
+ UMain,
+ UIni,
+ ULog,
+ ULanguage,
+ UUnicodeUtils;
function TScreenScore.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
Result := true;
If (PressedDown) Then begin
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenSing.pas b/unicode/src/screens/UScreenSing.pas
index 5783366d..1be1371e 100644
--- a/unicode/src/screens/UScreenSing.pas
+++ b/unicode/src/screens/UScreenSing.pas
@@ -34,10 +34,12 @@ interface
{$I switches.inc}
-uses UMenu,
- UMusic,
+uses
SDL,
SysUtils,
+ gl,
+ UMenu,
+ UMusic,
UFiles,
UTime,
USongs,
@@ -46,7 +48,6 @@ uses UMenu,
UTexture,
ULyrics,
TextGL,
- gl,
UThemes,
UGraphicClasses,
USingScores;
@@ -119,14 +120,16 @@ type
implementation
-uses UGraphic,
+uses
+ Classes,
+ Math,
+ UGraphic,
UDraw,
UMain,
USong,
- Classes,
URecord,
ULanguage,
- Math;
+ UUnicodeUtils;
// Method for input parsing. If False is returned, GetNextWindow
// should be checked to know the next window to load;
@@ -137,7 +140,7 @@ begin
if (PressedDown) then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
//When not ask before Exit then Finish now
diff --git a/unicode/src/screens/UScreenSong.pas b/unicode/src/screens/UScreenSong.pas
index 9fc74aae..5336efe5 100644
--- a/unicode/src/screens/UScreenSong.pas
+++ b/unicode/src/screens/UScreenSong.pas
@@ -164,6 +164,7 @@ uses
UParty,
UPlaylist,
UMenuButton,
+ UUnicodeUtils,
UScreenSongMenu;
// ***** Public methods ****** //
@@ -247,7 +248,8 @@ var
I: integer;
I2: integer;
SDL_ModState: Word;
- Letter: WideChar;
+ UpperLetter: UCS4Char;
+ TempStr: UTF8String;
begin
Result := true;
@@ -272,9 +274,10 @@ begin
//Jump to Artist/Titel
if ((SDL_ModState and KMOD_LALT <> 0) and (Mode = smNormal)) then
begin
- if (WideCharUpperCase(CharCode)[1] in ([WideChar('A')..WideChar('Z'), WideChar('0') .. WideChar('9')]) ) then
+ UpperLetter := UCS4UpperCase(WideStringToUCS4String(CharCode)[0]);
+
+ if (UpperLetter in ([UCS4Char('A')..UCS4Char('Z'), UCS4Char('0') .. UCS4Char('9')]) ) then
begin
- Letter := WideCharUpperCase(CharCode)[1];
I2 := Length(CatSongs.Song);
//Jump To Titel
@@ -282,18 +285,21 @@ begin
begin
for I := 1 to high(CatSongs.Song) do
begin
- if (CatSongs.Song[(I + Interaction) mod I2].Visible) and
- (Length(CatSongs.Song[(I + Interaction) mod I2].Title)>0) and
- (WideStringUpperCase(CatSongs.Song[(I + Interaction) mod I2].Title)[1] = Letter) then
+ if (CatSongs.Song[(I + Interaction) mod I2].Visible) then
begin
- SkipTo(CatSongs.VisibleIndex((I + Interaction) mod I2));
+ TempStr := CatSongs.Song[(I + Interaction) mod I2].Title;
+ if (Length(TempStr) > 0) and
+ (UCS4UpperCase(UTF8ToUCS4String(TempStr)[0]) = UpperLetter) then
+ begin
+ SkipTo(CatSongs.VisibleIndex((I + Interaction) mod I2));
- AudioPlayback.PlaySound(SoundLib.Change);
+ AudioPlayback.PlaySound(SoundLib.Change);
- ChangeMusic;
- SetScroll4;
- //Break and Exit
- Exit;
+ ChangeMusic;
+ SetScroll4;
+ //Break and Exit
+ Exit;
+ end;
end;
end;
end
@@ -302,19 +308,22 @@ begin
begin
for I := 1 to high(CatSongs.Song) do
begin
- if (CatSongs.Song[(I + Interaction) mod I2].Visible) and
- (Length(CatSongs.Song[(I + Interaction) mod I2].Artist)>0) and
- (WideStringUpperCase(CatSongs.Song[(I + Interaction) mod I2].Artist)[1] = Letter) then
+ if (CatSongs.Song[(I + Interaction) mod I2].Visible) then
begin
- SkipTo(CatSongs.VisibleIndex((I + Interaction) mod I2));
+ TempStr := CatSongs.Song[(I + Interaction) mod I2].Artist;
+ if (Length(TempStr) > 0) and
+ (UCS4UpperCase(UTF8ToUCS4String(TempStr)[0]) = UpperLetter) then
+ begin
+ SkipTo(CatSongs.VisibleIndex((I + Interaction) mod I2));
- AudioPlayback.PlaySound(SoundLib.Change);
+ AudioPlayback.PlaySound(SoundLib.Change);
- ChangeMusic;
- SetScroll4;
+ ChangeMusic;
+ SetScroll4;
- //Break and Exit
- Exit;
+ //Break and Exit
+ Exit;
+ end;
end;
end;
end;
@@ -324,7 +333,7 @@ begin
end;
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenSongMenu.pas b/unicode/src/screens/UScreenSongMenu.pas
index 6febdcab..f1008ff5 100644
--- a/unicode/src/screens/UScreenSongMenu.pas
+++ b/unicode/src/screens/UScreenSongMenu.pas
@@ -74,20 +74,22 @@ const
SM_Party_Joker = 128 or 2;
var
- ISelections: Array of String;
+ ISelections: Array of string;
SelectValue: Integer;
implementation
-uses UGraphic,
- UMain,
- UIni,
- UTexture,
- ULanguage,
- UParty,
- UPlaylist,
- USongs;
+uses
+ UGraphic,
+ UMain,
+ UIni,
+ UTexture,
+ ULanguage,
+ UParty,
+ UPlaylist,
+ USongs,
+ UUnicodeUtils;
function TScreenSongMenu.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -97,7 +99,7 @@ begin
if (CurMenu = SM_Playlist_New) AND (Interaction=0) then
begin
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'0'..'9', 'A'..'Z', ' ', '-', '_', '!', ',', '<', '/', '*', '?', '''', '"':
begin
Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + CharCode;
@@ -116,7 +118,7 @@ begin
end;
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenStatDetail.pas b/unicode/src/screens/UScreenStatDetail.pas
index 20b89b33..ffc5152c 100644
--- a/unicode/src/screens/UScreenStatDetail.pas
+++ b/unicode/src/screens/UScreenStatDetail.pas
@@ -67,11 +67,12 @@ type
implementation
uses
- UGraphic,
- ULanguage,
Math,
Classes,
- ULog;
+ UGraphic,
+ ULanguage,
+ ULog,
+ UUnicodeUtils;
function TScreenStatDetail.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -79,7 +80,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenStatMain.pas b/unicode/src/screens/UScreenStatMain.pas
index a6f67cab..c9bff348 100644
--- a/unicode/src/screens/UScreenStatMain.pas
+++ b/unicode/src/screens/UScreenStatMain.pas
@@ -62,19 +62,16 @@ type
implementation
-uses UGraphic,
- UDataBase,
- USongs,
- USong,
- ULanguage,
- UCommon,
- Classes,
- {$IFDEF win32}
- windows,
- {$ELSE}
- sysconst,
- {$ENDIF}
- ULog;
+uses
+ UGraphic,
+ UDataBase,
+ USongs,
+ USong,
+ ULanguage,
+ UCommon,
+ Classes,
+ ULog,
+ UUnicodeUtils;
function TScreenStatMain.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
@@ -82,7 +79,7 @@ begin
If (PressedDown) Then
begin // Key Down
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
diff --git a/unicode/src/screens/UScreenTop5.pas b/unicode/src/screens/UScreenTop5.pas
index cf5ee257..dede9a35 100644
--- a/unicode/src/screens/UScreenTop5.pas
+++ b/unicode/src/screens/UScreenTop5.pas
@@ -34,7 +34,13 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, SysUtils, UDisplay, UMusic, USongs, UThemes;
+ SDL,
+ SysUtils,
+ UMenu,
+ UDisplay,
+ UMusic,
+ USongs,
+ UThemes;
type
TScreenTop5 = class(TMenu)
@@ -56,14 +62,19 @@ type
implementation
-uses UGraphic, UDataBase, UMain, UIni;
+uses
+ UGraphic,
+ UDataBase,
+ UMain,
+ UIni,
+ UUnicodeUtils;
function TScreenTop5.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
begin
Result := true;
If (PressedDown) Then begin
// check normal keys
- case WideCharUpperCase(CharCode)[1] of
+ case WideStringUpperCase(CharCode)[1] of
'Q':
begin
Result := false;
@@ -126,7 +137,8 @@ begin
//ReadScore(CurrentSong);
PMax := Ini.Players;
- if PMax = 4 then PMax := 5;
+ if PMax = 4 then
+ PMax := 5;
for I := 0 to PMax do
DataBase.AddScore(CurrentSong, Ini.Difficulty, Ini.Name[I], Round(Player[I].ScoreTotalInt));