the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 51 lines 1.7 kB view raw
1#include "stdafx.h" 2#include "File.h" 3#include "InputOutputStream.h" 4#include "SharedConstants.h" 5 6const wstring SharedConstants::VERSION_STRING = L"1.6.4"; 7const bool SharedConstants::TEXTURE_LIGHTING = true; 8 9wstring SharedConstants::readAcceptableChars() 10{ 11 // 4J-PB - I've added ã in (for Portuguese in bed string) and added the character at the same place in the default.png font 12 wstring result = L" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'abcdefghijklmnopqrstuvwxyz{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»ã"; 13#if 0 // 4J - do we actually really need to get this from a file? 14 //try { 15 //BufferedReader br = new BufferedReader(new InputStreamReader(SharedConstants.class.getResourceAsStream("/font.txt"), "UTF-8")); 16 BufferedReader *br = new BufferedReader(new InputStreamReader( new FileInputStream( new File( wstring(L"/font.txt") ) ) ) ); 17 wstring line; 18 while ( !(line = br->readLine()).empty()) 19 { 20 if (!( wcscmp( &line[0], L"#") == 0 ) ) 21 { 22 result.append( line ); 23 } 24 } 25 br->close(); 26 //} catch (Exception e) { 27 // TODO 4J Stu - Exception handling? 28 //} 29#endif 30 return result; 31} 32 33bool SharedConstants::isAllowedChatCharacter(char ch) 34{ 35 //return ch != '§' && (acceptableLetters.indexOf(ch) >= 0 || (int) ch > 32); 36 // 4J Unused 37 return true; 38} 39 40wstring SharedConstants::acceptableLetters; 41 42void SharedConstants::staticCtor() 43{ 44 acceptableLetters = readAcceptableChars(); 45} 46 47const wchar_t SharedConstants::ILLEGAL_FILE_CHARACTERS[ILLEGAL_FILE_CHARACTERS_LENGTH] = 48{ 49 // 4J-PB - corrected 50 L'/', L'\n', L'\r', L'\t', L'\0', L'\f', L'`', L'?', L'*', L'\\', L'<', L'>', L'|', L'\"', L':' 51};