Files
MinecraftConsoles/Minecraft.World/SharedConstants.cpp
daoge b3feddfef3 feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-03-03 03:04:10 +08:00

51 lines
1.7 KiB
C++

#include "stdafx.h"
#include "File.h"
#include "InputOutputStream.h"
#include "SharedConstants.h"
const wstring SharedConstants::VERSION_STRING = L"1.6.4";
const bool SharedConstants::TEXTURE_LIGHTING = true;
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{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»ã";
#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;
while ( !(line = br->readLine()).empty())
{
if (!( wcscmp( &line[0], L"#") == 0 ) )
{
result.append( line );
}
}
br->close();
//} catch (Exception e) {
// TODO 4J Stu - Exception handling?
//}
#endif
return result;
}
bool SharedConstants::isAllowedChatCharacter(char ch)
{
//return ch != '§' && (acceptableLetters.indexOf(ch) >= 0 || (int) ch > 32);
// 4J Unused
return true;
}
wstring SharedConstants::acceptableLetters;
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':'
};