refactor: unglob std::wstring

This commit is contained in:
Tropical
2026-03-06 11:50:22 -06:00
parent 41db813a6d
commit cdc08700e4
581 changed files with 2156 additions and 2154 deletions

View File

@@ -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()
{