mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-22 16:03:31 +00:00
Watch out! Skins!
This commit is contained in:
@@ -16,7 +16,7 @@ typedef struct TextureData {
|
||||
TextureData()
|
||||
: w(0),
|
||||
h(0),
|
||||
data(NULL),
|
||||
data(nullptr),
|
||||
numBytes(0),
|
||||
transparent(true),
|
||||
memoryHandledExternally(false),
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "../Options.h"
|
||||
#include "../../platform/time.h"
|
||||
#include "../../AppPlatform.h"
|
||||
#include "../../util/StringUtils.h"
|
||||
|
||||
/*static*/ int Textures::textureChanges = 0;
|
||||
/*static*/ bool Textures::MIPMAP = false;
|
||||
@@ -64,7 +65,8 @@ TextureId Textures::loadTexture( const std::string& resourceName, bool inTexture
|
||||
if (it != idMap.end())
|
||||
return it->second;
|
||||
|
||||
TextureData texdata = platform->loadTexture(resourceName, inTextureFolder);
|
||||
bool isUrl = Util::startsWith(resourceName, "http://") || Util::startsWith(resourceName, "https://");
|
||||
TextureData texdata = platform->loadTexture(resourceName, isUrl ? false : inTextureFolder);
|
||||
if (texdata.data)
|
||||
return assignTexture(resourceName, texdata);
|
||||
else if (texdata.identifier != InvalidId) {
|
||||
|
||||
@@ -51,7 +51,7 @@ EntityRenderDispatcher::EntityRenderDispatcher()
|
||||
assign( ER_SPIDER_RENDERER, new SpiderRenderer());
|
||||
assign( ER_TNT_RENDERER, new TntRenderer());
|
||||
assign( ER_ARROW_RENDERER, new ArrowRenderer());
|
||||
assign( ER_PLAYER_RENDERER, new PlayerRenderer(new HumanoidModel(), 0));
|
||||
assign( ER_PLAYER_RENDERER, new PlayerRenderer(new HumanoidModel(0, 0, 64, 64), 0));
|
||||
assign( ER_THROWNEGG_RENDERER, new ItemSpriteRenderer(Item::egg->getIcon(0)));
|
||||
assign( ER_SNOWBALL_RENDERER, new ItemSpriteRenderer(Item::snowBall->getIcon(0)));
|
||||
assign( ER_PAINTING_RENDERER, new PaintingRenderer());
|
||||
|
||||
@@ -14,8 +14,8 @@ static const std::string armorFilenames[10] = {
|
||||
|
||||
PlayerRenderer::PlayerRenderer( HumanoidModel* humanoidModel, float shadow )
|
||||
: super(humanoidModel, shadow),
|
||||
armorParts1(new HumanoidModel(1.0f)),
|
||||
armorParts2(new HumanoidModel(0.5f))
|
||||
armorParts1(new HumanoidModel(1.0f, 0, 64, 64)),
|
||||
armorParts2(new HumanoidModel(0.5f, 0, 64, 64))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user