forked from Kolyah35/minecraft-pe-0.6.1
fix msvc build & mingw build
1. Include unified header files using lowercase filenames 2. Change special characters to escape sequences to solve encoding issues
This commit is contained in:
@@ -186,7 +186,7 @@ void Font::draw( const std::string& str, float x, float y, int color, bool darke
|
||||
glPushMatrix2();
|
||||
glTranslatef2((GLfloat)x, (GLfloat)y, 0.0f);
|
||||
for (unsigned int i = 0; i < str.length(); i++) {
|
||||
while (str.length() > i + 1 && str[i] == '§') {
|
||||
while (str.length() > i + 1 && str[i] == '\xa7') {
|
||||
int cc = hex.find((char)tolower(str[i + 1]));
|
||||
if (cc < 0 || cc > 15) cc = 15;
|
||||
lists[index++] = listPos + 256 + cc + (darken ? 16 : 0);
|
||||
@@ -235,7 +235,7 @@ int Font::width( const std::string& str )
|
||||
int len = 0;
|
||||
|
||||
for (unsigned int i = 0; i < str.length(); i++) {
|
||||
if (str[i] == '§') {
|
||||
if (str[i] == '\xa7') {
|
||||
i++;
|
||||
} else {
|
||||
//int ch = SharedConstants.acceptableLetters.indexOf(str.charAt(i));
|
||||
@@ -274,7 +274,7 @@ std::string Font::sanitize( const std::string& str )
|
||||
int j = 0;
|
||||
|
||||
for (unsigned int i = 0; i < str.length(); i++) {
|
||||
if (str[i] == '§') {
|
||||
if (str[i] == '\xa7') {
|
||||
i++;
|
||||
//} else if (SharedConstants.acceptableLetters.indexOf(str.charAt(i)) >= 0) {
|
||||
} else {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
// #else
|
||||
// // Uglyness to fix redeclaration issues
|
||||
// #ifdef WIN32
|
||||
// #include <WinSock2.h>
|
||||
// #include <winsock2.h>
|
||||
// #include <Windows.h>
|
||||
// #endif
|
||||
// #include <gl/glew.h>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
#include <WinSock2.h>
|
||||
#include <winsock2.h>
|
||||
#include <process.h>
|
||||
#include "SharedConstants.h"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <vector>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <WinSock2.h>
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#if defined(X360__)
|
||||
#elif defined (_WIN32)
|
||||
#include <WinSock2.h>
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <Ws2tcpip.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
// Must always include Winsock2.h before windows.h
|
||||
// or else:
|
||||
|
||||
Reference in New Issue
Block a user