mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-21 04:15:45 +00:00
refactor: unglob std::wstring
This commit is contained in:
@@ -3,18 +3,18 @@
|
||||
#include "../IO/Streams/InputOutputStream.h"
|
||||
#include "SharedConstants.h"
|
||||
|
||||
const wstring SharedConstants::VERSION_STRING = L"1.2.3";
|
||||
const std::wstring SharedConstants::VERSION_STRING = L"1.2.3";
|
||||
const bool SharedConstants::TEXTURE_LIGHTING = true;
|
||||
|
||||
wstring SharedConstants::readAcceptableChars()
|
||||
std::wstring SharedConstants::readAcceptableChars()
|
||||
{
|
||||
// 4J-PB - I've added ã in (for Portuguese in bed string) and added the character at the same place in the default.png font
|
||||
wstring result = L" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'abcdefghijklmnopqrstuvwxyz{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»ã";
|
||||
std::wstring result = L" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'abcdefghijklmnopqrstuvwxyz{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»ã";
|
||||
#if 0 // 4J - do we actually really need to get this from a file?
|
||||
//try {
|
||||
//BufferedReader br = new BufferedReader(new InputStreamReader(SharedConstants.class.getResourceAsStream("/font.txt"), "UTF-8"));
|
||||
BufferedReader *br = new BufferedReader(new InputStreamReader( new FileInputStream( new File( wstring(L"/font.txt") ) ) ) );
|
||||
wstring line;
|
||||
BufferedReader *br = new BufferedReader(new InputStreamReader( new FileInputStream( new File( std::wstring(L"/font.txt") ) ) ) );
|
||||
std::wstring line;
|
||||
while ( !(line = br->readLine()).empty())
|
||||
{
|
||||
if (!( wcscmp( &line[0], L"#") == 0 ) )
|
||||
@@ -37,7 +37,7 @@ bool SharedConstants::isAllowedChatCharacter(char ch)
|
||||
return true;
|
||||
}
|
||||
|
||||
wstring SharedConstants::acceptableLetters = SharedConstants::readAcceptableChars();
|
||||
std::wstring SharedConstants::acceptableLetters = SharedConstants::readAcceptableChars();
|
||||
|
||||
void SharedConstants::staticCtor()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user