diff options
Diffstat (limited to 'Minecraft.Client/BufferedImage.cpp')
| -rw-r--r-- | Minecraft.Client/BufferedImage.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Minecraft.Client/BufferedImage.cpp b/Minecraft.Client/BufferedImage.cpp index 37662d8a..89e37e4f 100644 --- a/Minecraft.Client/BufferedImage.cpp +++ b/Minecraft.Client/BufferedImage.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "..\Minecraft.World\StringHelpers.h" #include "Textures.h" #include "..\Minecraft.World\ArrayWithLength.h" @@ -46,7 +46,7 @@ void BufferedImage::ByteFlip4(unsigned int &data) } // Loads a bitmap into a buffered image - only currently supports the 2 types of 32-bit image that we've made so far // and determines which of these is which by the compression method. Compression method 3 is a 32-bit image with only -// 24-bits used (ie no alpha channel) whereas method 0 is a full 32-bit image with a valid alpha channel. +// 24-bits used (ie no alpha channel) whereas method 0 is a full 32-bit image with a valid alpha channel. BufferedImage::BufferedImage(const wstring& File, bool filenameHasExtension /*=false*/, bool bTitleUpdateTexture /*=false*/, const wstring &drive /*=L""*/) { HRESULT hr; @@ -149,7 +149,7 @@ BufferedImage::BufferedImage(const wstring& File, bool filenameHasExtension /*=f wstring mipMapPath = L""; if( l != 0 ) { - mipMapPath = L"MipMapLevel" + _toString<int>(l+1); + mipMapPath = L"MipMapLevel" + std::to_wstring(l+1); } if( filenameHasExtension ) { @@ -171,7 +171,7 @@ BufferedImage::BufferedImage(const wstring& File, bool filenameHasExtension /*=f hr=RenderManager.LoadTextureData(pchTextureName,&ImageInfo,&data[l]); - if(hr!=ERROR_SUCCESS) + if(hr!=ERROR_SUCCESS) { // 4J - If we haven't loaded the non-mipmap version then exit the game if( l == 0 ) @@ -179,7 +179,7 @@ BufferedImage::BufferedImage(const wstring& File, bool filenameHasExtension /*=f app.FatalLoadError(); } return; - } + } if( l == 0 ) { @@ -207,7 +207,7 @@ BufferedImage::BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenam wstring mipMapPath = L""; if( l != 0 ) { - mipMapPath = L"MipMapLevel" + _toString<int>(l+1); + mipMapPath = L"MipMapLevel" + std::to_wstring(l+1); } if( filenameHasExtension ) { @@ -231,7 +231,7 @@ BufferedImage::BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenam DLCFile *dlcFile = dlcPack->getFile(DLCManager::e_DLCType_All, name); pbData = dlcFile->getData(dwBytes); if(pbData == NULL || dwBytes == 0) - { + { // 4J - If we haven't loaded the non-mipmap version then exit the game if( l == 0 ) { @@ -245,7 +245,7 @@ BufferedImage::BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenam hr=RenderManager.LoadTextureData(pbData,dwBytes,&ImageInfo,&data[l]); - if(hr!=ERROR_SUCCESS) + if(hr!=ERROR_SUCCESS) { // 4J - If we haven't loaded the non-mipmap version then exit the game if( l == 0 ) @@ -253,7 +253,7 @@ BufferedImage::BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenam app.FatalLoadError(); } return; - } + } if( l == 0 ) { @@ -276,7 +276,7 @@ BufferedImage::BufferedImage(BYTE *pbData, DWORD dwBytes) ZeroMemory(&ImageInfo,sizeof(D3DXIMAGE_INFO)); HRESULT hr=RenderManager.LoadTextureData(pbData,dwBytes,&ImageInfo,&data[0]); - if(hr==ERROR_SUCCESS) + if(hr==ERROR_SUCCESS) { width=ImageInfo.Width; height=ImageInfo.Height; |
