mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-17 15:22:13 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -6,13 +6,19 @@
|
||||
const std::wstring SharedConstants::VERSION_STRING = L"1.2.3";
|
||||
const bool SharedConstants::TEXTURE_LIGHTING = true;
|
||||
|
||||
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
|
||||
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"));
|
||||
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
|
||||
std::wstring result =
|
||||
L" !\"#$%&'()*+,-./"
|
||||
L"0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'"
|
||||
L"abcdefghijklmnopqrstuvwxyz{|}~"
|
||||
L" ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»ã";
|
||||
#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( std::wstring(L"/font.txt") ) ) ) );
|
||||
std::wstring line;
|
||||
while ( !(line = br->readLine()).empty())
|
||||
@@ -27,25 +33,25 @@ std::wstring SharedConstants::readAcceptableChars()
|
||||
// TODO 4J Stu - Exception handling?
|
||||
//}
|
||||
#endif
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
bool SharedConstants::isAllowedChatCharacter(char ch)
|
||||
{
|
||||
//return ch != '§' && (acceptableLetters.indexOf(ch) >= 0 || (int) ch > 32);
|
||||
// 4J Unused
|
||||
return true;
|
||||
bool SharedConstants::isAllowedChatCharacter(char ch) {
|
||||
// return ch != '§' && (acceptableLetters.indexOf(ch) >= 0 || (int) ch >
|
||||
// 32);
|
||||
// 4J Unused
|
||||
return true;
|
||||
}
|
||||
|
||||
std::wstring SharedConstants::acceptableLetters = SharedConstants::readAcceptableChars();
|
||||
std::wstring SharedConstants::acceptableLetters =
|
||||
SharedConstants::readAcceptableChars();
|
||||
|
||||
void SharedConstants::staticCtor()
|
||||
{
|
||||
acceptableLetters = readAcceptableChars();
|
||||
void SharedConstants::staticCtor() {
|
||||
acceptableLetters = readAcceptableChars();
|
||||
}
|
||||
|
||||
const wchar_t SharedConstants::ILLEGAL_FILE_CHARACTERS[ILLEGAL_FILE_CHARACTERS_LENGTH] =
|
||||
{
|
||||
// 4J-PB - corrected
|
||||
L'/', L'\n', L'\r', L'\t', L'\0', L'\f', L'`', L'?', L'*', L'\\', L'<', L'>', L'|', L'\"', L':'
|
||||
};
|
||||
const wchar_t
|
||||
SharedConstants::ILLEGAL_FILE_CHARACTERS[ILLEGAL_FILE_CHARACTERS_LENGTH] = {
|
||||
// 4J-PB - corrected
|
||||
L'/', L'\n', L'\r', L'\t', L'\0', L'\f', L'`', L'?',
|
||||
L'*', L'\\', L'<', L'>', L'|', L'\"', L':'};
|
||||
Reference in New Issue
Block a user