diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
| commit | 7074f35e4ba831e358117842b99ee35b87f85ae5 (patch) | |
| tree | 7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.Client | |
| parent | d63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff) | |
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
Diffstat (limited to 'Minecraft.Client')
577 files changed, 6893 insertions, 6893 deletions
diff --git a/Minecraft.Client/AbstractContainerScreen.cpp b/Minecraft.Client/AbstractContainerScreen.cpp index 2b3e0837..d199f726 100644 --- a/Minecraft.Client/AbstractContainerScreen.cpp +++ b/Minecraft.Client/AbstractContainerScreen.cpp @@ -52,7 +52,7 @@ void AbstractContainerScreen::render(int xm, int ym, float a) glEnable(GL_RESCALE_NORMAL); Slot *hoveredSlot = NULL; - + AUTO_VAR(itEnd, menu->slots->end()); for (AUTO_VAR(it, menu->slots->begin()); it != itEnd; it++) { @@ -75,7 +75,7 @@ void AbstractContainerScreen::render(int xm, int ym, float a) } } - shared_ptr<Inventory> inventory = minecraft->player->inventory; + std::shared_ptr<Inventory> inventory = minecraft->player->inventory; if (inventory->getCarried() != NULL) { glTranslatef(0, 0, 32); @@ -128,7 +128,7 @@ void AbstractContainerScreen::renderSlot(Slot *slot) #if 0 int x = slot->x; int y = slot->y; - shared_ptr<ItemInstance> item = slot->getItem(); + std::shared_ptr<ItemInstance> item = slot->getItem(); if (item == NULL) { @@ -218,7 +218,7 @@ void AbstractContainerScreen::removed() if (minecraft->player == NULL) return; } -void AbstractContainerScreen::slotsChanged(shared_ptr<Container> container) +void AbstractContainerScreen::slotsChanged(std::shared_ptr<Container> container) { } diff --git a/Minecraft.Client/AbstractContainerScreen.h b/Minecraft.Client/AbstractContainerScreen.h index 2ba9cdcd..dc78db27 100644 --- a/Minecraft.Client/AbstractContainerScreen.h +++ b/Minecraft.Client/AbstractContainerScreen.h @@ -32,7 +32,7 @@ protected: virtual void keyPressed(wchar_t eventCharacter, int eventKey); public: virtual void removed(); - virtual void slotsChanged(shared_ptr<Container> container); + virtual void slotsChanged(std::shared_ptr<Container> container); virtual bool isPauseScreen(); virtual void tick(); };
\ No newline at end of file diff --git a/Minecraft.Client/ArrowRenderer.cpp b/Minecraft.Client/ArrowRenderer.cpp index 65c4ee71..b717552b 100644 --- a/Minecraft.Client/ArrowRenderer.cpp +++ b/Minecraft.Client/ArrowRenderer.cpp @@ -3,11 +3,11 @@ #include "..\Minecraft.World\net.minecraft.world.entity.projectile.h" #include "..\Minecraft.World\Mth.h" -void ArrowRenderer::render(shared_ptr<Entity> _arrow, double x, double y, double z, float rot, float a) +void ArrowRenderer::render(std::shared_ptr<Entity> _arrow, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type Arrow rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Arrow rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<Arrow> arrow = dynamic_pointer_cast<Arrow>(_arrow); + std::shared_ptr<Arrow> arrow = dynamic_pointer_cast<Arrow>(_arrow); bindTexture(TN_ITEM_ARROWS); // 4J - was L"/item/arrows.png" glPushMatrix(); diff --git a/Minecraft.Client/ArrowRenderer.h b/Minecraft.Client/ArrowRenderer.h index 2731f7c2..3348fc33 100644 --- a/Minecraft.Client/ArrowRenderer.h +++ b/Minecraft.Client/ArrowRenderer.h @@ -4,5 +4,5 @@ class ArrowRenderer : public EntityRenderer { public: - virtual void render(shared_ptr<Entity> _arrow, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _arrow, double x, double y, double z, float rot, float a); }; diff --git a/Minecraft.Client/BlazeModel.cpp b/Minecraft.Client/BlazeModel.cpp index 5af894ac..e1a7747b 100644 --- a/Minecraft.Client/BlazeModel.cpp +++ b/Minecraft.Client/BlazeModel.cpp @@ -7,7 +7,7 @@ BlazeModel::BlazeModel() : Model() { upperBodyParts = ModelPartArray(12); - for (unsigned int i = 0; i < upperBodyParts.length; i++) + for (unsigned int i = 0; i < upperBodyParts.length; i++) { upperBodyParts[i] = new ModelPart(this, 0, 16); upperBodyParts[i]->addBox(0, 0, 0, 2, 8, 2); @@ -18,34 +18,34 @@ BlazeModel::BlazeModel() : Model() // 4J added - compile now to avoid random performance hit first time cubes are rendered // 4J Stu - Not just performance, but alpha+depth tests don't work right unless we compile here - for (unsigned int i = 0; i < upperBodyParts.length; i++) + for (unsigned int i = 0; i < upperBodyParts.length; i++) { upperBodyParts[i]->compile(1.0f/16.0f); } head->compile(1.0f/16.0f); } -int BlazeModel::modelVersion() +int BlazeModel::modelVersion() { return 8; } -void BlazeModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void BlazeModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); head->render(scale,usecompiled); - for (unsigned int i = 0; i < upperBodyParts.length; i++) + for (unsigned int i = 0; i < upperBodyParts.length; i++) { upperBodyParts[i]->render(scale, usecompiled); } } -void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim) +void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim) { float angle = bob * PI * -.1f; - for (int i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) { upperBodyParts[i]->y = -2 + Mth::cos((i * 2 + bob) * .25f); upperBodyParts[i]->x = Mth::cos(angle) * 9.0f; @@ -53,7 +53,7 @@ void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRo angle += PI * 0.5f; } angle = .25f * PI + bob * PI * .03f; - for (int i = 4; i < 8; i++) + for (int i = 4; i < 8; i++) { upperBodyParts[i]->y = 2 + Mth::cos((i * 2 + bob) * .25f); upperBodyParts[i]->x = Mth::cos(angle) * 7.0f; @@ -62,7 +62,7 @@ void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRo } angle = .15f * PI + bob * PI * -.05f; - for (int i = 8; i < 12; i++) + for (int i = 8; i < 12; i++) { upperBodyParts[i]->y = 11 + Mth::cos((i * 1.5f + bob) * .5f); upperBodyParts[i]->x = Mth::cos(angle) * 5.0f; diff --git a/Minecraft.Client/BlazeModel.h b/Minecraft.Client/BlazeModel.h index 27ee2060..e710ebf6 100644 --- a/Minecraft.Client/BlazeModel.h +++ b/Minecraft.Client/BlazeModel.h @@ -1,7 +1,7 @@ #pragma once #include "Model.h" -class BlazeModel : public Model +class BlazeModel : public Model { private: @@ -11,6 +11,6 @@ private: public: BlazeModel(); int modelVersion(); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; diff --git a/Minecraft.Client/BlazeRenderer.cpp b/Minecraft.Client/BlazeRenderer.cpp index 7d5210dc..f3878c1d 100644 --- a/Minecraft.Client/BlazeRenderer.cpp +++ b/Minecraft.Client/BlazeRenderer.cpp @@ -8,11 +8,11 @@ BlazeRenderer::BlazeRenderer() : MobRenderer(new BlazeModel(), 0.5f) this->modelVersion = ((BlazeModel *) model)->modelVersion(); } -void BlazeRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void BlazeRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<Blaze> mob = dynamic_pointer_cast<Blaze>(_mob); + std::shared_ptr<Blaze> mob = dynamic_pointer_cast<Blaze>(_mob); int modelVersion = ((BlazeModel *) model)->modelVersion(); if (modelVersion != this->modelVersion) diff --git a/Minecraft.Client/BlazeRenderer.h b/Minecraft.Client/BlazeRenderer.h index fc575e9b..0ee973ca 100644 --- a/Minecraft.Client/BlazeRenderer.h +++ b/Minecraft.Client/BlazeRenderer.h @@ -10,5 +10,5 @@ private: public: BlazeRenderer(); - virtual void render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/BoatModel.cpp b/Minecraft.Client/BoatModel.cpp index d0d465e5..096d243e 100644 --- a/Minecraft.Client/BoatModel.cpp +++ b/Minecraft.Client/BoatModel.cpp @@ -16,19 +16,19 @@ BoatModel::BoatModel() : Model() cubes[0]->addBox((float)(-w / 2), (float)(-h / 2 + 2), -3, w, h - 4, 4, 0); cubes[0]->setPos(0, (float)(0 + yOff), 0); - + cubes[1]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[1]->setPos((float)(-w / 2 + 1), (float)(0 + yOff), 0); - + cubes[2]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[2]->setPos((float)(+w / 2 - 1), (float)(0 + yOff), 0); - + cubes[3]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[3]->setPos(0, (float)(0 + yOff), (float)(-h / 2 + 1)); - + cubes[4]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[4]->setPos(0, (float)(0 + yOff), (float)(+h / 2 - 1)); - + cubes[0]->xRot = PI / 2; cubes[1]->yRot = PI / 2 * 3; cubes[2]->yRot = PI / 2 * 1; @@ -42,7 +42,7 @@ BoatModel::BoatModel() : Model() cubes[4]->compile(1.0f/16.0f); } -void BoatModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void BoatModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { for (int i = 0; i < 5; i++) { diff --git a/Minecraft.Client/BoatModel.h b/Minecraft.Client/BoatModel.h index 4298b643..192e140f 100644 --- a/Minecraft.Client/BoatModel.h +++ b/Minecraft.Client/BoatModel.h @@ -7,5 +7,5 @@ class BoatModel : public Model public: ModelPart *cubes[5]; BoatModel(); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); };
\ No newline at end of file diff --git a/Minecraft.Client/BoatRenderer.cpp b/Minecraft.Client/BoatRenderer.cpp index f1367ae4..33ffc322 100644 --- a/Minecraft.Client/BoatRenderer.cpp +++ b/Minecraft.Client/BoatRenderer.cpp @@ -10,11 +10,11 @@ BoatRenderer::BoatRenderer() : EntityRenderer() model = new BoatModel(); } -void BoatRenderer::render(shared_ptr<Entity> _boat, double x, double y, double z, float rot, float a) +void BoatRenderer::render(std::shared_ptr<Entity> _boat, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Boat rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<Boat> boat = dynamic_pointer_cast<Boat>(_boat); + std::shared_ptr<Boat> boat = dynamic_pointer_cast<Boat>(_boat); glPushMatrix(); diff --git a/Minecraft.Client/BoatRenderer.h b/Minecraft.Client/BoatRenderer.h index 1cc9c1d9..c4bb0312 100644 --- a/Minecraft.Client/BoatRenderer.h +++ b/Minecraft.Client/BoatRenderer.h @@ -9,5 +9,5 @@ protected: public: BoatRenderer(); - virtual void render(shared_ptr<Entity> boat, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> boat, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/BookModel.cpp b/Minecraft.Client/BookModel.cpp index bc4769bd..dec3d6ac 100644 --- a/Minecraft.Client/BookModel.cpp +++ b/Minecraft.Client/BookModel.cpp @@ -3,7 +3,7 @@ #include "BookModel.h" #include "ModelPart.h" -BookModel::BookModel() +BookModel::BookModel() { leftLid = (new ModelPart(this))->texOffs(0, 0)->addBox(-6, -5, 0, 6, 10, 0); rightLid = (new ModelPart(this))->texOffs(16, 0)->addBox(0, -5, 0, 6, 10, 0); @@ -33,7 +33,7 @@ BookModel::BookModel() } -void BookModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void BookModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/BookModel.h b/Minecraft.Client/BookModel.h index 8b367a34..3e6cee00 100644 --- a/Minecraft.Client/BookModel.h +++ b/Minecraft.Client/BookModel.h @@ -2,7 +2,7 @@ #pragma once #include "Model.h" -class BookModel : public Model +class BookModel : public Model { public: ModelPart *leftLid, *rightLid; @@ -11,6 +11,6 @@ public: ModelPart *seam; BookModel(); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; diff --git a/Minecraft.Client/Camera.cpp b/Minecraft.Client/Camera.cpp index db6072b2..6c5a3649 100644 --- a/Minecraft.Client/Camera.cpp +++ b/Minecraft.Client/Camera.cpp @@ -21,7 +21,7 @@ float Camera::za = 0.0f; float Camera::xa2 = 0.0f; float Camera::za2 = 0.0f; -void Camera::prepare(shared_ptr<Player> player, bool mirror) +void Camera::prepare(std::shared_ptr<Player> player, bool mirror) { glGetFloat(GL_MODELVIEW_MATRIX, modelview); glGetFloat(GL_PROJECTION_MATRIX, projection); @@ -88,12 +88,12 @@ void Camera::prepare(shared_ptr<Player> player, bool mirror) ya = cosf(xRot * PI / 180.0f); } -TilePos *Camera::getCameraTilePos(shared_ptr<Mob> player, double alpha) +TilePos *Camera::getCameraTilePos(std::shared_ptr<Mob> player, double alpha) { return new TilePos(getCameraPos(player, alpha)); } -Vec3 *Camera::getCameraPos(shared_ptr<Mob> player, double alpha) +Vec3 *Camera::getCameraPos(std::shared_ptr<Mob> player, double alpha) { double xx = player->xo + (player->x - player->xo) * alpha; double yy = player->yo + (player->y - player->yo) * alpha + player->getHeadHeight(); @@ -106,7 +106,7 @@ Vec3 *Camera::getCameraPos(shared_ptr<Mob> player, double alpha) return Vec3::newTemp(xt, yt, zt); } -int Camera::getBlockAt(Level *level, shared_ptr<Mob> player, float alpha) +int Camera::getBlockAt(Level *level, std::shared_ptr<Mob> player, float alpha) { Vec3 *p = Camera::getCameraPos(player, alpha); TilePos tp = TilePos(p); diff --git a/Minecraft.Client/Camera.h b/Minecraft.Client/Camera.h index cccb0b2d..7e00540d 100644 --- a/Minecraft.Client/Camera.h +++ b/Minecraft.Client/Camera.h @@ -24,9 +24,9 @@ private: public: static float xa, ya, za, xa2, za2; - static void prepare(shared_ptr<Player> player, bool mirror); + static void prepare(std::shared_ptr<Player> player, bool mirror); - static TilePos *getCameraTilePos(shared_ptr<Mob> player, double alpha); - static Vec3 *getCameraPos(shared_ptr<Mob> player, double alpha); - static int getBlockAt(Level *level, shared_ptr<Mob> player, float alpha); + static TilePos *getCameraTilePos(std::shared_ptr<Mob> player, double alpha); + static Vec3 *getCameraPos(std::shared_ptr<Mob> player, double alpha); + static int getBlockAt(Level *level, std::shared_ptr<Mob> player, float alpha); };
\ No newline at end of file diff --git a/Minecraft.Client/ChestRenderer.cpp b/Minecraft.Client/ChestRenderer.cpp index d1b5cf91..d895d782 100644 --- a/Minecraft.Client/ChestRenderer.cpp +++ b/Minecraft.Client/ChestRenderer.cpp @@ -18,10 +18,10 @@ ChestRenderer::~ChestRenderer() delete largeChestModel; } -void ChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void ChestRenderer::render(std::shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J Convert as we aren't using a templated class - shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(_chest); + std::shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(_chest); int data; diff --git a/Minecraft.Client/ChestRenderer.h b/Minecraft.Client/ChestRenderer.h index 06c6bfff..c52598e4 100644 --- a/Minecraft.Client/ChestRenderer.h +++ b/Minecraft.Client/ChestRenderer.h @@ -11,8 +11,8 @@ private: ChestModel *largeChestModel; public: - ChestRenderer(); + ChestRenderer(); ~ChestRenderer(); - void render(shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + void render(std::shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/ChickenModel.cpp b/Minecraft.Client/ChickenModel.cpp index 21dc2059..2a88fac6 100644 --- a/Minecraft.Client/ChickenModel.cpp +++ b/Minecraft.Client/ChickenModel.cpp @@ -49,10 +49,10 @@ ChickenModel::ChickenModel() : Model() wing1->compile(1.0f/16.0f); } -void ChickenModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void ChickenModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); - if (young) + if (young) { float ss = 2; glPushMatrix(); @@ -70,8 +70,8 @@ void ChickenModel::render(shared_ptr<Entity> entity, float time, float r, float wing0->render(scale,usecompiled); wing1->render(scale,usecompiled); glPopMatrix(); - } - else + } + else { head->render(scale,usecompiled); beak->render(scale,usecompiled); @@ -88,13 +88,13 @@ void ChickenModel::setupAnim(float time, float r, float bob, float yRot, float x { head->xRot = xRot / (float) (180 / PI); head->yRot = yRot / (float) (180 / PI); - + beak->xRot = head->xRot; beak->yRot = head->yRot; - + redThing->xRot = head->xRot; redThing->yRot = head->yRot; - + body->xRot = 90 / (float) (180 / PI); leg0->xRot = (Mth::cos(time * 0.6662f) * 1.4f) * r; diff --git a/Minecraft.Client/ChickenModel.h b/Minecraft.Client/ChickenModel.h index 9ee0858e..81d83d99 100644 --- a/Minecraft.Client/ChickenModel.h +++ b/Minecraft.Client/ChickenModel.h @@ -6,6 +6,6 @@ public: ModelPart *head, *hair, *body, *leg0, *leg1, *wing0,* wing1, *beak, *redThing; ChickenModel(); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; diff --git a/Minecraft.Client/ChickenRenderer.cpp b/Minecraft.Client/ChickenRenderer.cpp index 908ba506..2e84a450 100644 --- a/Minecraft.Client/ChickenRenderer.cpp +++ b/Minecraft.Client/ChickenRenderer.cpp @@ -7,18 +7,18 @@ ChickenRenderer::ChickenRenderer(Model *model, float shadow) : MobRenderer(model { } -void ChickenRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void ChickenRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { MobRenderer::render(_mob, x, y, z, rot, a); } -float ChickenRenderer::getBob(shared_ptr<Mob> _mob, float a) +float ChickenRenderer::getBob(std::shared_ptr<Mob> _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Chicken> mob = dynamic_pointer_cast<Chicken>(_mob); + std::shared_ptr<Chicken> mob = dynamic_pointer_cast<Chicken>(_mob); float flap = mob->oFlap+(mob->flap-mob->oFlap)*a; float flapSpeed = mob->oFlapSpeed+(mob->flapSpeed-mob->oFlapSpeed)*a; - + return (Mth::sin(flap)+1)*flapSpeed; }
\ No newline at end of file diff --git a/Minecraft.Client/ChickenRenderer.h b/Minecraft.Client/ChickenRenderer.h index b81c9133..2c33176d 100644 --- a/Minecraft.Client/ChickenRenderer.h +++ b/Minecraft.Client/ChickenRenderer.h @@ -5,7 +5,7 @@ class ChickenRenderer : public MobRenderer { public: ChickenRenderer(Model *model, float shadow); - virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); protected: - virtual float getBob(shared_ptr<Mob> _mob, float a); + virtual float getBob(std::shared_ptr<Mob> _mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/Chunk.cpp b/Minecraft.Client/Chunk.cpp index 99933db3..fcc540ad 100644 --- a/Minecraft.Client/Chunk.cpp +++ b/Minecraft.Client/Chunk.cpp @@ -103,7 +103,7 @@ void Chunk::setPos(int x, int y, int z) { bb = AABB::newPermanent(-g, -g, -g, XZSIZE+g, SIZE+g, XZSIZE+g); } - else + else { // 4J MGH - bounds are relative to the position now, so the AABB will be setup already, either above, or from the tesselator bounds. // bb->set(-g, -g, -g, SIZE+g, SIZE+g, SIZE+g); @@ -141,7 +141,7 @@ void Chunk::setPos(int x, int y, int z) LeaveCriticalSection(&levelRenderer->m_csDirtyChunks); - + } void Chunk::translateToPos() @@ -173,7 +173,7 @@ void Chunk::makeCopyForRebuild(Chunk *source) this->clipChunk = NULL; this->id = source->id; this->globalRenderableTileEntities = source->globalRenderableTileEntities; - this->globalRenderableTileEntities_cs = source->globalRenderableTileEntities_cs; + this->globalRenderableTileEntities_cs = source->globalRenderableTileEntities_cs; } void Chunk::rebuild() @@ -186,7 +186,7 @@ void Chunk::rebuild() // if (!dirty) return; PIXBeginNamedEvent(0,"Rebuild section A"); - + #ifdef _LARGE_WORLDS Tesselator *t = Tesselator::getInstance(); #else @@ -204,10 +204,10 @@ void Chunk::rebuild() LevelChunk::touchedSky = false; -// unordered_set<shared_ptr<TileEntity> > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line +// unordered_set<std::shared_ptr<TileEntity> > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line // renderableTileEntities.clear(); - vector<shared_ptr<TileEntity> > renderableTileEntities; // 4J - added + vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - added int r = 1; @@ -223,7 +223,7 @@ void Chunk::rebuild() // Get the data for the level chunk that this render chunk is it (level chunk is 16 x 16 x 128, // render chunk is 16 x 16 x 16. We wouldn't have to actually get all of it if the data was ordered differently, but currently // it is ordered by x then z then y so just getting a small range of y out of it would involve getting the whole thing into - // the cache anyway. + // the cache anyway. #ifdef _LARGE_WORLDS unsigned char *tileIds = GetTileIdsStorage(); @@ -237,9 +237,9 @@ void Chunk::rebuild() TileRenderer *tileRenderer = new TileRenderer(region, this->x, this->y, this->z, tileIds); // AP - added a caching system for Chunk::rebuild to take advantage of - // Basically we're storing of copy of the tileIDs array inside the region so that calls to Region::getTile can grab data - // more quickly from this array rather than calling CompressedTileStorage. On the Vita the total thread time spent in - // Region::getTile went from 20% to 4%. + // Basically we're storing of copy of the tileIDs array inside the region so that calls to Region::getTile can grab data + // more quickly from this array rather than calling CompressedTileStorage. On the Vita the total thread time spent in + // Region::getTile went from 20% to 4%. #ifdef __PSVITA__ int xc = x >> 4; int zc = z >> 4; @@ -275,7 +275,7 @@ void Chunk::rebuild() if( yy == (Level::maxBuildHeight - 1) ) continue; if(( xx == 0 ) || ( xx == 15 )) continue; if(( zz == 0 ) || ( zz == 15 )) continue; - + // Establish whether this tile and its neighbours are all made of rock, dirt, unbreakable tiles, or have already // been determined to meet this criteria themselves and have a tile of 255 set. if( !( ( tileId == Tile::rock_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue; @@ -337,7 +337,7 @@ void Chunk::rebuild() PIXBeginNamedEvent(0,"Rebuild section C"); Tesselator::Bounds bounds; // 4J MGH - added { - // this was the old default clip bounds for the chunk, set in Chunk::setPos. + // this was the old default clip bounds for the chunk, set in Chunk::setPos. float g = 6.0f; bounds.boundingBox[0] = -g; bounds.boundingBox[1] = -g; @@ -398,11 +398,11 @@ void Chunk::rebuild() t->begin(); t->offset((float)(-this->x), (float)(-this->y), (float)(-this->z)); } - + Tile *tile = Tile::tiles[tileId]; if (currentLayer == 0 && tile->isEntityTile()) { - shared_ptr<TileEntity> et = region->getTileEntity(x, y, z); + std::shared_ptr<TileEntity> et = region->getTileEntity(x, y, z); if (TileEntityRenderDispatcher::instance->hasRenderer(et)) { renderableTileEntities.push_back(et); @@ -465,7 +465,7 @@ void Chunk::rebuild() { levelRenderer->setGlobalChunkFlag(this->x, this->y, this->z, level, LevelRenderer::CHUNK_FLAG_EMPTY1); RenderManager.CBuffClear(lists + 1); - break; + break; } } @@ -552,12 +552,12 @@ void Chunk::rebuild() oldTileEntities.removeAll(renderableTileEntities); globalRenderableTileEntities.removeAll(oldTileEntities); */ - - unordered_set<shared_ptr<TileEntity> > newTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); - + + unordered_set<std::shared_ptr<TileEntity> > newTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); + AUTO_VAR(endIt, oldTileEntities.end()); - for( unordered_set<shared_ptr<TileEntity> >::iterator it = oldTileEntities.begin(); it != endIt; it++ ) + for( unordered_set<std::shared_ptr<TileEntity> >::iterator it = oldTileEntities.begin(); it != endIt; it++ ) { newTileEntities.erase(*it); } @@ -566,7 +566,7 @@ void Chunk::rebuild() EnterCriticalSection(globalRenderableTileEntities_cs); endIt = newTileEntities.end(); - for( unordered_set<shared_ptr<TileEntity> >::iterator it = newTileEntities.begin(); it != endIt; it++ ) + for( unordered_set<std::shared_ptr<TileEntity> >::iterator it = newTileEntities.begin(); it != endIt; it++ ) { globalRenderableTileEntities->push_back(*it); } @@ -574,12 +574,12 @@ void Chunk::rebuild() // 4J - All these new things added to globalRenderableTileEntities AUTO_VAR(endItRTE, renderableTileEntities.end()); - for( vector<shared_ptr<TileEntity> >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) + for( vector<std::shared_ptr<TileEntity> >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) { oldTileEntities.erase(*it); } // 4J - oldTileEntities is now the removed items - vector<shared_ptr<TileEntity> >::iterator it = globalRenderableTileEntities->begin(); + vector<std::shared_ptr<TileEntity> >::iterator it = globalRenderableTileEntities->begin(); while( it != globalRenderableTileEntities->end() ) { if( oldTileEntities.find(*it) != oldTileEntities.end() ) @@ -656,10 +656,10 @@ void Chunk::rebuild_SPU() LevelChunk::touchedSky = false; -// unordered_set<shared_ptr<TileEntity> > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line +// unordered_set<std::shared_ptr<TileEntity> > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line // renderableTileEntities.clear(); - vector<shared_ptr<TileEntity> > renderableTileEntities; // 4J - added + vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - added // List<TileEntity> newTileEntities = new ArrayList<TileEntity>(); // newTileEntities.clear(); @@ -679,13 +679,13 @@ void Chunk::rebuild_SPU() // Get the data for the level chunk that this render chunk is it (level chunk is 16 x 16 x 128, // render chunk is 16 x 16 x 16. We wouldn't have to actually get all of it if the data was ordered differently, but currently // it is ordered by x then z then y so just getting a small range of y out of it would involve getting the whole thing into - // the cache anyway. + // the cache anyway. ChunkRebuildData* pOutData = NULL; g_rebuildDataIn.buildForChunk(®ion, level, x0, y0, z0); Tesselator::Bounds bounds; { - // this was the old default clip bounds for the chunk, set in Chunk::setPos. + // this was the old default clip bounds for the chunk, set in Chunk::setPos. float g = 6.0f; bounds.boundingBox[0] = -g; bounds.boundingBox[1] = -g; @@ -750,7 +750,7 @@ void Chunk::rebuild_SPU() { if (currentLayer == 0 && Tile::tiles[tileId]->isEntityTile()) { - shared_ptr<TileEntity> et = region.getTileEntity(x, y, z); + std::shared_ptr<TileEntity> et = region.getTileEntity(x, y, z); if (TileEntityRenderDispatcher::instance->hasRenderer(et)) { renderableTileEntities.push_back(et); @@ -881,12 +881,12 @@ void Chunk::rebuild_SPU() oldTileEntities.removeAll(renderableTileEntities); globalRenderableTileEntities.removeAll(oldTileEntities); */ - - unordered_set<shared_ptr<TileEntity> > newTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); - + + unordered_set<std::shared_ptr<TileEntity> > newTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); + AUTO_VAR(endIt, oldTileEntities.end()); - for( unordered_set<shared_ptr<TileEntity> >::iterator it = oldTileEntities.begin(); it != endIt; it++ ) + for( unordered_set<std::shared_ptr<TileEntity> >::iterator it = oldTileEntities.begin(); it != endIt; it++ ) { newTileEntities.erase(*it); } @@ -895,7 +895,7 @@ void Chunk::rebuild_SPU() EnterCriticalSection(globalRenderableTileEntities_cs); endIt = newTileEntities.end(); - for( unordered_set<shared_ptr<TileEntity> >::iterator it = newTileEntities.begin(); it != endIt; it++ ) + for( unordered_set<std::shared_ptr<TileEntity> >::iterator it = newTileEntities.begin(); it != endIt; it++ ) { globalRenderableTileEntities.push_back(*it); } @@ -903,12 +903,12 @@ void Chunk::rebuild_SPU() // 4J - All these new things added to globalRenderableTileEntities AUTO_VAR(endItRTE, renderableTileEntities.end()); - for( vector<shared_ptr<TileEntity> >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) + for( vector<std::shared_ptr<TileEntity> >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) { oldTileEntities.erase(*it); } // 4J - oldTileEntities is now the removed items - vector<shared_ptr<TileEntity> >::iterator it = globalRenderableTileEntities->begin(); + vector<std::shared_ptr<TileEntity> >::iterator it = globalRenderableTileEntities->begin(); while( it != globalRenderableTileEntities->end() ) { if( oldTileEntities.find(*it) != oldTileEntities.end() ) @@ -941,7 +941,7 @@ void Chunk::rebuild_SPU() #endif // _PS3_ -float Chunk::distanceToSqr(shared_ptr<Entity> player) const +float Chunk::distanceToSqr(std::shared_ptr<Entity> player) const { float xd = (float) (player->x - xm); float yd = (float) (player->y - ym); @@ -949,7 +949,7 @@ float Chunk::distanceToSqr(shared_ptr<Entity> player) const return xd * xd + yd * yd + zd * zd; } -float Chunk::squishedDistanceToSqr(shared_ptr<Entity> player) +float Chunk::squishedDistanceToSqr(std::shared_ptr<Entity> player) { float xd = (float) (player->x - xm); float yd = (float) (player->y - ym) * 2; diff --git a/Minecraft.Client/Chunk.h b/Minecraft.Client/Chunk.h index f7947156..276372db 100644 --- a/Minecraft.Client/Chunk.h +++ b/Minecraft.Client/Chunk.h @@ -38,22 +38,22 @@ public: static void ReleaseThreadStorage(); static unsigned char *GetTileIdsStorage(); #endif - + public: static int updates; int x, y, z; int xRender, yRender, zRender; int xRenderOffs, yRenderOffs, zRenderOffs; - + int xm, ym, zm; AABB *bb; ClipChunk *clipChunk; int id; //public: -// vector<shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed - +// vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed + private: LevelRenderer::rteMap *globalRenderableTileEntities; CRITICAL_SECTION *globalRenderableTileEntities_cs; @@ -71,8 +71,8 @@ public: #ifdef __PS3__ void rebuild_SPU(); #endif // __PS3__ - float distanceToSqr(shared_ptr<Entity> player) const; - float squishedDistanceToSqr(shared_ptr<Entity> player); + float distanceToSqr(std::shared_ptr<Entity> player) const; + float squishedDistanceToSqr(std::shared_ptr<Entity> player); void reset(); void _delete(); diff --git a/Minecraft.Client/ClientConnection.cpp b/Minecraft.Client/ClientConnection.cpp index 5ba3cb85..f2fbf3fc 100644 --- a/Minecraft.Client/ClientConnection.cpp +++ b/Minecraft.Client/ClientConnection.cpp @@ -150,16 +150,16 @@ INetworkPlayer *ClientConnection::getNetworkPlayer() else return NULL; } -void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet) +void ClientConnection::handleLogin(std::shared_ptr<LoginPacket> packet) { if (done) return; PlayerUID OnlineXuid; ProfileManager.GetXUID(m_userIndex,&OnlineXuid,true); // online xuid MOJANG_DATA *pMojangData = NULL; - + if(!g_NetworkManager.IsLocalGame()) - { + { pMojangData=app.GetMojangDataForXuid(OnlineXuid); } @@ -211,7 +211,7 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet) // check the file is not already in bRes=app.IsFileInMemoryTextures(wstr); if(!bRes) - { + { #ifdef _XBOX C4JStorage::ETMSStatus eTMSStatus; eTMSStatus=StorageManager.ReadTMSFile(iUserID,C4JStorage::eGlobalStorage_Title,C4JStorage::eTMS_FileType_Graphic,pMojangData->wchSkin,&pBuffer, &dwSize); @@ -223,17 +223,17 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet) if(bRes) { app.AddMemoryTextureFile(wstr,pBuffer,dwSize); - } + } } // a cloak? if(pMojangData->wchCape[0]!=0L) - { + { wstring wstr=pMojangData->wchCape; // check the file is not already in bRes=app.IsFileInMemoryTextures(wstr); if(!bRes) - { + { #ifdef _XBOX C4JStorage::ETMSStatus eTMSStatus; eTMSStatus=StorageManager.ReadTMSFile(iUserID,C4JStorage::eGlobalStorage_Title,C4JStorage::eTMS_FileType_Graphic,pMojangData->wchCape,&pBuffer, &dwSize); @@ -291,7 +291,7 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet) app.DebugPrintf("ClientConnection - DIFFICULTY --- %d\n",packet->difficulty); level->difficulty = packet->difficulty; // 4J Added level->isClientSide = true; - minecraft->setLevel(level); + minecraft->setLevel(level); } minecraft->player->setPlayerIndex( packet->m_playerIndex ); @@ -328,7 +328,7 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet) // 4J-PB - this isn't the level we want //level = (MultiPlayerLevel *)minecraft->level; level = (MultiPlayerLevel *)minecraft->getLevel( packet->dimension ); - shared_ptr<Player> player; + std::shared_ptr<Player> player; if(level==NULL) { @@ -351,11 +351,11 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet) // 4J Stu - At time of writing ProfileManager.GetGamertag() does not always return the correct name, // if sign-ins are turned off while the player signed in. Using the qnetPlayer instead. // need to have a level before create extra local player - MultiPlayerLevel *levelpassedin=(MultiPlayerLevel *)level; + MultiPlayerLevel *levelpassedin=(MultiPlayerLevel *)level; player = minecraft->createExtraLocalPlayer(m_userIndex, networkPlayer->GetOnlineName(), m_userIndex, packet->dimension, this,levelpassedin); // need to have a player before the setlevel - shared_ptr<MultiplayerLocalPlayer> lastPlayer = minecraft->player; + std::shared_ptr<MultiplayerLocalPlayer> lastPlayer = minecraft->player; minecraft->player = minecraft->localplayers[m_userIndex]; minecraft->setLevel(level); minecraft->player = lastPlayer; @@ -373,7 +373,7 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet) player->setPlayerIndex( packet->m_playerIndex ); player->setCustomSkin( app.GetPlayerSkinId(m_userIndex) ); player->setCustomCape( app.GetPlayerCapeId(m_userIndex) ); - + BYTE networkSmallId = getSocket()->getSmallId(); app.UpdatePlayerInfo(networkSmallId, packet->m_playerIndex, packet->m_uiGamePrivileges); @@ -385,50 +385,50 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet) displayPrivilegeChanges(minecraft->localplayers[m_userIndex],startingPrivileges); } - + maxPlayers = packet->maxPlayers; - + // need to have a player before the setLocalCreativeMode - shared_ptr<MultiplayerLocalPlayer> lastPlayer = minecraft->player; + std::shared_ptr<MultiplayerLocalPlayer> lastPlayer = minecraft->player; minecraft->player = minecraft->localplayers[m_userIndex]; ((MultiPlayerGameMode *)minecraft->localgameModes[m_userIndex])->setLocalMode(GameType::byId(packet->gameType)); minecraft->player = lastPlayer; - + // make sure the UI offsets for this player are set correctly if(iUserID!=-1) { ui.UpdateSelectedItemPos(iUserID); } - + TelemetryManager->RecordLevelStart(m_userIndex, eSen_FriendOrMatch_Playing_With_Invited_Friends, eSen_CompeteOrCoop_Coop_and_Competitive, Minecraft::GetInstance()->getLevel(packet->dimension)->difficulty, app.GetLocalPlayerCount(), g_NetworkManager.GetOnlinePlayerCount()); } -void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet) +void ClientConnection::handleAddEntity(std::shared_ptr<AddEntityPacket> packet) { double x = packet->x / 32.0; double y = packet->y / 32.0; double z = packet->z / 32.0; - shared_ptr<Entity> e; + std::shared_ptr<Entity> e; boolean setRot = true; // 4J-PB - replacing this massive if nest with switch switch(packet->type) { case AddEntityPacket::MINECART_RIDEABLE: - e = shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::RIDEABLE) ); + e = std::shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::RIDEABLE) ); break; case AddEntityPacket::MINECART_CHEST: - e = shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::CHEST) ); + e = std::shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::CHEST) ); break; case AddEntityPacket::MINECART_FURNACE: - e = shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::FURNACE) ); + e = std::shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::FURNACE) ); break; case AddEntityPacket::FISH_HOOK: { // 4J Stu - Brought forward from 1.4 to be able to drop XP from fishing - shared_ptr<Entity> owner = getEntity(packet->data); + std::shared_ptr<Entity> owner = getEntity(packet->data); // 4J - check all local players to find match if( owner == NULL ) @@ -446,10 +446,10 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet) } } } - shared_ptr<Player> player = dynamic_pointer_cast<Player>(owner); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(owner); if (player != NULL) { - shared_ptr<FishingHook> hook = shared_ptr<FishingHook>( new FishingHook(level, x, y, z, player) ); + std::shared_ptr<FishingHook> hook = std::shared_ptr<FishingHook>( new FishingHook(level, x, y, z, player) ); e = hook; // 4J Stu - Move the player->fishing out of the ctor as we cannot reference 'this' player->fishing = hook; @@ -458,10 +458,10 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet) } break; case AddEntityPacket::ARROW: - e = shared_ptr<Entity>( new Arrow(level, x, y, z) ); + e = std::shared_ptr<Entity>( new Arrow(level, x, y, z) ); break; case AddEntityPacket::SNOWBALL: - e = shared_ptr<Entity>( new Snowball(level, x, y, z) ); + e = std::shared_ptr<Entity>( new Snowball(level, x, y, z) ); break; case AddEntityPacket::ITEM_FRAME: { @@ -470,66 +470,66 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet) int iz = (int) z; app.DebugPrintf("ClientConnection ITEM_FRAME xyz %d,%d,%d\n",ix,iy,iz); } - e = shared_ptr<Entity>(new ItemFrame(level, (int) x, (int) y, (int) z, packet->data)); + e = std::shared_ptr<Entity>(new ItemFrame(level, (int) x, (int) y, (int) z, packet->data)); packet->data = 0; setRot = false; break; case AddEntityPacket::THROWN_ENDERPEARL: - e = shared_ptr<Entity>( new ThrownEnderpearl(level, x, y, z) ); + e = std::shared_ptr<Entity>( new ThrownEnderpearl(level, x, y, z) ); break; case AddEntityPacket::EYEOFENDERSIGNAL: - e = shared_ptr<Entity>( new EyeOfEnderSignal(level, x, y, z) ); + e = std::shared_ptr<Entity>( new EyeOfEnderSignal(level, x, y, z) ); break; case AddEntityPacket::FIREBALL: - e = shared_ptr<Entity>( new Fireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = std::shared_ptr<Entity>( new Fireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; break; case AddEntityPacket::SMALL_FIREBALL: - e = shared_ptr<Entity>( new SmallFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = std::shared_ptr<Entity>( new SmallFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; break; case AddEntityPacket::DRAGON_FIRE_BALL: - e = shared_ptr<Entity>( new DragonFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = std::shared_ptr<Entity>( new DragonFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; break; case AddEntityPacket::EGG: - e = shared_ptr<Entity>( new ThrownEgg(level, x, y, z) ); + e = std::shared_ptr<Entity>( new ThrownEgg(level, x, y, z) ); break; case AddEntityPacket::THROWN_POTION: - e = shared_ptr<Entity>( new ThrownPotion(level, x, y, z, packet->data) ); + e = std::shared_ptr<Entity>( new ThrownPotion(level, x, y, z, packet->data) ); packet->data = 0; break; case AddEntityPacket::THROWN_EXPBOTTLE: - e = shared_ptr<Entity>( new ThrownExpBottle(level, x, y, z) ); + e = std::shared_ptr<Entity>( new ThrownExpBottle(level, x, y, z) ); packet->data = 0; break; case AddEntityPacket::BOAT: - e = shared_ptr<Entity>( new Boat(level, x, y, z) ); + e = std::shared_ptr<Entity>( new Boat(level, x, y, z) ); break; case AddEntityPacket::PRIMED_TNT: - e = shared_ptr<Entity>( new PrimedTnt(level, x, y, z) ); + e = std::shared_ptr<Entity>( new PrimedTnt(level, x, y, z) ); break; case AddEntityPacket::ENDER_CRYSTAL: - e = shared_ptr<Entity>( new EnderCrystal(level, x, y, z) ); + e = std::shared_ptr<Entity>( new EnderCrystal(level, x, y, z) ); break; case AddEntityPacket::ITEM: - e = shared_ptr<Entity>( new ItemEntity(level, x, y, z) ); + e = std::shared_ptr<Entity>( new ItemEntity(level, x, y, z) ); break; case AddEntityPacket::FALLING: - e = shared_ptr<Entity>( new FallingTile(level, x, y, z, packet->data & 0xFFFF, packet->data >> 16) ); + e = std::shared_ptr<Entity>( new FallingTile(level, x, y, z, packet->data & 0xFFFF, packet->data >> 16) ); packet->data = 0; break; } - /* if (packet->type == AddEntityPacket::MINECART_RIDEABLE) e = shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::RIDEABLE) ); - if (packet->type == AddEntityPacket::MINECART_CHEST) e = shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::CHEST) ); - if (packet->type == AddEntityPacket::MINECART_FURNACE) e = shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::FURNACE) ); + /* if (packet->type == AddEntityPacket::MINECART_RIDEABLE) e = std::shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::RIDEABLE) ); + if (packet->type == AddEntityPacket::MINECART_CHEST) e = std::shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::CHEST) ); + if (packet->type == AddEntityPacket::MINECART_FURNACE) e = std::shared_ptr<Entity>( new Minecart(level, x, y, z, Minecart::FURNACE) ); if (packet->type == AddEntityPacket::FISH_HOOK) { // 4J Stu - Brought forward from 1.4 to be able to drop XP from fishing - shared_ptr<Entity> owner = getEntity(packet->data); + std::shared_ptr<Entity> owner = getEntity(packet->data); // 4J - check all local players to find match if( owner == NULL ) @@ -547,48 +547,48 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet) } } } - shared_ptr<Player> player = dynamic_pointer_cast<Player>(owner); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(owner); if (player != NULL) { - shared_ptr<FishingHook> hook = shared_ptr<FishingHook>( new FishingHook(level, x, y, z, player) ); + std::shared_ptr<FishingHook> hook = std::shared_ptr<FishingHook>( new FishingHook(level, x, y, z, player) ); e = hook; // 4J Stu - Move the player->fishing out of the ctor as we cannot reference 'this' player->fishing = hook; } packet->data = 0; } - - if (packet->type == AddEntityPacket::ARROW) e = shared_ptr<Entity>( new Arrow(level, x, y, z) ); - if (packet->type == AddEntityPacket::SNOWBALL) e = shared_ptr<Entity>( new Snowball(level, x, y, z) ); - if (packet->type == AddEntityPacket::THROWN_ENDERPEARL) e = shared_ptr<Entity>( new ThrownEnderpearl(level, x, y, z) ); - if (packet->type == AddEntityPacket::EYEOFENDERSIGNAL) e = shared_ptr<Entity>( new EyeOfEnderSignal(level, x, y, z) ); + + if (packet->type == AddEntityPacket::ARROW) e = std::shared_ptr<Entity>( new Arrow(level, x, y, z) ); + if (packet->type == AddEntityPacket::SNOWBALL) e = std::shared_ptr<Entity>( new Snowball(level, x, y, z) ); + if (packet->type == AddEntityPacket::THROWN_ENDERPEARL) e = std::shared_ptr<Entity>( new ThrownEnderpearl(level, x, y, z) ); + if (packet->type == AddEntityPacket::EYEOFENDERSIGNAL) e = std::shared_ptr<Entity>( new EyeOfEnderSignal(level, x, y, z) ); if (packet->type == AddEntityPacket::FIREBALL) { - e = shared_ptr<Entity>( new Fireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = std::shared_ptr<Entity>( new Fireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; } if (packet->type == AddEntityPacket::SMALL_FIREBALL) { - e = shared_ptr<Entity>( new SmallFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = std::shared_ptr<Entity>( new SmallFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; } - if (packet->type == AddEntityPacket::EGG) e = shared_ptr<Entity>( new ThrownEgg(level, x, y, z) ); + if (packet->type == AddEntityPacket::EGG) e = std::shared_ptr<Entity>( new ThrownEgg(level, x, y, z) ); if (packet->type == AddEntityPacket::THROWN_POTION) { - e = shared_ptr<Entity>( new ThrownPotion(level, x, y, z, packet->data) ); + e = std::shared_ptr<Entity>( new ThrownPotion(level, x, y, z, packet->data) ); packet->data = 0; } if (packet->type == AddEntityPacket::THROWN_EXPBOTTLE) { - e = shared_ptr<Entity>( new ThrownExpBottle(level, x, y, z) ); + e = std::shared_ptr<Entity>( new ThrownExpBottle(level, x, y, z) ); packet->data = 0; } - if (packet->type == AddEntityPacket::BOAT) e = shared_ptr<Entity>( new Boat(level, x, y, z) ); - if (packet->type == AddEntityPacket::PRIMED_TNT) e = shared_ptr<Entity>( new PrimedTnt(level, x, y, z) ); - if (packet->type == AddEntityPacket::ENDER_CRYSTAL) e = shared_ptr<Entity>( new EnderCrystal(level, x, y, z) ); - if (packet->type == AddEntityPacket::FALLING_SAND) e = shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::sand->id) ); - if (packet->type == AddEntityPacket::FALLING_GRAVEL) e = shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::gravel->id) ); - if (packet->type == AddEntityPacket::FALLING_EGG) e = shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::dragonEgg_Id) ); + if (packet->type == AddEntityPacket::BOAT) e = std::shared_ptr<Entity>( new Boat(level, x, y, z) ); + if (packet->type == AddEntityPacket::PRIMED_TNT) e = std::shared_ptr<Entity>( new PrimedTnt(level, x, y, z) ); + if (packet->type == AddEntityPacket::ENDER_CRYSTAL) e = std::shared_ptr<Entity>( new EnderCrystal(level, x, y, z) ); + if (packet->type == AddEntityPacket::FALLING_SAND) e = std::shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::sand->id) ); + if (packet->type == AddEntityPacket::FALLING_GRAVEL) e = std::shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::gravel->id) ); + if (packet->type == AddEntityPacket::FALLING_EGG) e = std::shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::dragonEgg_Id) ); */ @@ -603,13 +603,13 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet) e->yRotp = packet->yRot; e->xRotp = packet->xRot; - if (setRot) + if (setRot) { e->yRot = 0.0f; e->xRot = 0.0f; } - vector<shared_ptr<Entity> > *subEntities = e->getSubEntities(); + vector<std::shared_ptr<Entity> > *subEntities = e->getSubEntities(); if (subEntities != NULL) { int offs = packet->id - e->entityId; @@ -635,7 +635,7 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet) if (packet->type == AddEntityPacket::ARROW) { - shared_ptr<Entity> owner = getEntity(packet->data); + std::shared_ptr<Entity> owner = getEntity(packet->data); // 4J - check all local players to find match if( owner == NULL ) @@ -659,15 +659,15 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet) } } - e->lerpMotion(packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0); + e->lerpMotion(packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0); } } } -void ClientConnection::handleAddExperienceOrb(shared_ptr<AddExperienceOrbPacket> packet) +void ClientConnection::handleAddExperienceOrb(std::shared_ptr<AddExperienceOrbPacket> packet) { - shared_ptr<Entity> e = shared_ptr<ExperienceOrb>( new ExperienceOrb(level, packet->x / 32.0, packet->y / 32.0, packet->z / 32.0, packet->value) ); + std::shared_ptr<Entity> e = std::shared_ptr<ExperienceOrb>( new ExperienceOrb(level, packet->x / 32.0, packet->y / 32.0, packet->z / 32.0, packet->value) ); e->xp = packet->x; e->yp = packet->y; e->zp = packet->z; @@ -677,13 +677,13 @@ void ClientConnection::handleAddExperienceOrb(shared_ptr<AddExperienceOrbPacket> level->putEntity(packet->id, e); } -void ClientConnection::handleAddGlobalEntity(shared_ptr<AddGlobalEntityPacket> packet) +void ClientConnection::handleAddGlobalEntity(std::shared_ptr<AddGlobalEntityPacket> packet) { double x = packet->x / 32.0; double y = packet->y / 32.0; double z = packet->z / 32.0; - shared_ptr<Entity> e;// = nullptr; - if (packet->type == AddGlobalEntityPacket::LIGHTNING) e = shared_ptr<LightningBolt>( new LightningBolt(level, x, y, z) ); + std::shared_ptr<Entity> e;// = nullptr; + if (packet->type == AddGlobalEntityPacket::LIGHTNING) e = std::shared_ptr<LightningBolt>( new LightningBolt(level, x, y, z) ); if (e != NULL) { e->xp = packet->x; @@ -696,29 +696,29 @@ void ClientConnection::handleAddGlobalEntity(shared_ptr<AddGlobalEntityPacket> p } } -void ClientConnection::handleAddPainting(shared_ptr<AddPaintingPacket> packet) +void ClientConnection::handleAddPainting(std::shared_ptr<AddPaintingPacket> packet) { - shared_ptr<Painting> painting = shared_ptr<Painting>( new Painting(level, packet->x, packet->y, packet->z, packet->dir, packet->motive) ); + std::shared_ptr<Painting> painting = std::shared_ptr<Painting>( new Painting(level, packet->x, packet->y, packet->z, packet->dir, packet->motive) ); level->putEntity(packet->id, painting); } -void ClientConnection::handleSetEntityMotion(shared_ptr<SetEntityMotionPacket> packet) +void ClientConnection::handleSetEntityMotion(std::shared_ptr<SetEntityMotionPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; e->lerpMotion(packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0); } -void ClientConnection::handleSetEntityData(shared_ptr<SetEntityDataPacket> packet) +void ClientConnection::handleSetEntityData(std::shared_ptr<SetEntityDataPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e != NULL && packet->getUnpackedData() != NULL) { e->getEntityData()->assignValues(packet->getUnpackedData()); } } -void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet) +void ClientConnection::handleAddPlayer(std::shared_ptr<AddPlayerPacket> packet) { // Some remote players could actually be local players that are already added for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) @@ -755,7 +755,7 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet) double z = packet->z / 32.0; float yRot = packet->yRot * 360 / 256.0f; float xRot = packet->xRot * 360 / 256.0f; - shared_ptr<RemotePlayer> player = shared_ptr<RemotePlayer>( new RemotePlayer(minecraft->level, packet->name) ); + std::shared_ptr<RemotePlayer> player = std::shared_ptr<RemotePlayer>( new RemotePlayer(minecraft->level, packet->name) ); player->xo = player->xOld = player->xp = packet->x; player->yo = player->yOld = player->yp = packet->y; player->zo = player->zOld = player->zp = packet->z; @@ -778,11 +778,11 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet) int item = packet->carriedItem; if (item == 0) { - player->inventory->items[player->inventory->selected] = shared_ptr<ItemInstance>(); // NULL; + player->inventory->items[player->inventory->selected] = std::shared_ptr<ItemInstance>(); // NULL; } else { - player->inventory->items[player->inventory->selected] = shared_ptr<ItemInstance>( new ItemInstance(item, 1, 0) ); + player->inventory->items[player->inventory->selected] = std::shared_ptr<ItemInstance>( new ItemInstance(item, 1, 0) ); } player->absMoveTo(x, y, z, yRot, xRot); @@ -790,14 +790,14 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet) player->setCustomSkin( packet->m_skinId ); player->setCustomCape( packet->m_capeId ); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, packet->m_uiGamePrivileges); - + if(!player->customTextureUrl.empty() && player->customTextureUrl.substr(0,3).compare(L"def") != 0 && !app.IsFileInMemoryTextures(player->customTextureUrl)) { if( minecraft->addPendingClientTextureRequest(player->customTextureUrl) ) { app.DebugPrintf("Client sending TextureAndGeometryPacket to get custom skin %ls for player %ls\n",player->customTextureUrl.c_str(), player->name.c_str()); - send(shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(player->customTextureUrl,NULL,0) ) ); + send(std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(player->customTextureUrl,NULL,0) ) ); } } else if(!player->customTextureUrl.empty() && app.IsFileInMemoryTextures(player->customTextureUrl)) @@ -807,13 +807,13 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet) } app.DebugPrintf("Custom skin for player %ls is %ls\n",player->name.c_str(),player->customTextureUrl.c_str()); - + if(!player->customTextureUrl2.empty() && player->customTextureUrl2.substr(0,3).compare(L"def") != 0 && !app.IsFileInMemoryTextures(player->customTextureUrl2)) { if( minecraft->addPendingClientTextureRequest(player->customTextureUrl2) ) { app.DebugPrintf("Client sending texture packet to get custom cape %ls for player %ls\n",player->customTextureUrl2.c_str(), player->name.c_str()); - send(shared_ptr<TexturePacket>( new TexturePacket(player->customTextureUrl2,NULL,0) ) ); + send(std::shared_ptr<TexturePacket>( new TexturePacket(player->customTextureUrl2,NULL,0) ) ); } } else if(!player->customTextureUrl2.empty() && app.IsFileInMemoryTextures(player->customTextureUrl2)) @@ -826,7 +826,7 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet) level->putEntity(packet->id, player); - vector<shared_ptr<SynchedEntityData::DataItem> > *unpackedData = packet->getUnpackedData(); + vector<std::shared_ptr<SynchedEntityData::DataItem> > *unpackedData = packet->getUnpackedData(); if (unpackedData != NULL) { player->getEntityData()->assignValues(unpackedData); @@ -834,9 +834,9 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet) } -void ClientConnection::handleTeleportEntity(shared_ptr<TeleportEntityPacket> packet) +void ClientConnection::handleTeleportEntity(std::shared_ptr<TeleportEntityPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; e->xp = packet->x; e->yp = packet->y; @@ -856,9 +856,9 @@ void ClientConnection::handleTeleportEntity(shared_ptr<TeleportEntityPacket> pac e->lerpTo(x, y, z, yRot, xRot, 3); } -void ClientConnection::handleMoveEntity(shared_ptr<MoveEntityPacket> packet) +void ClientConnection::handleMoveEntity(std::shared_ptr<MoveEntityPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; e->xp += packet->xa; e->yp += packet->ya; @@ -877,17 +877,17 @@ void ClientConnection::handleMoveEntity(shared_ptr<MoveEntityPacket> packet) e->lerpTo(x, y, z, yRot, xRot, 3); } -void ClientConnection::handleRotateMob(shared_ptr<RotateHeadPacket> packet) +void ClientConnection::handleRotateMob(std::shared_ptr<RotateHeadPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; float yHeadRot = packet->yHeadRot * 360 / 256.f; e->setYHeadRot(yHeadRot); } -void ClientConnection::handleMoveEntitySmall(shared_ptr<MoveEntityPacketSmall> packet) +void ClientConnection::handleMoveEntitySmall(std::shared_ptr<MoveEntityPacketSmall> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; e->xp += packet->xa; e->yp += packet->ya; @@ -906,7 +906,7 @@ void ClientConnection::handleMoveEntitySmall(shared_ptr<MoveEntityPacketSmall> p e->lerpTo(x, y, z, yRot, xRot, 3); } -void ClientConnection::handleRemoveEntity(shared_ptr<RemoveEntitiesPacket> packet) +void ClientConnection::handleRemoveEntity(std::shared_ptr<RemoveEntitiesPacket> packet) { for (int i = 0; i < packet->ids.length; i++) { @@ -914,9 +914,9 @@ void ClientConnection::handleRemoveEntity(shared_ptr<RemoveEntitiesPacket> packe } } -void ClientConnection::handleMovePlayer(shared_ptr<MovePlayerPacket> packet) +void ClientConnection::handleMovePlayer(std::shared_ptr<MovePlayerPacket> packet) { - shared_ptr<Player> player = minecraft->localplayers[m_userIndex]; //minecraft->player; + std::shared_ptr<Player> player = minecraft->localplayers[m_userIndex]; //minecraft->player; double x = player->x; double y = player->y; @@ -945,7 +945,7 @@ void ClientConnection::handleMovePlayer(shared_ptr<MovePlayerPacket> packet) packet->yView = player->y; connection->send(packet); if (!started) - { + { if(!g_NetworkManager.IsHost() ) { @@ -961,7 +961,7 @@ void ClientConnection::handleMovePlayer(shared_ptr<MovePlayerPacket> packet) started = true; minecraft->setScreen(NULL); - + // Fix for #105852 - TU12: Content: Gameplay: Local splitscreen Players are spawned at incorrect places after re-joining previously saved and loaded "Mass Effect World". // Move this check from Minecraft::createExtraLocalPlayer // 4J-PB - can't call this when this function is called from the qnet thread (GetGameStarted will be false) @@ -974,19 +974,19 @@ void ClientConnection::handleMovePlayer(shared_ptr<MovePlayerPacket> packet) } // 4J Added -void ClientConnection::handleChunkVisibilityArea(shared_ptr<ChunkVisibilityAreaPacket> packet) +void ClientConnection::handleChunkVisibilityArea(std::shared_ptr<ChunkVisibilityAreaPacket> packet) { for(int z = packet->m_minZ; z <= packet->m_maxZ; ++z) for(int x = packet->m_minX; x <= packet->m_maxX; ++x) level->setChunkVisible(x, z, true); } -void ClientConnection::handleChunkVisibility(shared_ptr<ChunkVisibilityPacket> packet) +void ClientConnection::handleChunkVisibility(std::shared_ptr<ChunkVisibilityPacket> packet) { level->setChunkVisible(packet->x, packet->z, packet->visible); } -void ClientConnection::handleChunkTilesUpdate(shared_ptr<ChunkTilesUpdatePacket> packet) +void ClientConnection::handleChunkTilesUpdate(std::shared_ptr<ChunkTilesUpdatePacket> packet) { // 4J - changed to encode level in packet MultiPlayerLevel *dimensionLevel = (MultiPlayerLevel *)minecraft->levels[packet->levelIdx]; @@ -1035,7 +1035,7 @@ void ClientConnection::handleChunkTilesUpdate(shared_ptr<ChunkTilesUpdatePacket> // Don't bother setting this to dirty if it isn't going to visually change - we get a lot of // water changing from static to dynamic for instance if(!( ( ( prevTile == Tile::water_Id ) && ( tile == Tile::calmWater_Id ) ) || - ( ( prevTile == Tile::calmWater_Id ) && ( tile == Tile::water_Id ) ) || + ( ( prevTile == Tile::calmWater_Id ) && ( tile == Tile::water_Id ) ) || ( ( prevTile == Tile::lava_Id ) && ( tile == Tile::calmLava_Id ) ) || ( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::calmLava_Id ) ) || ( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::lava_Id ) ) ) ) @@ -1055,7 +1055,7 @@ void ClientConnection::handleChunkTilesUpdate(shared_ptr<ChunkTilesUpdatePacket> } } -void ClientConnection::handleBlockRegionUpdate(shared_ptr<BlockRegionUpdatePacket> packet) +void ClientConnection::handleBlockRegionUpdate(std::shared_ptr<BlockRegionUpdatePacket> packet) { // 4J - changed to encode level in packet MultiPlayerLevel *dimensionLevel = (MultiPlayerLevel *)minecraft->levels[packet->levelIdx]; @@ -1090,7 +1090,7 @@ void ClientConnection::handleBlockRegionUpdate(shared_ptr<BlockRegionUpdatePacke } } -void ClientConnection::handleTileUpdate(shared_ptr<TileUpdatePacket> packet) +void ClientConnection::handleTileUpdate(std::shared_ptr<TileUpdatePacket> packet) { // 4J added - using a block of 255 to signify that this is a packet for destroying a tile, where we need to inform the level renderer that we are about to do so. // This is used in creative mode as the point where a tile is first destroyed at the client end of things. Packets formed like this are potentially sent from @@ -1147,11 +1147,11 @@ void ClientConnection::handleTileUpdate(shared_ptr<TileUpdatePacket> packet) } } -void ClientConnection::handleDisconnect(shared_ptr<DisconnectPacket> packet) +void ClientConnection::handleDisconnect(std::shared_ptr<DisconnectPacket> packet) { connection->close(DisconnectPacket::eDisconnect_Kicked); done = true; - + Minecraft *pMinecraft = Minecraft::GetInstance(); pMinecraft->connectionDisconnected( m_userIndex , packet->reason ); app.SetDisconnectReason( packet->reason ); @@ -1191,23 +1191,23 @@ void ClientConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason, //minecraft->setScreen(new DisconnectedScreen(L"disconnect.lost", reason, reasonObjects)); } -void ClientConnection::sendAndDisconnect(shared_ptr<Packet> packet) +void ClientConnection::sendAndDisconnect(std::shared_ptr<Packet> packet) { if (done) return; connection->send(packet); connection->sendAndQuit(); } -void ClientConnection::send(shared_ptr<Packet> packet) +void ClientConnection::send(std::shared_ptr<Packet> packet) { if (done) return; connection->send(packet); } -void ClientConnection::handleTakeItemEntity(shared_ptr<TakeItemEntityPacket> packet) +void ClientConnection::handleTakeItemEntity(std::shared_ptr<TakeItemEntityPacket> packet) { - shared_ptr<Entity> from = getEntity(packet->itemId); - shared_ptr<Mob> to = dynamic_pointer_cast<Mob>(getEntity(packet->playerId)); + std::shared_ptr<Entity> from = getEntity(packet->itemId); + std::shared_ptr<Mob> to = dynamic_pointer_cast<Mob>(getEntity(packet->playerId)); // 4J - the original game could assume that if getEntity didn't find the player, it must be the local player. We // need to search all local players @@ -1235,12 +1235,12 @@ void ClientConnection::handleTakeItemEntity(shared_ptr<TakeItemEntityPacket> pac if (from != NULL) { - // If this is a local player, then we only want to do processing for it if this connection is associated with the player it is for. In + // If this is a local player, then we only want to do processing for it if this connection is associated with the player it is for. In // particular, we don't want to remove the item entity until we are processing it for the right connection, or else we won't have a valid // "from" reference if we've already removed the item for an earlier processed connection if( isLocalPlayer ) { - shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>(to); + std::shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>(to); // 4J Stu - Fix for #10213 - UI: Local clients cannot progress through the tutorial normally. // We only send this packet once if many local players can see the event, so make sure we update @@ -1261,7 +1261,7 @@ void ClientConnection::handleTakeItemEntity(shared_ptr<TakeItemEntityPacket> pac level->playSound(from, eSoundType_RANDOM_POP, 0.2f, ((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f); } - minecraft->particleEngine->add( shared_ptr<TakeAnimationParticle>( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) ); + minecraft->particleEngine->add( std::shared_ptr<TakeAnimationParticle>( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) ); level->removeEntity(packet->itemId); } else @@ -1274,14 +1274,14 @@ void ClientConnection::handleTakeItemEntity(shared_ptr<TakeItemEntityPacket> pac else { level->playSound(from, eSoundType_RANDOM_POP, 0.2f, ((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f); - minecraft->particleEngine->add( shared_ptr<TakeAnimationParticle>( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) ); + minecraft->particleEngine->add( std::shared_ptr<TakeAnimationParticle>( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) ); level->removeEntity(packet->itemId); } } } -void ClientConnection::handleChat(shared_ptr<ChatPacket> packet) +void ClientConnection::handleChat(std::shared_ptr<ChatPacket> packet) { wstring message; int iPos; @@ -1316,7 +1316,7 @@ void ClientConnection::handleChat(shared_ptr<ChatPacket> packet) case ChatPacket::e_ChatBedMeSleep: message=app.GetString(IDS_TILE_BED_MESLEEP); break; - case ChatPacket::e_ChatPlayerJoinedGame: + case ChatPacket::e_ChatPlayerJoinedGame: message=app.GetString(IDS_PLAYER_JOINED); iPos=message.find(L"%s"); message.replace(iPos,2,playerDisplayName); @@ -1514,7 +1514,7 @@ void ClientConnection::handleChat(shared_ptr<ChatPacket> packet) message=app.GetString(IDS_MAX_WOLVES_BRED); break; - // can't shear the mooshroom + // can't shear the mooshroom case ChatPacket::e_ChatPlayerCantShearMooshroom: message=app.GetString(IDS_CANT_SHEAR_MOOSHROOM); break; @@ -1522,16 +1522,16 @@ void ClientConnection::handleChat(shared_ptr<ChatPacket> packet) // Paintings/Item Frames case ChatPacket::e_ChatPlayerMaxHangingEntities: message=app.GetString(IDS_MAX_HANGINGENTITIES); - break; + break; // Enemy spawn eggs in peaceful case ChatPacket::e_ChatPlayerCantSpawnInPeaceful: message=app.GetString(IDS_CANT_SPAWN_IN_PEACEFUL); - break; + break; // Enemy spawn eggs in peaceful case ChatPacket::e_ChatPlayerMaxBoats: message=app.GetString(IDS_MAX_BOATS); - break; + break; case ChatPacket::e_ChatCommandTeleportSuccess: message=app.GetString(IDS_COMMAND_TELEPORT_SUCCESS); @@ -1565,13 +1565,13 @@ void ClientConnection::handleChat(shared_ptr<ChatPacket> packet) if( displayOnGui ) minecraft->gui->addMessage(message,m_userIndex, bIsDeathMessage); } -void ClientConnection::handleAnimate(shared_ptr<AnimatePacket> packet) +void ClientConnection::handleAnimate(std::shared_ptr<AnimatePacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; if (packet->action == AnimatePacket::SWING) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); if(player != NULL) player->swing(); } else if (packet->action == AnimatePacket::HURT) @@ -1580,7 +1580,7 @@ void ClientConnection::handleAnimate(shared_ptr<AnimatePacket> packet) } else if (packet->action == AnimatePacket::WAKE_UP) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); if(player != NULL) player->stopSleepInBed(false, false, false); } else if (packet->action == AnimatePacket::RESPAWN) @@ -1588,13 +1588,13 @@ void ClientConnection::handleAnimate(shared_ptr<AnimatePacket> packet) } else if (packet->action == AnimatePacket::CRITICAL_HIT) { - shared_ptr<CritParticle> critParticle = shared_ptr<CritParticle>( new CritParticle(minecraft->level, e) ); + std::shared_ptr<CritParticle> critParticle = std::shared_ptr<CritParticle>( new CritParticle(minecraft->level, e) ); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add( critParticle ); } else if (packet->action == AnimatePacket::MAGIC_CRITICAL_HIT) { - shared_ptr<CritParticle> critParticle = shared_ptr<CritParticle>( new CritParticle(minecraft->level, e, eParticleType_magicCrit) ); + std::shared_ptr<CritParticle> critParticle = std::shared_ptr<CritParticle>( new CritParticle(minecraft->level, e, eParticleType_magicCrit) ); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add(critParticle); } @@ -1604,13 +1604,13 @@ void ClientConnection::handleAnimate(shared_ptr<AnimatePacket> packet) } -void ClientConnection::handleEntityActionAtPosition(shared_ptr<EntityActionAtPositionPacket> packet) +void ClientConnection::handleEntityActionAtPosition(std::shared_ptr<EntityActionAtPositionPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; if (packet->action == EntityActionAtPositionPacket::START_SLEEP) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); player->startSleepInBed(packet->x, packet->y, packet->z); if( player == minecraft->localplayers[m_userIndex] ) @@ -1620,7 +1620,7 @@ void ClientConnection::handleEntityActionAtPosition(shared_ptr<EntityActionAtPos } } -void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) +void ClientConnection::handlePreLogin(std::shared_ptr<PreLoginPacket> packet) { // printf("Client: handlePreLogin\n"); #if 1 @@ -1630,7 +1630,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) BOOL isAtLeastOneFriend = g_NetworkManager.IsHost(); BOOL isFriendsWithHost = TRUE; BOOL cantPlayContentRestricted = FALSE; - + if(!g_NetworkManager.IsHost()) { // set the game host settings @@ -1664,7 +1664,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) } if( playerXuid != INVALID_XUID ) { - // Is this user friends with the host player? + // Is this user friends with the host player? BOOL result; DWORD error; error = XUserAreUsersFriends(idx,&packet->m_playerXuids[packet->m_hostIndex],1,&result,NULL); @@ -1694,7 +1694,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) } if( playerXuid != INVALID_XUID ) { - // Is this user friends with the host player? + // Is this user friends with the host player? BOOL result; DWORD error; error = XUserAreUsersFriends(m_userIndex,&packet->m_playerXuids[packet->m_hostIndex],1,&result,NULL); @@ -1809,7 +1809,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) if(m_userIndex == ProfileManager.GetPrimaryPad() ) { - // Is this user friends with the host player? + // Is this user friends with the host player? bool isFriend = true; unsigned int friendCount = 0; #ifdef __PS3__ @@ -1839,7 +1839,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) requestParam.offset = 0; requestParam.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad()); - int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false); + int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false); if( ret == 0 ) { if( friendList.hasResult() ) @@ -1849,7 +1849,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) } #endif if( ret == 0 ) - { + { isFriend = false; SceNpId npid; for( unsigned int i = 0; i < friendCount; i++ ) @@ -1932,7 +1932,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) isAtLeastOneFriend = true; break; } - } + } } app.DebugPrintf("ClientConnection::handlePreLogin: User has at least one friend? %s\n", isAtLeastOneFriend ? "Yes" : "No"); @@ -1974,8 +1974,8 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) DisconnectPacket::eDisconnectReason reason = DisconnectPacket::eDisconnect_NoUGC_Remote; #else DisconnectPacket::eDisconnectReason reason = DisconnectPacket::eDisconnect_None; -#endif - if(m_userIndex == ProfileManager.GetPrimaryPad()) +#endif + if(m_userIndex == ProfileManager.GetPrimaryPad()) { if(!isFriendsWithHost) reason = DisconnectPacket::eDisconnect_NotFriendsWithHost; else if(!isAtLeastOneFriend) reason = DisconnectPacket::eDisconnect_NoFriendsInGame; @@ -1987,7 +1987,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) app.SetAction(ProfileManager.GetPrimaryPad(),eAppAction_ExitWorld,(void *)TRUE); } else - { + { if(!isFriendsWithHost) reason = DisconnectPacket::eDisconnect_NotFriendsWithHost; else if(!canPlayLocal) reason = DisconnectPacket::eDisconnect_NoUGC_Single_Local; else if(cantPlayContentRestricted) reason = DisconnectPacket::eDisconnect_ContentRestricted_Single_Local; @@ -2000,7 +2000,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) app.SetDisconnectReason( reason ); - // 4J-PB - this locks up on the read and write threads not closing down, because they are trying to lock the incoming critsec when it's already locked by this thread + // 4J-PB - this locks up on the read and write threads not closing down, because they are trying to lock the incoming critsec when it's already locked by this thread // Minecraft::GetInstance()->connectionDisconnected( m_userIndex , reason ); // done = true; // connection->flush(); @@ -2055,7 +2055,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) #endif // On PS3, all non-signed in players (even guests) can get a useful offlineXUID -#if !(defined __PS3__ || defined _DURANGO ) +#if !(defined __PS3__ || defined _DURANGO ) if( !ProfileManager.IsGuest( m_userIndex ) ) #endif { @@ -2064,7 +2064,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) } BOOL allAllowed, friendsAllowed; ProfileManager.AllowedPlayerCreatedContent(m_userIndex,true,&allAllowed,&friendsAllowed); - send( shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE), + send( std::shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE), packet->m_ugcPlayersVersion, app.GetPlayerSkinId(m_userIndex), app.GetPlayerCapeId(m_userIndex), ProfileManager.IsGuest( m_userIndex )))); if(!g_NetworkManager.IsHost() ) @@ -2105,7 +2105,7 @@ void ClientConnection::close() connection->close(DisconnectPacket::eDisconnect_Closed); } -void ClientConnection::handleAddMob(shared_ptr<AddMobPacket> packet) +void ClientConnection::handleAddMob(std::shared_ptr<AddMobPacket> packet) { double x = packet->x / 32.0; double y = packet->y / 32.0; @@ -2113,7 +2113,7 @@ void ClientConnection::handleAddMob(shared_ptr<AddMobPacket> packet) float yRot = packet->yRot * 360 / 256.0f; float xRot = packet->xRot * 360 / 256.0f; - shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(EntityIO::newById(packet->type, level)); + std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(EntityIO::newById(packet->type, level)); mob->xp = packet->x; mob->yp = packet->y; mob->zp = packet->z; @@ -2121,7 +2121,7 @@ void ClientConnection::handleAddMob(shared_ptr<AddMobPacket> packet) mob->yRotp = packet->yRot; mob->xRotp = packet->xRot; - vector<shared_ptr<Entity> > *subEntities = mob->getSubEntities(); + vector<std::shared_ptr<Entity> > *subEntities = mob->getSubEntities(); if (subEntities != NULL) { int offs = packet->id - mob->entityId; @@ -2143,7 +2143,7 @@ void ClientConnection::handleAddMob(shared_ptr<AddMobPacket> packet) mob->zd = packet->zd / 8000.0f; level->putEntity(packet->id, mob); - vector<shared_ptr<SynchedEntityData::DataItem> > *unpackedData = packet->getUnpackedData(); + vector<std::shared_ptr<SynchedEntityData::DataItem> > *unpackedData = packet->getUnpackedData(); if (unpackedData != NULL) { mob->getEntityData()->assignValues(unpackedData); @@ -2153,17 +2153,17 @@ void ClientConnection::handleAddMob(shared_ptr<AddMobPacket> packet) // 4J Stu - Slimes have a different BB depending on their size which is set in the entity data, so update the BB if(mob->GetType() == eTYPE_SLIME || mob->GetType() == eTYPE_LAVASLIME) { - shared_ptr<Slime> slime = dynamic_pointer_cast<Slime>(mob); + std::shared_ptr<Slime> slime = dynamic_pointer_cast<Slime>(mob); slime->setSize( slime->getSize() ); } } -void ClientConnection::handleSetTime(shared_ptr<SetTimePacket> packet) +void ClientConnection::handleSetTime(std::shared_ptr<SetTimePacket> packet) { minecraft->level->setTime(packet->time); } -void ClientConnection::handleSetSpawn(shared_ptr<SetSpawnPositionPacket> packet) +void ClientConnection::handleSetSpawn(std::shared_ptr<SetSpawnPositionPacket> packet) { //minecraft->player->setRespawnPosition(new Pos(packet->x, packet->y, packet->z)); minecraft->localplayers[m_userIndex]->setRespawnPosition(new Pos(packet->x, packet->y, packet->z)); @@ -2171,12 +2171,12 @@ void ClientConnection::handleSetSpawn(shared_ptr<SetSpawnPositionPacket> packet) } -void ClientConnection::handleRidePacket(shared_ptr<SetRidingPacket> packet) +void ClientConnection::handleRidePacket(std::shared_ptr<SetRidingPacket> packet) { - shared_ptr<Entity> rider = getEntity(packet->riderId); - shared_ptr<Entity> ridden = getEntity(packet->riddenId); + std::shared_ptr<Entity> rider = getEntity(packet->riderId); + std::shared_ptr<Entity> ridden = getEntity(packet->riddenId); - shared_ptr<Boat> boat = dynamic_pointer_cast<Boat>(ridden); + std::shared_ptr<Boat> boat = dynamic_pointer_cast<Boat>(ridden); //if (packet->riderId == minecraft->player->entityId) rider = minecraft->player; if (packet->riderId == minecraft->localplayers[m_userIndex]->entityId) { @@ -2193,13 +2193,13 @@ void ClientConnection::handleRidePacket(shared_ptr<SetRidingPacket> packet) rider->ride(ridden); } -void ClientConnection::handleEntityEvent(shared_ptr<EntityEventPacket> packet) +void ClientConnection::handleEntityEvent(std::shared_ptr<EntityEventPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->entityId); + std::shared_ptr<Entity> e = getEntity(packet->entityId); if (e != NULL) e->handleEntityEvent(packet->eventId); } -shared_ptr<Entity> ClientConnection::getEntity(int entityId) +std::shared_ptr<Entity> ClientConnection::getEntity(int entityId) { //if (entityId == minecraft->player->entityId) if(entityId == minecraft->localplayers[m_userIndex]->entityId) @@ -2210,7 +2210,7 @@ shared_ptr<Entity> ClientConnection::getEntity(int entityId) return level->getEntity(entityId); } -void ClientConnection::handleSetHealth(shared_ptr<SetHealthPacket> packet) +void ClientConnection::handleSetHealth(std::shared_ptr<SetHealthPacket> packet) { //minecraft->player->hurtTo(packet->health); minecraft->localplayers[m_userIndex]->hurtTo(packet->health,packet->damageSource); @@ -2227,12 +2227,12 @@ void ClientConnection::handleSetHealth(shared_ptr<SetHealthPacket> packet) } } -void ClientConnection::handleSetExperience(shared_ptr<SetExperiencePacket> packet) +void ClientConnection::handleSetExperience(std::shared_ptr<SetExperiencePacket> packet) { minecraft->localplayers[m_userIndex]->setExperienceValues(packet->experienceProgress, packet->totalExperience, packet->experienceLevel); } -void ClientConnection::handleTexture(shared_ptr<TexturePacket> packet) +void ClientConnection::handleTexture(std::shared_ptr<TexturePacket> packet) { // Both PlayerConnection and ClientConnection should handle this mostly the same way // Server side also needs to store a list of those clients waiting to get a texture the server doesn't have yet @@ -2245,12 +2245,12 @@ void ClientConnection::handleTexture(shared_ptr<TexturePacket> packet) wprintf(L"Client received request for custom texture %ls\n",packet->textureName.c_str()); #endif PBYTE pbData=NULL; - DWORD dwBytes=0; + DWORD dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); if(dwBytes!=0) { - send( shared_ptr<TexturePacket>( new TexturePacket(packet->textureName,pbData,dwBytes) ) ); + send( std::shared_ptr<TexturePacket>( new TexturePacket(packet->textureName,pbData,dwBytes) ) ); } } else @@ -2264,7 +2264,7 @@ void ClientConnection::handleTexture(shared_ptr<TexturePacket> packet) } } -void ClientConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPacket> packet) +void ClientConnection::handleTextureAndGeometry(std::shared_ptr<TextureAndGeometryPacket> packet) { // Both PlayerConnection and ClientConnection should handle this mostly the same way // Server side also needs to store a list of those clients waiting to get a texture the server doesn't have yet @@ -2277,7 +2277,7 @@ void ClientConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPac wprintf(L"Client received request for custom texture and geometry %ls\n",packet->textureName.c_str()); #endif PBYTE pbData=NULL; - DWORD dwBytes=0; + DWORD dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); DLCSkinFile *pDLCSkinFile = app.m_dlcManager.getSkinFile(packet->textureName); @@ -2287,18 +2287,18 @@ void ClientConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPac { if(pDLCSkinFile->getAdditionalBoxesCount()!=0) { - send( shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes,pDLCSkinFile) ) ); + send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes,pDLCSkinFile) ) ); } else { - send( shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes) ) ); + send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes) ) ); } } else { unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(packet->dwSkinID); - send( shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes,app.GetAdditionalSkinBoxes(packet->dwSkinID),uiAnimOverrideBitmask) ) ); + send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes,app.GetAdditionalSkinBoxes(packet->dwSkinID),uiAnimOverrideBitmask) ) ); } } } @@ -2311,9 +2311,9 @@ void ClientConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPac // Add the texture data app.AddMemoryTextureFile(packet->textureName,packet->pbData,packet->dwTextureBytes); // Add the geometry data - if(packet->dwBoxC!=0) + if(packet->dwBoxC!=0) { - app.SetAdditionalSkinBoxes(packet->dwSkinID,packet->BoxDataA,packet->dwBoxC); + app.SetAdditionalSkinBoxes(packet->dwSkinID,packet->BoxDataA,packet->dwBoxC); } // Add the anim override app.SetAnimOverrideBitmask(packet->dwSkinID,packet->uiAnimOverrideBitmask); @@ -2323,11 +2323,11 @@ void ClientConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPac } } -void ClientConnection::handleTextureChange(shared_ptr<TextureChangePacket> packet) +void ClientConnection::handleTextureChange(std::shared_ptr<TextureChangePacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; - shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); if( e == NULL) return; bool isLocalPlayer = false; @@ -2360,7 +2360,7 @@ void ClientConnection::handleTextureChange(shared_ptr<TextureChangePacket> packe #endif break; } - + if(!packet->path.empty() && packet->path.substr(0,3).compare(L"def") != 0 && !app.IsFileInMemoryTextures(packet->path)) { if( minecraft->addPendingClientTextureRequest(packet->path) ) @@ -2368,7 +2368,7 @@ void ClientConnection::handleTextureChange(shared_ptr<TextureChangePacket> packe #ifndef _CONTENT_PACKAGE wprintf(L"handleTextureChange - Client sending texture packet to get custom skin %ls for player %ls\n",packet->path.c_str(), player->name.c_str()); #endif - send(shared_ptr<TexturePacket>( new TexturePacket(packet->path,NULL,0) ) ); + send(std::shared_ptr<TexturePacket>( new TexturePacket(packet->path,NULL,0) ) ); } } else if(!packet->path.empty() && app.IsFileInMemoryTextures(packet->path)) @@ -2378,11 +2378,11 @@ void ClientConnection::handleTextureChange(shared_ptr<TextureChangePacket> packe } } -void ClientConnection::handleTextureAndGeometryChange(shared_ptr<TextureAndGeometryChangePacket> packet) +void ClientConnection::handleTextureAndGeometryChange(std::shared_ptr<TextureAndGeometryChangePacket> packet) { - shared_ptr<Entity> e = getEntity(packet->id); + std::shared_ptr<Entity> e = getEntity(packet->id); if (e == NULL) return; - shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); if( e == NULL) return; bool isLocalPlayer = false; @@ -2413,7 +2413,7 @@ void ClientConnection::handleTextureAndGeometryChange(shared_ptr<TextureAndGeome #ifndef _CONTENT_PACKAGE wprintf(L"handleTextureAndGeometryChange - Client sending TextureAndGeometryPacket to get custom skin %ls for player %ls\n",packet->path.c_str(), player->name.c_str()); #endif - send(shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->path,NULL,0) ) ); + send(std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->path,NULL,0) ) ); } } else if(!packet->path.empty() && app.IsFileInMemoryTextures(packet->path)) @@ -2424,7 +2424,7 @@ void ClientConnection::handleTextureAndGeometryChange(shared_ptr<TextureAndGeome } } -void ClientConnection::handleRespawn(shared_ptr<RespawnPacket> packet) +void ClientConnection::handleRespawn(std::shared_ptr<RespawnPacket> packet) { //if (packet->dimension != minecraft->player->dimension) if( packet->dimension != minecraft->localplayers[m_userIndex]->dimension || packet->mapSeed != minecraft->localplayers[m_userIndex]->level->getSeed() ) @@ -2459,19 +2459,19 @@ void ClientConnection::handleRespawn(shared_ptr<RespawnPacket> packet) } // Remove the player entity from the current level - level->removeEntity( shared_ptr<Entity>(minecraft->localplayers[m_userIndex]) ); + level->removeEntity( std::shared_ptr<Entity>(minecraft->localplayers[m_userIndex]) ); level = dimensionLevel; - + // Whilst calling setLevel, make sure that minecraft::player is set up to be correct for this // connection - shared_ptr<MultiplayerLocalPlayer> lastPlayer = minecraft->player; + std::shared_ptr<MultiplayerLocalPlayer> lastPlayer = minecraft->player; minecraft->player = minecraft->localplayers[m_userIndex]; minecraft->setLevel(dimensionLevel); minecraft->player = lastPlayer; TelemetryManager->RecordLevelExit(m_userIndex, eSen_LevelExitStatus_Succeeded); - + //minecraft->player->dimension = packet->dimension; minecraft->localplayers[m_userIndex]->dimension = packet->dimension; //minecraft->setScreen(new ReceivingLevelScreen(this)); @@ -2522,12 +2522,12 @@ void ClientConnection::handleRespawn(shared_ptr<RespawnPacket> packet) { ui.NavigateToScene(m_userIndex, eUIScene_ConnectingProgress, param); } - + app.SetAction( m_userIndex, eAppAction_WaitForDimensionChangeComplete); } //minecraft->respawnPlayer(minecraft->player->GetXboxPad(),true, packet->dimension); - + // Wrap respawnPlayer call up in code to set & restore the player/gamemode etc. as some things // in there assume that we are set up for the player that the respawn is coming in for int oldIndex = minecraft->getLocalPlayerIdx(); @@ -2537,7 +2537,7 @@ void ClientConnection::handleRespawn(shared_ptr<RespawnPacket> packet) minecraft->setLocalPlayerIdx(oldIndex); } -void ClientConnection::handleExplosion(shared_ptr<ExplodePacket> packet) +void ClientConnection::handleExplosion(std::shared_ptr<ExplodePacket> packet) { if(!packet->m_bKnockbackOnly) { @@ -2552,7 +2552,7 @@ void ClientConnection::handleExplosion(shared_ptr<ExplodePacket> packet) MultiPlayerLevel *mpLevel = (MultiPlayerLevel *)minecraft->level; mpLevel->enableResetChanges(false); // 4J - now directly pass a pointer to the toBlow array in the packet rather than copying around - e->finalizeExplosion(true, &packet->toBlow); + e->finalizeExplosion(true, &packet->toBlow); mpLevel->enableResetChanges(true); PIXEndNamedEvent(); PIXEndNamedEvent(); @@ -2569,57 +2569,57 @@ void ClientConnection::handleExplosion(shared_ptr<ExplodePacket> packet) minecraft->localplayers[m_userIndex]->zd += packet->getKnockbackZ(); } -void ClientConnection::handleContainerOpen(shared_ptr<ContainerOpenPacket> packet) +void ClientConnection::handleContainerOpen(std::shared_ptr<ContainerOpenPacket> packet) { bool failed = false; - shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[m_userIndex]; + std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[m_userIndex]; switch(packet->type) { case ContainerOpenPacket::CONTAINER: { - if( player->openContainer(shared_ptr<SimpleContainer>( new SimpleContainer(packet->title, packet->size) ))) + if( player->openContainer(std::shared_ptr<SimpleContainer>( new SimpleContainer(packet->title, packet->size) ))) { player->containerMenu->containerId = packet->containerId; } else { - failed = true; + failed = true; } } break; case ContainerOpenPacket::FURNACE: { - if( player->openFurnace(shared_ptr<FurnaceTileEntity>( new FurnaceTileEntity() )) ) + if( player->openFurnace(std::shared_ptr<FurnaceTileEntity>( new FurnaceTileEntity() )) ) { player->containerMenu->containerId = packet->containerId; } else { - failed = true; + failed = true; } } break; case ContainerOpenPacket::BREWING_STAND: { - if( player->openBrewingStand(shared_ptr<BrewingStandTileEntity>( new BrewingStandTileEntity() )) ) + if( player->openBrewingStand(std::shared_ptr<BrewingStandTileEntity>( new BrewingStandTileEntity() )) ) { player->containerMenu->containerId = packet->containerId; } else { - failed = true; + failed = true; } } break; case ContainerOpenPacket::TRAP: { - if( player->openTrap(shared_ptr<DispenserTileEntity>( new DispenserTileEntity() )) ) + if( player->openTrap(std::shared_ptr<DispenserTileEntity>( new DispenserTileEntity() )) ) { player->containerMenu->containerId = packet->containerId; } else { - failed = true; + failed = true; } } break; @@ -2631,7 +2631,7 @@ void ClientConnection::handleContainerOpen(shared_ptr<ContainerOpenPacket> packe } else { - failed = true; + failed = true; } } break; @@ -2643,13 +2643,13 @@ void ClientConnection::handleContainerOpen(shared_ptr<ContainerOpenPacket> packe } else { - failed = true; + failed = true; } } break; case ContainerOpenPacket::TRADER_NPC: { - shared_ptr<ClientSideMerchant> csm = shared_ptr<ClientSideMerchant>(new ClientSideMerchant(player,packet->title)); + std::shared_ptr<ClientSideMerchant> csm = std::shared_ptr<ClientSideMerchant>(new ClientSideMerchant(player,packet->title)); csm->createContainer(); if(player->openTrading(csm)) { @@ -2657,7 +2657,7 @@ void ClientConnection::handleContainerOpen(shared_ptr<ContainerOpenPacket> packe } else { - failed = true; + failed = true; } } break; @@ -2669,7 +2669,7 @@ void ClientConnection::handleContainerOpen(shared_ptr<ContainerOpenPacket> packe } else { - failed = true; + failed = true; } } break; @@ -2686,14 +2686,14 @@ void ClientConnection::handleContainerOpen(shared_ptr<ContainerOpenPacket> packe } else { - send(shared_ptr<ContainerClosePacket>(new ContainerClosePacket(packet->containerId))); + send(std::shared_ptr<ContainerClosePacket>(new ContainerClosePacket(packet->containerId))); } } } -void ClientConnection::handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> packet) +void ClientConnection::handleContainerSetSlot(std::shared_ptr<ContainerSetSlotPacket> packet) { - shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[m_userIndex]; + std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[m_userIndex]; if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_CARRIED ) { player->inventory->setCarried(packet->item); @@ -2705,7 +2705,7 @@ void ClientConnection::handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> // 4J Stu - Reworked a bit to fix a bug where things being collected while the creative menu was up replaced items in the creative menu if(packet->slot >= 36 && packet->slot < 36 + 9) { - shared_ptr<ItemInstance> lastItem = player->inventoryMenu->getSlot(packet->slot)->getItem(); + std::shared_ptr<ItemInstance> lastItem = player->inventoryMenu->getSlot(packet->slot)->getItem(); if (packet->item != NULL) { if (lastItem == NULL || lastItem->count < packet->item->count) @@ -2723,9 +2723,9 @@ void ClientConnection::handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> } } -void ClientConnection::handleContainerAck(shared_ptr<ContainerAckPacket> packet) +void ClientConnection::handleContainerAck(std::shared_ptr<ContainerAckPacket> packet) { - shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[m_userIndex]; + std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[m_userIndex]; AbstractContainerMenu *menu = NULL; if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_INVENTORY) { @@ -2739,15 +2739,15 @@ void ClientConnection::handleContainerAck(shared_ptr<ContainerAckPacket> packet) { if (!packet->accepted) { - send( shared_ptr<ContainerAckPacket>( new ContainerAckPacket(packet->containerId, packet->uid, true) )); + send( std::shared_ptr<ContainerAckPacket>( new ContainerAckPacket(packet->containerId, packet->uid, true) )); } } } -void ClientConnection::handleContainerContent(shared_ptr<ContainerSetContentPacket> packet) +void ClientConnection::handleContainerContent(std::shared_ptr<ContainerSetContentPacket> packet) { - shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[m_userIndex]; - if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_INVENTORY) + std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[m_userIndex]; + if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_INVENTORY) { player->inventoryMenu->setAll(&packet->items); } @@ -2757,17 +2757,17 @@ void ClientConnection::handleContainerContent(shared_ptr<ContainerSetContentPack } } -void ClientConnection::handleSignUpdate(shared_ptr<SignUpdatePacket> packet) +void ClientConnection::handleSignUpdate(std::shared_ptr<SignUpdatePacket> packet) { app.DebugPrintf("ClientConnection::handleSignUpdate - "); if (minecraft->level->hasChunkAt(packet->x, packet->y, packet->z)) { - shared_ptr<TileEntity> te = minecraft->level->getTileEntity(packet->x, packet->y, packet->z); + std::shared_ptr<TileEntity> te = minecraft->level->getTileEntity(packet->x, packet->y, packet->z); // 4J-PB - on a client connecting, the line below fails if (dynamic_pointer_cast<SignTileEntity>(te) != NULL) { - shared_ptr<SignTileEntity> ste = dynamic_pointer_cast<SignTileEntity>(te); + std::shared_ptr<SignTileEntity> ste = dynamic_pointer_cast<SignTileEntity>(te); for (int i = 0; i < MAX_SIGN_LINES; i++) { ste->SetMessage(i,packet->lines[i]); @@ -2790,11 +2790,11 @@ void ClientConnection::handleSignUpdate(shared_ptr<SignUpdatePacket> packet) } } -void ClientConnection::handleTileEntityData(shared_ptr<TileEntityDataPacket> packet) +void ClientConnection::handleTileEntityData(std::shared_ptr<TileEntityDataPacket> packet) { if (minecraft->level->hasChunkAt(packet->x, packet->y, packet->z)) { - shared_ptr<TileEntity> te = minecraft->level->getTileEntity(packet->x, packet->y, packet->z); + std::shared_ptr<TileEntity> te = minecraft->level->getTileEntity(packet->x, packet->y, packet->z); if (te != NULL) { @@ -2809,7 +2809,7 @@ void ClientConnection::handleTileEntityData(shared_ptr<TileEntityDataPacket> pac //else if (packet.type == TileEntityDataPacket.TYPE_BEACON && (te instanceof BeaconTileEntity)) //{ // ((BeaconTileEntity) te).load(packet.tag); - //} + //} else if (packet->type == TileEntityDataPacket::TYPE_SKULL && dynamic_pointer_cast<SkullTileEntity>(te) != NULL) { dynamic_pointer_cast<SkullTileEntity>(te)->load(packet->tag); @@ -2818,7 +2818,7 @@ void ClientConnection::handleTileEntityData(shared_ptr<TileEntityDataPacket> pac } } -void ClientConnection::handleContainerSetData(shared_ptr<ContainerSetDataPacket> packet) +void ClientConnection::handleContainerSetData(std::shared_ptr<ContainerSetDataPacket> packet) { onUnhandledPacket(packet); if (minecraft->localplayers[m_userIndex]->containerMenu != NULL && minecraft->localplayers[m_userIndex]->containerMenu->containerId == packet->containerId) @@ -2827,9 +2827,9 @@ void ClientConnection::handleContainerSetData(shared_ptr<ContainerSetDataPacket> } } -void ClientConnection::handleSetEquippedItem(shared_ptr<SetEquippedItemPacket> packet) +void ClientConnection::handleSetEquippedItem(std::shared_ptr<SetEquippedItemPacket> packet) { - shared_ptr<Entity> entity = getEntity(packet->entity); + std::shared_ptr<Entity> entity = getEntity(packet->entity); if (entity != NULL) { // 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game @@ -2837,19 +2837,19 @@ void ClientConnection::handleSetEquippedItem(shared_ptr<SetEquippedItemPacket> p } } -void ClientConnection::handleContainerClose(shared_ptr<ContainerClosePacket> packet) +void ClientConnection::handleContainerClose(std::shared_ptr<ContainerClosePacket> packet) { minecraft->localplayers[m_userIndex]->closeContainer(); } -void ClientConnection::handleTileEvent(shared_ptr<TileEventPacket> packet) +void ClientConnection::handleTileEvent(std::shared_ptr<TileEventPacket> packet) { PIXBeginNamedEvent(0,"Handle tile event\n"); minecraft->level->tileEvent(packet->x, packet->y, packet->z, packet->tile, packet->b0, packet->b1); PIXEndNamedEvent(); } -void ClientConnection::handleTileDestruction(shared_ptr<TileDestructionPacket> packet) +void ClientConnection::handleTileDestruction(std::shared_ptr<TileDestructionPacket> packet) { minecraft->level->destroyTileProgress(packet->getEntityId(), packet->getX(), packet->getY(), packet->getZ(), packet->getState()); } @@ -2859,7 +2859,7 @@ bool ClientConnection::canHandleAsyncPackets() return minecraft != NULL && minecraft->level != NULL && minecraft->localplayers[m_userIndex] != NULL && level != NULL; } -void ClientConnection::handleGameEvent(shared_ptr<GameEventPacket> gameEventPacket) +void ClientConnection::handleGameEvent(std::shared_ptr<GameEventPacket> gameEventPacket) { int event = gameEventPacket->_event; int param = gameEventPacket->param; @@ -2887,7 +2887,7 @@ void ClientConnection::handleGameEvent(shared_ptr<GameEventPacket> gameEventPack else if (event == GameEventPacket::WIN_GAME) { ui.SetWinUserIndex( (BYTE)gameEventPacket->param ); - + #ifdef _XBOX // turn off the gamertags in splitscreen for the primary player, since they are about to be made fullscreen @@ -2925,7 +2925,7 @@ void ClientConnection::handleGameEvent(shared_ptr<GameEventPacket> gameEventPack } } -void ClientConnection::handleComplexItemData(shared_ptr<ComplexItemDataPacket> packet) +void ClientConnection::handleComplexItemData(std::shared_ptr<ComplexItemDataPacket> packet) { if (packet->itemType == Item::map->id) { @@ -2939,7 +2939,7 @@ void ClientConnection::handleComplexItemData(shared_ptr<ComplexItemDataPacket> p -void ClientConnection::handleLevelEvent(shared_ptr<LevelEventPacket> packet) +void ClientConnection::handleLevelEvent(std::shared_ptr<LevelEventPacket> packet) { switch(packet->type) { @@ -2963,22 +2963,22 @@ void ClientConnection::handleLevelEvent(shared_ptr<LevelEventPacket> packet) } } -void ClientConnection::handleAwardStat(shared_ptr<AwardStatPacket> packet) +void ClientConnection::handleAwardStat(std::shared_ptr<AwardStatPacket> packet) { minecraft->localplayers[m_userIndex]->awardStatFromServer(GenericStats::stat(packet->statId), packet->getParamData()); } -void ClientConnection::handleUpdateMobEffect(shared_ptr<UpdateMobEffectPacket> packet) +void ClientConnection::handleUpdateMobEffect(std::shared_ptr<UpdateMobEffectPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->entityId); + std::shared_ptr<Entity> e = getEntity(packet->entityId); if (e == NULL || dynamic_pointer_cast<Mob>(e) == NULL) return; ( dynamic_pointer_cast<Mob>(e) )->addEffect(new MobEffectInstance(packet->effectId, packet->effectDurationTicks, packet->effectAmplifier)); } -void ClientConnection::handleRemoveMobEffect(shared_ptr<RemoveMobEffectPacket> packet) +void ClientConnection::handleRemoveMobEffect(std::shared_ptr<RemoveMobEffectPacket> packet) { - shared_ptr<Entity> e = getEntity(packet->entityId); + std::shared_ptr<Entity> e = getEntity(packet->entityId); if (e == NULL || dynamic_pointer_cast<Mob>(e) == NULL) return; ( dynamic_pointer_cast<Mob>(e) )->removeEffectNoUpdate(packet->effectId); @@ -2989,7 +2989,7 @@ bool ClientConnection::isServerPacketListener() return false; } -void ClientConnection::handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet) +void ClientConnection::handlePlayerInfo(std::shared_ptr<PlayerInfoPacket> packet) { unsigned int startingPrivileges = app.GetPlayerPrivileges(packet->m_networkSmallId); @@ -3005,17 +3005,17 @@ void ClientConnection::handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet) // 4J Stu - Repurposed this packet for player info that we want app.UpdatePlayerInfo(packet->m_networkSmallId, packet->m_playerColourIndex, packet->m_playerPrivileges); - shared_ptr<Entity> entity = getEntity(packet->m_entityId); + std::shared_ptr<Entity> entity = getEntity(packet->m_entityId); if(entity != NULL && entity->GetType() == eTYPE_PLAYER) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, packet->m_playerPrivileges); } if(networkPlayer != NULL && networkPlayer->IsLocal()) { for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { - shared_ptr<MultiplayerLocalPlayer> localPlayer = minecraft->localplayers[i]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = minecraft->localplayers[i]; if(localPlayer != NULL && localPlayer->connection != NULL && localPlayer->connection->getNetworkPlayer() == networkPlayer ) { localPlayer->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All,packet->m_playerPrivileges); @@ -3044,7 +3044,7 @@ void ClientConnection::handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet) } -void ClientConnection::displayPrivilegeChanges(shared_ptr<MultiplayerLocalPlayer> player, unsigned int oldPrivileges) +void ClientConnection::displayPrivilegeChanges(std::shared_ptr<MultiplayerLocalPlayer> player, unsigned int oldPrivileges) { int userIndex = player->GetXboxPad(); unsigned int newPrivileges = player->getAllPlayerGamePrivileges(); @@ -3117,7 +3117,7 @@ void ClientConnection::displayPrivilegeChanges(shared_ptr<MultiplayerLocalPlayer case Player::ePlayerGamePrivilege_Invulnerable: if(privOn) message = app.GetString(IDS_PRIV_INVULNERABLE_TOGGLE_ON); else message = app.GetString(IDS_PRIV_INVULNERABLE_TOGGLE_OFF); - break; + break; case Player::ePlayerGamePrivilege_CanToggleInvisible: if(privOn) message = app.GetString(IDS_PRIV_CAN_INVISIBLE_TOGGLE_ON); else message = app.GetString(IDS_PRIV_CAN_INVISIBLE_TOGGLE_OFF); @@ -3141,14 +3141,14 @@ void ClientConnection::displayPrivilegeChanges(shared_ptr<MultiplayerLocalPlayer } } -void ClientConnection::handleKeepAlive(shared_ptr<KeepAlivePacket> packet) +void ClientConnection::handleKeepAlive(std::shared_ptr<KeepAlivePacket> packet) { - send(shared_ptr<KeepAlivePacket>(new KeepAlivePacket(packet->id))); + send(std::shared_ptr<KeepAlivePacket>(new KeepAlivePacket(packet->id))); } -void ClientConnection::handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket) +void ClientConnection::handlePlayerAbilities(std::shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket) { - shared_ptr<Player> player = minecraft->localplayers[m_userIndex]; + std::shared_ptr<Player> player = minecraft->localplayers[m_userIndex]; player->abilities.flying = playerAbilitiesPacket->isFlying(); player->abilities.instabuild = playerAbilitiesPacket->canInstabuild(); player->abilities.invulnerable = playerAbilitiesPacket->isInvulnerable(); @@ -3156,12 +3156,12 @@ void ClientConnection::handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> p player->abilities.setFlyingSpeed(playerAbilitiesPacket->getFlyingSpeed()); } -void ClientConnection::handleSoundEvent(shared_ptr<LevelSoundPacket> packet) +void ClientConnection::handleSoundEvent(std::shared_ptr<LevelSoundPacket> packet) { minecraft->level->playLocalSound(packet->getX(), packet->getY(), packet->getZ(), packet->getSound(), packet->getVolume(), packet->getPitch()); } -void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> customPayloadPacket) +void ClientConnection::handleCustomPayload(std::shared_ptr<CustomPayloadPacket> customPayloadPacket) { if (CustomPayloadPacket::TRADER_LIST_PACKET.compare(customPayloadPacket->identifier) == 0) { @@ -3170,7 +3170,7 @@ void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo int containerId = input.readInt(); if (ui.IsSceneInStack(m_userIndex, eUIScene_TradingMenu) && containerId == minecraft->localplayers[m_userIndex]->containerMenu->containerId) { - shared_ptr<Merchant> trader = nullptr; + std::shared_ptr<Merchant> trader = nullptr; #ifdef _XBOX HXUIOBJ scene = app.GetCurrentScene(m_userIndex); @@ -3190,7 +3190,7 @@ void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo UIScene_TradingMenu *screen = (UIScene_TradingMenu *)scene; trader = screen->getMerchant(); #endif - + MerchantRecipeList *recipeList = MerchantRecipeList::createFromStream(&input); trader->overrideOffers(recipeList); } @@ -3203,7 +3203,7 @@ Connection *ClientConnection::getConnection() } // 4J Added -void ClientConnection::handleServerSettingsChanged(shared_ptr<ServerSettingsChangedPacket> packet) +void ClientConnection::handleServerSettingsChanged(std::shared_ptr<ServerSettingsChangedPacket> packet) { if(packet->action==ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS) { @@ -3229,7 +3229,7 @@ void ClientConnection::handleServerSettingsChanged(shared_ptr<ServerSettingsChan } -void ClientConnection::handleXZ(shared_ptr<XZPacket> packet) +void ClientConnection::handleXZ(std::shared_ptr<XZPacket> packet) { if(packet->action==XZPacket::STRONGHOLD) { @@ -3239,12 +3239,12 @@ void ClientConnection::handleXZ(shared_ptr<XZPacket> packet) } } -void ClientConnection::handleUpdateProgress(shared_ptr<UpdateProgressPacket> packet) +void ClientConnection::handleUpdateProgress(std::shared_ptr<UpdateProgressPacket> packet) { if(!g_NetworkManager.IsHost() ) Minecraft::GetInstance()->progressRenderer->progressStagePercentage( packet->m_percentage ); } -void ClientConnection::handleUpdateGameRuleProgressPacket(shared_ptr<UpdateGameRuleProgressPacket> packet) +void ClientConnection::handleUpdateGameRuleProgressPacket(std::shared_ptr<UpdateGameRuleProgressPacket> packet) { LPCWSTR string = app.GetGameRulesString(packet->m_messageId); if(string != NULL) @@ -3277,7 +3277,7 @@ int ClientConnection::HostDisconnectReturned(void *pParam,int iPad,C4JStorage::E DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack(); if(!pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" )) - { + { // no upsell, we're about to quit MinecraftServer::getInstance()->setSaveOnExit( false ); // flag a app action of exit game @@ -3331,7 +3331,7 @@ int ClientConnection::HostDisconnectReturned(void *pParam,int iPad,C4JStorage::E int ClientConnection::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result) { // results switched for this dialog - if(result==C4JStorage::EMessage_ResultDecline) + if(result==C4JStorage::EMessage_ResultDecline) { //INT saveOrCheckpointId = 0; //bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); @@ -3350,7 +3350,7 @@ int ClientConnection::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage:: return 0; } -// +// wstring ClientConnection::GetDisplayNameByGamertag(wstring gamertag) { #ifdef _DURANGO diff --git a/Minecraft.Client/ClientConnection.h b/Minecraft.Client/ClientConnection.h index 2ce46ce0..53c3ff22 100644 --- a/Minecraft.Client/ClientConnection.h +++ b/Minecraft.Client/ClientConnection.h @@ -49,92 +49,92 @@ public: ~ClientConnection(); void tick(); INetworkPlayer *getNetworkPlayer(); - virtual void handleLogin(shared_ptr<LoginPacket> packet); - virtual void handleAddEntity(shared_ptr<AddEntityPacket> packet); - virtual void handleAddExperienceOrb(shared_ptr<AddExperienceOrbPacket> packet); - virtual void handleAddGlobalEntity(shared_ptr<AddGlobalEntityPacket> packet); - virtual void handleAddPainting(shared_ptr<AddPaintingPacket> packet); - virtual void handleSetEntityMotion(shared_ptr<SetEntityMotionPacket> packet); - virtual void handleSetEntityData(shared_ptr<SetEntityDataPacket> packet); - virtual void handleAddPlayer(shared_ptr<AddPlayerPacket> packet); - virtual void handleTeleportEntity(shared_ptr<TeleportEntityPacket> packet); - virtual void handleMoveEntity(shared_ptr<MoveEntityPacket> packet); - virtual void handleRotateMob(shared_ptr<RotateHeadPacket> packet); - virtual void handleMoveEntitySmall(shared_ptr<MoveEntityPacketSmall> packet); - virtual void handleRemoveEntity(shared_ptr<RemoveEntitiesPacket> packet); - virtual void handleMovePlayer(shared_ptr<MovePlayerPacket> packet); + virtual void handleLogin(std::shared_ptr<LoginPacket> packet); + virtual void handleAddEntity(std::shared_ptr<AddEntityPacket> packet); + virtual void handleAddExperienceOrb(std::shared_ptr<AddExperienceOrbPacket> packet); + virtual void handleAddGlobalEntity(std::shared_ptr<AddGlobalEntityPacket> packet); + virtual void handleAddPainting(std::shared_ptr<AddPaintingPacket> packet); + virtual void handleSetEntityMotion(std::shared_ptr<SetEntityMotionPacket> packet); + virtual void handleSetEntityData(std::shared_ptr<SetEntityDataPacket> packet); + virtual void handleAddPlayer(std::shared_ptr<AddPlayerPacket> packet); + virtual void handleTeleportEntity(std::shared_ptr<TeleportEntityPacket> packet); + virtual void handleMoveEntity(std::shared_ptr<MoveEntityPacket> packet); + virtual void handleRotateMob(std::shared_ptr<RotateHeadPacket> packet); + virtual void handleMoveEntitySmall(std::shared_ptr<MoveEntityPacketSmall> packet); + virtual void handleRemoveEntity(std::shared_ptr<RemoveEntitiesPacket> packet); + virtual void handleMovePlayer(std::shared_ptr<MovePlayerPacket> packet); Random *random; - + // 4J Added - virtual void handleChunkVisibilityArea(shared_ptr<ChunkVisibilityAreaPacket> packet); + virtual void handleChunkVisibilityArea(std::shared_ptr<ChunkVisibilityAreaPacket> packet); - virtual void handleChunkVisibility(shared_ptr<ChunkVisibilityPacket> packet); - virtual void handleChunkTilesUpdate(shared_ptr<ChunkTilesUpdatePacket> packet); - virtual void handleBlockRegionUpdate(shared_ptr<BlockRegionUpdatePacket> packet); - virtual void handleTileUpdate(shared_ptr<TileUpdatePacket> packet); - virtual void handleDisconnect(shared_ptr<DisconnectPacket> packet); + virtual void handleChunkVisibility(std::shared_ptr<ChunkVisibilityPacket> packet); + virtual void handleChunkTilesUpdate(std::shared_ptr<ChunkTilesUpdatePacket> packet); + virtual void handleBlockRegionUpdate(std::shared_ptr<BlockRegionUpdatePacket> packet); + virtual void handleTileUpdate(std::shared_ptr<TileUpdatePacket> packet); + virtual void handleDisconnect(std::shared_ptr<DisconnectPacket> packet); virtual void onDisconnect(DisconnectPacket::eDisconnectReason reason, void *reasonObjects); - void sendAndDisconnect(shared_ptr<Packet> packet); - void send(shared_ptr<Packet> packet); - virtual void handleTakeItemEntity(shared_ptr<TakeItemEntityPacket> packet); - virtual void handleChat(shared_ptr<ChatPacket> packet); - virtual void handleAnimate(shared_ptr<AnimatePacket> packet); - virtual void handleEntityActionAtPosition(shared_ptr<EntityActionAtPositionPacket> packet); - virtual void handlePreLogin(shared_ptr<PreLoginPacket> packet); + void sendAndDisconnect(std::shared_ptr<Packet> packet); + void send(std::shared_ptr<Packet> packet); + virtual void handleTakeItemEntity(std::shared_ptr<TakeItemEntityPacket> packet); + virtual void handleChat(std::shared_ptr<ChatPacket> packet); + virtual void handleAnimate(std::shared_ptr<AnimatePacket> packet); + virtual void handleEntityActionAtPosition(std::shared_ptr<EntityActionAtPositionPacket> packet); + virtual void handlePreLogin(std::shared_ptr<PreLoginPacket> packet); void close(); - virtual void handleAddMob(shared_ptr<AddMobPacket> packet); - virtual void handleSetTime(shared_ptr<SetTimePacket> packet); - virtual void handleSetSpawn(shared_ptr<SetSpawnPositionPacket> packet); - virtual void handleRidePacket(shared_ptr<SetRidingPacket> packet); - virtual void handleEntityEvent(shared_ptr<EntityEventPacket> packet); + virtual void handleAddMob(std::shared_ptr<AddMobPacket> packet); + virtual void handleSetTime(std::shared_ptr<SetTimePacket> packet); + virtual void handleSetSpawn(std::shared_ptr<SetSpawnPositionPacket> packet); + virtual void handleRidePacket(std::shared_ptr<SetRidingPacket> packet); + virtual void handleEntityEvent(std::shared_ptr<EntityEventPacket> packet); private: - shared_ptr<Entity> getEntity(int entityId); + std::shared_ptr<Entity> getEntity(int entityId); wstring GetDisplayNameByGamertag(wstring gamertag); public: - virtual void handleSetHealth(shared_ptr<SetHealthPacket> packet); - virtual void handleSetExperience(shared_ptr<SetExperiencePacket> packet); - virtual void handleRespawn(shared_ptr<RespawnPacket> packet); - virtual void handleExplosion(shared_ptr<ExplodePacket> packet); - virtual void handleContainerOpen(shared_ptr<ContainerOpenPacket> packet); - virtual void handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> packet); - virtual void handleContainerAck(shared_ptr<ContainerAckPacket> packet); - virtual void handleContainerContent(shared_ptr<ContainerSetContentPacket> packet); - virtual void handleSignUpdate(shared_ptr<SignUpdatePacket> packet); - virtual void handleTileEntityData(shared_ptr<TileEntityDataPacket> packet); - virtual void handleContainerSetData(shared_ptr<ContainerSetDataPacket> packet); - virtual void handleSetEquippedItem(shared_ptr<SetEquippedItemPacket> packet); - virtual void handleContainerClose(shared_ptr<ContainerClosePacket> packet); - virtual void handleTileEvent(shared_ptr<TileEventPacket> packet); - virtual void handleTileDestruction(shared_ptr<TileDestructionPacket> packet); + virtual void handleSetHealth(std::shared_ptr<SetHealthPacket> packet); + virtual void handleSetExperience(std::shared_ptr<SetExperiencePacket> packet); + virtual void handleRespawn(std::shared_ptr<RespawnPacket> packet); + virtual void handleExplosion(std::shared_ptr<ExplodePacket> packet); + virtual void handleContainerOpen(std::shared_ptr<ContainerOpenPacket> packet); + virtual void handleContainerSetSlot(std::shared_ptr<ContainerSetSlotPacket> packet); + virtual void handleContainerAck(std::shared_ptr<ContainerAckPacket> packet); + virtual void handleContainerContent(std::shared_ptr<ContainerSetContentPacket> packet); + virtual void handleSignUpdate(std::shared_ptr<SignUpdatePacket> packet); + virtual void handleTileEntityData(std::shared_ptr<TileEntityDataPacket> packet); + virtual void handleContainerSetData(std::shared_ptr<ContainerSetDataPacket> packet); + virtual void handleSetEquippedItem(std::shared_ptr<SetEquippedItemPacket> packet); + virtual void handleContainerClose(std::shared_ptr<ContainerClosePacket> packet); + virtual void handleTileEvent(std::shared_ptr<TileEventPacket> packet); + virtual void handleTileDestruction(std::shared_ptr<TileDestructionPacket> packet); virtual bool canHandleAsyncPackets(); - virtual void handleGameEvent(shared_ptr<GameEventPacket> gameEventPacket); - virtual void handleComplexItemData(shared_ptr<ComplexItemDataPacket> packet); - virtual void handleLevelEvent(shared_ptr<LevelEventPacket> packet); - virtual void handleAwardStat(shared_ptr<AwardStatPacket> packet); - virtual void handleUpdateMobEffect(shared_ptr<UpdateMobEffectPacket> packet); - virtual void handleRemoveMobEffect(shared_ptr<RemoveMobEffectPacket> packet); + virtual void handleGameEvent(std::shared_ptr<GameEventPacket> gameEventPacket); + virtual void handleComplexItemData(std::shared_ptr<ComplexItemDataPacket> packet); + virtual void handleLevelEvent(std::shared_ptr<LevelEventPacket> packet); + virtual void handleAwardStat(std::shared_ptr<AwardStatPacket> packet); + virtual void handleUpdateMobEffect(std::shared_ptr<UpdateMobEffectPacket> packet); + virtual void handleRemoveMobEffect(std::shared_ptr<RemoveMobEffectPacket> packet); virtual bool isServerPacketListener(); - virtual void handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet); - virtual void handleKeepAlive(shared_ptr<KeepAlivePacket> packet); - virtual void handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket); - virtual void handleSoundEvent(shared_ptr<LevelSoundPacket> packet); - virtual void handleCustomPayload(shared_ptr<CustomPayloadPacket> customPayloadPacket); + virtual void handlePlayerInfo(std::shared_ptr<PlayerInfoPacket> packet); + virtual void handleKeepAlive(std::shared_ptr<KeepAlivePacket> packet); + virtual void handlePlayerAbilities(std::shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket); + virtual void handleSoundEvent(std::shared_ptr<LevelSoundPacket> packet); + virtual void handleCustomPayload(std::shared_ptr<CustomPayloadPacket> customPayloadPacket); virtual Connection *getConnection(); // 4J Added - virtual void handleServerSettingsChanged(shared_ptr<ServerSettingsChangedPacket> packet); - virtual void handleTexture(shared_ptr<TexturePacket> packet); - virtual void handleTextureAndGeometry(shared_ptr<TextureAndGeometryPacket> packet); - virtual void handleUpdateProgress(shared_ptr<UpdateProgressPacket> packet); + virtual void handleServerSettingsChanged(std::shared_ptr<ServerSettingsChangedPacket> packet); + virtual void handleTexture(std::shared_ptr<TexturePacket> packet); + virtual void handleTextureAndGeometry(std::shared_ptr<TextureAndGeometryPacket> packet); + virtual void handleUpdateProgress(std::shared_ptr<UpdateProgressPacket> packet); // 4J Added static int HostDisconnectReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); static int ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); - virtual void handleTextureChange(shared_ptr<TextureChangePacket> packet); - virtual void handleTextureAndGeometryChange(shared_ptr<TextureAndGeometryChangePacket> packet); - virtual void handleUpdateGameRuleProgressPacket(shared_ptr<UpdateGameRuleProgressPacket> packet); - virtual void handleXZ(shared_ptr<XZPacket> packet); + virtual void handleTextureChange(std::shared_ptr<TextureChangePacket> packet); + virtual void handleTextureAndGeometryChange(std::shared_ptr<TextureAndGeometryChangePacket> packet); + virtual void handleUpdateGameRuleProgressPacket(std::shared_ptr<UpdateGameRuleProgressPacket> packet); + virtual void handleXZ(std::shared_ptr<XZPacket> packet); - void displayPrivilegeChanges(shared_ptr<MultiplayerLocalPlayer> player, unsigned int oldPrivileges); + void displayPrivilegeChanges(std::shared_ptr<MultiplayerLocalPlayer> player, unsigned int oldPrivileges); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h b/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h index 4ec76036..607a24c6 100644 --- a/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h +++ b/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h @@ -43,7 +43,7 @@ class ConsoleSoundEngine public: ConsoleSoundEngine() : m_bIsPlayingStreamingCDMusic(false),m_bIsPlayingStreamingGameMusic(false), m_bIsPlayingEndMusic(false),m_bIsPlayingNetherMusic(false){}; - virtual void tick(shared_ptr<Mob> *players, float a) =0; + virtual void tick(std::shared_ptr<Mob> *players, float a) =0; virtual void destroy()=0; virtual void play(int iSound, float x, float y, float z, float volume, float pitch) =0; virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true) =0; diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index 43d2059d..7bf10b40 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -22,17 +22,17 @@ #ifdef __ORBIS__ #include <audioout.h> //#define __DISABLE_MILES__ // MGH disabled for now as it crashes if we call sceNpMatching2Initialize -#endif +#endif // take out Orbis until they are done -#if defined _XBOX +#if defined _XBOX SoundEngine::SoundEngine() {} void SoundEngine::init(Options *pOptions) { } -void SoundEngine::tick(shared_ptr<Mob> *players, float a) +void SoundEngine::tick(std::shared_ptr<Mob> *players, float a) { } void SoundEngine::destroy() {} @@ -95,7 +95,7 @@ char SoundEngine::m_szRedistName[]={"redist"}; #endif -F32 AILCALLBACK custom_falloff_function (HSAMPLE S, +F32 AILCALLBACK custom_falloff_function (HSAMPLE S, F32 distance, F32 rolloff_factor, F32 min_dist, @@ -124,7 +124,7 @@ char *SoundEngine::m_szStreamFileA[eStream_Max]= "menu2", "menu3", "menu4", -#endif +#endif "piano1", "piano2", "piano3", @@ -209,7 +209,7 @@ void SoundEngine::init(Options *pOptions) #endif #ifdef __ORBIS__ C4JThread::PushAffinityAllCores(); -#endif +#endif #if defined _DURANGO || defined __ORBIS__ || defined __PS3__ || defined __PSVITA__ Register_RIB(BinkADec); #endif @@ -226,8 +226,8 @@ void SoundEngine::init(Options *pOptions) int iNumberOfChannels=initAudioHardware(8); // Create a driver to render our audio - 44khz, 16 bit, -#ifdef __PS3__ - // On the Sony PS3, the driver is always opened in 48 kHz, 32-bit floating point. The only meaningful configurations are MSS_MC_STEREO, MSS_MC_51_DISCRETE, and MSS_MC_71_DISCRETE. +#ifdef __PS3__ + // On the Sony PS3, the driver is always opened in 48 kHz, 32-bit floating point. The only meaningful configurations are MSS_MC_STEREO, MSS_MC_51_DISCRETE, and MSS_MC_71_DISCRETE. m_hDriver = AIL_open_digital_driver( 48000, 16, iNumberOfChannels, AIL_OPEN_DIGITAL_USE_SPU0 ); #elif defined __PSVITA__ @@ -236,7 +236,7 @@ void SoundEngine::init(Options *pOptions) m_hDriver = AIL_open_digital_driver( 48000, 16, MSS_MC_STEREO, 0 ); - // AP - For some reason the submit thread defaults to a priority of zero (invalid). Make sure it has the highest priority to avoid audio breakup. + // AP - For some reason the submit thread defaults to a priority of zero (invalid). Make sure it has the highest priority to avoid audio breakup. SceUID threadID; AIL_platform_property( m_hDriver, PSP2_SUBMIT_THREAD, &threadID, 0, 0); S32 g_DefaultCPU = sceKernelGetThreadCpuAffinityMask(threadID); @@ -260,7 +260,7 @@ void SoundEngine::init(Options *pOptions) AIL_shutdown(); #ifdef __ORBIS__ C4JThread::PopAffinity(); -#endif +#endif return; } app.DebugPrintf("---SoundEngine::init - driver opened\n"); @@ -289,12 +289,12 @@ void SoundEngine::init(Options *pOptions) AIL_shutdown(); #ifdef __ORBIS__ C4JThread::PopAffinity(); -#endif +#endif app.DebugPrintf("---SoundEngine::init - AIL_startup_event_system failed\n"); return; } char szBankName[255]; -#if defined __PS3__ +#if defined __PS3__ if(app.GetBootedFromDiscPatch()) { char szTempSoundFilename[255]; @@ -308,7 +308,7 @@ void SoundEngine::init(Options *pOptions) { sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath ); } - + #elif defined __PSVITA__ sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath ); #elif defined __ORBIS__ @@ -329,7 +329,7 @@ void SoundEngine::init(Options *pOptions) AIL_shutdown(); #ifdef __ORBIS__ C4JThread::PopAffinity(); -#endif +#endif return; } @@ -362,7 +362,7 @@ void SoundEngine::init(Options *pOptions) #endif #ifdef __PSVITA__ - // AP - By default the mixer won't start up and nothing will process. Kick off a blank sample to force the mixer to start up. + // AP - By default the mixer won't start up and nothing will process. Kick off a blank sample to force the mixer to start up. HSAMPLE Sample = AIL_allocate_sample_handle(m_hDriver); AIL_init_sample(Sample, DIG_F_STEREO_16); static U64 silence = 0; @@ -403,7 +403,7 @@ void SoundEngine::SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int i // AP - moved to a separate function so it can be called from the mixer callback on Vita void SoundEngine::updateMiles() { -#ifdef __PSVITA__ +#ifdef __PSVITA__ //CD - We must check for Background Music [BGM] at any point //If it's playing disable our audio, otherwise enable int NoBGMPlaying = sceAudioOutGetAdopt(SCE_AUDIO_OUT_PORT_TYPE_BGM); @@ -463,7 +463,7 @@ void SoundEngine::updateMiles() { isThunder = true; } - if(game_data->volume>1) + if(game_data->volume>1) { game_data->volume=1; } @@ -477,7 +477,7 @@ void SoundEngine::updateMiles() AIL_register_falloff_function_callback(SoundInfo.Sample,&custom_falloff_function); if(game_data->bIs3D) - { + { AIL_set_sample_is_3D( SoundInfo.Sample, 1 ); int iSound = game_data->iSound - eSFX_MAX; @@ -518,7 +518,7 @@ void SoundEngine::updateMiles() } if(game_data->bIs3D) - { + { if(m_validListenerCount>1) { float fClosest=10000.0f; @@ -562,7 +562,7 @@ void SoundEngine::updateMiles() default: if(game_data->bIs3D) - { + { if(m_validListenerCount>1) { float fClosest=10000.0f; @@ -600,9 +600,9 @@ void SoundEngine::updateMiles() { AIL_set_sample_3D_position( SoundInfo.Sample, game_data->x, game_data->y, -game_data->z ); // Flipped sign of z as Miles is expecting left handed coord system } - } + } break; - } + } } } AIL_complete_event_queue_processing(); @@ -622,7 +622,7 @@ static float fVal=0.0f; static S32 running = AIL_ms_count(); #endif -void SoundEngine::tick(shared_ptr<Mob> *players, float a) +void SoundEngine::tick(std::shared_ptr<Mob> *players, float a) { #ifdef __DISABLE_MILES__ return; @@ -657,7 +657,7 @@ void SoundEngine::tick(shared_ptr<Mob> *players, float a) // store the listener positions for splitscreen m_ListenerA[i].vPosition.x = x; m_ListenerA[i].vPosition.y = y; - m_ListenerA[i].vPosition.z = z; + m_ListenerA[i].vPosition.z = z; m_ListenerA[i].vOrientFront.x = ySin; m_ListenerA[i].vOrientFront.y = 0; @@ -707,7 +707,7 @@ SoundEngine::SoundEngine() m_hStream=0; m_StreamState=eMusicStreamState_Idle; m_iMusicDelay=0; - m_validListenerCount=0; + m_validListenerCount=0; m_bHeardTrackA=NULL; @@ -763,7 +763,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa // AP removed old counting system. Now relying on Miles' Play Count Limit /* // if we are already playing loads of this sounds ignore this one - if(CurrentSoundsPlaying[iSound+eSFX_MAX]>MAX_SAME_SOUNDS_PLAYING) + if(CurrentSoundsPlaying[iSound+eSFX_MAX]>MAX_SAME_SOUNDS_PLAYING) { // wstring name = wchSoundNames[iSound]; // char *SoundName = (char *)ConvertSoundPathToName(name); @@ -810,7 +810,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa // playUI // ///////////////////////////////////////////// -void SoundEngine::playUI(int iSound, float volume, float pitch) +void SoundEngine::playUI(int iSound, float volume, float pitch) { U8 szSoundName[256]; wstring name; @@ -956,7 +956,7 @@ int SoundEngine::GetRandomishTrack(int iStart,int iEnd) int iVal=iStart; for(int i=iStart;i<=iEnd;i++) { - if(m_bHeardTrackA[i]==false) + if(m_bHeardTrackA[i]==false) { bAllTracksHeard=false; app.DebugPrintf("Not heard all tracks yet\n"); @@ -974,7 +974,7 @@ int SoundEngine::GetRandomishTrack(int iStart,int iEnd) } } - // trying to get a track we haven't heard, but not too hard + // trying to get a track we haven't heard, but not too hard for(int i=0;i<=((iEnd-iStart)/2);i++) { // random->nextInt(1) will always return 0 @@ -1111,7 +1111,7 @@ void SoundEngine::updateSystemMusicPlaying(bool isPlaying) // updateSoundEffectVolume // ///////////////////////////////////////////// -void SoundEngine::updateSoundEffectVolume(float fVal) +void SoundEngine::updateSoundEffectVolume(float fVal) { m_MasterEffectsVolume=fVal; //AIL_set_variable_float(0,"UserEffectVol",fVal); @@ -1137,7 +1137,7 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter ) // playMusicTick // ///////////////////////////////////////////// -void SoundEngine::playMusicTick() +void SoundEngine::playMusicTick() { // AP - vita will update the music during the mixer callback #ifndef __PSVITA__ @@ -1146,7 +1146,7 @@ void SoundEngine::playMusicTick() } // AP - moved to a separate function so it can be called from the mixer callback on Vita -void SoundEngine::playMusicUpdate() +void SoundEngine::playMusicUpdate() { //return; static bool firstCall = true; @@ -1179,7 +1179,7 @@ void SoundEngine::playMusicUpdate() // 4J-PB - Need to check if we are a patched BD build if(app.GetBootedFromDiscPatch()) { - sprintf(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szMusicPath), m_szMusicPath ); + sprintf(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szMusicPath), m_szMusicPath ); app.DebugPrintf("SoundEngine::playMusicUpdate - (booted from disc patch) music path - %s",m_szStreamName); } else @@ -1214,7 +1214,7 @@ void SoundEngine::playMusicUpdate() SetIsPlayingStreamingCDMusic(false); m_MusicType=eMusicType_Game; m_StreamingAudioInfo.bIs3D=false; - + #ifdef _XBOX_ONE wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID); wstring wstrFile=L"TPACK:\\Data\\" + wstrSoundName +L".binka"; @@ -1244,7 +1244,7 @@ void SoundEngine::playMusicUpdate() } } else - { + { // 4J-PB - if this is a PS3 disc patch, we have to check if the music file is in the patch data #ifdef __PS3__ if(app.GetBootedFromDiscPatch() && (m_musicID<m_iStream_CD_1)) @@ -1256,7 +1256,7 @@ void SoundEngine::playMusicUpdate() strcat((char *)m_szStreamName,".binka"); // check if this is in the patch data - sprintf(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szStreamName), m_szMusicPath ); + sprintf(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szStreamName), m_szMusicPath ); strcat((char *)m_szStreamName,"music/"); strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID]); strcat((char *)m_szStreamName,".binka"); @@ -1289,7 +1289,7 @@ void SoundEngine::playMusicUpdate() strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID]); strcat((char *)m_szStreamName,".binka"); } -#else +#else if(m_musicID<m_iStream_CD_1) { SetIsPlayingStreamingGameMusic(true); @@ -1310,7 +1310,7 @@ void SoundEngine::playMusicUpdate() } strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID]); strcat((char *)m_szStreamName,".binka"); - + #endif } @@ -1321,7 +1321,7 @@ void SoundEngine::playMusicUpdate() app.DebugPrintf("Starting streaming - %s\n",m_szStreamName); - // Don't actually open in this thread, as it can block for ~300ms. + // Don't actually open in this thread, as it can block for ~300ms. m_openStreamThread = new C4JThread(OpenStreamThreadProc, this, "OpenStreamThreadProc"); m_openStreamThread->Run(); m_StreamState = eMusicStreamState_Opening; @@ -1335,7 +1335,7 @@ void SoundEngine::playMusicUpdate() delete m_openStreamThread; m_openStreamThread = NULL; - HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); + HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); // 4J-PB - causes the falloff to be calculated on the PPU instead of the SPU, and seems to resolve our distorted sound issue AIL_register_falloff_function_callback(hSample,&custom_falloff_function); @@ -1383,12 +1383,12 @@ void SoundEngine::playMusicUpdate() else { // clear the 3d flag on the stream after a jukebox finishes and streaming music starts - AIL_set_sample_is_3D( hSample, 0 ); + AIL_set_sample_is_3D( hSample, 0 ); } // set the pitch app.DebugPrintf("Sample rate:%d\n", AIL_sample_playback_rate(hSample)); AIL_set_sample_playback_rate_factor(hSample,m_StreamingAudioInfo.pitch); - // set the volume + // set the volume AIL_set_sample_volume_levels( hSample, m_StreamingAudioInfo.volume*getMasterMusicVolume(), m_StreamingAudioInfo.volume*getMasterMusicVolume()); AIL_start_stream( m_hStream ); @@ -1447,7 +1447,7 @@ void SoundEngine::playMusicUpdate() // Set the end track m_musicID = getMusicID(LevelData::DIMENSION_END); SetIsPlayingEndMusic(true); - SetIsPlayingNetherMusic(false); + SetIsPlayingNetherMusic(false); } else if(!playerInEnd && GetIsPlayingEndMusic()) { @@ -1458,7 +1458,7 @@ void SoundEngine::playMusicUpdate() // Set the end track m_musicID = getMusicID(LevelData::DIMENSION_NETHER); SetIsPlayingEndMusic(false); - SetIsPlayingNetherMusic(true); + SetIsPlayingNetherMusic(true); } else { @@ -1467,7 +1467,7 @@ void SoundEngine::playMusicUpdate() // Set the end track m_musicID = getMusicID(LevelData::DIMENSION_OVERWORLD); SetIsPlayingEndMusic(false); - SetIsPlayingNetherMusic(false); + SetIsPlayingNetherMusic(false); } } else if (playerInNether && !GetIsPlayingNetherMusic()) @@ -1502,7 +1502,7 @@ void SoundEngine::playMusicUpdate() if(fMusicVol!=getMasterMusicVolume()) { fMusicVol=getMasterMusicVolume(); - HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); + HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); //AIL_set_sample_3D_position( hSample, m_StreamingAudioInfo.x, m_StreamingAudioInfo.y, m_StreamingAudioInfo.z ); AIL_set_sample_volume_levels( hSample, fMusicVol, fMusicVol); } @@ -1545,7 +1545,7 @@ void SoundEngine::playMusicUpdate() } // our distances in the world aren't very big, so floats rather than casts to doubles should be fine - HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); + HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); fDist=sqrtf((fClosestX*fClosestX)+(fClosestY*fClosestY)+(fClosestZ*fClosestZ)); AIL_set_sample_3D_position( hSample, 0, 0, fDist ); } @@ -1555,7 +1555,7 @@ void SoundEngine::playMusicUpdate() break; case eMusicStreamState_Completed: - { + { // random delay of up to 3 minutes for music m_iMusicDelay = random->nextInt(20 * 60 * 3);//random->nextInt(20 * 60 * 10) + 20 * 60 * 10; // Check if we have a local player in The Nether or in The End, and play that music if they are @@ -1644,7 +1644,7 @@ char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpac #endif -F32 AILCALLBACK custom_falloff_function (HSAMPLE S, +F32 AILCALLBACK custom_falloff_function (HSAMPLE S, F32 distance, F32 rolloff_factor, F32 min_dist, diff --git a/Minecraft.Client/Common/Audio/SoundEngine.h b/Minecraft.Client/Common/Audio/SoundEngine.h index 92c99d23..8dc50e7c 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.h +++ b/Minecraft.Client/Common/Audio/SoundEngine.h @@ -78,8 +78,8 @@ typedef struct { F32 x,y,z,volume,pitch; int iSound; - bool bIs3D; - bool bUseSoundsPitchVal; + bool bIs3D; + bool bUseSoundsPitchVal; #ifdef _DEBUG char chName[64]; #endif @@ -103,7 +103,7 @@ public: virtual void updateSystemMusicPlaying(bool isPlaying); virtual void updateSoundEffectVolume(float fVal); virtual void init(Options *); - virtual void tick(shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one + virtual void tick(std::shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one virtual void add(const wstring& name, File *file); virtual void addMusic(const wstring& name, File *file); virtual void addStreaming(const wstring& name, File *file); @@ -123,7 +123,7 @@ private: #else int initAudioHardware(int iMinSpeakers) { return iMinSpeakers;} #endif - + int GetRandomishTrack(int iStart,int iEnd); HMSOUNDBANK m_hBank; @@ -165,4 +165,4 @@ private: #ifdef __ORBIS__ int32_t m_hBGMAudio; #endif -}; +}; diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 0e55ec9f..a1cb78d8 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -365,7 +365,7 @@ void CMinecraftApp::HandleButtonPresses(int iPad) // ProfileManager.WriteToProfile(iPad,true); } -bool CMinecraftApp::LoadInventoryMenu(int iPad,shared_ptr<LocalPlayer> player,bool bNavigateBack) +bool CMinecraftApp::LoadInventoryMenu(int iPad,std::shared_ptr<LocalPlayer> player,bool bNavigateBack) { bool success = true; @@ -388,7 +388,7 @@ bool CMinecraftApp::LoadInventoryMenu(int iPad,shared_ptr<LocalPlayer> player,bo return success; } -bool CMinecraftApp::LoadCreativeMenu(int iPad,shared_ptr<LocalPlayer> player,bool bNavigateBack) +bool CMinecraftApp::LoadCreativeMenu(int iPad,std::shared_ptr<LocalPlayer> player,bool bNavigateBack) { bool success = true; @@ -411,7 +411,7 @@ bool CMinecraftApp::LoadCreativeMenu(int iPad,shared_ptr<LocalPlayer> player,boo return success; } -bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,shared_ptr<LocalPlayer> player) +bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,std::shared_ptr<LocalPlayer> player) { bool success = true; @@ -437,7 +437,7 @@ bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,shared_ptr<LocalPlayer> player) return success; } -bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr<LocalPlayer> player, int x, int y, int z) +bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,std::shared_ptr<LocalPlayer> player, int x, int y, int z) { bool success = true; @@ -463,7 +463,7 @@ bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr<LocalPlayer> player, return success; } -bool CMinecraftApp::LoadEnchantingMenu(int iPad,shared_ptr<Inventory> inventory, int x, int y, int z, Level *level) +bool CMinecraftApp::LoadEnchantingMenu(int iPad,std::shared_ptr<Inventory> inventory, int x, int y, int z, Level *level) { bool success = true; @@ -489,7 +489,7 @@ bool CMinecraftApp::LoadEnchantingMenu(int iPad,shared_ptr<Inventory> inventory, return success; } -bool CMinecraftApp::LoadFurnaceMenu(int iPad,shared_ptr<Inventory> inventory, shared_ptr<FurnaceTileEntity> furnace) +bool CMinecraftApp::LoadFurnaceMenu(int iPad,std::shared_ptr<Inventory> inventory, std::shared_ptr<FurnaceTileEntity> furnace) { bool success = true; @@ -514,7 +514,7 @@ bool CMinecraftApp::LoadFurnaceMenu(int iPad,shared_ptr<Inventory> inventory, sh return success; } -bool CMinecraftApp::LoadBrewingStandMenu(int iPad,shared_ptr<Inventory> inventory, shared_ptr<BrewingStandTileEntity> brewingStand) +bool CMinecraftApp::LoadBrewingStandMenu(int iPad,std::shared_ptr<Inventory> inventory, std::shared_ptr<BrewingStandTileEntity> brewingStand) { bool success = true; @@ -540,7 +540,7 @@ bool CMinecraftApp::LoadBrewingStandMenu(int iPad,shared_ptr<Inventory> inventor } -bool CMinecraftApp::LoadContainerMenu(int iPad,shared_ptr<Container> inventory, shared_ptr<Container> container) +bool CMinecraftApp::LoadContainerMenu(int iPad,std::shared_ptr<Container> inventory, std::shared_ptr<Container> container) { bool success = true; @@ -574,7 +574,7 @@ bool CMinecraftApp::LoadContainerMenu(int iPad,shared_ptr<Container> inventory, return success; } -bool CMinecraftApp::LoadTrapMenu(int iPad,shared_ptr<Container> inventory, shared_ptr<DispenserTileEntity> trap) +bool CMinecraftApp::LoadTrapMenu(int iPad,std::shared_ptr<Container> inventory, std::shared_ptr<DispenserTileEntity> trap) { bool success = true; @@ -599,7 +599,7 @@ bool CMinecraftApp::LoadTrapMenu(int iPad,shared_ptr<Container> inventory, share return success; } -bool CMinecraftApp::LoadSignEntryMenu(int iPad,shared_ptr<SignTileEntity> sign) +bool CMinecraftApp::LoadSignEntryMenu(int iPad,std::shared_ptr<SignTileEntity> sign) { bool success = true; @@ -615,7 +615,7 @@ bool CMinecraftApp::LoadSignEntryMenu(int iPad,shared_ptr<SignTileEntity> sign) return success; } -bool CMinecraftApp::LoadRepairingMenu(int iPad,shared_ptr<Inventory> inventory, Level *level, int x, int y, int z) +bool CMinecraftApp::LoadRepairingMenu(int iPad,std::shared_ptr<Inventory> inventory, Level *level, int x, int y, int z) { bool success = true; @@ -634,7 +634,7 @@ bool CMinecraftApp::LoadRepairingMenu(int iPad,shared_ptr<Inventory> inventory, return success; } -bool CMinecraftApp::LoadTradingMenu(int iPad, shared_ptr<Inventory> inventory, shared_ptr<Merchant> trader, Level *level) +bool CMinecraftApp::LoadTradingMenu(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<Merchant> trader, Level *level) { bool success = true; @@ -1272,7 +1272,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal) PlayerList *players = MinecraftServer::getInstance()->getPlayerList(); for(AUTO_VAR(it3, players->players.begin()); it3 != players->players.end(); ++it3) { - shared_ptr<ServerPlayer> decorationPlayer = *it3; + std::shared_ptr<ServerPlayer> decorationPlayer = *it3; decorationPlayer->setShowOnMaps((app.GetGameHostOption(eGameHostOption_Gamertags)!=0)?true:false); } } @@ -2240,7 +2240,7 @@ unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlay } if(iPad < 0) iPad = 0; - shared_ptr<Player> player = Minecraft::GetInstance()->localplayers[iPad]; + std::shared_ptr<Player> player = Minecraft::GetInstance()->localplayers[iPad]; if(bOverridePlayer || player==NULL) { @@ -2260,7 +2260,7 @@ void CMinecraftApp::SetGameSettingsDebugMask(int iPad, unsigned int uiVal) GameSettingsA[iPad]->uiDebugBitmask=uiVal; // update the value so the network server can use it - shared_ptr<Player> player = Minecraft::GetInstance()->localplayers[iPad]; + std::shared_ptr<Player> player = Minecraft::GetInstance()->localplayers[iPad]; if(player) { @@ -2427,7 +2427,7 @@ void CMinecraftApp::HandleXuiActions(void) eTMSAction eTMS; LPVOID param; Minecraft *pMinecraft=Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player; + std::shared_ptr<MultiplayerLocalPlayer> player; // are there any global actions to deal with? eAction = app.GetGlobalXuiAction(); diff --git a/Minecraft.Client/Common/Consoles_App.h b/Minecraft.Client/Common/Consoles_App.h index 68f4ccd4..fd517d73 100644 --- a/Minecraft.Client/Common/Consoles_App.h +++ b/Minecraft.Client/Common/Consoles_App.h @@ -125,18 +125,18 @@ public: bool GetGameStarted() {return m_bGameStarted;} void SetGameStarted(bool bVal) { if(bVal) DebugPrintf("SetGameStarted - true\n"); else DebugPrintf("SetGameStarted - false\n"); m_bGameStarted = bVal; m_bIsAppPaused = !bVal;} int GetLocalPlayerCount(void); - bool LoadInventoryMenu(int iPad,shared_ptr<LocalPlayer> player, bool bNavigateBack=false); - bool LoadCreativeMenu(int iPad,shared_ptr<LocalPlayer> player,bool bNavigateBack=false); - bool LoadEnchantingMenu(int iPad,shared_ptr<Inventory> inventory, int x, int y, int z, Level *level); - bool LoadFurnaceMenu(int iPad,shared_ptr<Inventory> inventory, shared_ptr<FurnaceTileEntity> furnace); - bool LoadBrewingStandMenu(int iPad,shared_ptr<Inventory> inventory, shared_ptr<BrewingStandTileEntity> brewingStand); - bool LoadContainerMenu(int iPad,shared_ptr<Container> inventory, shared_ptr<Container> container); - bool LoadTrapMenu(int iPad,shared_ptr<Container> inventory, shared_ptr<DispenserTileEntity> trap); - bool LoadCrafting2x2Menu(int iPad,shared_ptr<LocalPlayer> player); - bool LoadCrafting3x3Menu(int iPad,shared_ptr<LocalPlayer> player, int x, int y, int z); - bool LoadSignEntryMenu(int iPad,shared_ptr<SignTileEntity> sign); - bool LoadRepairingMenu(int iPad,shared_ptr<Inventory> inventory, Level *level, int x, int y, int z); - bool LoadTradingMenu(int iPad, shared_ptr<Inventory> inventory, shared_ptr<Merchant> trader, Level *level); + bool LoadInventoryMenu(int iPad,std::shared_ptr<LocalPlayer> player, bool bNavigateBack=false); + bool LoadCreativeMenu(int iPad,std::shared_ptr<LocalPlayer> player,bool bNavigateBack=false); + bool LoadEnchantingMenu(int iPad,std::shared_ptr<Inventory> inventory, int x, int y, int z, Level *level); + bool LoadFurnaceMenu(int iPad,std::shared_ptr<Inventory> inventory, std::shared_ptr<FurnaceTileEntity> furnace); + bool LoadBrewingStandMenu(int iPad,std::shared_ptr<Inventory> inventory, std::shared_ptr<BrewingStandTileEntity> brewingStand); + bool LoadContainerMenu(int iPad,std::shared_ptr<Container> inventory, std::shared_ptr<Container> container); + bool LoadTrapMenu(int iPad,std::shared_ptr<Container> inventory, std::shared_ptr<DispenserTileEntity> trap); + bool LoadCrafting2x2Menu(int iPad,std::shared_ptr<LocalPlayer> player); + bool LoadCrafting3x3Menu(int iPad,std::shared_ptr<LocalPlayer> player, int x, int y, int z); + bool LoadSignEntryMenu(int iPad,std::shared_ptr<SignTileEntity> sign); + bool LoadRepairingMenu(int iPad,std::shared_ptr<Inventory> inventory, Level *level, int x, int y, int z); + bool LoadTradingMenu(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<Merchant> trader, Level *level); bool GetTutorialMode() { return m_bTutorialMode;} void SetTutorialMode(bool bSet) {m_bTutorialMode=bSet;} diff --git a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp index eabc1401..b2687619 100644 --- a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp @@ -43,14 +43,14 @@ void AddEnchantmentRuleDefinition::addAttribute(const wstring &attributeName, co } } -bool AddEnchantmentRuleDefinition::enchantItem(shared_ptr<ItemInstance> item) +bool AddEnchantmentRuleDefinition::enchantItem(std::shared_ptr<ItemInstance> item) { bool enchanted = false; if (item != NULL) { // 4J-JEV: Ripped code from enchantmenthelpers // Maybe we want to add an addEnchantment method to EnchantmentHelpers - if (item->id == Item::enchantedBook_Id) + if (item->id == Item::enchantedBook_Id) { Item::enchantedBook->addEnchantment( item, new EnchantmentInstance(m_enchantmentId, m_enchantmentLevel) ); } diff --git a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h index 3beece10..0ec2ff44 100644 --- a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h @@ -19,5 +19,5 @@ public: virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); - bool enchantItem(shared_ptr<ItemInstance> item); + bool enchantItem(std::shared_ptr<ItemInstance> item); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp index 0d14884a..6b99c59e 100644 --- a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp @@ -94,13 +94,13 @@ void AddItemRuleDefinition::addAttribute(const wstring &attributeName, const wst } } -bool AddItemRuleDefinition::addItemToContainer(shared_ptr<Container> container, int slotId) +bool AddItemRuleDefinition::addItemToContainer(std::shared_ptr<Container> container, int slotId) { bool added = false; if(Item::items[m_itemId] != NULL) { int quantity = min(m_quantity, Item::items[m_itemId]->getMaxStackSize()); - shared_ptr<ItemInstance> newItem = shared_ptr<ItemInstance>(new ItemInstance(m_itemId,quantity,m_auxValue) ); + std::shared_ptr<ItemInstance> newItem = std::shared_ptr<ItemInstance>(new ItemInstance(m_itemId,quantity,m_auxValue) ); newItem->set4JData(m_dataTag); for(AUTO_VAR(it, m_enchantments.begin()); it != m_enchantments.end(); ++it) diff --git a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h index 602f2d82..bd8c466a 100644 --- a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h @@ -26,5 +26,5 @@ public: virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); - bool addItemToContainer(shared_ptr<Container> container, int slotId); + bool addItemToContainer(std::shared_ptr<Container> container, int slotId); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp index 66abefbb..d94ce63b 100644 --- a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp @@ -74,7 +74,7 @@ void CollectItemRuleDefinition::populateGameRule(GameRulesInstance::EGameRulesIn GameRuleDefinition::populateGameRule(type, rule); } -bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item) +bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item) { bool statusChanged = false; if(item != NULL && item->id == m_itemId && item->getAuxValue() == m_auxValue && item->get4JData() == m_4JDataValue) @@ -94,7 +94,7 @@ bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemIns if(rule->getConnection() != NULL) { - rule->getConnection()->send( shared_ptr<UpdateGameRuleProgressPacket>( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId, m_itemId, m_auxValue, this->m_4JDataValue,NULL,0))); + rule->getConnection()->send( std::shared_ptr<UpdateGameRuleProgressPacket>( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId, m_itemId, m_auxValue, this->m_4JDataValue,NULL,0))); } } } @@ -102,7 +102,7 @@ bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemIns return statusChanged; } -wstring CollectItemRuleDefinition::generateXml(shared_ptr<ItemInstance> item) +wstring CollectItemRuleDefinition::generateXml(std::shared_ptr<ItemInstance> item) { // 4J Stu - This should be kept in sync with the GameRulesDefinition.xsd wstring xml = L""; diff --git a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h index 5ee6f4c5..1c6821e4 100644 --- a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h @@ -25,16 +25,16 @@ public: virtual int getGoal(); virtual int getProgress(GameRule *rule); - + virtual int getIcon() { return m_itemId; } virtual int getAuxValue() { return m_auxValue; } void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule); - bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item); + bool onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item); - static wstring generateXml(shared_ptr<ItemInstance> item); + static wstring generateXml(std::shared_ptr<ItemInstance> item); -private: +private: //static wstring generateXml(CollectItemRuleDefinition *ruleDef); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp index adaf70c8..f0362f48 100644 --- a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp @@ -17,7 +17,7 @@ bool CompleteAllRuleDefinition::onUseTile(GameRule *rule, int tileId, int x, int return statusChanged; } -bool CompleteAllRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item) +bool CompleteAllRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item) { bool statusChanged = CompoundGameRuleDefinition::onCollectItem(rule,item); if(statusChanged) updateStatus(rule); @@ -44,14 +44,14 @@ void CompleteAllRuleDefinition::updateStatus(GameRule *rule) int icon = -1; int auxValue = 0; - + if(m_lastRuleStatusChanged != NULL) - { + { icon = m_lastRuleStatusChanged->getIcon(); auxValue = m_lastRuleStatusChanged->getAuxValue(); m_lastRuleStatusChanged = NULL; } - rule->getConnection()->send( shared_ptr<UpdateGameRuleProgressPacket>( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId,icon, auxValue, 0,&data,sizeof(PacketData)))); + rule->getConnection()->send( std::shared_ptr<UpdateGameRuleProgressPacket>( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId,icon, auxValue, 0,&data,sizeof(PacketData)))); } app.DebugPrintf("Updated CompleteAllRule - Completed %d of %d\n", progress, goal); } diff --git a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h index b2cb8847..2ecbc303 100644 --- a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h @@ -17,7 +17,7 @@ public: virtual void getChildren(vector<GameRuleDefinition *> *children); virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z); - virtual bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item); + virtual bool onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item); static wstring generateDescriptionString(const wstring &description, void *data, int dataLength); diff --git a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp index 0481a54b..106302ee 100644 --- a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp @@ -40,7 +40,7 @@ GameRuleDefinition *CompoundGameRuleDefinition::addChild(ConsoleGameRules::EGame rule = new UseTileRuleDefinition(); } else if(ruleType == ConsoleGameRules::eGameRuleType_UpdatePlayerRule) - { + { rule = new UpdatePlayerRuleDefinition(); } else @@ -91,7 +91,7 @@ bool CompoundGameRuleDefinition::onUseTile(GameRule *rule, int tileId, int x, in return statusChanged; } -bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item) +bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item) { bool statusChanged = false; for(AUTO_VAR(it, rule->m_parameters.begin()); it != rule->m_parameters.end(); ++it) @@ -100,7 +100,7 @@ bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemIn { bool changed = it->second.gr->getGameRuleDefinition()->onCollectItem(it->second.gr,item); if(!statusChanged && changed) - { + { m_lastRuleStatusChanged = it->second.gr->getGameRuleDefinition(); statusChanged = true; } @@ -109,7 +109,7 @@ bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemIn return statusChanged; } -void CompoundGameRuleDefinition::postProcessPlayer(shared_ptr<Player> player) +void CompoundGameRuleDefinition::postProcessPlayer(std::shared_ptr<Player> player) { for(AUTO_VAR(it, m_children.begin()); it != m_children.end(); ++it) { diff --git a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h index bfedfd09..4b91cda8 100644 --- a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h @@ -18,6 +18,6 @@ public: virtual void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule); virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z); - virtual bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item); - virtual void postProcessPlayer(shared_ptr<Player> player); + virtual bool onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item); + virtual void postProcessPlayer(std::shared_ptr<Player> player); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp index 0eef096b..5f4bc737 100644 --- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp +++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp @@ -116,7 +116,7 @@ void ConsoleSchematicFile::load(DataInputStream *dis) for (int i = 0; i < tileEntityTags->size(); i++) { CompoundTag *teTag = tileEntityTags->get(i); - shared_ptr<TileEntity> te = TileEntity::loadStatic(teTag); + std::shared_ptr<TileEntity> te = TileEntity::loadStatic(teTag); if(te == NULL) { @@ -433,7 +433,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox, { for(AUTO_VAR(it, m_tileEntities.begin()); it != m_tileEntities.end();++it) { - shared_ptr<TileEntity> te = *it; + std::shared_ptr<TileEntity> te = *it; double targetX = te->x; double targetY = te->y + destinationBox->y0; @@ -444,7 +444,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox, Vec3 *pos = Vec3::newTemp(targetX,targetY,targetZ); if( chunkBox->containsIncludingLowerBound(pos) ) { - shared_ptr<TileEntity> teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 ); + std::shared_ptr<TileEntity> teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 ); if ( teCopy != NULL ) { @@ -495,11 +495,11 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox, } CompoundTag *eTag = it->second; - shared_ptr<Entity> e = EntityIO::loadStatic(eTag, NULL); + std::shared_ptr<Entity> e = EntityIO::loadStatic(eTag, NULL); if( e->GetType() == eTYPE_PAINTING ) { - shared_ptr<Painting> painting = dynamic_pointer_cast<Painting>(e); + std::shared_ptr<Painting> painting = dynamic_pointer_cast<Painting>(e); double tileX = painting->xTile; double tileZ = painting->zTile; @@ -512,7 +512,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox, } else if( e->GetType() == eTYPE_ITEM_FRAME ) { - shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e); + std::shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e); double tileX = frame->xTile; double tileZ = frame->zTile; @@ -678,12 +678,12 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l { for (int zc = zc0; zc <= zc1; zc++) { - vector<shared_ptr<TileEntity> > *tileEntities = getTileEntitiesInRegion(level->getChunk(xc, zc), xStart, yStart, zStart, xStart + xSize, yStart + ySize, zStart + zSize); + vector<std::shared_ptr<TileEntity> > *tileEntities = getTileEntitiesInRegion(level->getChunk(xc, zc), xStart, yStart, zStart, xStart + xSize, yStart + ySize, zStart + zSize); for(AUTO_VAR(it, tileEntities->begin()); it != tileEntities->end(); ++it) { - shared_ptr<TileEntity> te = *it; + std::shared_ptr<TileEntity> te = *it; CompoundTag *teTag = new CompoundTag(); - shared_ptr<TileEntity> teCopy = te->clone(); + std::shared_ptr<TileEntity> teCopy = te->clone(); // Adjust the tileEntity position to schematic coords from world co-ords teCopy->x -= xStart; @@ -698,12 +698,12 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l tag.put(L"TileEntities", tileEntitiesTag); AABB *bb = AABB::newTemp(xStart,yStart,zStart,xEnd,yEnd,zEnd); - vector<shared_ptr<Entity> > *entities = level->getEntities(nullptr, bb); + vector<std::shared_ptr<Entity> > *entities = level->getEntities(nullptr, bb); ListTag<CompoundTag> *entitiesTag = new ListTag<CompoundTag>(L"entities"); for(AUTO_VAR(it, entities->begin()); it != entities->end(); ++it) { - shared_ptr<Entity> e = *it; + std::shared_ptr<Entity> e = *it; bool mobCanBeSaved = false; if(bSaveMobs) @@ -1005,12 +1005,12 @@ void ConsoleSchematicFile::setBlocksAndData(LevelChunk *chunk, byteArray blockDa } } -vector<shared_ptr<TileEntity> > *ConsoleSchematicFile::getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1) +vector<std::shared_ptr<TileEntity> > *ConsoleSchematicFile::getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1) { - vector<shared_ptr<TileEntity> > *result = new vector<shared_ptr<TileEntity> >; + vector<std::shared_ptr<TileEntity> > *result = new vector<std::shared_ptr<TileEntity> >; for (AUTO_VAR(it, chunk->tileEntities.begin()); it != chunk->tileEntities.end(); ++it) { - shared_ptr<TileEntity> te = it->second; + std::shared_ptr<TileEntity> te = it->second; if (te->x >= x0 && te->y >= y0 && te->z >= z0 && te->x < x1 && te->y < y1 && te->z < z1) { result->push_back(te); diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h index b0eebf9e..299f81d4 100644 --- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h +++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h @@ -55,7 +55,7 @@ public: } XboxSchematicInitParam; private: int m_xSize, m_ySize, m_zSize; - vector<shared_ptr<TileEntity> > m_tileEntities; + vector<std::shared_ptr<TileEntity> > m_tileEntities; vector< pair<Vec3 *, CompoundTag *> > m_entities; public: @@ -83,7 +83,7 @@ private: void load_tags(DataInputStream *dis); static void getBlocksAndData(LevelChunk *chunk, byteArray *data, int x0, int y0, int z0, int x1, int y1, int z1, int &blocksP, int &dataP, int &blockLightP, int &skyLightP); - static vector<shared_ptr<TileEntity> > *getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1); + static vector<std::shared_ptr<TileEntity> > *getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1); void chunkCoordToSchematicCoord(AABB *destinationBox, int chunkX, int chunkZ, ESchematicRotation rot, int &schematicX, int &schematicZ); void schematicCoordToChunkCoord(AABB *destinationBox, double schematicX, double schematicZ, ESchematicRotation rot, double &chunkX, double &chunkZ); diff --git a/Minecraft.Client/Common/GameRules/GameRule.cpp b/Minecraft.Client/Common/GameRules/GameRule.cpp index 34d6196c..310d6d65 100644 --- a/Minecraft.Client/Common/GameRules/GameRule.cpp +++ b/Minecraft.Client/Common/GameRules/GameRule.cpp @@ -53,7 +53,7 @@ GameRuleDefinition *GameRule::getGameRuleDefinition() } void GameRule::onUseTile(int tileId, int x, int y, int z) { m_definition->onUseTile(this,tileId,x,y,z); } -void GameRule::onCollectItem(shared_ptr<ItemInstance> item) { m_definition->onCollectItem(this,item); } +void GameRule::onCollectItem(std::shared_ptr<ItemInstance> item) { m_definition->onCollectItem(this,item); } void GameRule::write(DataOutputStream *dos) { @@ -63,7 +63,7 @@ void GameRule::write(DataOutputStream *dos) { wstring pName = (*it).first; ValueType vType = (*it).second; - + dos->writeUTF( (*it).first ); dos->writeBoolean( vType.isPointer ); @@ -80,7 +80,7 @@ void GameRule::read(DataInputStream *dis) for (int i = 0; i < savedParams; i++) { wstring pNames = dis->readUTF(); - + ValueType vType = getParameter(pNames); if (dis->readBoolean()) diff --git a/Minecraft.Client/Common/GameRules/GameRule.h b/Minecraft.Client/Common/GameRules/GameRule.h index 3b9dba7e..c2b6c826 100644 --- a/Minecraft.Client/Common/GameRules/GameRule.h +++ b/Minecraft.Client/Common/GameRules/GameRule.h @@ -51,7 +51,7 @@ public: // All the hooks go here void onUseTile(int tileId, int x, int y, int z); - void onCollectItem(shared_ptr<ItemInstance> item); + void onCollectItem(std::shared_ptr<ItemInstance> item); // 4J-JEV: For saving. //CompoundTag *toTags(unordered_map<GameRuleDefinition *, int> *map); diff --git a/Minecraft.Client/Common/GameRules/GameRuleDefinition.h b/Minecraft.Client/Common/GameRules/GameRuleDefinition.h index afec8fbc..ea7647bf 100644 --- a/Minecraft.Client/Common/GameRules/GameRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/GameRuleDefinition.h @@ -39,7 +39,7 @@ public: virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); - + virtual void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule); bool getComplete(GameRule *rule); @@ -53,8 +53,8 @@ public: // Here we should have functions for all the hooks, with a GameRule* as the first parameter virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z) { return false; } - virtual bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item) { return false; } - virtual void postProcessPlayer(shared_ptr<Player> player) { } + virtual bool onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item) { return false; } + virtual void postProcessPlayer(std::shared_ptr<Player> player) { } vector<GameRuleDefinition *> *enumerate(); unordered_map<GameRuleDefinition *, int> *enumerateMap(); diff --git a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp index 6e55cd45..7ef8e577 100644 --- a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp @@ -11,7 +11,7 @@ UpdatePlayerRuleDefinition::UpdatePlayerRuleDefinition() { m_bUpdateHealth = m_bUpdateFood = m_bUpdateYRot = false;; m_health = 0; - m_food = 0; + m_food = 0; m_spawnPos = NULL; m_yRot = 0.0f; } @@ -130,7 +130,7 @@ void UpdatePlayerRuleDefinition::addAttribute(const wstring &attributeName, cons } } -void UpdatePlayerRuleDefinition::postProcessPlayer(shared_ptr<Player> player) +void UpdatePlayerRuleDefinition::postProcessPlayer(std::shared_ptr<Player> player) { if(m_bUpdateHealth) { diff --git a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h index 538aefa1..f02ba848 100644 --- a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h @@ -13,7 +13,7 @@ private: bool m_bUpdateHealth, m_bUpdateFood, m_bUpdateYRot, m_bUpdateInventory; int m_health; - int m_food; + int m_food; Pos *m_spawnPos; float m_yRot; @@ -22,12 +22,12 @@ public: ~UpdatePlayerRuleDefinition(); virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_UpdatePlayerRule; } - + virtual void getChildren(vector<GameRuleDefinition *> *children); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual void writeAttributes(DataOutputStream *dos, UINT numAttributes); virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); - virtual void postProcessPlayer(shared_ptr<Player> player); + virtual void postProcessPlayer(std::shared_ptr<Player> player); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp index 8184f45b..25b7f6ab 100644 --- a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp +++ b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp @@ -22,7 +22,7 @@ XboxStructureActionPlaceContainer::~XboxStructureActionPlaceContainer() // 4J-JEV: Super class handles attr-facing fine. //void XboxStructureActionPlaceContainer::writeAttributes(DataOutputStream *dos, UINT numAttrs) - + void XboxStructureActionPlaceContainer::getChildren(vector<GameRuleDefinition *> *children) { @@ -78,8 +78,8 @@ bool XboxStructureActionPlaceContainer::placeContainerInLevel(StructurePiece *st } level->setTile( worldX, worldY, worldZ, m_tile ); - shared_ptr<Container> container = dynamic_pointer_cast<Container>(level->getTileEntity( worldX, worldY, worldZ )); - + std::shared_ptr<Container> container = dynamic_pointer_cast<Container>(level->getTileEntity( worldX, worldY, worldZ )); + app.DebugPrintf("XboxStructureActionPlaceContainer - placing a container at (%d,%d,%d)\n", worldX, worldY, worldZ); if ( container != NULL ) { diff --git a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp index 1eca3342..fcb8a018 100644 --- a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp +++ b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp @@ -54,7 +54,7 @@ bool XboxStructureActionPlaceSpawner::placeSpawnerInLevel(StructurePiece *struct } level->setTile( worldX, worldY, worldZ, m_tile ); - shared_ptr<MobSpawnerTileEntity> entity = dynamic_pointer_cast<MobSpawnerTileEntity>(level->getTileEntity( worldX, worldY, worldZ )); + std::shared_ptr<MobSpawnerTileEntity> entity = dynamic_pointer_cast<MobSpawnerTileEntity>(level->getTileEntity( worldX, worldY, worldZ )); #ifndef _CONTENT_PACKAGE wprintf(L"XboxStructureActionPlaceSpawner - placing a %ls spawner at (%d,%d,%d)\n", m_entityId.c_str(), worldX, worldY, worldZ); diff --git a/Minecraft.Client/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Common/Network/GameNetworkManager.cpp index 5fd72e40..f52bd4e7 100644 --- a/Minecraft.Client/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Common/Network/GameNetworkManager.cpp @@ -316,7 +316,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame return false; } - connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(minecraft->user->name) ) ); + connection->send( std::shared_ptr<PreLoginPacket>( new PreLoginPacket(minecraft->user->name) ) ); // Tick connection until we're ready to go. The stages involved in this are: // (1) Creating the ClientConnection sends a prelogin packet to the server @@ -403,7 +403,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame // Open the socket on the server end to accept incoming data Socket::addIncomingSocket(socket); - connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(convStringToWstring( ProfileManager.GetGamertag(idx) )) ) ); + connection->send( std::shared_ptr<PreLoginPacket>( new PreLoginPacket(convStringToWstring( ProfileManager.GetGamertag(idx) )) ) ); createdConnections.push_back( connection ); @@ -1134,7 +1134,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam ) PlayerList *players = pServer->getPlayers(); for(AUTO_VAR(it, players->players.begin()); it < players->players.end(); ++it) { - shared_ptr<ServerPlayer> servPlayer = *it; + std::shared_ptr<ServerPlayer> servPlayer = *it; if( servPlayer->connection->isLocal() && !servPlayer->connection->isGuest() ) { servPlayer->connection->connection->getSocket()->setPlayer(NULL); @@ -1202,7 +1202,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam ) PlayerList *players = pServer->getPlayers(); for(AUTO_VAR(it, players->players.begin()); it < players->players.end(); ++it) { - shared_ptr<ServerPlayer> servPlayer = *it; + std::shared_ptr<ServerPlayer> servPlayer = *it; if( servPlayer->getXuid() == localPlayerXuid ) { servPlayer->connection->connection->getSocket()->setPlayer( g_NetworkManager.GetLocalPlayerByUserIndex(index) ); @@ -1391,7 +1391,7 @@ void CGameNetworkManager::CreateSocket( INetworkPlayer *pNetworkPlayer, bool loc Minecraft *pMinecraft = Minecraft::GetInstance(); Socket *socket = NULL; - shared_ptr<MultiplayerLocalPlayer> mpPlayer = pMinecraft->localplayers[pNetworkPlayer->GetUserIndex()]; + std::shared_ptr<MultiplayerLocalPlayer> mpPlayer = pMinecraft->localplayers[pNetworkPlayer->GetUserIndex()]; if( localPlayer && mpPlayer != NULL && mpPlayer->connection != NULL) { // If we already have a MultiplayerLocalPlayer here then we are doing a session type change @@ -1428,7 +1428,7 @@ void CGameNetworkManager::CreateSocket( INetworkPlayer *pNetworkPlayer, bool loc if( connection->createdOk ) { - connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket( pNetworkPlayer->GetOnlineName() ) ) ); + connection->send( std::shared_ptr<PreLoginPacket>( new PreLoginPacket( pNetworkPlayer->GetOnlineName() ) ) ); pMinecraft->addPendingLocalConnection(idx, connection); } else diff --git a/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp b/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp index f01db84e..f495cca0 100644 --- a/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp +++ b/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp @@ -24,7 +24,7 @@ ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_Stat m_tutorial = tutorial; m_targetState = targetState; m_sourceStatesCount = sourceStatesCount; - + m_bHasChanged = false; m_changedFromState = e_Tutorial_State_None; @@ -59,11 +59,11 @@ void ChangeStateConstraint::tick(int iPad) if(originalPrivileges != playerPrivs) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } @@ -100,11 +100,11 @@ void ChangeStateConstraint::tick(int iPad) if(originalPrivileges != playerPrivs) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } @@ -124,11 +124,11 @@ void ChangeStateConstraint::tick(int iPad) if(originalPrivileges != playerPrivs) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } diff --git a/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp b/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp index 43b2f7f3..fbd6ddf3 100644 --- a/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp +++ b/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp @@ -4,7 +4,7 @@ CompleteUsingItemTask::CompleteUsingItemTask(Tutorial *tutorial, int descriptionId, int itemIds[], unsigned int itemIdsLength, bool enablePreCompletion) : TutorialTask( tutorial, descriptionId, enablePreCompletion, NULL) -{ +{ m_iValidItemsA= new int [itemIdsLength]; for(int i=0;i<itemIdsLength;i++) { @@ -23,7 +23,7 @@ bool CompleteUsingItemTask::isCompleted() return bIsCompleted; } -void CompleteUsingItemTask::completeUsingItem(shared_ptr<ItemInstance> item) +void CompleteUsingItemTask::completeUsingItem(std::shared_ptr<ItemInstance> item) { if(!hasBeenActivated() && !isPreCompletionEnabled()) return; for(int i=0;i<m_iValidItemsCount;i++) diff --git a/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.h b/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.h index a905bead..41758e1f 100644 --- a/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.h +++ b/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.h @@ -16,5 +16,5 @@ public: CompleteUsingItemTask(Tutorial *tutorial, int descriptionId, int itemIds[], unsigned int itemIdsLength, bool enablePreCompletion = false); virtual ~CompleteUsingItemTask(); virtual bool isCompleted(); - virtual void completeUsingItem(shared_ptr<ItemInstance> item); + virtual void completeUsingItem(std::shared_ptr<ItemInstance> item); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/CraftTask.cpp b/Minecraft.Client/Common/Tutorial/CraftTask.cpp index 6749d030..ca462aa5 100644 --- a/Minecraft.Client/Common/Tutorial/CraftTask.cpp +++ b/Minecraft.Client/Common/Tutorial/CraftTask.cpp @@ -40,7 +40,7 @@ CraftTask::~CraftTask() delete[] m_auxValues; } -void CraftTask::onCrafted(shared_ptr<ItemInstance> item) +void CraftTask::onCrafted(std::shared_ptr<ItemInstance> item) { #ifndef _CONTENT_PACKAGE wprintf(L"CraftTask::onCrafted - %ls\n", item->toString().c_str() ); diff --git a/Minecraft.Client/Common/Tutorial/CraftTask.h b/Minecraft.Client/Common/Tutorial/CraftTask.h index 1496f07a..c841c96b 100644 --- a/Minecraft.Client/Common/Tutorial/CraftTask.h +++ b/Minecraft.Client/Common/Tutorial/CraftTask.h @@ -14,7 +14,7 @@ public: ~CraftTask(); virtual bool isCompleted() { return bIsCompleted; } - virtual void onCrafted(shared_ptr<ItemInstance> item); + virtual void onCrafted(std::shared_ptr<ItemInstance> item); private: int *m_items; diff --git a/Minecraft.Client/Common/Tutorial/DiggerItemHint.cpp b/Minecraft.Client/Common/Tutorial/DiggerItemHint.cpp index 1367f411..fcfec29d 100644 --- a/Minecraft.Client/Common/Tutorial/DiggerItemHint.cpp +++ b/Minecraft.Client/Common/Tutorial/DiggerItemHint.cpp @@ -20,7 +20,7 @@ DiggerItemHint::DiggerItemHint(eTutorial_Hint id, Tutorial *tutorial, int descri tutorial->addMessage(IDS_TUTORIAL_HINT_ATTACK_WITH_TOOL, true); } -int DiggerItemHint::startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile) +int DiggerItemHint::startDestroyBlock(std::shared_ptr<ItemInstance> item, Tile *tile) { if(item != NULL) { @@ -46,7 +46,7 @@ int DiggerItemHint::startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile) return -1; } -int DiggerItemHint::attack(shared_ptr<ItemInstance> item, shared_ptr<Entity> entity) +int DiggerItemHint::attack(std::shared_ptr<ItemInstance> item, std::shared_ptr<Entity> entity) { if(item != NULL) { diff --git a/Minecraft.Client/Common/Tutorial/DiggerItemHint.h b/Minecraft.Client/Common/Tutorial/DiggerItemHint.h index cb71742e..b23a8be3 100644 --- a/Minecraft.Client/Common/Tutorial/DiggerItemHint.h +++ b/Minecraft.Client/Common/Tutorial/DiggerItemHint.h @@ -13,6 +13,6 @@ private: public: DiggerItemHint(eTutorial_Hint id, Tutorial *tutorial, int descriptionId, int items[], unsigned int itemsLength); - virtual int startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile); - virtual int attack(shared_ptr<ItemInstance> item, shared_ptr<Entity> entity); + virtual int startDestroyBlock(std::shared_ptr<ItemInstance> item, Tile *tile); + virtual int attack(std::shared_ptr<ItemInstance> item, std::shared_ptr<Entity> entity); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/PickupTask.cpp b/Minecraft.Client/Common/Tutorial/PickupTask.cpp index 00bc9d1f..742ed08c 100644 --- a/Minecraft.Client/Common/Tutorial/PickupTask.cpp +++ b/Minecraft.Client/Common/Tutorial/PickupTask.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "PickupTask.h" -void PickupTask::onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void PickupTask::onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { if(item->id == m_itemId) { diff --git a/Minecraft.Client/Common/Tutorial/PickupTask.h b/Minecraft.Client/Common/Tutorial/PickupTask.h index 68e1d479..26ef3a21 100644 --- a/Minecraft.Client/Common/Tutorial/PickupTask.h +++ b/Minecraft.Client/Common/Tutorial/PickupTask.h @@ -17,7 +17,7 @@ public: {} virtual bool isCompleted() { return bIsCompleted; } - virtual void onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); + virtual void onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); private: int m_itemId; diff --git a/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp b/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp index 8603f765..39daa72a 100644 --- a/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp +++ b/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp @@ -111,7 +111,7 @@ bool ProcedureCompoundTask::isCompleted() return allCompleted; } -void ProcedureCompoundTask::onCrafted(shared_ptr<ItemInstance> item) +void ProcedureCompoundTask::onCrafted(std::shared_ptr<ItemInstance> item) { AUTO_VAR(itEnd, m_taskSequence.end()); for(AUTO_VAR(it, m_taskSequence.begin()); it < itEnd; ++it) @@ -222,7 +222,7 @@ bool ProcedureCompoundTask::AllowFade() return allowFade; } -void ProcedureCompoundTask::useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly) +void ProcedureCompoundTask::useItemOn(Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly) { AUTO_VAR(itEnd, m_taskSequence.end()); for(AUTO_VAR(it, m_taskSequence.begin()); it < itEnd; ++it) @@ -232,7 +232,7 @@ void ProcedureCompoundTask::useItemOn(Level *level, shared_ptr<ItemInstance> ite } } -void ProcedureCompoundTask::useItem(shared_ptr<ItemInstance> item, bool bTestUseOnly) +void ProcedureCompoundTask::useItem(std::shared_ptr<ItemInstance> item, bool bTestUseOnly) { AUTO_VAR(itEnd, m_taskSequence.end()); for(AUTO_VAR(it, m_taskSequence.begin()); it < itEnd; ++it) @@ -242,7 +242,7 @@ void ProcedureCompoundTask::useItem(shared_ptr<ItemInstance> item, bool bTestUse } } -void ProcedureCompoundTask::onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void ProcedureCompoundTask::onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { AUTO_VAR(itEnd, m_taskSequence.end()); for(AUTO_VAR(it, m_taskSequence.begin()); it < itEnd; ++it) diff --git a/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h b/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h index 36b32798..e60bcfb0 100644 --- a/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h +++ b/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h @@ -18,7 +18,7 @@ public: virtual int getDescriptionId(); virtual int getPromptId(); virtual bool isCompleted(); - virtual void onCrafted(shared_ptr<ItemInstance> item); + virtual void onCrafted(std::shared_ptr<ItemInstance> item); virtual void handleUIInput(int iAction); virtual void setAsCurrentTask(bool active = true); virtual bool ShowMinimumTime(); @@ -26,9 +26,9 @@ public: virtual void setShownForMinimumTime(); virtual bool AllowFade(); - virtual void useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false); - virtual void useItem(shared_ptr<ItemInstance> item, bool bTestUseOnly=false); - virtual void onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); + virtual void useItemOn(Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false); + virtual void useItem(std::shared_ptr<ItemInstance> item, bool bTestUseOnly=false); + virtual void onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); virtual void onStateChange(eTutorial_State newState); private: diff --git a/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp b/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp index a1a5c37a..5a5c0ea5 100644 --- a/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp +++ b/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp @@ -17,7 +17,7 @@ TakeItemHint::TakeItemHint(eTutorial_Hint id, Tutorial *tutorial, int items[], u } } -bool TakeItemHint::onTake(shared_ptr<ItemInstance> item) +bool TakeItemHint::onTake(std::shared_ptr<ItemInstance> item) { if(item != NULL) { diff --git a/Minecraft.Client/Common/Tutorial/TakeItemHint.h b/Minecraft.Client/Common/Tutorial/TakeItemHint.h index f001d4c7..25d43eac 100644 --- a/Minecraft.Client/Common/Tutorial/TakeItemHint.h +++ b/Minecraft.Client/Common/Tutorial/TakeItemHint.h @@ -15,5 +15,5 @@ public: TakeItemHint(eTutorial_Hint id, Tutorial *tutorial, int items[], unsigned int itemsLength); ~TakeItemHint(); - virtual bool onTake( shared_ptr<ItemInstance> item ); + virtual bool onTake( std::shared_ptr<ItemInstance> item ); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/Tutorial.cpp b/Minecraft.Client/Common/Tutorial/Tutorial.cpp index f7e44b17..fa865b90 100644 --- a/Minecraft.Client/Common/Tutorial/Tutorial.cpp +++ b/Minecraft.Client/Common/Tutorial/Tutorial.cpp @@ -1681,7 +1681,7 @@ void Tutorial::showTutorialPopup(bool show) } } -void Tutorial::useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly) +void Tutorial::useItemOn(Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly) { for(AUTO_VAR(it, activeTasks[m_CurrentState].begin()); it < activeTasks[m_CurrentState].end(); ++it) { @@ -1690,7 +1690,7 @@ void Tutorial::useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int } } -void Tutorial::useItemOn(shared_ptr<ItemInstance> item, bool bTestUseOnly) +void Tutorial::useItemOn(std::shared_ptr<ItemInstance> item, bool bTestUseOnly) { for(AUTO_VAR(it, activeTasks[m_CurrentState].begin()); it < activeTasks[m_CurrentState].end(); ++it) { @@ -1699,7 +1699,7 @@ void Tutorial::useItemOn(shared_ptr<ItemInstance> item, bool bTestUseOnly) } } -void Tutorial::completeUsingItem(shared_ptr<ItemInstance> item) +void Tutorial::completeUsingItem(std::shared_ptr<ItemInstance> item) { for(AUTO_VAR(it, activeTasks[m_CurrentState].begin()); it < activeTasks[m_CurrentState].end(); ++it) { @@ -1718,7 +1718,7 @@ void Tutorial::completeUsingItem(shared_ptr<ItemInstance> item) } } -void Tutorial::startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile) +void Tutorial::startDestroyBlock(std::shared_ptr<ItemInstance> item, Tile *tile) { int hintNeeded = -1; for(AUTO_VAR(it, hints[m_CurrentState].begin()); it < hints[m_CurrentState].end(); ++it) @@ -1754,7 +1754,7 @@ void Tutorial::destroyBlock(Tile *tile) } } -void Tutorial::attack(shared_ptr<Player> player, shared_ptr<Entity> entity) +void Tutorial::attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity) { int hintNeeded = -1; for(AUTO_VAR(it, hints[m_CurrentState].begin()); it < hints[m_CurrentState].end(); ++it) @@ -1772,7 +1772,7 @@ void Tutorial::attack(shared_ptr<Player> player, shared_ptr<Entity> entity) } } -void Tutorial::itemDamaged(shared_ptr<ItemInstance> item) +void Tutorial::itemDamaged(std::shared_ptr<ItemInstance> item) { int hintNeeded = -1; for(AUTO_VAR(it, hints[m_CurrentState].begin()); it < hints[m_CurrentState].end(); ++it) @@ -1803,7 +1803,7 @@ void Tutorial::handleUIInput(int iAction) currentTask[m_CurrentState]->handleUIInput(iAction); } -void Tutorial::createItemSelected(shared_ptr<ItemInstance> item, bool canMake) +void Tutorial::createItemSelected(std::shared_ptr<ItemInstance> item, bool canMake) { int hintNeeded = -1; for(AUTO_VAR(it, hints[m_CurrentState].begin()); it < hints[m_CurrentState].end(); ++it) @@ -1821,7 +1821,7 @@ void Tutorial::createItemSelected(shared_ptr<ItemInstance> item, bool canMake) } } -void Tutorial::onCrafted(shared_ptr<ItemInstance> item) +void Tutorial::onCrafted(std::shared_ptr<ItemInstance> item) { for(unsigned int state = 0; state < e_Tutorial_State_Max; ++state) { @@ -1833,7 +1833,7 @@ void Tutorial::onCrafted(shared_ptr<ItemInstance> item) } } -void Tutorial::onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void Tutorial::onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { if( !m_hintDisplayed ) { @@ -1860,7 +1860,7 @@ void Tutorial::onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAn } } -void Tutorial::onSelectedItemChanged(shared_ptr<ItemInstance> item) +void Tutorial::onSelectedItemChanged(std::shared_ptr<ItemInstance> item) { // We only handle this if we are in a state that allows changing based on the selected item // Menus and states like riding in a minecart will NOT allow this diff --git a/Minecraft.Client/Common/Tutorial/Tutorial.h b/Minecraft.Client/Common/Tutorial/Tutorial.h index aaaaba0a..e942ff32 100644 --- a/Minecraft.Client/Common/Tutorial/Tutorial.h +++ b/Minecraft.Client/Common/Tutorial/Tutorial.h @@ -11,7 +11,7 @@ using namespace std; // #define TUTORIAL_MINIMUM_DISPLAY_MESSAGE_TIME 2000 // #define TUTORIAL_REMINDER_TIME (TUTORIAL_DISPLAY_MESSAGE_TIME + 20000) // #define TUTORIAL_CONSTRAINT_DELAY_REMOVE_TICKS 15 -// +// // // 0-24000 // #define TUTORIAL_FREEZE_TIME_VALUE 8000 @@ -151,19 +151,19 @@ public: void showTutorialPopup(bool show); - void useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly=false); - void useItemOn(shared_ptr<ItemInstance> item, bool bTestUseOnly=false); - void completeUsingItem(shared_ptr<ItemInstance> item); - void startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile); + void useItemOn(Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly=false); + void useItemOn(std::shared_ptr<ItemInstance> item, bool bTestUseOnly=false); + void completeUsingItem(std::shared_ptr<ItemInstance> item); + void startDestroyBlock(std::shared_ptr<ItemInstance> item, Tile *tile); void destroyBlock(Tile *tile); - void attack(shared_ptr<Player> player, shared_ptr<Entity> entity); - void itemDamaged(shared_ptr<ItemInstance> item); + void attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity); + void itemDamaged(std::shared_ptr<ItemInstance> item); void handleUIInput(int iAction); - void createItemSelected(shared_ptr<ItemInstance> item, bool canMake); - void onCrafted(shared_ptr<ItemInstance> item); - void onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); - void onSelectedItemChanged(shared_ptr<ItemInstance> item); + void createItemSelected(std::shared_ptr<ItemInstance> item, bool canMake); + void onCrafted(std::shared_ptr<ItemInstance> item); + void onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); + void onSelectedItemChanged(std::shared_ptr<ItemInstance> item); void onLookAt(int id, int iData=0); void onLookAtEntity(eINSTANCEOF type); void onEffectChanged(MobEffect *effect, bool bRemoved=false); diff --git a/Minecraft.Client/Common/Tutorial/TutorialHint.cpp b/Minecraft.Client/Common/Tutorial/TutorialHint.cpp index 5f0808bf..ecd6fe29 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialHint.cpp +++ b/Minecraft.Client/Common/Tutorial/TutorialHint.cpp @@ -7,14 +7,14 @@ #include "..\..\Minecraft.h" #include "..\..\MultiplayerLocalPlayer.h" -TutorialHint::TutorialHint(eTutorial_Hint id, Tutorial *tutorial, int descriptionId, eHintType type, bool allowFade /*= true*/) +TutorialHint::TutorialHint(eTutorial_Hint id, Tutorial *tutorial, int descriptionId, eHintType type, bool allowFade /*= true*/) : m_id( id ), m_tutorial(tutorial), m_descriptionId( descriptionId ), m_type( type ), m_counter( 0 ), m_lastTile( NULL ), m_hintNeeded( true ), m_allowFade(allowFade) { tutorial->addMessage(descriptionId, type != e_Hint_NoIngredients); } -int TutorialHint::startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile) +int TutorialHint::startDestroyBlock(std::shared_ptr<ItemInstance> item, Tile *tile) { int returnVal = -1; switch(m_type) @@ -59,7 +59,7 @@ int TutorialHint::destroyBlock(Tile *tile) return returnVal; } -int TutorialHint::attack(shared_ptr<ItemInstance> item, shared_ptr<Entity> entity) +int TutorialHint::attack(std::shared_ptr<ItemInstance> item, std::shared_ptr<Entity> entity) { /* switch(m_type) @@ -71,7 +71,7 @@ int TutorialHint::attack(shared_ptr<ItemInstance> item, shared_ptr<Entity> entit return -1; } -int TutorialHint::createItemSelected(shared_ptr<ItemInstance> item, bool canMake) +int TutorialHint::createItemSelected(std::shared_ptr<ItemInstance> item, bool canMake) { int returnVal = -1; switch(m_type) @@ -86,7 +86,7 @@ int TutorialHint::createItemSelected(shared_ptr<ItemInstance> item, bool canMake return returnVal; } -int TutorialHint::itemDamaged(shared_ptr<ItemInstance> item) +int TutorialHint::itemDamaged(std::shared_ptr<ItemInstance> item) { int returnVal = -1; switch(m_type) @@ -100,7 +100,7 @@ int TutorialHint::itemDamaged(shared_ptr<ItemInstance> item) return returnVal; } -bool TutorialHint::onTake( shared_ptr<ItemInstance> item ) +bool TutorialHint::onTake( std::shared_ptr<ItemInstance> item ) { return false; } @@ -121,7 +121,7 @@ int TutorialHint::tick() switch(m_type) { case e_Hint_SwimUp: - if( Minecraft::GetInstance()->localplayers[m_tutorial->getPad()]->isUnderLiquid(Material::water) ) returnVal = m_descriptionId; + if( Minecraft::GetInstance()->localplayers[m_tutorial->getPad()]->isUnderLiquid(Material::water) ) returnVal = m_descriptionId; break; } return returnVal; diff --git a/Minecraft.Client/Common/Tutorial/TutorialHint.h b/Minecraft.Client/Common/Tutorial/TutorialHint.h index 8ca543cc..8c33156f 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialHint.h +++ b/Minecraft.Client/Common/Tutorial/TutorialHint.h @@ -10,7 +10,7 @@ class Tutorial; class TutorialHint { -public: +public: enum eHintType { e_Hint_DiggerItem, @@ -40,12 +40,12 @@ public: eTutorial_Hint getId() { return m_id; } - virtual int startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile); + virtual int startDestroyBlock(std::shared_ptr<ItemInstance> item, Tile *tile); virtual int destroyBlock(Tile *tile); - virtual int attack(shared_ptr<ItemInstance> item, shared_ptr<Entity> entity); - virtual int createItemSelected(shared_ptr<ItemInstance> item, bool canMake); - virtual int itemDamaged(shared_ptr<ItemInstance> item); - virtual bool onTake( shared_ptr<ItemInstance> item ); + virtual int attack(std::shared_ptr<ItemInstance> item, std::shared_ptr<Entity> entity); + virtual int createItemSelected(std::shared_ptr<ItemInstance> item, bool canMake); + virtual int itemDamaged(std::shared_ptr<ItemInstance> item); + virtual bool onTake( std::shared_ptr<ItemInstance> item ); virtual bool onLookAt(int id, int iData=0); virtual bool onLookAtEntity(eINSTANCEOF type); virtual int tick(); diff --git a/Minecraft.Client/Common/Tutorial/TutorialMode.cpp b/Minecraft.Client/Common/Tutorial/TutorialMode.cpp index 82c81598..774e9c73 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialMode.cpp +++ b/Minecraft.Client/Common/Tutorial/TutorialMode.cpp @@ -36,7 +36,7 @@ bool TutorialMode::destroyBlock(int x, int y, int z, int face) int t = minecraft->level->getTile(x, y, z); tutorial->destroyBlock(Tile::tiles[t]); } - shared_ptr<ItemInstance> item = minecraft->player->getSelectedItem(); + std::shared_ptr<ItemInstance> item = minecraft->player->getSelectedItem(); int damageBefore; if(item != NULL) { @@ -47,7 +47,7 @@ bool TutorialMode::destroyBlock(int x, int y, int z, int face) if(!tutorial->m_allTutorialsComplete) { if ( item != NULL && item->isDamageableItem() ) - { + { int max = item->getMaxDamage(); int damageNow = item->getDamageValue(); @@ -78,7 +78,7 @@ void TutorialMode::tick() */ } -bool TutorialMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly, bool *pbUsedItem) +bool TutorialMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly, bool *pbUsedItem) { bool haveItem = false; int itemCount = 0; @@ -87,7 +87,7 @@ bool TutorialMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr tutorial->useItemOn(level, item, x, y, z, bTestUseOnly); if(!bTestUseOnly) - { + { if(item != NULL) { haveItem = true; @@ -110,7 +110,7 @@ bool TutorialMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr return result; } -void TutorialMode::attack(shared_ptr<Player> player, shared_ptr<Entity> entity) +void TutorialMode::attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity) { if(!tutorial->m_allTutorialsComplete) tutorial->attack(player, entity); diff --git a/Minecraft.Client/Common/Tutorial/TutorialMode.h b/Minecraft.Client/Common/Tutorial/TutorialMode.h index 75e24edf..330b0d51 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialMode.h +++ b/Minecraft.Client/Common/Tutorial/TutorialMode.h @@ -19,8 +19,8 @@ public: virtual void startDestroyBlock(int x, int y, int z, int face); virtual bool destroyBlock(int x, int y, int z, int face); virtual void tick(); - virtual bool useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly=false, bool *pbUsedItem=NULL); - virtual void attack(shared_ptr<Player> player, shared_ptr<Entity> entity); + virtual bool useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly=false, bool *pbUsedItem=NULL); + virtual void attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity); virtual bool isInputAllowed(int mapping); diff --git a/Minecraft.Client/Common/Tutorial/TutorialTask.h b/Minecraft.Client/Common/Tutorial/TutorialTask.h index 92cb5999..adeaab6d 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialTask.h +++ b/Minecraft.Client/Common/Tutorial/TutorialTask.h @@ -26,7 +26,7 @@ protected: bool m_bAllowFade; bool m_bTaskReminders; bool m_bShowMinimumTime; - + protected: bool bIsCompleted; bool m_bShownForMinimumTime; @@ -43,7 +43,7 @@ public: virtual eTutorial_CompletionAction getCompletionAction() { return e_Tutorial_Completion_None; } virtual bool isPreCompletionEnabled() { return enablePreCompletion; } virtual void taskCompleted(); - virtual void enableConstraints(bool enable, bool delayRemove = false); + virtual void enableConstraints(bool enable, bool delayRemove = false); virtual void setAsCurrentTask(bool active = true); virtual void setShownForMinimumTime() { m_bShownForMinimumTime = true; } @@ -52,12 +52,12 @@ public: bool TaskReminders() { return m_bTaskReminders;} virtual bool ShowMinimumTime() { return m_bShowMinimumTime;} - virtual void useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false) { } - virtual void useItem(shared_ptr<ItemInstance> item,bool bTestUseOnly=false) { } - virtual void completeUsingItem(shared_ptr<ItemInstance> item) { } + virtual void useItemOn(Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false) { } + virtual void useItem(std::shared_ptr<ItemInstance> item,bool bTestUseOnly=false) { } + virtual void completeUsingItem(std::shared_ptr<ItemInstance> item) { } virtual void handleUIInput(int iAction) { } - virtual void onCrafted(shared_ptr<ItemInstance> item) { } - virtual void onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { } + virtual void onCrafted(std::shared_ptr<ItemInstance> item) { } + virtual void onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { } virtual void onStateChange(eTutorial_State newState) { } virtual void onEffectChanged(MobEffect *effect, bool bRemoved=false) { } };
\ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/UseItemTask.cpp b/Minecraft.Client/Common/Tutorial/UseItemTask.cpp index 09bac4d1..8f53f14d 100644 --- a/Minecraft.Client/Common/Tutorial/UseItemTask.cpp +++ b/Minecraft.Client/Common/Tutorial/UseItemTask.cpp @@ -16,7 +16,7 @@ bool UseItemTask::isCompleted() return bIsCompleted; } -void UseItemTask::useItem(shared_ptr<ItemInstance> item,bool bTestUseOnly) +void UseItemTask::useItem(std::shared_ptr<ItemInstance> item,bool bTestUseOnly) { if(bTestUseOnly) return; diff --git a/Minecraft.Client/Common/Tutorial/UseItemTask.h b/Minecraft.Client/Common/Tutorial/UseItemTask.h index 46d71be4..2982412e 100644 --- a/Minecraft.Client/Common/Tutorial/UseItemTask.h +++ b/Minecraft.Client/Common/Tutorial/UseItemTask.h @@ -16,5 +16,5 @@ public: UseItemTask(const int itemId, Tutorial *tutorial, int descriptionId, bool enablePreCompletion = false, vector<TutorialConstraint *> *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true ); virtual bool isCompleted(); - virtual void useItem(shared_ptr<ItemInstance> item, bool bTestUseOnly=false); + virtual void useItem(std::shared_ptr<ItemInstance> item, bool bTestUseOnly=false); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/UseTileTask.cpp b/Minecraft.Client/Common/Tutorial/UseTileTask.cpp index 1f4ed4cb..57e67cad 100644 --- a/Minecraft.Client/Common/Tutorial/UseTileTask.cpp +++ b/Minecraft.Client/Common/Tutorial/UseTileTask.cpp @@ -25,7 +25,7 @@ bool UseTileTask::isCompleted() return bIsCompleted; } -void UseTileTask::useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly) +void UseTileTask::useItemOn(Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly) { if(bTestUseOnly) return; diff --git a/Minecraft.Client/Common/Tutorial/UseTileTask.h b/Minecraft.Client/Common/Tutorial/UseTileTask.h index 74b3a40c..b20c4b84 100644 --- a/Minecraft.Client/Common/Tutorial/UseTileTask.h +++ b/Minecraft.Client/Common/Tutorial/UseTileTask.h @@ -20,5 +20,5 @@ public: UseTileTask(const int tileId, Tutorial *tutorial, int descriptionId, bool enablePreCompletion = false, vector<TutorialConstraint *> *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true); virtual bool isCompleted(); - virtual void useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false); + virtual void useItemOn(Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp index 29ddcf71..2bdf8ae9 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -73,7 +73,7 @@ void IUIScene_AbstractContainerMenu::Initialize(int iPad, AbstractContainerMenu* m_iCurrSlotX = 0; m_iCurrSlotY = 0; #endif // TAP_DETECTION - // + // // for(int i=0;i<XUSER_MAX_COUNT;i++) // { // m_bFirstTouchStored[i]=false; @@ -101,7 +101,7 @@ int IUIScene_AbstractContainerMenu::GetSectionDimensions( ESceneSection eSection *piNumRows = 0; *piNumColumns = 0; } - return( ( *piNumRows ) * ( *piNumColumns ) ); + return( ( *piNumRows ) * ( *piNumColumns ) ); } void IUIScene_AbstractContainerMenu::updateSlotPosition( ESceneSection eSection, ESceneSection newSection, ETapState eTapDirection, int *piTargetX, int *piTargetY, int xOffset ) @@ -205,7 +205,7 @@ void IUIScene_AbstractContainerMenu::SetToolTip( EToolTipButton eButton, EToolTi void IUIScene_AbstractContainerMenu::UpdateTooltips() { // Table gives us text id for tooltip. - static const DWORD kaToolTipextIds[ eNumToolTips ] = + static const DWORD kaToolTipextIds[ eNumToolTips ] = { IDS_TOOLTIPS_PICKUPPLACE, //eToolTipPickupPlace_OLD IDS_TOOLTIPS_EXIT, // eToolTipExit @@ -307,7 +307,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() float fNewX=(((float)pTouchPadData->touch[0].x)-m_oldvTouchPos.x) * m_fTouchPadMulX; float fNewY=(((float)pTouchPadData->touch[0].y)-m_oldvTouchPos.y) * m_fTouchPadMulY; - // relative positions - needs a deadzone + // relative positions - needs a deadzone if(fNewX>m_fTouchPadDeadZoneX) { @@ -320,11 +320,11 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(fNewY>m_fTouchPadDeadZoneY) { - vPointerPos.y=m_oldvPointerPos.y+((fNewY-m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f)); + vPointerPos.y=m_oldvPointerPos.y+((fNewY-m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f)); } else if(fNewY<-m_fTouchPadDeadZoneY) { - vPointerPos.y=m_oldvPointerPos.y+((fNewY+m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f)); + vPointerPos.y=m_oldvPointerPos.y+((fNewY+m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f)); } // Clamp to pointer extents. @@ -334,7 +334,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if ( vPointerPos.y > m_fPointerMaxY ) vPointerPos.y = m_fPointerMaxY; bStickInput = true; - m_eCurrTapState=eTapStateNoInput; + m_eCurrTapState=eTapStateNoInput; } else { @@ -408,7 +408,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() fInputX *= fInputScale; fInputY *= fInputScale; -#ifdef USE_POINTER_ACCEL +#ifdef USE_POINTER_ACCEL m_fPointerAccelX += fInputX / 50.0f; m_fPointerAccelY += fInputY / 50.0f; @@ -451,12 +451,12 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else { m_iConsectiveInputTicks = 0; -#ifdef USE_POINTER_ACCEL +#ifdef USE_POINTER_ACCEL m_fPointerVelX = 0.0f; m_fPointerVelY = 0.0f; m_fPointerAccelX = 0.0f; m_fPointerAccelY = 0.0f; -#endif +#endif } #ifdef __ORBIS__ @@ -501,7 +501,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() ( vPointerPos.y >= sectionPos.y ) && ( vPointerPos.y <= itemMax.y ) ) { // Pointer is over this control! - eSectionUnderPointer = eSection; + eSectionUnderPointer = eSection; vSnapPos.x = itemPos.x + ( itemSize.x / 2.0f ); vSnapPos.y = itemPos.y + ( itemSize.y / 2.0f ); @@ -590,7 +590,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() } // If we are not over any slot, set focus elsewhere. - if ( eSectionUnderPointer == eSectionNone ) + if ( eSectionUnderPointer == eSectionNone ) { setFocusToPointer( getPad() ); #ifdef TAP_DETECTION @@ -704,11 +704,11 @@ void IUIScene_AbstractContainerMenu::onMouseTick() // Determine appropriate context sensitive tool tips, based on what is carried on the pointer and what is under the pointer. // What are we carrying on pointer. - shared_ptr<LocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()]; - shared_ptr<ItemInstance> carriedItem = nullptr; + std::shared_ptr<LocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()]; + std::shared_ptr<ItemInstance> carriedItem = nullptr; if(player != NULL) carriedItem = player->inventory->getCarried(); - shared_ptr<ItemInstance> slotItem = nullptr; + std::shared_ptr<ItemInstance> slotItem = nullptr; Slot *slot = NULL; int slotIndex = 0; if(bPointerIsOverSlot) @@ -790,7 +790,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if ( bSlotHasItem ) { // Item in hand and item in slot ... is item in slot the same as in out hand? If so, can we stack on to it? - if ( bCarriedIsSameAsSlot ) + if ( bCarriedIsSameAsSlot ) { // Can we stack more into this slot? if ( iSlotStackSizeRemaining == 0 ) @@ -889,7 +889,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if((eSectionUnderPointer==eSectionInventoryUsing)||(eSectionUnderPointer==eSectionInventoryInventory)) { - shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + std::shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); ArmorRecipes::_eArmorType eArmourType=ArmorRecipes::GetArmorType(item->id); if(eArmourType==ArmorRecipes::eArmorType_None) @@ -919,7 +919,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else { buttonY = eToolTipQuickMove; - } + } break; case ArmorRecipes::eArmorType_Leggings: if(isSlotEmpty(eSectionInventoryArmor,2)) @@ -952,7 +952,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionFurnaceUsing)||(eSectionUnderPointer==eSectionFurnaceInventory)) { // Get the info on this item. - shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + std::shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); bool bValidFuel = FurnaceTileEntity::isFuel(item); bool bValidIngredient = FurnaceRecipes::getInstance()->getResult(item->getItem()->id) != NULL; @@ -962,7 +962,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceIngredient,0)) { // is it the same as this item - shared_ptr<ItemInstance> IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); + std::shared_ptr<ItemInstance> IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -991,7 +991,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceFuel,0)) { // is it the same as this item - shared_ptr<ItemInstance> fuelItem = getSlotItem(eSectionFurnaceFuel,0); + std::shared_ptr<ItemInstance> fuelItem = getSlotItem(eSectionFurnaceFuel,0); if(fuelItem->id == item->id) { buttonY = eToolTipQuickMoveFuel; @@ -1002,7 +1002,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceIngredient,0)) { // is it the same as this item - shared_ptr<ItemInstance> IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); + std::shared_ptr<ItemInstance> IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -1044,7 +1044,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionBrewingUsing)||(eSectionUnderPointer==eSectionBrewingInventory)) { // Get the info on this item. - shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + std::shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); int iId=item->id; // valid ingredient? @@ -1062,7 +1062,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionBrewingIngredient,0)) { // is it the same as this item - shared_ptr<ItemInstance> IngredientItem = getSlotItem(eSectionBrewingIngredient,0); + std::shared_ptr<ItemInstance> IngredientItem = getSlotItem(eSectionBrewingIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -1077,15 +1077,15 @@ void IUIScene_AbstractContainerMenu::onMouseTick() // ingredient slot empty buttonY = eToolTipQuickMoveIngredient; } - } + } else { // valid potion? Glass bottle with water in it is a 'potion' too. if(iId==Item::potion_Id) { // space available? - if(isSlotEmpty(eSectionBrewingBottle1,0) || - isSlotEmpty(eSectionBrewingBottle2,0) || + if(isSlotEmpty(eSectionBrewingBottle1,0) || + isSlotEmpty(eSectionBrewingBottle2,0) || isSlotEmpty(eSectionBrewingBottle3,0)) { buttonY = eToolTipQuickMoveIngredient; @@ -1104,7 +1104,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionEnchantUsing)||(eSectionUnderPointer==eSectionEnchantInventory)) { // Get the info on this item. - shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + std::shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); int iId=item->id; // valid enchantable tool? @@ -1112,8 +1112,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { // is there already something in the ingredient slot? if(isSlotEmpty(eSectionEnchantSlot,0)) - { - // tool slot empty + { + // tool slot empty switch(iId) { case Item::bow_Id: @@ -1155,7 +1155,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() buttonY = eToolTipQuickMove; break; default: - buttonY=eToolTipQuickMoveTool; + buttonY=eToolTipQuickMoveTool; break; } } @@ -1163,10 +1163,10 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { buttonY = eToolTipQuickMove; } - } + } else { - buttonY=eToolTipQuickMove; + buttonY=eToolTipQuickMove; } } else @@ -1199,7 +1199,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() SetPointerOutsideMenu( false ); } - shared_ptr<ItemInstance> item = nullptr; + std::shared_ptr<ItemInstance> item = nullptr; if(bPointerIsOverSlot && bSlotHasItem) item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); overrideTooltips(eSectionUnderPointer, item, bIsItemCarried, bSlotHasItem, bCarriedIsSameAsSlot, iSlotStackSizeRemaining, buttonA, buttonX, buttonY, buttonRT); @@ -1358,7 +1358,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b } else { - ui.CloseUIScenes(iPad); + ui.CloseUIScenes(iPad); } bHandled = true; @@ -1410,7 +1410,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex); if ( bSlotHasItem ) { - shared_ptr<ItemInstance> item = getSlotItem(m_eCurrSection, currentIndex); + std::shared_ptr<ItemInstance> item = getSlotItem(m_eCurrSection, currentIndex); if( Minecraft::GetInstance()->localgameModes[iPad] != NULL ) { Tutorial::PopupMessageDetails *message = new Tutorial::PopupMessageDetails; @@ -1456,7 +1456,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b { handleOutsideClicked(iPad, buttonNum, quickKeyHeld); } - else // + else // { // over empty space or something else??? handleOtherClicked(iPad,m_eCurrSection,buttonNum,quickKeyHeld?true:false); @@ -1569,7 +1569,7 @@ int IUIScene_AbstractContainerMenu::getCurrentIndex(ESceneSection eSection) return currentIndex + getSectionStartOffset(eSection); } -bool IUIScene_AbstractContainerMenu::IsSameItemAs(shared_ptr<ItemInstance> itemA, shared_ptr<ItemInstance> itemB) +bool IUIScene_AbstractContainerMenu::IsSameItemAs(std::shared_ptr<ItemInstance> itemA, std::shared_ptr<ItemInstance> itemB) { if(itemA == NULL || itemB == NULL) return false; @@ -1583,7 +1583,7 @@ int IUIScene_AbstractContainerMenu::GetEmptyStackSpace(Slot *slot) if(slot != NULL && slot->hasItem()) { - shared_ptr<ItemInstance> item = slot->getItem(); + std::shared_ptr<ItemInstance> item = slot->getItem(); if ( item->isStackable() ) { int iCount = item->GetCount(); @@ -1614,7 +1614,7 @@ wstring IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slot, vector<ws } else { - firstLine = false; + firstLine = false; wchar_t formatted[256]; eMinecraftColour rarityColour = slot->getItem()->getRarity()->color; int colour = app.GetHTMLColour(rarityColour); @@ -1624,7 +1624,7 @@ wstring IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slot, vector<ws colour = app.GetHTMLColour(eTextColor_RenamedItemTitle); } - swprintf(formatted, 256, L"<font color=\"#%08x\">%ls</font>",colour,thisString.c_str()); + swprintf(formatted, 256, L"<font color=\"#%08x\">%ls</font>",colour,thisString.c_str()); thisString = formatted; } desc.append( thisString ); diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h index bdb8bb4c..57bc8253 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h @@ -10,7 +10,7 @@ // Uncomment to enable acceleration on pointer input. //#define USE_POINTER_ACCEL -#define POINTER_INPUT_TIMER_ID (0) // Arbitrary timer ID. +#define POINTER_INPUT_TIMER_ID (0) // Arbitrary timer ID. #define POINTER_SPEED_FACTOR (13.0f) // Speed of pointer. //#define POINTER_PANEL_OVER_REACH (42.0f) // Amount beyond edge of panel which pointer can go over to drop items. - comes from the pointer size in the scene @@ -32,19 +32,19 @@ protected: eSectionContainerInventory, eSectionContainerChest, eSectionContainerMax, - + eSectionFurnaceUsing, eSectionFurnaceInventory, eSectionFurnaceIngredient, eSectionFurnaceFuel, eSectionFurnaceResult, eSectionFurnaceMax, - + eSectionInventoryUsing, eSectionInventoryInventory, eSectionInventoryArmor, eSectionInventoryMax, - + eSectionTrapUsing, eSectionTrapInventory, eSectionTrapTrap, @@ -64,7 +64,7 @@ protected: eSectionInventoryCreativeSlider, #endif eSectionInventoryCreativeMax, - + eSectionEnchantUsing, eSectionEnchantInventory, eSectionEnchantSlot, @@ -151,7 +151,7 @@ protected: // 4J - WESTY - Added for pointer prototype. // Current tooltip settings. EToolTipItem m_aeToolTipSettings[ eToolTipNumButtons ]; - + // 4J - WESTY - Added for pointer prototype. // Indicates if pointer is outside UI window (used to drop items). bool m_bPointerOutsideMenu; @@ -159,7 +159,7 @@ protected: bool m_bSplitscreen; bool m_bNavigateBack; // should we exit the xuiscenes or just navigate back on exit? - + virtual bool IsSectionSlotList( ESceneSection eSection ) { return eSection != eSectionNone; } virtual bool CanHaveFocus( ESceneSection eSection ) { return true; } int GetSectionDimensions( ESceneSection eSection, int* piNumColumns, int* piNumRows ); @@ -180,7 +180,7 @@ protected: // 4J - WESTY - Added for pointer prototype. void SetPointerOutsideMenu( bool bOutside ) { m_bPointerOutsideMenu = bOutside; } - + void Initialize(int m_iPad, AbstractContainerMenu* menu, bool autoDeleteMenu, int startIndex,ESceneSection firstSection,ESceneSection maxSection, bool bNavigateBack=FALSE); virtual void PlatformInitialize(int iPad, int startIndex) = 0; virtual void InitDataAssociations(int iPad, AbstractContainerMenu *menu, int startIndex = 0) = 0; @@ -201,15 +201,15 @@ protected: virtual void setSectionSelectedSlot(ESceneSection eSection, int x, int y) = 0; virtual void setFocusToPointer(int iPad) = 0; virtual void SetPointerText(const wstring &description, vector<wstring> &unformattedStrings, bool newSlot) = 0; - virtual shared_ptr<ItemInstance> getSlotItem(ESceneSection eSection, int iSlot) = 0; + virtual std::shared_ptr<ItemInstance> getSlotItem(ESceneSection eSection, int iSlot) = 0; virtual bool isSlotEmpty(ESceneSection eSection, int iSlot) = 0; virtual void adjustPointerForSafeZone() = 0; - virtual bool overrideTooltips(ESceneSection sectionUnderPointer, shared_ptr<ItemInstance> itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, + virtual bool overrideTooltips(ESceneSection sectionUnderPointer, std::shared_ptr<ItemInstance> itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, EToolTipItem &buttonA, EToolTipItem &buttonX, EToolTipItem &buttonY, EToolTipItem &buttonRT) { return false; } private: - bool IsSameItemAs(shared_ptr<ItemInstance> itemA, shared_ptr<ItemInstance> itemB); + bool IsSameItemAs(std::shared_ptr<ItemInstance> itemA, std::shared_ptr<ItemInstance> itemB); int GetEmptyStackSpace(Slot *slot); wstring GetItemDescription(Slot *slot, vector<wstring> &unformattedStrings); diff --git a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp index 81451c7a..990e4d6a 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp @@ -245,15 +245,15 @@ void IUIScene_AnvilMenu::updateItemName() ByteArrayOutputStream baos; DataOutputStream dos(&baos); dos.writeUTF(m_itemName); - Minecraft::GetInstance()->localplayers[getPad()]->connection->send(shared_ptr<CustomPayloadPacket>(new CustomPayloadPacket(CustomPayloadPacket::SET_ITEM_NAME_PACKET, baos.toByteArray()))); + Minecraft::GetInstance()->localplayers[getPad()]->connection->send(std::shared_ptr<CustomPayloadPacket>(new CustomPayloadPacket(CustomPayloadPacket::SET_ITEM_NAME_PACKET, baos.toByteArray()))); } -void IUIScene_AnvilMenu::refreshContainer(AbstractContainerMenu *container, vector<shared_ptr<ItemInstance> > *items) +void IUIScene_AnvilMenu::refreshContainer(AbstractContainerMenu *container, vector<std::shared_ptr<ItemInstance> > *items) { slotChanged(container, RepairMenu::INPUT_SLOT, container->getSlot(0)->getItem()); } -void IUIScene_AnvilMenu::slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr<ItemInstance> item) +void IUIScene_AnvilMenu::slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr<ItemInstance> item) { if (slotIndex == RepairMenu::INPUT_SLOT) { diff --git a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h index 6c4348f2..aad54abc 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h @@ -16,7 +16,7 @@ class RepairMenu; class IUIScene_AnvilMenu : public virtual IUIScene_AbstractContainerMenu, public net_minecraft_world_inventory::ContainerListener { protected: - shared_ptr<Inventory> m_inventory; + std::shared_ptr<Inventory> m_inventory; RepairMenu *m_repairMenu; wstring m_itemName; @@ -24,7 +24,7 @@ protected: IUIScene_AnvilMenu(); virtual ESceneSection GetSectionAndSlotInDirection( ESceneSection eSection, ETapState eTapDirection, int *piTargetX, int *piTargetY ); - int getSectionStartOffset(ESceneSection eSection); + int getSectionStartOffset(ESceneSection eSection); virtual void handleOtherClicked(int iPad, ESceneSection eSection, int buttonNum, bool quickKey); bool IsSectionSlotList( ESceneSection eSection ); @@ -39,7 +39,7 @@ protected: void updateItemName(); // ContainerListenr - void refreshContainer(AbstractContainerMenu *container, vector<shared_ptr<ItemInstance> > *items); - void slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr<ItemInstance> item); + void refreshContainer(AbstractContainerMenu *container, vector<std::shared_ptr<ItemInstance> > *items); + void slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr<ItemInstance> item); void setContainerData(AbstractContainerMenu *container, int id, int value); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp index f158b174..2c6c69fc 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp @@ -91,7 +91,7 @@ IUIScene_CraftingMenu::_eGroupTab IUIScene_CraftingMenu::m_GroupTabBkgMapping3x3 // eBaseItemType_bow, // eBaseItemType_pockettool, // eBaseItemType_utensil, -// +// // } // eBaseItemType; @@ -180,11 +180,11 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) UpdateTooltips(); break; case ACTION_MENU_PAUSEMENU: - case ACTION_MENU_B: + case ACTION_MENU_B: ui.ShowTooltip( iPad, eToolTipButtonX, false ); ui.ShowTooltip( iPad, eToolTipButtonB, false ); - ui.ShowTooltip( iPad, eToolTipButtonA, false ); - ui.ShowTooltip( iPad, eToolTipButtonRB, false ); + ui.ShowTooltip( iPad, eToolTipButtonA, false ); + ui.ShowTooltip( iPad, eToolTipButtonRB, false ); // kill the crafting xui //ui.PlayUISFX(eSFX_Back); ui.CloseUIScenes(iPad); @@ -197,18 +197,18 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) #endif // Do some crafting! if(m_pPlayer && m_pPlayer->inventory) - { + { //RecipyList *recipes = ((Recipes *)Recipes::getInstance())->getRecipies(); Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray(); // Force a make if the debug is on if(app.DebugSettingsOn() && app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<<eDebugSetting_CraftAnything)) { if(CanBeMadeA[m_iCurrentSlotHIndex].iCount!=0) - { + { int iSlot=iVSlotIndexA[m_iCurrentSlotVIndex]; int iRecipe= CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]; - shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); //int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue()); if( pMinecraft->localgameModes[iPad] != NULL) @@ -244,7 +244,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) iSlot=0; } int iRecipe= CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]; - shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); //int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue()); if( pMinecraft->localgameModes[iPad] != NULL ) @@ -256,7 +256,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) } } - if(pRecipeIngredientsRequired[iRecipe].bCanMake[iPad]) + if(pRecipeIngredientsRequired[iRecipe].bCanMake[iPad]) { pTempItemInst->onCraftedBy(m_pPlayer->level, dynamic_pointer_cast<Player>( m_pPlayer->shared_from_this() ), pTempItemInst->count ); // TODO 4J Stu - handleCraftItem should do a lot more than what it does, loads of the "can we craft" code should also probably be @@ -272,7 +272,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) { for(int j=0;j<pRecipeIngredientsRequired[iRecipe].iIngValA[i];j++) { - shared_ptr<ItemInstance> ingItemInst = nullptr; + std::shared_ptr<ItemInstance> ingItemInst = nullptr; // do we need to remove a specific aux value? if(pRecipeIngredientsRequired[iRecipe].iIngAuxValA[i]!=Recipes::ANY_AUX_VALUE) { @@ -291,7 +291,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) if (ingItemInst->getItem()->hasCraftingRemainingItem()) { // replace item with remaining result - m_pPlayer->inventory->add( shared_ptr<ItemInstance>( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); + m_pPlayer->inventory->add( std::shared_ptr<ItemInstance>( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); } } @@ -337,7 +337,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) break; case ACTION_MENU_LEFT_SCROLL: - // turn off the old group tab + // turn off the old group tab showTabHighlight(m_iGroupIndex,false); if(m_iGroupIndex==0) @@ -431,7 +431,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) // clear the indices iVSlotIndexA[0]=CanBeMadeA[m_iCurrentSlotHIndex].iCount-1; iVSlotIndexA[1]=0; - iVSlotIndexA[2]=1; + iVSlotIndexA[2]=1; UpdateVerticalSlots(); UpdateHighlight(); @@ -482,13 +482,13 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) else { iVSlotIndexA[1]--; - } + } ui.PlayUISFX(eSFX_Focus); } else if(CanBeMadeA[m_iCurrentSlotHIndex].iCount>2) { - { + { if(m_iCurrentSlotVIndex!=0) { // just move the highlight @@ -496,11 +496,11 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) ui.PlayUISFX(eSFX_Focus); } else - { + { //move the slots iVSlotIndexA[2]=iVSlotIndexA[1]; iVSlotIndexA[1]=iVSlotIndexA[0]; - // on 0 and went up, so cycle the values + // on 0 and went up, so cycle the values if(iVSlotIndexA[0]==0) { iVSlotIndexA[0]=CanBeMadeA[m_iCurrentSlotHIndex].iCount-1; @@ -533,7 +533,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) if(CanBeMadeA[m_iCurrentSlotHIndex].iCount>1) { if(bNoScrollSlots) - { + { if(iVSlotIndexA[1]==(CanBeMadeA[m_iCurrentSlotHIndex].iCount-1)) { iVSlotIndexA[1]=0; @@ -574,7 +574,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) { m_iCurrentSlotVIndex++; ui.PlayUISFX(eSFX_Focus); - } + } } UpdateVerticalSlots(); UpdateHighlight(); @@ -624,11 +624,11 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // for (int i = 0; i < iRecipeC; i++) // { - // shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(NULL); + // std::shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(NULL); // if (pTempItemInst != NULL) // { // wstring itemstring=pTempItemInst->toString(); - // + // // printf("Recipe [%d] = ",i); // OutputDebugStringW(itemstring.c_str()); // if(pTempItemInst->id!=0) @@ -642,7 +642,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // { // printf("ID\t%d\tAux val\t%d\tBase type\t%d\tMaterial\t%d Count=%d\n",pTempItemInst->id, pTempItemInst->getAuxValue(),pTempItemInst->getItem()->getBaseItemType(),pTempItemInst->getItem()->getMaterial(),pTempItemInst->GetCount()); // } - // + // // } // } // } @@ -683,9 +683,9 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() if (m_pPlayer->inventory->items[k] != NULL) { // do they have the ingredient, and the aux value matches, and enough off it? - if((m_pPlayer->inventory->items[k]->id == pRecipeIngredientsRequired[i].iIngIDA[j]) && + if((m_pPlayer->inventory->items[k]->id == pRecipeIngredientsRequired[i].iIngIDA[j]) && // check if the ingredient required doesn't care about the aux value, or if it does, does the inventory item aux match it - ((pRecipeIngredientsRequired[i].iIngAuxValA[j]==Recipes::ANY_AUX_VALUE) || (pRecipeIngredientsRequired[i].iIngAuxValA[j]==m_pPlayer->inventory->items[k]->getAuxValue())) + ((pRecipeIngredientsRequired[i].iIngAuxValA[j]==Recipes::ANY_AUX_VALUE) || (pRecipeIngredientsRequired[i].iIngAuxValA[j]==m_pPlayer->inventory->items[k]->getAuxValue())) ) { // do they have enough? We need to check the whole inventory, since they may have enough in different slots (milk isn't milkx3, but milk,milk,milk) @@ -721,18 +721,18 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // 4J Stu - TU-1 hotfix // Fix for #13143 - Players are able to craft items they do not have enough ingredients for if they store the ingredients in multiple, smaller stacks break; - } + } } } // if bFoundA[j] is false, then we didn't have enough of the ingredient required by the recipe, so mark the grid items we're short of if(bFoundA[j]==false) - { + { int iMissing = pRecipeIngredientsRequired[i].iIngValA[j]-iTotalCount; int iGridIndex=0; while(iMissing!=0) { // need to check if there is an aux val and match that - if(((pRecipeIngredientsRequired[i].uiGridA[iGridIndex]&0x00FFFFFF)==pRecipeIngredientsRequired[i].iIngIDA[j]) && + if(((pRecipeIngredientsRequired[i].uiGridA[iGridIndex]&0x00FFFFFF)==pRecipeIngredientsRequired[i].iIngIDA[j]) && ((pRecipeIngredientsRequired[i].iIngAuxValA[j]==Recipes::ANY_AUX_VALUE) ||(pRecipeIngredientsRequired[i].iIngAuxValA[j]== ((pRecipeIngredientsRequired[i].uiGridA[iGridIndex]&0xFF000000)>>24))) ) { // this grid entry is the ingredient we don't have enough of @@ -761,7 +761,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() if(iHSlotBrushControl<=m_iCraftablesMaxHSlotC) { bool bFound=false; - shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(nullptr); //int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue()); int iID=pTempItemInst->getItem()->id; int iBaseType; @@ -777,7 +777,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // ignore for the misc base type - these have not been placed in a base type group if(iBaseType!=Item::eBaseItemType_undefined) - { + { for(int k=0;k<iHSlotBrushControl;k++) { // if the item base type is the same as one already in, then add it to that list @@ -801,7 +801,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() if(!bFound) { if(iHSlotBrushControl<m_iCraftablesMaxHSlotC) - { + { // add to the list CanBeMadeA[iHSlotBrushControl].iItemBaseType=iBaseType; CanBeMadeA[iHSlotBrushControl].iRecipeA[CanBeMadeA[iHSlotBrushControl].iCount++]=i; @@ -824,7 +824,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() } delete [] bFoundA; - itRecipe++; + itRecipe++; } } @@ -835,7 +835,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() while((iIndex<m_iCraftablesMaxHSlotC) && CanBeMadeA[iIndex].iCount!=0) { - shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[iIndex].iRecipeA[0]].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[iIndex].iRecipeA[0]].pRecipy->assemble(nullptr); assert(pTempItemInst->id!=0); unsigned int uiAlpha; @@ -844,7 +844,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() uiAlpha = 31; } else - { + { if(pRecipeIngredientsRequired[CanBeMadeA[iIndex].iRecipeA[0]].bCanMake[getPad()]) { uiAlpha = 31; @@ -903,7 +903,7 @@ void IUIScene_CraftingMenu::UpdateHighlight() { iSlot=0; } - shared_ptr<ItemInstance> pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); // special case for the torch coal/charcoal int id=pTempItemInstAdditional->getDescriptionId(); @@ -933,10 +933,10 @@ void IUIScene_CraftingMenu::UpdateHighlight() { itemstring=app.GetString( IDS_ITEM_FIREBALLCOAL ); } - } + } break; default: - itemstring=app.GetString(id ); + itemstring=app.GetString(id ); break; } @@ -991,7 +991,7 @@ void IUIScene_CraftingMenu::UpdateVerticalSlots() { if(i!=1) continue; } - shared_ptr<ItemInstance> pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iVSlotIndexA[i]]].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iVSlotIndexA[i]]].pRecipy->assemble(nullptr); assert(pTempItemInstAdditional->id!=0); unsigned int uiAlpha; @@ -1001,7 +1001,7 @@ void IUIScene_CraftingMenu::UpdateVerticalSlots() uiAlpha = 31; } else - { + { if(pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iVSlotIndexA[i]]].bCanMake[getPad()]) { uiAlpha = 31; @@ -1040,7 +1040,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() hideAllIngredientsSlots(); if(CanBeMadeA[m_iCurrentSlotHIndex].iCount!=0) - { + { int iSlot,iRecipy; if(CanBeMadeA[m_iCurrentSlotHIndex].iCount>1) { @@ -1057,7 +1057,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() int iBoxWidth=(m_iContainerType==RECIPE_TYPE_2x2)?2:3; int iRecipe=CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]; bool bCanMakeRecipe = pRecipeIngredientsRequired[iRecipe].bCanMake[getPad()]; - shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); m_iIngredientsC=pRecipeIngredientsRequired[iRecipe].iIngC; @@ -1077,7 +1077,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() iAuxVal = 0xFF; } - shared_ptr<ItemInstance> itemInst= shared_ptr<ItemInstance>(new ItemInstance(item,pRecipeIngredientsRequired[iRecipe].iIngValA[i],iAuxVal)); + std::shared_ptr<ItemInstance> itemInst= std::shared_ptr<ItemInstance>(new ItemInstance(item,pRecipeIngredientsRequired[iRecipe].iIngValA[i],iAuxVal)); setIngredientDescriptionItem(getPad(),i,itemInst); setIngredientDescriptionRedBox(i,false); @@ -1124,13 +1124,13 @@ void IUIScene_CraftingMenu::DisplayIngredients() } } - for (int x = 0; x < iBoxWidth; x++) + for (int x = 0; x < iBoxWidth; x++) { - for (int y = 0; y < iBoxWidth; y++) + for (int y = 0; y < iBoxWidth; y++) { int index = x+y*iBoxWidth; if(pRecipeIngredientsRequired[iRecipy].uiGridA[x+y*3]!=0) - { + { int id=pRecipeIngredientsRequired[iRecipy].uiGridA[x+y*3]&0x00FFFFFF; assert(id!=0); int iAuxVal=(pRecipeIngredientsRequired[iRecipy].uiGridA[x+y*3]&0xFF000000)>>24; @@ -1141,7 +1141,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() { iAuxVal = 0xFF; } - shared_ptr<ItemInstance> itemInst= shared_ptr<ItemInstance>(new ItemInstance(id,1,iAuxVal)); + std::shared_ptr<ItemInstance> itemInst= std::shared_ptr<ItemInstance>(new ItemInstance(id,1,iAuxVal)); setIngredientSlotItem(getPad(),index,itemInst); // show the ingredients we don't have if we can't make the recipe if(app.DebugSettingsOn() && app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<<eDebugSetting_CraftAnything)) @@ -1149,7 +1149,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() setIngredientSlotRedBox(index, false); } else - { + { if((pRecipeIngredientsRequired[iRecipy].usBitmaskMissingGridIngredients[getPad()]&(1<<(x+y*3)))!=0) { setIngredientSlotRedBox(index, true); @@ -1164,7 +1164,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() { setIngredientSlotRedBox(index, false); setIngredientSlotItem(getPad(),index,nullptr); - } + } } } } @@ -1188,7 +1188,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() { setIngredientSlotRedBox(i, false); setIngredientSlotItem(getPad(),i,nullptr); - } + } } } @@ -1205,7 +1205,7 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray(); if(bCanBeMade) - { + { int iSlot;//,iRecipy; if(CanBeMadeA[m_iCurrentSlotHIndex].iCount>1) { @@ -1218,7 +1218,7 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) //iRecipy=CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[0]; } - shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); int iID=pTempItemInst->getItem()->id; int iAuxVal=pTempItemInst->getAuxValue(); int iBaseType; @@ -1278,13 +1278,13 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) #ifdef _DEBUG setDescriptionText(L"This is some placeholder description text about the craftable item."); #else - setDescriptionText(L""); + setDescriptionText(L""); #endif - } + } } else { - setDescriptionText(L""); + setDescriptionText(L""); } } @@ -1308,7 +1308,7 @@ void IUIScene_CraftingMenu::UpdateTooltips() { iSlot=iVSlotIndexA[m_iCurrentSlotVIndex]; } - else + else { iSlot=0; } @@ -1348,7 +1348,7 @@ void IUIScene_CraftingMenu::UpdateTooltips() { iSlot=iVSlotIndexA[m_iCurrentSlotVIndex]; } - else + else { iSlot=0; } @@ -1372,7 +1372,7 @@ bool IUIScene_CraftingMenu::isItemSelected(int itemId) { bool isSelected = false; if(m_pPlayer && m_pPlayer->inventory) - { + { //RecipyList *recipes = ((Recipes *)Recipes::getInstance())->getRecipies(); Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray(); diff --git a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h index 05227fff..c3ee07ba 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h @@ -22,7 +22,7 @@ protected: static const int m_iMaxHSlotC = 12; static const int m_iMaxHCraftingSlotC = 10; - static const int m_iMaxVSlotC = 17; + static const int m_iMaxVSlotC = 17; static const int m_iMaxDisplayedVSlotC = 3; static const int m_iIngredients3x3SlotC = 9; static const int m_iIngredients2x2SlotC = 4; @@ -35,7 +35,7 @@ protected: static int m_iBaseTypeMapA[Item::eBaseItemType_MAXTYPES]; - typedef struct + typedef struct { int iCount; int iItemBaseType; @@ -49,7 +49,7 @@ protected: int m_iCurrentSlotVIndex; int m_iRecipeC; int m_iContainerType; // 2x2 or 3x3 - shared_ptr<LocalPlayer> m_pPlayer; + std::shared_ptr<LocalPlayer> m_pPlayer; int m_iGroupIndex; int iVSlotIndexA[3]; // index of the v slots currently displayed @@ -59,7 +59,7 @@ protected: static Recipy::_eGroupType m_GroupTypeMapping9GridA[m_iMaxGroup3x3]; Recipy::_eGroupType *m_pGroupA; - static LPCWSTR m_GroupTabNameA[3]; + static LPCWSTR m_GroupTabNameA[3]; static _eGroupTab m_GroupTabBkgMapping2x2A[m_iMaxGroup2x2]; static _eGroupTab m_GroupTabBkgMapping3x3A[m_iMaxGroup3x3]; _eGroupTab *m_pGroupTabA; @@ -96,13 +96,13 @@ protected: virtual void hideAllHSlots() = 0; virtual void hideAllVSlots() = 0; virtual void hideAllIngredientsSlots() = 0; - virtual void setCraftHSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha) = 0; - virtual void setCraftVSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha) = 0; - virtual void setCraftingOutputSlotItem(int iPad, shared_ptr<ItemInstance> item) = 0; + virtual void setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha) = 0; + virtual void setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha) = 0; + virtual void setCraftingOutputSlotItem(int iPad, std::shared_ptr<ItemInstance> item) = 0; virtual void setCraftingOutputSlotRedBox(bool show) = 0; - virtual void setIngredientSlotItem(int iPad, int index, shared_ptr<ItemInstance> item) = 0; + virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr<ItemInstance> item) = 0; virtual void setIngredientSlotRedBox(int index, bool show) = 0; - virtual void setIngredientDescriptionItem(int iPad, int index, shared_ptr<ItemInstance> item) = 0; + virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr<ItemInstance> item) = 0; virtual void setIngredientDescriptionRedBox(int index, bool show) = 0; virtual void setIngredientDescriptionText(int index, LPCWSTR text) = 0; virtual void setShowCraftHSlot(int iIndex, bool show) = 0; diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp index 7ce33234..0ab9a672 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp @@ -12,16 +12,16 @@ // 4J JEV - Images for each tab. IUIScene_CreativeMenu::TabSpec **IUIScene_CreativeMenu::specs = NULL; -vector< shared_ptr<ItemInstance> > IUIScene_CreativeMenu::categoryGroups[eCreativeInventoryGroupsCount]; +vector< std::shared_ptr<ItemInstance> > IUIScene_CreativeMenu::categoryGroups[eCreativeInventoryGroupsCount]; -#define ITEM(id) list->push_back( shared_ptr<ItemInstance>(new ItemInstance(id, 1, 0)) ); -#define ITEM_AUX(id, aux) list->push_back( shared_ptr<ItemInstance>(new ItemInstance(id, 1, aux)) ); +#define ITEM(id) list->push_back( std::shared_ptr<ItemInstance>(new ItemInstance(id, 1, 0)) ); +#define ITEM_AUX(id, aux) list->push_back( std::shared_ptr<ItemInstance>(new ItemInstance(id, 1, aux)) ); #define DEF(index) list = &categoryGroups[index]; void IUIScene_CreativeMenu::staticCtor() { - vector< shared_ptr<ItemInstance> > *list; + vector< std::shared_ptr<ItemInstance> > *list; // Building Blocks @@ -56,7 +56,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Tile::treeTrunk_Id, 0) ITEM_AUX(Tile::treeTrunk_Id, TreeTile::DARK_TRUNK) ITEM_AUX(Tile::treeTrunk_Id, TreeTile::BIRCH_TRUNK) - ITEM_AUX(Tile::treeTrunk_Id, TreeTile::JUNGLE_TRUNK) + ITEM_AUX(Tile::treeTrunk_Id, TreeTile::JUNGLE_TRUNK) ITEM(Tile::gravel_Id) ITEM(Tile::redBrick_Id) ITEM(Tile::mossStone_Id) @@ -118,7 +118,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Tile::sponge_Id) ITEM(Tile::melon_Id) ITEM(Tile::pumpkin_Id) - ITEM(Tile::litPumpkin_Id) + ITEM(Tile::litPumpkin_Id) ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_DEFAULT) ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_EVERGREEN) ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_BIRCH) @@ -232,7 +232,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Tile::cobbleWall_Id, WallTile::TYPE_MOSSY) ITEM(Item::bed_Id) ITEM(Item::bucket_empty_Id) - ITEM(Item::bucket_lava_Id) + ITEM(Item::bucket_lava_Id) ITEM(Item::bucket_water_Id) ITEM(Item::milk_Id) ITEM(Item::cauldron_Id) @@ -292,7 +292,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::beef_cooked_Id) ITEM(Item::beef_raw_Id) ITEM(Item::chicken_raw_Id) - ITEM(Item::chicken_cooked_Id) + ITEM(Item::chicken_cooked_Id) ITEM(Item::rotten_flesh_Id) ITEM(Item::spiderEye_Id) ITEM(Item::potato_Id) @@ -314,7 +314,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::pickAxe_wood_Id) ITEM(Item::hatchet_wood_Id) ITEM(Item::hoe_wood_Id) - + ITEM(Item::map_Id) ITEM(Item::helmet_chain_Id) ITEM(Item::chestplate_chain_Id) @@ -325,7 +325,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::pickAxe_stone_Id) ITEM(Item::hatchet_stone_Id) ITEM(Item::hoe_stone_Id) - + ITEM(Item::bow_Id) ITEM(Item::helmet_iron_Id) ITEM(Item::chestplate_iron_Id) @@ -336,7 +336,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::pickAxe_iron_Id) ITEM(Item::hatchet_iron_Id) ITEM(Item::hoe_iron_Id) - + ITEM(Item::arrow_Id) ITEM(Item::helmet_gold_Id) ITEM(Item::chestplate_gold_Id) @@ -384,7 +384,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::brick_Id) ITEM(Item::netherbrick_Id) ITEM(Item::stick_Id) - ITEM(Item::bowl_Id) + ITEM(Item::bowl_Id) ITEM(Item::bone_Id) ITEM(Item::string_Id) ITEM(Item::feather_Id) @@ -393,13 +393,13 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::sulphur_Id) ITEM(Item::clay_Id) ITEM(Item::yellowDust_Id) - ITEM(Item::seeds_wheat_Id) + ITEM(Item::seeds_wheat_Id) ITEM(Item::seeds_melon_Id) ITEM(Item::seeds_pumpkin_Id) ITEM(Item::wheat_Id) ITEM(Item::reeds_Id) ITEM(Item::egg_Id) - ITEM(Item::sugar_Id) + ITEM(Item::sugar_Id) ITEM(Item::slimeBall_Id) ITEM(Item::blazeRod_Id) ITEM(Item::goldNugget_Id) @@ -432,7 +432,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::magmaCream_Id) ITEM(Item::speckledMelon_Id) ITEM(Item::glassBottle_Id) - ITEM_AUX(Item::potion_Id,0) // Water bottle + ITEM_AUX(Item::potion_Id,0) // Water bottle //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_TYPE_AWKWARD)) // Awkward Potion @@ -464,7 +464,7 @@ void IUIScene_CreativeMenu::staticCtor() //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_INSTANTHEALTH)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_NIGHTVISION)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_INVISIBILITY)) - + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_WEAKNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_STRENGTH)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_SLOWNESS)) @@ -579,7 +579,7 @@ IUIScene_CreativeMenu::IUIScene_CreativeMenu() m_creativeSlotX = m_creativeSlotY = m_inventorySlotX = m_inventorySlotY = 0; // 4J JEV - Settup Tabs - for (int i = 0; i < eCreativeInventoryTab_COUNT; i++) + for (int i = 0; i < eCreativeInventoryTab_COUNT; i++) { m_tabDynamicPos[i] = 0; m_tabPage[i] = 0; @@ -594,7 +594,7 @@ void IUIScene_CreativeMenu::switchTab(ECreativeInventoryTabs tab) if(tab != m_curTab) updateTabHighlightAndText(tab); m_curTab = tab; - + updateScrollCurrentPage(m_tabPage[m_curTab] + 1, specs[m_curTab]->getPageCount()); specs[tab]->populateMenu(itemPickerMenu,m_tabDynamicPos[m_curTab], m_tabPage[m_curTab]); @@ -605,7 +605,7 @@ void IUIScene_CreativeMenu::switchTab(ECreativeInventoryTabs tab) IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount, ECreative_Inventory_Groups *dynamicGroups) : m_icon(icon), m_descriptionId(descriptionId), m_staticGroupsCount(staticGroupsCount), m_dynamicGroupsCount(dynamicGroupsCount) { - + m_pages = 0; m_staticGroupsA = NULL; @@ -708,10 +708,10 @@ unsigned int IUIScene_CreativeMenu::TabSpec::getPageCount() // 4J JEV - Item Picker Menu -IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( shared_ptr<SimpleContainer> smp, shared_ptr<Inventory> inv ) : AbstractContainerMenu() +IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( std::shared_ptr<SimpleContainer> smp, std::shared_ptr<Inventory> inv ) : AbstractContainerMenu() { inventory = inv; - creativeContainer = smp; + creativeContainer = smp; //int startLength = slots->size(); @@ -734,7 +734,7 @@ IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( shared_ptr<SimpleContaine containerId = CONTAINER_ID_CREATIVE; } -bool IUIScene_CreativeMenu::ItemPickerMenu::stillValid(shared_ptr<Player> player) +bool IUIScene_CreativeMenu::ItemPickerMenu::stillValid(std::shared_ptr<Player> player) { return true; } @@ -752,7 +752,7 @@ IUIScene_AbstractContainerMenu::ESceneSection IUIScene_CreativeMenu::GetSectionA switch( eSection ) { case eSectionInventoryCreativeSelector: - if (eTapDirection == eTapStateDown || eTapDirection == eTapStateUp) + if (eTapDirection == eTapStateDown || eTapDirection == eTapStateUp) { newSection = eSectionInventoryCreativeUsing; } @@ -794,7 +794,7 @@ bool IUIScene_CreativeMenu::handleValidKeyPress(int iPad, int buttonNum, BOOL qu Minecraft *pMinecraft = Minecraft::GetInstance(); for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i) { - shared_ptr<ItemInstance> newItem = m_menu->getSlot(i)->getItem(); + std::shared_ptr<ItemInstance> newItem = m_menu->getSlot(i)->getItem(); if(newItem != NULL) { @@ -813,7 +813,7 @@ void IUIScene_CreativeMenu::handleOutsideClicked(int iPad, int buttonNum, BOOL q // Drop items. Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<Inventory> playerInventory = pMinecraft->localplayers[iPad]->inventory; + std::shared_ptr<Inventory> playerInventory = pMinecraft->localplayers[iPad]->inventory; if (playerInventory->getCarried() != NULL) { if (buttonNum == 0) @@ -823,7 +823,7 @@ void IUIScene_CreativeMenu::handleOutsideClicked(int iPad, int buttonNum, BOOL q } if (buttonNum == 1) { - shared_ptr<ItemInstance> removedItem = playerInventory->getCarried()->remove(1); + std::shared_ptr<ItemInstance> removedItem = playerInventory->getCarried()->remove(1); pMinecraft->localgameModes[iPad]->handleCreativeModeItemDrop(removedItem); if (playerInventory->getCarried()->count == 0) playerInventory->setCarried(nullptr); } @@ -841,7 +841,7 @@ void IUIScene_CreativeMenu::handleAdditionalKeyPress(int iAction) dir = -1; // Fall through intentional case ACTION_MENU_RIGHT_SCROLL: - { + { ECreativeInventoryTabs tab = (ECreativeInventoryTabs)(m_curTab + dir); if (tab < 0) tab = (ECreativeInventoryTabs)(eCreativeInventoryTab_COUNT - 1); if (tab >= eCreativeInventoryTab_COUNT) tab = eCreativeInventoryTab_BuildingBlocks; @@ -894,9 +894,9 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu if (buttonNum == 0) { - shared_ptr<Inventory> playerInventory = pMinecraft->localplayers[getPad()]->inventory; - shared_ptr<ItemInstance> carried = playerInventory->getCarried(); - shared_ptr<ItemInstance> clicked = m_menu->getSlot(currentIndex)->getItem(); + std::shared_ptr<Inventory> playerInventory = pMinecraft->localplayers[getPad()]->inventory; + std::shared_ptr<ItemInstance> carried = playerInventory->getCarried(); + std::shared_ptr<ItemInstance> clicked = m_menu->getSlot(currentIndex)->getItem(); if (clicked != NULL) { playerInventory->setCarried(ItemInstance::clone(clicked)); @@ -928,7 +928,7 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu quickKeyHeld = FALSE; } m_menu->clicked(currentIndex, buttonNum, quickKeyHeld?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, pMinecraft->localplayers[getPad()]); - shared_ptr<ItemInstance> newItem = m_menu->getSlot(currentIndex)->getItem(); + std::shared_ptr<ItemInstance> newItem = m_menu->getSlot(currentIndex)->getItem(); // call this function to synchronize multiplayer item bar pMinecraft->localgameModes[getPad()]->handleCreativeModeItemAdd(newItem, currentIndex - (int)m_menu->slots->size() + 9 + InventoryMenu::USE_ROW_SLOT_START); @@ -941,7 +941,7 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu m_iCurrSlotX = m_creativeSlotX; m_iCurrSlotY = m_creativeSlotY; - shared_ptr<Inventory> playerInventory = pMinecraft->localplayers[getPad()]->inventory; + std::shared_ptr<Inventory> playerInventory = pMinecraft->localplayers[getPad()]->inventory; playerInventory->setCarried(nullptr); m_bCarryingCreativeItem = false; } @@ -970,14 +970,14 @@ bool IUIScene_CreativeMenu::CanHaveFocus( ESceneSection eSection ) return false; } -bool IUIScene_CreativeMenu::getEmptyInventorySlot(shared_ptr<ItemInstance> item, int &slotX) +bool IUIScene_CreativeMenu::getEmptyInventorySlot(std::shared_ptr<ItemInstance> item, int &slotX) { bool sameItemFound = false; bool emptySlotFound = false; // Jump to the slot with this item already on it, if we can stack more for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i) { - shared_ptr<ItemInstance> slotItem = m_menu->getSlot(i)->getItem(); + std::shared_ptr<ItemInstance> slotItem = m_menu->getSlot(i)->getItem(); if( slotItem != NULL && slotItem->sameItem(item) && (slotItem->GetCount() + item->GetCount() <= item->getMaxStackSize() )) { sameItemFound = true; @@ -1020,7 +1020,7 @@ int IUIScene_CreativeMenu::getSectionStartOffset(ESceneSection eSection) return offset; } -bool IUIScene_CreativeMenu::overrideTooltips(ESceneSection sectionUnderPointer, shared_ptr<ItemInstance> itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, +bool IUIScene_CreativeMenu::overrideTooltips(ESceneSection sectionUnderPointer, std::shared_ptr<ItemInstance> itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, EToolTipItem &buttonA, EToolTipItem &buttonX, EToolTipItem &buttonY, EToolTipItem &buttonRT) { bool _override = false; diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h index 7ab3ff7e..46370773 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h @@ -74,21 +74,21 @@ public: class ItemPickerMenu : public AbstractContainerMenu { protected: - shared_ptr<SimpleContainer> creativeContainer; - shared_ptr<Inventory> inventory; + std::shared_ptr<SimpleContainer> creativeContainer; + std::shared_ptr<Inventory> inventory; public: - ItemPickerMenu( shared_ptr<SimpleContainer> creativeContainer, shared_ptr<Inventory> inventory ); + ItemPickerMenu( std::shared_ptr<SimpleContainer> creativeContainer, std::shared_ptr<Inventory> inventory ); - virtual bool stillValid(shared_ptr<Player> player); + virtual bool stillValid(std::shared_ptr<Player> player); bool isOverrideResultClick(int slotNum, int buttonNum); protected: // 4J Stu - Brought forward from 1.2 to fix infinite recursion bug in creative - virtual void loopClick(int slotIndex, int buttonNum, bool quickKeyHeld, shared_ptr<Player> player) { } // do nothing + virtual void loopClick(int slotIndex, int buttonNum, bool quickKeyHeld, std::shared_ptr<Player> player) { } // do nothing } *itemPickerMenu; protected: - static vector< shared_ptr<ItemInstance> > categoryGroups[eCreativeInventoryGroupsCount]; + static vector< std::shared_ptr<ItemInstance> > categoryGroups[eCreativeInventoryGroupsCount]; // 4J JEV - Tabs static TabSpec **specs; @@ -112,11 +112,11 @@ protected: virtual void handleOutsideClicked(int iPad, int buttonNum, BOOL quickKeyHeld); virtual void handleAdditionalKeyPress(int iAction); virtual void handleSlotListClicked(ESceneSection eSection, int buttonNum, BOOL quickKeyHeld); - bool getEmptyInventorySlot(shared_ptr<ItemInstance> item, int &slotX); + bool getEmptyInventorySlot(std::shared_ptr<ItemInstance> item, int &slotX); int getSectionStartOffset(ESceneSection eSection); virtual bool IsSectionSlotList( ESceneSection eSection ); virtual bool CanHaveFocus( ESceneSection eSection ); - virtual bool overrideTooltips(ESceneSection sectionUnderPointer, shared_ptr<ItemInstance> itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, + virtual bool overrideTooltips(ESceneSection sectionUnderPointer, std::shared_ptr<ItemInstance> itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, EToolTipItem &buttonA, EToolTipItem &buttonX, EToolTipItem &buttonY, EToolTipItem &buttonRT); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp index 658bcdfb..cd99cb79 100644 --- a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp @@ -16,7 +16,7 @@ IUIScene_TradingMenu::IUIScene_TradingMenu() m_bHasUpdatedOnce = false; } -shared_ptr<Merchant> IUIScene_TradingMenu::getMerchant() +std::shared_ptr<Merchant> IUIScene_TradingMenu::getMerchant() { return m_merchant; } @@ -46,11 +46,11 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) switch(iAction) { - case ACTION_MENU_B: + case ACTION_MENU_B: ui.ShowTooltip( iPad, eToolTipButtonX, false ); ui.ShowTooltip( iPad, eToolTipButtonB, false ); - ui.ShowTooltip( iPad, eToolTipButtonA, false ); - ui.ShowTooltip( iPad, eToolTipButtonRB, false ); + ui.ShowTooltip( iPad, eToolTipButtonA, false ); + ui.ShowTooltip( iPad, eToolTipButtonRB, false ); // kill the crafting xui //ui.PlayUISFX(eSFX_Back); ui.CloseUIScenes(iPad); @@ -70,9 +70,9 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) if(!activeRecipe->isDeprecated()) { // Do we have the ingredients? - shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem(); - shared_ptr<ItemInstance> buyBItem = activeRecipe->getBuyBItem(); - shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()]; + std::shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem(); + std::shared_ptr<ItemInstance> buyBItem = activeRecipe->getBuyBItem(); + std::shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()]; int buyAMatches = player->inventory->countMatches(buyAItem); int buyBMatches = player->inventory->countMatches(buyBItem); if( (buyAItem != NULL && buyAMatches >= buyAItem->count) && (buyBItem == NULL || buyBMatches >= buyBItem->count) ) @@ -84,7 +84,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) player->inventory->removeResources(buyBItem); // Add the item we have purchased - shared_ptr<ItemInstance> result = activeRecipe->getSellItem()->copy(); + std::shared_ptr<ItemInstance> result = activeRecipe->getSellItem()->copy(); if(!player->inventory->add( result ) ) { player->drop(result); @@ -92,7 +92,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) // Send a packet to the server int actualShopItem = m_activeOffers.at(selectedShopItem).second; - player->connection->send( shared_ptr<TradeItemPacket>( new TradeItemPacket(m_menu->containerId, actualShopItem) ) ); + player->connection->send( std::shared_ptr<TradeItemPacket>( new TradeItemPacket(m_menu->containerId, actualShopItem) ) ); updateDisplay(); } @@ -149,7 +149,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) ByteArrayOutputStream rawOutput; DataOutputStream output(&rawOutput); output.writeInt(actualShopItem); - Minecraft::GetInstance()->getConnection(getPad())->send(shared_ptr<CustomPayloadPacket>( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); + Minecraft::GetInstance()->getConnection(getPad())->send(std::shared_ptr<CustomPayloadPacket>( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); } } return handled; @@ -203,7 +203,7 @@ void IUIScene_TradingMenu::updateDisplay() ByteArrayOutputStream rawOutput; DataOutputStream output(&rawOutput); output.writeInt(firstValidTrade); - Minecraft::GetInstance()->getConnection(getPad())->send(shared_ptr<CustomPayloadPacket>( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); + Minecraft::GetInstance()->getConnection(getPad())->send(std::shared_ptr<CustomPayloadPacket>( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); } } @@ -247,9 +247,9 @@ void IUIScene_TradingMenu::updateDisplay() vector<wstring> unformattedStrings; wstring offerDescription = GetItemDescription(activeRecipe->getSellItem(), unformattedStrings); setOfferDescription(offerDescription, unformattedStrings); - - shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem(); - shared_ptr<ItemInstance> buyBItem = activeRecipe->getBuyBItem(); + + std::shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem(); + std::shared_ptr<ItemInstance> buyBItem = activeRecipe->getBuyBItem(); setRequest1Item(buyAItem); setRequest2Item(buyBItem); @@ -262,7 +262,7 @@ void IUIScene_TradingMenu::updateDisplay() bool canMake = true; - shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()]; + std::shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()]; int buyAMatches = player->inventory->countMatches(buyAItem); if(buyAMatches > 0) { @@ -321,10 +321,10 @@ bool IUIScene_TradingMenu::canMake(MerchantRecipe *recipe) { if(recipe->isDeprecated()) return false; - shared_ptr<ItemInstance> buyAItem = recipe->getBuyAItem(); - shared_ptr<ItemInstance> buyBItem = recipe->getBuyBItem(); + std::shared_ptr<ItemInstance> buyAItem = recipe->getBuyAItem(); + std::shared_ptr<ItemInstance> buyBItem = recipe->getBuyBItem(); - shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()]; + std::shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()]; int buyAMatches = player->inventory->countMatches(buyAItem); if(buyAMatches > 0) { @@ -349,19 +349,19 @@ bool IUIScene_TradingMenu::canMake(MerchantRecipe *recipe) } -void IUIScene_TradingMenu::setRequest1Item(shared_ptr<ItemInstance> item) +void IUIScene_TradingMenu::setRequest1Item(std::shared_ptr<ItemInstance> item) { } -void IUIScene_TradingMenu::setRequest2Item(shared_ptr<ItemInstance> item) +void IUIScene_TradingMenu::setRequest2Item(std::shared_ptr<ItemInstance> item) { } -void IUIScene_TradingMenu::setTradeItem(int index, shared_ptr<ItemInstance> item) +void IUIScene_TradingMenu::setTradeItem(int index, std::shared_ptr<ItemInstance> item) { } -wstring IUIScene_TradingMenu::GetItemDescription(shared_ptr<ItemInstance> item, vector<wstring> &unformattedStrings) +wstring IUIScene_TradingMenu::GetItemDescription(std::shared_ptr<ItemInstance> item, vector<wstring> &unformattedStrings) { if(item == NULL) return L""; diff --git a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.h b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.h index c8edda67..b02f1a8b 100644 --- a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.h @@ -7,7 +7,7 @@ class IUIScene_TradingMenu { protected: MerchantMenu *m_menu; - shared_ptr<Merchant> m_merchant; + std::shared_ptr<Merchant> m_merchant; vector< pair<MerchantRecipe *,int> > m_activeOffers; int m_validOffersCount; @@ -39,20 +39,20 @@ protected: virtual void setRequest1RedBox(bool show) = 0; virtual void setRequest2RedBox(bool show) = 0; virtual void setTradeRedBox(int index, bool show) = 0; - + virtual void setOfferDescription(const wstring &name, vector<wstring> &unformattedStrings) = 0; - virtual void setRequest1Item(shared_ptr<ItemInstance> item); - virtual void setRequest2Item(shared_ptr<ItemInstance> item); - virtual void setTradeItem(int index, shared_ptr<ItemInstance> item); + virtual void setRequest1Item(std::shared_ptr<ItemInstance> item); + virtual void setRequest2Item(std::shared_ptr<ItemInstance> item); + virtual void setTradeItem(int index, std::shared_ptr<ItemInstance> item); private: void updateDisplay(); bool canMake(MerchantRecipe *recipe); - wstring GetItemDescription(shared_ptr<ItemInstance> item, vector<wstring> &unformattedStrings); + wstring GetItemDescription(std::shared_ptr<ItemInstance> item, vector<wstring> &unformattedStrings); public: - shared_ptr<Merchant> getMerchant(); + std::shared_ptr<Merchant> getMerchant(); virtual int getPad() = 0; };
\ No newline at end of file diff --git a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp index 858a8b43..e27c36da 100644 --- a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp +++ b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp @@ -126,7 +126,7 @@ void UIComponent_TutorialPopup::handleTimerComplete(int id) } void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const wstring &desc, const wstring &title, bool allowFade, bool isReminder) -{ +{ m_interactScene = interactScene; app.DebugPrintf("Setting m_interactScene to %08x\n", m_interactScene); if( interactScene != m_lastInteractSceneMoved ) m_lastInteractSceneMoved = NULL; @@ -204,12 +204,12 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, wstring temp(desc); bool isFixedIcon = false; - + m_iconIsFoil = isFoil; if( icon != TUTORIAL_NO_ICON ) { m_iconIsFoil = false; - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(icon,1,iAuxVal)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(icon,1,iAuxVal)); } else { @@ -238,72 +238,72 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, { iAuxVal = 0; } - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(iconId,1,iAuxVal)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(iconId,1,iAuxVal)); temp.replace(iconTagStartPos, iconEndPos - iconTagStartPos + closeTag.length(), L""); } } - + // remove any icon text else if(temp.find(L"{*CraftingTableIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::workBench_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Tile::workBench_Id,1,0)); } else if(temp.find(L"{*SticksIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::stick_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::stick_Id,1,0)); } else if(temp.find(L"{*PlanksIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::wood_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Tile::wood_Id,1,0)); } else if(temp.find(L"{*WoodenShovelIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::shovel_wood_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::shovel_wood_Id,1,0)); } else if(temp.find(L"{*WoodenHatchetIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::hatchet_wood_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::hatchet_wood_Id,1,0)); } else if(temp.find(L"{*WoodenPickaxeIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::pickAxe_wood_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::pickAxe_wood_Id,1,0)); } else if(temp.find(L"{*FurnaceIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::furnace_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Tile::furnace_Id,1,0)); } else if(temp.find(L"{*WoodenDoorIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::door_wood,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::door_wood,1,0)); } else if(temp.find(L"{*TorchIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::torch_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Tile::torch_Id,1,0)); } else if(temp.find(L"{*BoatIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::boat_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::boat_Id,1,0)); } else if(temp.find(L"{*FishingRodIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::fishingRod_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::fishingRod_Id,1,0)); } else if(temp.find(L"{*FishIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::fish_raw_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::fish_raw_Id,1,0)); } else if(temp.find(L"{*MinecartIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::minecart_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Item::minecart_Id,1,0)); } else if(temp.find(L"{*RailIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::rail_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Tile::rail_Id,1,0)); } else if(temp.find(L"{*PoweredRailIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::goldenRail_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Tile::goldenRail_Id,1,0)); } else if(temp.find(L"{*StructuresIcon*}")!=wstring::npos) { @@ -317,7 +317,7 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, } else if(temp.find(L"{*StoneIcon*}")!=wstring::npos) { - m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::rock_Id,1,0)); + m_iconItem = std::shared_ptr<ItemInstance>(new ItemInstance(Tile::rock_Id,1,0)); } else { @@ -358,7 +358,7 @@ wstring UIComponent_TutorialPopup::_SetImage(wstring &desc) // hide the icon slot m_image.SetShow( FALSE ); } - + BOOL imageShowAtEnd = m_image.IsShown(); if(imageShowAtStart != imageShowAtEnd) { diff --git a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.h b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.h index 36f78300..036fc148 100644 --- a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.h +++ b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.h @@ -15,7 +15,7 @@ private: bool m_lastSceneMovedLeft; bool m_bAllowFade; Tutorial *m_tutorial; - shared_ptr<ItemInstance> m_iconItem; + std::shared_ptr<ItemInstance> m_iconItem; bool m_iconIsFoil; //int m_iLocalPlayerC; diff --git a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp index ef7c0e94..32086f39 100644 --- a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp +++ b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp @@ -100,7 +100,7 @@ void UIControl_EnchantmentBook::tickBook() { UIScene_EnchantingMenu *m_containerScene = (UIScene_EnchantingMenu *)m_parentScene; EnchantmentMenu *menu = m_containerScene->getMenu(); - shared_ptr<ItemInstance> current = menu->getSlot(0)->getItem(); + std::shared_ptr<ItemInstance> current = menu->getSlot(0)->getItem(); if (!ItemInstance::matches(current, last)) { last = current; @@ -122,7 +122,7 @@ void UIControl_EnchantmentBook::tickBook() { shouldBeOpen = true; } - } + } if (shouldBeOpen) open += 0.2f; else open -= 0.2f; diff --git a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.h b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.h index cbe2cf2b..5cd78a89 100644 --- a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.h +++ b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.h @@ -19,7 +19,7 @@ private: //BOOL m_bDirty; //float m_fScale,m_fAlpha; //int m_iPad; - shared_ptr<ItemInstance> last; + std::shared_ptr<ItemInstance> last; //float m_fScreenWidth,m_fScreenHeight; //float m_fRawWidth,m_fRawHeight; diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp index 75eb3dcf..86a9c3e6 100644 --- a/Minecraft.Client/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Common/UI/UIScene.cpp @@ -597,7 +597,7 @@ void UIScene::customDraw(IggyCustomDrawCallbackRegion *region) app.DebugPrintf("Handling custom draw for scene with no override!\n"); } -void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations) +void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, std::shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations) { if (item!= NULL) { @@ -608,7 +608,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP //Make sure that pMinecraft->player is the correct player so that player specific rendering // eg clock and compass, are rendered correctly Minecraft *pMinecraft=Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> oldPlayer = pMinecraft->player; + std::shared_ptr<MultiplayerLocalPlayer> oldPlayer = pMinecraft->player; if( iPad >= 0 && iPad < XUSER_MAX_COUNT ) pMinecraft->player = pMinecraft->localplayers[iPad]; // Setup GDraw, normal game render states and matrices @@ -688,7 +688,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP //Make sure that pMinecraft->player is the correct player so that player specific rendering // eg clock and compass, are rendered correctly - shared_ptr<MultiplayerLocalPlayer> oldPlayer = pMinecraft->player; + std::shared_ptr<MultiplayerLocalPlayer> oldPlayer = pMinecraft->player; if( iPad >= 0 && iPad < XUSER_MAX_COUNT ) pMinecraft->player = pMinecraft->localplayers[iPad]; _customDrawSlotControl(customDrawRegion, iPad, item, fAlpha, isFoil, bDecorations, false); @@ -701,7 +701,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP } } -void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer) +void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, std::shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer) { Minecraft *pMinecraft=Minecraft::GetInstance(); diff --git a/Minecraft.Client/Common/UI/UIScene.h b/Minecraft.Client/Common/UI/UIScene.h index 1b646ce0..d9490a82 100644 --- a/Minecraft.Client/Common/UI/UIScene.h +++ b/Minecraft.Client/Common/UI/UIScene.h @@ -187,7 +187,7 @@ public: protected: //void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, int iID, int iCount, int iAuxVal, float fAlpha, bool isFoil, bool bDecorations); - void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations); + void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, std::shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations); bool m_cacheSlotRenders; bool m_needsCacheRendered; @@ -196,14 +196,14 @@ private: typedef struct _CachedSlotDrawData { CustomDrawData *customDrawRegion; - shared_ptr<ItemInstance> item; + std::shared_ptr<ItemInstance> item; float fAlpha; bool isFoil; bool bDecorations; } CachedSlotDrawData; vector<CachedSlotDrawData *> m_cachedSlotDraw; - void _customDrawSlotControl(CustomDrawData *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer); + void _customDrawSlotControl(CustomDrawData *region, int iPad, std::shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer); public: // INPUT diff --git a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp index 7823fb4e..126f2403 100644 --- a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp @@ -49,7 +49,7 @@ void UIScene_AbstractContainerMenu::handleDestroy() } // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(pMinecraft->localplayers[m_iPad] != NULL) pMinecraft->localplayers[m_iPad]->closeContainer(); ui.OverrideSFX(m_iPad,ACTION_MENU_A,false); @@ -90,7 +90,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) // We may have varying depths of controls here, so base off the pointers parent #if TO_BE_IMPLEMENTED HXUIOBJ parent; - XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight ); + XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight ); #else fPointerWidth = 50; fPointerHeight = 50; @@ -103,7 +103,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) // Get size of pointer m_fPointerImageOffsetX = 0; //floor(fPointerWidth/2.0f); m_fPointerImageOffsetY = 0; //floor(fPointerHeight/2.0f); - + m_fPanelMinX = fPanelX; m_fPanelMaxX = fPanelX + fPanelWidth; m_fPanelMinY = fPanelY; @@ -111,9 +111,9 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) #ifdef __ORBIS__ // we need to map the touchpad rectangle to the UI rectangle. While it works great for the creative menu, it is much too sensitive for the smaller menus. - //X coordinate of the touch point (0 to 1919) - //Y coordinate of the touch point (0 to 941: DUALSHOCK�4 wireless controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the PlayStation�4 development tool, - //0 to 753: JDX-1000x series controllers for the PlayStation�4 development tool,) + //X coordinate of the touch point (0 to 1919) + //Y coordinate of the touch point (0 to 941: DUALSHOCK�4 wireless controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the PlayStation�4 development tool, + //0 to 753: JDX-1000x series controllers for the PlayStation�4 development tool,) m_fTouchPadMulX=fPanelWidth/1919.0f; m_fTouchPadMulY=fPanelHeight/941.0f; m_fTouchPadDeadZoneX=15.0f*m_fTouchPadMulX; @@ -161,13 +161,13 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) S32 width, height; m_parentLayer->getRenderDimensions(width, height); S32 x = m_pointerPos.x*((float)width/m_movieWidth); - S32 y = m_pointerPos.y*((float)height/m_movieHeight); + S32 y = m_pointerPos.y*((float)height/m_movieHeight); IggyMakeEventMouseMove( &mouseEvent, x, y); IggyEventResult result; IggyPlayerDispatchEventRS ( getMovie() , &mouseEvent , &result ); -#ifdef USE_POINTER_ACCEL +#ifdef USE_POINTER_ACCEL m_fPointerVelX = 0.0f; m_fPointerVelY = 0.0f; m_fPointerAccelX = 0.0f; @@ -332,9 +332,9 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; - shared_ptr<ItemInstance> item = nullptr; + std::shared_ptr<ItemInstance> item = nullptr; if(wcscmp((wchar_t *)region->name,L"pointerIcon")==0) - { + { m_cacheSlotRenders = false; item = pMinecraft->localplayers[m_iPad]->inventory->getCarried(); } @@ -347,7 +347,7 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg app.DebugPrintf("This is not the control we are looking for\n"); } else - { + { m_cacheSlotRenders = true; Slot *slot = m_menu->getSlot(slotId); item = slot->getItem(); @@ -398,7 +398,7 @@ void UIScene_AbstractContainerMenu::setFocusToPointer(int iPad) m_focusSection = eSectionNone; } -shared_ptr<ItemInstance> UIScene_AbstractContainerMenu::getSlotItem(ESceneSection eSection, int iSlot) +std::shared_ptr<ItemInstance> UIScene_AbstractContainerMenu::getSlotItem(ESceneSection eSection, int iSlot) { Slot *slot = m_menu->getSlot( getSectionStartOffset(eSection) + iSlot ); if(slot) return slot->getItem(); diff --git a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h index 26688dc5..f4411b00 100644 --- a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h @@ -31,7 +31,7 @@ protected: UI_MAP_ELEMENT( m_labelInventory, "inventoryLabel") UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - + public: UIScene_AbstractContainerMenu(int iPad, UILayer *parentLayer); ~UIScene_AbstractContainerMenu(); @@ -49,7 +49,7 @@ protected: virtual void setSectionFocus(ESceneSection eSection, int iPad); void setFocusToPointer(int iPad); void SetPointerText(const wstring &description, vector<wstring> &unformattedStrings, bool newSlot); - virtual shared_ptr<ItemInstance> getSlotItem(ESceneSection eSection, int iSlot); + virtual std::shared_ptr<ItemInstance> getSlotItem(ESceneSection eSection, int iSlot); virtual bool isSlotEmpty(ESceneSection eSection, int iSlot); virtual void adjustPointerForSafeZone(); @@ -57,7 +57,7 @@ protected: public: virtual void tick(); - + virtual void render(S32 width, S32 height, C4JRender::eViewportType viewpBort); virtual void customDraw(IggyCustomDrawCallbackRegion *region); diff --git a/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.h b/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.h index 5441a1ac..13c8b1de 100644 --- a/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.h @@ -8,7 +8,7 @@ class InventoryMenu; class UIScene_BrewingStandMenu : public UIScene_AbstractContainerMenu, public IUIScene_BrewingMenu { private: - shared_ptr<BrewingStandTileEntity> m_brewingStand; + std::shared_ptr<BrewingStandTileEntity> m_brewingStand; public: UIScene_BrewingStandMenu(int iPad, void *initData, UILayer *parentLayer); diff --git a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp index 5b729069..1be78ad6 100644 --- a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp @@ -51,7 +51,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p // if we are in splitscreen, then we need to figure out if we want to move this scene if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } XuiElementSetShow(m_hGrid,TRUE); @@ -76,7 +76,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p #if TO_BE_IMPLEMENTED - // display the first group tab + // display the first group tab m_hTabGroupA[m_iGroupIndex].SetShow(TRUE); // store the slot 0 position @@ -196,7 +196,7 @@ void UIScene_CraftingMenu::handleDestroy() if(gameMode != NULL) gameMode->getTutorial()->changeTutorialState(m_previousTutorialState); } - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); ui.OverrideSFX(m_iPad,ACTION_MENU_A,false); @@ -297,7 +297,7 @@ void UIScene_CraftingMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int else { iVSlotIndexA[1]--; - } + } ui.PlayUISFX(eSFX_Focus); UpdateVerticalSlots(); @@ -349,7 +349,7 @@ void UIScene_CraftingMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int // clear the indices iVSlotIndexA[0]=CanBeMadeA[m_iCurrentSlotHIndex].iCount-1; iVSlotIndexA[1]=0; - iVSlotIndexA[2]=1; + iVSlotIndexA[2]=1; UpdateVerticalSlots(); UpdateHighlight(); @@ -435,7 +435,7 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region) Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; - shared_ptr<ItemInstance> item = nullptr; + std::shared_ptr<ItemInstance> item = nullptr; int slotId = -1; float alpha = 1.0f; bool decorations = true; @@ -606,21 +606,21 @@ void UIScene_CraftingMenu::hideAllIngredientsSlots() } } -void UIScene_CraftingMenu::setCraftHSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha) +void UIScene_CraftingMenu::setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha) { m_hSlotsInfo[iIndex].item = item; m_hSlotsInfo[iIndex].alpha = uiAlpha; m_hSlotsInfo[iIndex].show = true; } -void UIScene_CraftingMenu::setCraftVSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha) +void UIScene_CraftingMenu::setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha) { m_vSlotsInfo[iIndex].item = item; m_vSlotsInfo[iIndex].alpha = uiAlpha; m_vSlotsInfo[iIndex].show = true; } -void UIScene_CraftingMenu::setCraftingOutputSlotItem(int iPad, shared_ptr<ItemInstance> item) +void UIScene_CraftingMenu::setCraftingOutputSlotItem(int iPad, std::shared_ptr<ItemInstance> item) { m_craftingOutputSlotInfo.item = item; m_craftingOutputSlotInfo.alpha = 31; @@ -632,7 +632,7 @@ void UIScene_CraftingMenu::setCraftingOutputSlotRedBox(bool show) m_slotListCraftingOutput.showSlotRedBox(0,show); } -void UIScene_CraftingMenu::setIngredientSlotItem(int iPad, int index, shared_ptr<ItemInstance> item) +void UIScene_CraftingMenu::setIngredientSlotItem(int iPad, int index, std::shared_ptr<ItemInstance> item) { m_ingredientsSlotsInfo[index].item = item; m_ingredientsSlotsInfo[index].alpha = 31; @@ -644,7 +644,7 @@ void UIScene_CraftingMenu::setIngredientSlotRedBox(int index, bool show) m_slotListIngredientsLayout.showSlotRedBox(index,show); } -void UIScene_CraftingMenu::setIngredientDescriptionItem(int iPad, int index, shared_ptr<ItemInstance> item) +void UIScene_CraftingMenu::setIngredientDescriptionItem(int iPad, int index, std::shared_ptr<ItemInstance> item) { m_ingredientsInfo[index].item = item; m_ingredientsInfo[index].alpha = 31; @@ -680,7 +680,7 @@ void UIScene_CraftingMenu::setShowCraftHSlot(int iIndex, bool show) void UIScene_CraftingMenu::showTabHighlight(int iIndex, bool show) { if(show) - { + { IggyDataValue result; IggyDataValue value[1]; @@ -729,7 +729,7 @@ void UIScene_CraftingMenu::scrollDescriptionDown() void UIScene_CraftingMenu::updateHighlightAndScrollPositions() { - { + { IggyDataValue result; IggyDataValue value[2]; diff --git a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.h b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.h index 44a39d61..dffd4273 100644 --- a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.h @@ -32,7 +32,7 @@ class UIScene_CraftingMenu : public UIScene, public IUIScene_CraftingMenu private: typedef struct _SlotInfo { - shared_ptr<ItemInstance> item; + std::shared_ptr<ItemInstance> item; unsigned int alpha; bool show; @@ -97,7 +97,7 @@ protected: ETouchInput_TouchPanel_5, ETouchInput_TouchPanel_6, ETouchInput_CraftingHSlots, - + ETouchInput_Count, }; UIControl_Touch m_TouchInput[ETouchInput_Count]; @@ -182,13 +182,13 @@ protected: virtual void hideAllHSlots(); virtual void hideAllVSlots(); virtual void hideAllIngredientsSlots(); - virtual void setCraftHSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha); - virtual void setCraftVSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha); - virtual void setCraftingOutputSlotItem(int iPad, shared_ptr<ItemInstance> item); + virtual void setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha); + virtual void setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha); + virtual void setCraftingOutputSlotItem(int iPad, std::shared_ptr<ItemInstance> item); virtual void setCraftingOutputSlotRedBox(bool show); - virtual void setIngredientSlotItem(int iPad, int index, shared_ptr<ItemInstance> item); + virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr<ItemInstance> item); virtual void setIngredientSlotRedBox(int index, bool show); - virtual void setIngredientDescriptionItem(int iPad, int index, shared_ptr<ItemInstance> item); + virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr<ItemInstance> item); virtual void setIngredientDescriptionRedBox(int index, bool show); virtual void setIngredientDescriptionText(int index, LPCWSTR text); virtual void setShowCraftHSlot(int iIndex, bool show); diff --git a/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp index 569cc8ba..85441877 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp @@ -21,7 +21,7 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void *_initData, UILayer *p InventoryScreenInput *initData = (InventoryScreenInput *)_initData; - shared_ptr<SimpleContainer> creativeContainer = shared_ptr<SimpleContainer>(new SimpleContainer( 0, TabSpec::MAX_SIZE )); + std::shared_ptr<SimpleContainer> creativeContainer = std::shared_ptr<SimpleContainer>(new SimpleContainer( 0, TabSpec::MAX_SIZE )); itemPickerMenu = new ItemPickerMenu(creativeContainer, initData->player->inventory); Initialize( initData->iPad, itemPickerMenu, false, -1, eSectionInventoryCreativeUsing, eSectionInventoryCreativeMax, initData->bNavigateBack); @@ -96,7 +96,7 @@ void UIScene_CreativeMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int { // calculate relative touch position on slider float fPosition = ((float)y - (float)m_TouchInput[ETouchInput_TouchSlider].getYPos() - m_controlMainPanel.getYPos()) / (float)m_TouchInput[ETouchInput_TouchSlider].getHeight(); - + // clamp if(fPosition > 1) fPosition = 1.0f; @@ -105,7 +105,7 @@ void UIScene_CreativeMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int // calculate page position according to page count int iCurrentPage = Math::round(fPosition * (specs[m_curTab]->getPageCount() - 1)); - + // set tab page m_tabPage[m_curTab] = iCurrentPage; @@ -208,7 +208,7 @@ void UIScene_CreativeMenu::handleInput(int iPad, int key, bool repeat, bool pres dir = -1; // Fall through intentional case VK_PAD_RSHOULDER: - { + { ECreativeInventoryTabs tab = (ECreativeInventoryTabs)(m_curTab + dir); if (tab < 0) tab = (ECreativeInventoryTabs)(eCreativeInventoryTab_COUNT - 1); if (tab >= eCreativeInventoryTab_COUNT) tab = eCreativeInventoryTab_BuildingBlocks; diff --git a/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp b/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp index 44a7e6c5..2dcdf8fe 100644 --- a/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp @@ -127,7 +127,7 @@ void UIScene_DebugOverlay::customDraw(IggyCustomDrawCallbackRegion *region) } else { - shared_ptr<ItemInstance> item = shared_ptr<ItemInstance>( new ItemInstance(itemId,1,0) ); + std::shared_ptr<ItemInstance> item = std::shared_ptr<ItemInstance>( new ItemInstance(itemId,1,0) ); if(item != NULL) customDrawSlotControl(region,m_iPad,item,1.0f,false,false); } } @@ -176,7 +176,7 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId) { int id = childId; if(id<m_mobFactories.size()) - { + { app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_SpawnMob,(void *)m_mobFactories[id]); } } diff --git a/Minecraft.Client/Common/UI/UIScene_FurnaceMenu.h b/Minecraft.Client/Common/UI/UIScene_FurnaceMenu.h index dcea967e..56c0447f 100644 --- a/Minecraft.Client/Common/UI/UIScene_FurnaceMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_FurnaceMenu.h @@ -8,7 +8,7 @@ class InventoryMenu; class UIScene_FurnaceMenu : public UIScene_AbstractContainerMenu, public IUIScene_FurnaceMenu { private: - shared_ptr<FurnaceTileEntity> m_furnace; + std::shared_ptr<FurnaceTileEntity> m_furnace; public: UIScene_FurnaceMenu(int iPad, void *initData, UILayer *parentLayer); diff --git a/Minecraft.Client/Common/UI/UIScene_HUD.cpp b/Minecraft.Client/Common/UI/UIScene_HUD.cpp index 27eeb76b..37b433cf 100644 --- a/Minecraft.Client/Common/UI/UIScene_HUD.cpp +++ b/Minecraft.Client/Common/UI/UIScene_HUD.cpp @@ -161,7 +161,7 @@ void UIScene_HUD::tick() } else { - shared_ptr<EnderDragon> boss = EnderDragonRenderer::bossInstance; + std::shared_ptr<EnderDragon> boss = EnderDragonRenderer::bossInstance; // 4J Stu - Don't clear this here as it's wiped for other players //EnderDragonRenderer::bossInstance = nullptr; m_ticksWithNoBoss = 0; @@ -191,7 +191,7 @@ void UIScene_HUD::customDraw(IggyCustomDrawCallbackRegion *region) else { Slot *invSlot = pMinecraft->localplayers[m_iPad]->inventoryMenu->getSlot(InventoryMenu::USE_ROW_SLOT_START + slot); - shared_ptr<ItemInstance> item = invSlot->getItem(); + std::shared_ptr<ItemInstance> item = invSlot->getItem(); if(item != NULL) { unsigned char ucAlpha=app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_InterfaceOpacity); @@ -265,7 +265,7 @@ void UIScene_HUD::handleReload() } m_labelJukebox.init(L""); - int iGuiScale; + int iGuiScale; Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localplayers[m_iPad]->m_iScreenSection == C4JRender::VIEWPORT_TYPE_FULLSCREEN) { @@ -629,7 +629,7 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor } IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight ); - + m_renderWidth = tileWidth; m_renderHeight = tileHeight; @@ -639,7 +639,7 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor tileYStart , tileXStart + tileWidth , tileYStart + tileHeight , - 0 ); + 0 ); IggyPlayerDrawTilesEnd ( getMovie() ); } else @@ -651,7 +651,7 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor void UIScene_HUD::handleTimerComplete(int id) { Minecraft *pMinecraft = Minecraft::GetInstance(); - + bool anyVisible = false; if(pMinecraft->localplayers[m_iPad]!= NULL) { @@ -735,7 +735,7 @@ void UIScene_HUD::SetDisplayName(const wstring &displayName) if(displayName.compare(m_displayName) != 0) { m_displayName = displayName; - + IggyDataValue result; IggyDataValue value[1]; IggyStringUTF16 stringVal; @@ -775,7 +775,7 @@ void UIScene_HUD::handleGameTick() } m_parentLayer->showComponent(m_iPad, eUIScene_HUD,true); - int iGuiScale; + int iGuiScale; if(pMinecraft->localplayers[m_iPad]->m_iScreenSection == C4JRender::VIEWPORT_TYPE_FULLSCREEN) { @@ -788,7 +788,7 @@ void UIScene_HUD::handleGameTick() SetHudSize(iGuiScale); SetDisplayName(ProfileManager.GetDisplayName(m_iPad)); - + SetTooltipsEnabled(((ui.GetMenuDisplayed(ProfileManager.GetPrimaryPad())) || (app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_Tooltips) != 0))); #if TO_BE_IMPLEMENTED @@ -797,8 +797,8 @@ void UIScene_HUD::handleGameTick() { int iTooltipsYOffset = 0; // if tooltips are off, set the y offset to zero - if(app.GetGameSettings(m_iPad,eGameSetting_Tooltips)==0) - { + if(app.GetGameSettings(m_iPad,eGameSetting_Tooltips)==0) + { switch(iGuiScale) { case 0: @@ -987,11 +987,11 @@ void UIScene_HUD::handleGameTick() bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(m_iPad) && !(app.GetXuiAction(m_iPad)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(m_iPad,eGameSetting_DisplayHUD)!=0; if(bDisplayGui && pMinecraft->localplayers[m_iPad] != NULL) { - setVisible(true); + setVisible(true); } else { - setVisible(false); + setVisible(false); } } } diff --git a/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp index de8af0ac..72c41049 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp @@ -65,11 +65,11 @@ void UIScene_InGameHostOptionsMenu::handleInput(int iPad, int key, bool repeat, // Send update settings packet to server if(hostOptions != app.GetGameHostOption(eGameHostOption_All) ) { - Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + std::shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; if(player->connection) { - player->connection->send( shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); + player->connection->send( std::shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); } } diff --git a/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp index 5c3f73f6..542834db 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp @@ -67,7 +67,7 @@ UIScene_InGameInfoMenu::UIScene_InGameInfoMenu(int iPad, void *initData, UILayer m_playersVoiceState[i] = voiceStatus; m_playersColourState[i] = app.GetPlayerColour( m_players[i] ); m_playerNames[i] = playerName; - m_playerList.addItem( playerName, app.GetPlayerColour( m_players[i] ), voiceStatus); + m_playerList.addItem( playerName, app.GetPlayerColour( m_players[i] ), voiceStatus); } } @@ -78,7 +78,7 @@ UIScene_InGameInfoMenu::UIScene_InGameInfoMenu(int iPad, void *initData, UILayer if(thisPlayer != NULL) m_isHostPlayer = thisPlayer->IsHost() == TRUE; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { removeControl( &m_buttonGameOptions, false ); @@ -131,7 +131,7 @@ void UIScene_InGameInfoMenu::updateTooltips() int keyA = -1; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -161,7 +161,7 @@ void UIScene_InGameInfoMenu::updateTooltips() } } } - + #if defined(__PS3__) || defined(__ORBIS__) if(m_iPad == ProfileManager.GetPrimaryPad() ) ikeyY = IDS_TOOLTIPS_GAME_INVITES; #else @@ -243,7 +243,7 @@ void UIScene_InGameInfoMenu::handleReload() m_playersVoiceState[i] = voiceStatus; m_playersColourState[i] = app.GetPlayerColour( m_players[i] ); m_playerNames[i] = playerName; - m_playerList.addItem( playerName, app.GetPlayerColour( m_players[i] ), voiceStatus); + m_playerList.addItem( playerName, app.GetPlayerColour( m_players[i] ), voiceStatus); } } @@ -252,7 +252,7 @@ void UIScene_InGameInfoMenu::handleReload() if(thisPlayer != NULL) m_isHostPlayer = thisPlayer->IsHost() == TRUE; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { removeControl( &m_buttonGameOptions, false ); @@ -367,7 +367,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr #else // __PS3__ int ret = sceNpBasicRecvMessageCustom(SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, SYS_MEMORY_CONTAINER_ID_INVALID); app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, ret); -#endif +#endif } } #else @@ -397,7 +397,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr if(pressed && !repeat && !g_NetworkManager.IsLocalGame() ) { #ifdef __PSVITA__ - if(CGameNetworkManager::usingAdhocMode() == false) + if(CGameNetworkManager::usingAdhocMode() == false) g_NetworkManager.SendInviteGUI(iPad); #else g_NetworkManager.SendInviteGUI(iPad); @@ -431,7 +431,7 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId) INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ currentSelection ] ); Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -544,7 +544,7 @@ void UIScene_InGameInfoMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer } } - scene->m_playerList.addItem( playerName, app.GetPlayerColour( scene->m_players[scene->m_playersCount - 1] ), voiceStatus); + scene->m_playerList.addItem( playerName, app.GetPlayerColour( scene->m_players[scene->m_playersCount - 1] ), voiceStatus); } } @@ -554,12 +554,12 @@ int UIScene_InGameInfoMenu::KickPlayerReturned(void *pParam,int iPad,C4JStorage: delete pParam; if(result==C4JStorage::EMessage_ResultAccept) - { + { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer->connection) { - localPlayer->connection->send( shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( std::shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) ); } } @@ -571,7 +571,7 @@ int UIScene_InGameInfoMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStora { UIScene_InGameInfoMenu* pClass = (UIScene_InGameInfoMenu*)pParam; - if(result==C4JStorage::EMessage_ResultAccept) + if(result==C4JStorage::EMessage_ResultAccept) { #ifdef __PS3__ SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_InGameInfoMenu::ViewInvites_SignInReturned, pClass); diff --git a/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp index 6eb22b09..aa0e1994 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp @@ -66,7 +66,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void #else m_checkboxes[eControl_Op].init(L"DEBUG: Creative",eControl_Op,Player::getPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode)); #endif - + removeControl( &m_buttonKick, true ); removeControl( &m_checkboxes[eControl_CheatTeleport], true ); @@ -129,7 +129,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void m_checkboxes[eControl_HostHunger].SetEnable(true); checked = Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanToggleClassicHunger)!=0; m_checkboxes[eControl_HostHunger].init( app.GetString(IDS_CAN_DISABLE_EXHAUSTION), eControl_HostHunger, checked); - + checked = Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanTeleport)!=0; m_checkboxes[eControl_CheatTeleport].init(app.GetString(IDS_ENABLE_TELEPORT),eControl_CheatTeleport,checked); } @@ -315,11 +315,11 @@ void UIScene_InGamePlayerOptionsMenu::handleInput(int iPad, int key, bool repeat if(originalPrivileges != m_playerPrivileges) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + std::shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; if(player->connection) { - player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); + player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); } } navigateBack(); @@ -364,12 +364,12 @@ int UIScene_InGamePlayerOptionsMenu::KickPlayerReturned(void *pParam,int iPad,C4 delete pParam; if(result==C4JStorage::EMessage_ResultAccept) - { + { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer->connection) { - localPlayer->connection->send( shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( std::shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) ); } // Fix for #61494 - [CRASH]: TU7: Code: Multiplayer: Title may crash while kicking a player from an online game. @@ -405,7 +405,7 @@ void UIScene_InGamePlayerOptionsMenu::resetCheatCheckboxes() m_checkboxes[eControl_HostInvisible].SetEnable(isModerator); m_checkboxes[eControl_HostFly].SetEnable(isModerator); m_checkboxes[eControl_HostHunger].SetEnable(isModerator); - m_checkboxes[eControl_CheatTeleport].SetEnable(isModerator); + m_checkboxes[eControl_CheatTeleport].SetEnable(isModerator); } } diff --git a/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp index 723937d0..e13a9239 100644 --- a/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp @@ -32,7 +32,7 @@ UIScene_InventoryMenu::UIScene_InventoryMenu(int iPad, void *_initData, UILayer m_previousTutorialState = gameMode->getTutorial()->getCurrentState(); gameMode->getTutorial()->changeTutorialState(e_Tutorial_State_Inventory_Menu, this); } - + InventoryMenu *menu = (InventoryMenu *)initData->player->inventoryMenu; initData->player->awardStat(GenericStats::openInventory(),GenericStats::param_openInventory()); @@ -251,7 +251,7 @@ void UIScene_InventoryMenu::updateEffectsDisplay() { // Update with the current effects Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; if(player == NULL) return; @@ -262,7 +262,7 @@ void UIScene_InventoryMenu::updateEffectsDisplay() IggyDataValue *UpdateValue = new IggyDataValue[activeEffects->size()*2]; for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) - { + { MobEffectInstance *effect = *it; if(effect->getDuration() >= m_bEffectTime[effect->getId()]) diff --git a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp index 80db57f8..d21c2906 100644 --- a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -9,7 +9,7 @@ #define PLAYER_ONLINE_TIMER_TIME 100 // if the value is greater than 32000, it's an xzp icon that needs displayed, rather than the game icon -const int UIScene_LeaderboardsMenu::TitleIcons[UIScene_LeaderboardsMenu::NUM_LEADERBOARDS][7] = +const int UIScene_LeaderboardsMenu::TitleIcons[UIScene_LeaderboardsMenu::NUM_LEADERBOARDS][7] = { { UIControl_LeaderboardList::e_ICON_TYPE_WALKED, UIControl_LeaderboardList::e_ICON_TYPE_FALLEN, Item::minecart_Id, Item::boat_Id, NULL }, { Tile::dirt_Id, Tile::stoneBrick_Id, Tile::sand_Id, Tile::rock_Id, Tile::gravel_Id, Tile::clay_Id, Tile::obsidian_Id }, @@ -36,7 +36,7 @@ const UIScene_LeaderboardsMenu::LeaderboardDescriptor UIScene_LeaderboardsMenu:: UIScene_LeaderboardsMenu::LeaderboardDescriptor( 6, false, IDS_LEADERBOARD_FARMING_HARD), // Farming Hard }, { - UIScene_LeaderboardsMenu::LeaderboardDescriptor( 0, false, -1), // + UIScene_LeaderboardsMenu::LeaderboardDescriptor( 0, false, -1), // UIScene_LeaderboardsMenu::LeaderboardDescriptor( 7, false, IDS_LEADERBOARD_KILLS_EASY), // Kills Easy UIScene_LeaderboardsMenu::LeaderboardDescriptor( 7, false, IDS_LEADERBOARD_KILLS_NORMAL), // Kills Normal UIScene_LeaderboardsMenu::LeaderboardDescriptor( 7, false, IDS_LEADERBOARD_KILLS_HARD), // Kills Hard @@ -132,7 +132,7 @@ void UIScene_LeaderboardsMenu::updateTooltips() selection < (GetEntryStartIndex() + m_leaderboard.m_entries.size()) ) { #ifdef _XBOX - if( (m_leaderboard.m_entries[selection - (m_leaderboard.m_entryStartIndex-1)].m_bFriend==false) + if( (m_leaderboard.m_entries[selection - (m_leaderboard.m_entryStartIndex-1)].m_bFriend==false) && (m_leaderboard.m_entries[selection - (m_leaderboard.m_entryStartIndex-1)].m_bRequestedFriend==false)) #endif { @@ -267,7 +267,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool SetLeaderboardHeader(); - ReadStats(-1); + ReadStats(-1); ui.PlayUISFX(eSFX_Press); } handled = true; @@ -284,7 +284,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool if( m_leaderboard.m_totalEntryCount <= 10 ) break; - + sendInputToMovie(key, repeat, pressed, released); #if 0 @@ -441,7 +441,7 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex) } //app.DebugPrintf("Requesting stats read %d - %d - %d\n", m_currentLeaderboard, startIndex == -1 ? m_currentFilter : LeaderboardManager::eFM_TopRank, m_currentDifficulty); - + LeaderboardManager::EFilterMode filtermode; if ( m_currentFilter == LeaderboardManager::eFM_MyScore || m_currentFilter == LeaderboardManager::eFM_TopRank ) @@ -457,8 +457,8 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex) switch (filtermode) { case LeaderboardManager::eFM_TopRank: - LeaderboardManager::Instance()->ReadStats_TopRank( this, - m_currentDifficulty, (LeaderboardManager::EStatsType) m_currentLeaderboard, + LeaderboardManager::Instance()->ReadStats_TopRank( this, + m_currentDifficulty, (LeaderboardManager::EStatsType) m_currentLeaderboard, m_newEntryIndex, m_newReadSize ); break; @@ -529,7 +529,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() { m_leaderboard.m_totalEntryCount = NUM_ENTRIES; m_leaderboard.m_numColumns = LEADERBOARD_DESCRIPTORS[m_currentLeaderboard][m_currentDifficulty].m_columnCount; - + //For each entry in the leaderboard for(unsigned int entryIndex=0; entryIndex < NUM_ENTRIES; entryIndex++) { @@ -539,7 +539,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() m_leaderboard.m_entries[entryIndex].m_row = entryIndex; m_leaderboard.m_entries[entryIndex].m_rank = entryIndex+1; swprintf(m_leaderboard.m_entries[entryIndex].m_wcRank, 12, L"12345678");//(int)m_leaderboard.m_entries[entryIndex].m_rank); - + swprintf(m_leaderboard.m_entries[entryIndex].m_gamerTag, 17, L"WWWWWWWWWWWWWWWW"); //m_leaderboard.m_entries[entryIndex].m_locale = (entryIndex % 37) + 1; @@ -598,7 +598,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() //LeaderboardManager::Instance()->SetStatsRetrieved(false); return false; } - + m_leaderboard.m_numColumns = m_stats.m_queries[0].m_statsSize; for( unsigned int entryIndex=0 ; entryIndex < m_newEntriesCount; ++entryIndex ) @@ -676,7 +676,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() insertPosition++; } - + if (deleteFront) { // Delete front x entries @@ -865,7 +865,7 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet m_labelInfo.setVisible( false ); m_listEntries.initLeaderboard(m_newSel, m_leaderboard.m_totalEntryCount, LEADERBOARD_DESCRIPTORS[m_currentLeaderboard][m_currentDifficulty].m_columnCount); - + int startIndex = m_newEntryIndex; int entryCount = m_newEntriesCount; @@ -874,7 +874,7 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet bool isLast = i == ((startIndex + entryCount) - 1); int idsErrorMessage = m_leaderboard.m_entries[i].m_idsErrorMessage; - + if (idsErrorMessage > 0) { m_listEntries.addDataSet( @@ -882,7 +882,7 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet m_leaderboard.m_entries[i].m_row, m_leaderboard.m_entries[i].m_rank, m_leaderboard.m_entries[i].m_gamerTag, - + true, // 4J-JEV: Has error message to display. app.GetString(idsErrorMessage), @@ -896,9 +896,9 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet m_leaderboard.m_entries[i].m_row, m_leaderboard.m_entries[i].m_rank, m_leaderboard.m_entries[i].m_gamerTag, - - // 4J-TomK | The bDisplayMessage Flag defines if Leaderboard Data should be - // displayed (false) or if a specific message (true - when data is private for example) + + // 4J-TomK | The bDisplayMessage Flag defines if Leaderboard Data should be + // displayed (false) or if a specific message (true - when data is private for example) // should be displayed. The message itself should be passed on in col0! false, @@ -955,7 +955,7 @@ int UIScene_LeaderboardsMenu::SetLeaderboardTitleIcons() m_listEntries.setColumnIcon(i,TitleIcons[m_currentLeaderboard][i]); } } - + return iValidIcons; } @@ -969,7 +969,7 @@ void UIScene_LeaderboardsMenu::customDraw(IggyCustomDrawCallbackRegion *region) } else { - shared_ptr<ItemInstance> item = shared_ptr<ItemInstance>( new ItemInstance(TitleIcons[m_currentLeaderboard][slotId], 1, 0) ); + std::shared_ptr<ItemInstance> item = std::shared_ptr<ItemInstance>( new ItemInstance(TitleIcons[m_currentLeaderboard][slotId], 1, 0) ); customDrawSlotControl(region,m_iPad,item,1.0f,false,false); } } diff --git a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp index c29bac2d..fec64a98 100644 --- a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp @@ -85,7 +85,7 @@ void UIScene_SignEntryMenu::tick() for(int i=0;i<4;i++) { wstring temp=m_textInputLines[i].getLabel(); - m_sign->SetMessage(i,temp); + m_sign->SetMessage(i,temp); } m_sign->setChanged(); @@ -94,10 +94,10 @@ void UIScene_SignEntryMenu::tick() // need to send the new data if (pMinecraft->level->isClientSide) { - shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection && player->connection->isStarted()) { - player->connection->send( shared_ptr<SignUpdatePacket>( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) ); + player->connection->send( std::shared_ptr<SignUpdatePacket>( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) ); } } ui.CloseUIScenes(m_iPad); diff --git a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h index 28b37d53..b83a8b2d 100644 --- a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h @@ -17,7 +17,7 @@ private: eControl_Confirm }; - shared_ptr<SignTileEntity> m_sign; + std::shared_ptr<SignTileEntity> m_sign; int m_iEditingLine; bool m_bConfirmed; bool m_bIgnoreInput; diff --git a/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp b/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp index f6916d13..596f5b67 100644 --- a/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp @@ -11,13 +11,13 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa { // Setup all the Iggy references we need for this scene initialiseMovie(); - + TeleportMenuInitData *initParam = (TeleportMenuInitData *)initData; m_teleportToPlayer = initParam->teleportToPlayer; delete initParam; - + if(m_teleportToPlayer) { m_labelTitle.init(app.GetString(IDS_TELEPORT_TO_PLAYER)); @@ -81,7 +81,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa m_playersVoiceState[m_playersCount] = voiceStatus; m_playersColourState[m_playersCount] = app.GetPlayerColour( m_players[m_playersCount] ); m_playerNames[m_playersCount] = playerName; - m_playerList.addItem( playerName, app.GetPlayerColour( m_players[m_playersCount] ), voiceStatus); + m_playerList.addItem( playerName, app.GetPlayerColour( m_players[m_playersCount] ), voiceStatus); } } @@ -171,7 +171,7 @@ void UIScene_TeleportMenu::handleReload() m_playersVoiceState[m_playersCount] = voiceStatus; m_playersColourState[m_playersCount] = app.GetPlayerColour( m_players[m_playersCount] ); m_playerNames[m_playersCount] = playerName; - m_playerList.addItem( playerName, app.GetPlayerColour( m_players[m_playersCount] ), voiceStatus); + m_playerList.addItem( playerName, app.GetPlayerColour( m_players[m_playersCount] ), voiceStatus); } } @@ -257,8 +257,8 @@ void UIScene_TeleportMenu::handlePress(F64 controlId, F64 childId) int currentSelection = (int)childId; INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ currentSelection ] ); INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(m_iPad); - - shared_ptr<GameCommandPacket> packet; + + std::shared_ptr<GameCommandPacket> packet; if(m_teleportToPlayer) { packet = TeleportCommand::preparePacket(thisPlayer->GetUID(),selectedPlayer->GetUID()); @@ -339,6 +339,6 @@ void UIScene_TeleportMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer * } } - scene->m_playerList.addItem( playerName, app.GetPlayerColour( scene->m_players[scene->m_playersCount - 1] ), voiceStatus); + scene->m_playerList.addItem( playerName, app.GetPlayerColour( scene->m_players[scene->m_playersCount - 1] ), voiceStatus); } } diff --git a/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp index dc2bac48..cd630651 100644 --- a/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp @@ -11,7 +11,7 @@ UIScene_TradingMenu::UIScene_TradingMenu(int iPad, void *_initData, UILayer *par { // Setup all the Iggy references we need for this scene initialiseMovie(); - + m_showingLeftArrow = true; m_showingRightArrow = true; @@ -36,7 +36,7 @@ UIScene_TradingMenu::UIScene_TradingMenu(int iPad, void *_initData, UILayer *par } m_menu = new MerchantMenu( initData->inventory, initData->trader, initData->level ); - + Minecraft::GetInstance()->localplayers[iPad]->containerMenu = m_menu; m_slotListRequest1.addSlots(BUY_A,1); @@ -93,7 +93,7 @@ void UIScene_TradingMenu::handleDestroy() } // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(pMinecraft->localplayers[m_iPad] != NULL) pMinecraft->localplayers[m_iPad]->closeContainer(); ui.OverrideSFX(m_iPad,ACTION_MENU_A,false); @@ -147,12 +147,12 @@ void UIScene_TradingMenu::customDraw(IggyCustomDrawCallbackRegion *region) Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; - shared_ptr<ItemInstance> item = nullptr; + std::shared_ptr<ItemInstance> item = nullptr; int slotId = -1; swscanf((wchar_t*)region->name,L"slot_%d",&slotId); if(slotId < MerchantMenu::USE_ROW_SLOT_END) - { + { Slot *slot = m_menu->getSlot(slotId); item = slot->getItem(); } diff --git a/Minecraft.Client/Common/UI/UIStructs.h b/Minecraft.Client/Common/UI/UIStructs.h index 2dd03c8c..0865cbf3 100644 --- a/Minecraft.Client/Common/UI/UIStructs.h +++ b/Minecraft.Client/Common/UI/UIStructs.h @@ -31,8 +31,8 @@ typedef struct _UIVec2D // Brewing typedef struct _BrewingScreenInput { - shared_ptr<Inventory> inventory; - shared_ptr<BrewingStandTileEntity> brewingStand; + std::shared_ptr<Inventory> inventory; + std::shared_ptr<BrewingStandTileEntity> brewingStand; int iPad; bool bSplitscreen; } BrewingScreenInput; @@ -40,8 +40,8 @@ typedef struct _BrewingScreenInput // Chest typedef struct _ContainerScreenInput { - shared_ptr<Container> inventory; - shared_ptr<Container> container; + std::shared_ptr<Container> inventory; + std::shared_ptr<Container> container; int iPad; bool bSplitscreen; } ContainerScreenInput; @@ -49,8 +49,8 @@ typedef struct _ContainerScreenInput // Dispenser typedef struct _TrapScreenInput { - shared_ptr<Container> inventory; - shared_ptr<DispenserTileEntity> trap; + std::shared_ptr<Container> inventory; + std::shared_ptr<DispenserTileEntity> trap; int iPad; bool bSplitscreen; } TrapScreenInput; @@ -58,16 +58,16 @@ typedef struct _TrapScreenInput // Inventory and creative inventory typedef struct _InventoryScreenInput { - shared_ptr<LocalPlayer> player; + std::shared_ptr<LocalPlayer> player; bool bNavigateBack; // If we came here from the crafting screen, go back to it, rather than closing the xui menus int iPad; bool bSplitscreen; } InventoryScreenInput; -// Enchanting +// Enchanting typedef struct _EnchantingScreenInput { - shared_ptr<Inventory> inventory; + std::shared_ptr<Inventory> inventory; Level *level; int x; int y; @@ -79,8 +79,8 @@ typedef struct _EnchantingScreenInput // Furnace typedef struct _FurnaceScreenInput { - shared_ptr<Inventory> inventory; - shared_ptr<FurnaceTileEntity> furnace; + std::shared_ptr<Inventory> inventory; + std::shared_ptr<FurnaceTileEntity> furnace; int iPad; bool bSplitscreen; } FurnaceScreenInput; @@ -88,21 +88,21 @@ typedef struct _FurnaceScreenInput // Crafting typedef struct _CraftingPanelScreenInput { - shared_ptr<LocalPlayer> player; + std::shared_ptr<LocalPlayer> player; int iContainerType; // RECIPE_TYPE_2x2 or RECIPE_TYPE_3x3 bool bSplitscreen; int iPad; int x; int y; int z; -} +} CraftingPanelScreenInput; // Trading typedef struct _TradingScreenInput { - shared_ptr<Inventory> inventory; - shared_ptr<Merchant> trader; + std::shared_ptr<Inventory> inventory; + std::shared_ptr<Merchant> trader; Level *level; int iPad; bool bSplitscreen; @@ -112,7 +112,7 @@ TradingScreenInput; // Anvil typedef struct _AnvilScreenInput { - shared_ptr<Inventory> inventory; + std::shared_ptr<Inventory> inventory; Level *level; int x; int y; @@ -125,7 +125,7 @@ AnvilScreenInput; // Sign typedef struct _SignEntryScreenInput { - shared_ptr<SignTileEntity> sign; + std::shared_ptr<SignTileEntity> sign; int iPad; } SignEntryScreenInput; @@ -179,7 +179,7 @@ typedef struct _CreateWorldMenuInitData BOOL bOnline; BOOL bIsPrivate; int iPad; -} +} CreateWorldMenuInitData; // Join/Load saves list @@ -223,7 +223,7 @@ typedef struct _LoadMenuInitData int iSaveGameInfoIndex; LevelGenerationOptions *levelGen; SaveListDetails *saveDetails; -} +} LoadMenuInitData; // Join Games @@ -276,7 +276,7 @@ typedef struct _LaunchMoreOptionsMenuInitData seed = L""; bDisableSaving = false; } -} +} LaunchMoreOptionsMenuInitData; typedef struct _LoadingInputParams @@ -352,7 +352,7 @@ typedef struct _SignInInfo } SignInInfo; // Credits -typedef struct +typedef struct { LPCWSTR m_Text; // Should contain string, optionally with %s to add in translated string ... e.g. "Andy West - %s" int m_iStringID[2]; // May be NO_TRANSLATED_STRING if we do not require to add any translated string. @@ -379,8 +379,8 @@ typedef struct _DLCOffersParam { int iPad; int iOfferC; - int iType; -} + int iType; +} DLCOffersParam; typedef struct _InGamePlayerOptionsInitData diff --git a/Minecraft.Client/Common/XUI/SlotProgressControl.cpp b/Minecraft.Client/Common/XUI/SlotProgressControl.cpp index 91f362a3..180ade67 100644 --- a/Minecraft.Client/Common/XUI/SlotProgressControl.cpp +++ b/Minecraft.Client/Common/XUI/SlotProgressControl.cpp @@ -20,8 +20,8 @@ int SlotProgressControl::GetValue() if( pvUserData != NULL ) { SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - - shared_ptr<ItemInstance> item = shared_ptr<ItemInstance>(); + + std::shared_ptr<ItemInstance> item = std::shared_ptr<ItemInstance>(); if( pUserDataContainer->slot != NULL ) { @@ -68,8 +68,8 @@ void SlotProgressControl::GetRange(int *pnRangeMin, int *pnRangeMax) if( pvUserData != NULL ) { SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - - shared_ptr<ItemInstance> item = shared_ptr<ItemInstance>(); + + std::shared_ptr<ItemInstance> item = std::shared_ptr<ItemInstance>(); if( pUserDataContainer->slot != NULL ) { diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp index 82b6c3ed..6989aeef 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp @@ -8,7 +8,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -CXuiCtrlCraftIngredientSlot::CXuiCtrlCraftIngredientSlot() +CXuiCtrlCraftIngredientSlot::CXuiCtrlCraftIngredientSlot() { m_iID=0; m_Desc=NULL; @@ -23,7 +23,7 @@ CXuiCtrlCraftIngredientSlot::CXuiCtrlCraftIngredientSlot() HRESULT CXuiCtrlCraftIngredientSlot::OnInit(XUIMessageInit* pInitData, BOOL& rfHandled) { HRESULT hr=S_OK; - + return hr; } //----------------------------------------------------------------------------- @@ -48,10 +48,10 @@ HRESULT CXuiCtrlCraftIngredientSlot::OnCustomMessage_GetSlotItem(CustomMessage_G } HRESULT CXuiCtrlCraftIngredientSlot::OnGetSourceText(XUIMessageGetSourceText *pGetSourceTextData,BOOL& bHandled) -{ +{ pGetSourceTextData->szText=m_Desc; bHandled = TRUE; - + return S_OK; } @@ -72,7 +72,7 @@ void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCo m_item = nullptr; m_iID=iId; m_iAuxVal=iAuxVal; - + // 4J Stu - For clocks and compasses we set the aux value to a special one that signals we should use a default texture // rather than the dynamic one for the player // not right... auxvals for diggables are damage values, can be a lot higher @@ -92,7 +92,7 @@ void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCo XuiElementSetShow(m_hObj,bShow); } -void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) +void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) { if(item == NULL) SetIcon(iPad, 0,0,0,0,0,false,false,bShow); else diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h index 5cf7a7f4..0a46227b 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h @@ -16,7 +16,7 @@ public: virtual ~CXuiCtrlCraftIngredientSlot() { }; void SetRedBox(BOOL bVal); void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha, bool bDecorations, bool isFoil = false, BOOL bShow=TRUE); - void SetIcon(int iPad, shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); void SetDescription(LPCWSTR Desc); protected: @@ -31,7 +31,7 @@ protected: HRESULT OnInit(XUIMessageInit* pInitData, BOOL& rfHandled); private: - shared_ptr<ItemInstance> m_item; + std::shared_ptr<ItemInstance> m_item; int m_iID; int m_iAuxVal; int m_iCount; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp index 8a56a0ea..b05a8fdd 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp @@ -100,7 +100,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &b // Annoyingly, XUI renders everything to a z of 0 so if we want to render anything that needs the z-buffer on top of it, then we need to clear it. // Clear just the region required for this control. - D3DRECT clearRect; + D3DRECT clearRect; clearRect.x1 = (int)(matrix._41) - 2; clearRect.y1 = (int)(matrix._42) - 2; clearRect.x2 = (int)(matrix._41 + ( bwidth * matrix._11 )) + 2; @@ -201,7 +201,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &b //HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &bHandled ) //{ // HXUIDC hDC = pRenderData->hDC; -// +// // RenderManager.Set_matrixDirty(); // // Minecraft *minecraft = Minecraft::GetInstance(); @@ -306,7 +306,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &b void CXuiCtrlEnchantmentBook::tickBook() { EnchantmentMenu *menu = m_containerScene->getMenu(); - shared_ptr<ItemInstance> current = menu->getSlot(0)->getItem(); + std::shared_ptr<ItemInstance> current = menu->getSlot(0)->getItem(); if (!ItemInstance::matches(current, last)) { last = current; @@ -328,7 +328,7 @@ void CXuiCtrlEnchantmentBook::tickBook() { shouldBeOpen = true; } - } + } if (shouldBeOpen) open += 0.2f; else open -= 0.2f; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.h index 93da0768..8d22eed9 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.h +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.h @@ -42,7 +42,7 @@ private: float m_fScale,m_fAlpha; int m_iPad; CXuiSceneEnchant *m_containerScene; - shared_ptr<ItemInstance> last; + std::shared_ptr<ItemInstance> last; float m_fScreenWidth,m_fScreenHeight; float m_fRawWidth,m_fRawHeight; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp index 84273eb5..08e9fdd7 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp @@ -124,7 +124,7 @@ HRESULT CXuiCtrlMinecraftSlot::OnGetSourceImage(XUIMessageGetSourceImage* pData, // if the id is greater than or equal to 32000, then it's an xzp icon, not a game icon if(m_iID<32000) - { + { // 4J Stu - Some parent controls may overide this, others will leave it as what we passed in m_iPad = GET_SLOTDISPLAY_USERINDEX_FROM_DATA_BITMASK(MsgGetSlotItem.iDataBitField); @@ -188,7 +188,7 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa { HXUIDC hDC = pRenderData->hDC; CXuiControl xuiControl(m_hObj); - if(m_item == NULL) m_item = shared_ptr<ItemInstance>( new ItemInstance(m_iID, m_iCount, m_iAuxVal) ); + if(m_item == NULL) m_item = std::shared_ptr<ItemInstance>( new ItemInstance(m_iID, m_iCount, m_iAuxVal) ); // build and render with the game call @@ -208,15 +208,15 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa // we might want separate x & y scales here float scaleX = bwidth / 16.0f; - float scaleY = bheight / 16.0f; + float scaleY = bheight / 16.0f; // apply any scale in the matrix too scaleX *= matrix._11; - scaleY *= matrix._22; + scaleY *= matrix._22; // Annoyingly, XUI renders everything to a z of 0 so if we want to render anything that needs the z-buffer on top of it, then we need to clear it. // Clear just the region required for this control. - D3DRECT clearRect; + D3DRECT clearRect; clearRect.x1 = (int)(matrix._41) - 2; clearRect.y1 = (int)(matrix._42) - 2; clearRect.x2 = (int)(matrix._41 + ( bwidth * matrix._11 )) + 2; @@ -253,7 +253,7 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa //Make sure that pMinecraft->player is the correct player so that player specific rendering // eg clock and compass, are rendered correctly - shared_ptr<MultiplayerLocalPlayer> oldPlayer = pMinecraft->player; + std::shared_ptr<MultiplayerLocalPlayer> oldPlayer = pMinecraft->player; if( m_iPad >= 0 && m_iPad < XUSER_MAX_COUNT ) pMinecraft->player = pMinecraft->localplayers[m_iPad]; @@ -281,8 +281,8 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa if(m_bDecorations) { if((scaleX!=1.0f) ||(scaleY!=1.0f)) - { - glPushMatrix(); + { + glPushMatrix(); glScalef(scaleX, scaleY, 1.0f); int iX= (int)(0.5f+((float)x)/scaleX); int iY= (int)(0.5f+((float)y)/scaleY); @@ -317,7 +317,7 @@ void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, i // aux value for diggers can go as high as 1561 //const _Tier *_Tier::DIAMOND = new _Tier(3, 1561, 8, 3); // - // setMaxDamage(tier->getUses()); + // setMaxDamage(tier->getUses()); // int ItemInstance::getDamageValue() // { @@ -343,7 +343,7 @@ void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, i XuiElementSetShow(m_hObj,bShow); } -void CXuiCtrlMinecraftSlot::SetIcon(int iPad, shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) +void CXuiCtrlMinecraftSlot::SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) { m_item = item; m_isFoil = item->isFoil(); diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.h index 5dafec53..02d06ae6 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.h +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.h @@ -23,7 +23,7 @@ public: void renderGuiItem(Font *font, Textures *textures,ItemInstance *item, int x, int y); void RenderItem(); void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,BOOL bShow, bool isFoil); - void SetIcon(int iPad, shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); protected: @@ -38,7 +38,7 @@ protected: HRESULT OnRender(XUIMessageRender *pRenderData, BOOL &rfHandled); private: - shared_ptr<ItemInstance> m_item; + std::shared_ptr<ItemInstance> m_item; BOOL m_bDirty; INT m_iPassThroughDataAssociation; INT m_iPassThroughIdAssociation; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp index 87abbcd3..eb5bf366 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp @@ -36,7 +36,7 @@ HRESULT CXuiCtrlSlotItemCtrlBase::OnDestroy( HXUIOBJ hObj ) HRESULT CXuiCtrlSlotItemCtrlBase::OnCustomMessage_GetSlotItem(HXUIOBJ hObj, CustomMessage_GetSlotItem_Struct *pData, BOOL& bHandled) { - shared_ptr<ItemInstance> item = shared_ptr<ItemInstance>(); + std::shared_ptr<ItemInstance> item = std::shared_ptr<ItemInstance>(); void* pvUserData; XuiElementGetUserData( hObj, &pvUserData ); @@ -49,7 +49,7 @@ HRESULT CXuiCtrlSlotItemCtrlBase::OnCustomMessage_GetSlotItem(HXUIOBJ hObj, Cust } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) item = player->inventory->getCarried(); } @@ -64,7 +64,7 @@ HRESULT CXuiCtrlSlotItemCtrlBase::OnCustomMessage_GetSlotItem(HXUIOBJ hObj, Cust // 11 bits - auxval // 6 bits - count // 6 bits - scale - pData->iDataBitField = MAKE_SLOTDISPLAY_DATA_BITMASK(pUserDataContainer->m_iPad, (int)(31*pUserDataContainer->m_fAlpha),true,item->GetCount(),7,item->popTime); + pData->iDataBitField = MAKE_SLOTDISPLAY_DATA_BITMASK(pUserDataContainer->m_iPad, (int)(31*pUserDataContainer->m_fAlpha),true,item->GetCount(),7,item->popTime); } else { @@ -93,7 +93,7 @@ void CXuiCtrlSlotItemCtrlBase::SetUserIndex( HXUIOBJ hObj, int iPad ) XuiElementGetUserData( hObj, &pvUserData ); SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - + pUserDataContainer->m_iPad = iPad; } @@ -103,7 +103,7 @@ void CXuiCtrlSlotItemCtrlBase::SetAlpha( HXUIOBJ hObj, float fAlpha ) XuiElementGetUserData( hObj, &pvUserData ); SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - + pUserDataContainer->m_fAlpha = fAlpha; } @@ -119,7 +119,7 @@ bool CXuiCtrlSlotItemCtrlBase::isEmpty( HXUIOBJ hObj ) } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) return player->inventory->getCarried() == NULL; } @@ -146,7 +146,7 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vector<wstri } else { - firstLine = false; + firstLine = false; wchar_t formatted[256]; eMinecraftColour rarityColour = pUserDataContainer->slot->getItem()->getRarity()->color; int colour = app.GetHTMLColour(rarityColour); @@ -156,7 +156,7 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vector<wstri colour = app.GetHTMLColour(eTextColor_RenamedItemTitle); } - swprintf(formatted, 256, L"<font color=\"#%08x\">%s</font>",colour,thisString.c_str()); + swprintf(formatted, 256, L"<font color=\"#%08x\">%s</font>",colour,thisString.c_str()); thisString = formatted; } desc.append( thisString ); @@ -167,10 +167,10 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vector<wstri } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) { - shared_ptr<ItemInstance> item = player->inventory->getCarried(); + std::shared_ptr<ItemInstance> item = player->inventory->getCarried(); if(item != NULL) return app.GetString( item->getDescriptionId() ); } @@ -178,7 +178,7 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vector<wstri return L""; } -shared_ptr<ItemInstance> CXuiCtrlSlotItemCtrlBase::getItemInstance( HXUIOBJ hObj ) +std::shared_ptr<ItemInstance> CXuiCtrlSlotItemCtrlBase::getItemInstance( HXUIOBJ hObj ) { void* pvUserData; XuiElementGetUserData( hObj, &pvUserData ); @@ -190,7 +190,7 @@ shared_ptr<ItemInstance> CXuiCtrlSlotItemCtrlBase::getItemInstance( HXUIOBJ hObj } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) return player->inventory->getCarried(); } @@ -221,7 +221,7 @@ HRESULT CXuiCtrlSlotItemCtrlBase::OnKeyDown(HXUIOBJ hObj, XUIMessageInput *pInpu XUIMessage message; XUIMessageInput messageInput; - + XuiMessageInput( &message, &messageInput, XUI_KEYDOWN, pInputData->dwKeyCode, pInputData->wch, pInputData->dwFlags, pInputData->UserIndex ); if (HRESULT_SUCCEEDED(hr)) @@ -268,7 +268,7 @@ int CXuiCtrlSlotItemCtrlBase::GetObjectCount( HXUIOBJ hObj ) } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL && player->inventory->getCarried() != NULL) { iCount = player->inventory->getCarried()->count; @@ -309,7 +309,7 @@ bool CXuiCtrlSlotItemCtrlBase::IsSameItemAs( HXUIOBJ hThisObj, HXUIOBJ hOtherObj } else if(pThisUserDataContainer->m_iPad >= 0 && pThisUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pThisUserDataContainer->m_iPad] ); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pThisUserDataContainer->m_iPad] ); if(player != NULL && player->inventory->getCarried() != NULL) { iThisID = player->inventory->getCarried()->id; @@ -336,7 +336,7 @@ bool CXuiCtrlSlotItemCtrlBase::IsSameItemAs( HXUIOBJ hThisObj, HXUIOBJ hOtherObj } else if(pOtherUserDataContainer->m_iPad >= 0 && pOtherUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pOtherUserDataContainer->m_iPad] ); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>( Minecraft::GetInstance()->localplayers[pOtherUserDataContainer->m_iPad] ); if(player != NULL && player->inventory->getCarried() != NULL) { iOtherID = player->inventory->getCarried()->id; @@ -358,7 +358,7 @@ bool CXuiCtrlSlotItemCtrlBase::IsSameItemAs( HXUIOBJ hThisObj, HXUIOBJ hOtherObj // 4J WESTY : Pointer Prototype : Added to support prototype only. // Returns number of items that can still be stacked into this slot. -int CXuiCtrlSlotItemCtrlBase::GetEmptyStackSpace( HXUIOBJ hObj ) +int CXuiCtrlSlotItemCtrlBase::GetEmptyStackSpace( HXUIOBJ hObj ) { int iResult = 0; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h index 2fd21749..3fe436ad 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h @@ -29,9 +29,9 @@ private: public: // We define a lot of functions as virtual. These should be implemented to call the protected version by // passing in the HXUIOBJ of the control as the first parameter. We do not have access to that normally - // due to the inheritance structure + // due to the inheritance structure virtual HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) = 0; - + virtual HRESULT OnDestroy() = 0; virtual HRESULT OnCustomMessage_GetSlotItem(CustomMessage_GetSlotItem_Struct *pData, BOOL& bHandled) = 0; @@ -49,7 +49,7 @@ public: wstring GetItemDescription( HXUIOBJ hObj, vector<wstring> &unformattedStrings ); - shared_ptr<ItemInstance> getItemInstance( HXUIOBJ hObj ); + std::shared_ptr<ItemInstance> getItemInstance( HXUIOBJ hObj ); Slot *getSlot( HXUIOBJ hObj ); // 4J WESTY : Pointer Prototype : Added to support prototype only. @@ -64,9 +64,9 @@ public: // 4J WESTY : Pointer Prototype : Added to support prototype only. bool IsSameItemAs( HXUIOBJ hThisObj, HXUIOBJ hOtherObj ); -protected: +protected: HRESULT OnInit( HXUIOBJ hObj, XUIMessageInit* pInitData, BOOL& bHandled ); - + HRESULT OnDestroy( HXUIOBJ hObj ); HRESULT OnCustomMessage_GetSlotItem(HXUIOBJ hObj, CustomMessage_GetSlotItem_Struct *pData, BOOL& bHandled); diff --git a/Minecraft.Client/Common/XUI/XUI_CustomMessages.h b/Minecraft.Client/Common/XUI/XUI_CustomMessages.h index 888f8ad0..0744f826 100644 --- a/Minecraft.Client/Common/XUI/XUI_CustomMessages.h +++ b/Minecraft.Client/Common/XUI/XUI_CustomMessages.h @@ -8,13 +8,13 @@ #define XM_INVENTORYUPDATED_MESSAGE XM_USER + 5 #define XM_TMS_DLCFILE_RETRIEVED_MESSAGE XM_USER + 6 #define XM_TMS_BANFILE_RETRIEVED_MESSAGE XM_USER + 7 -#define XM_TMS_ALLFILES_RETRIEVED_MESSAGE XM_USER + 8 +#define XM_TMS_ALLFILES_RETRIEVED_MESSAGE XM_USER + 8 #define XM_CUSTOMTICKSCENE_MESSAGE XM_USER + 9 #define XM_GETSLOTITEM_MESSAGE XM_USER + 10 typedef struct { - shared_ptr<ItemInstance> item; + std::shared_ptr<ItemInstance> item; // Legacy values for compatibility int iDataBitField; diff --git a/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.cpp b/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.cpp index 56b41267..0931f50d 100644 --- a/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.cpp +++ b/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.cpp @@ -9,7 +9,7 @@ #include "..\..\Common\GameRules\ConsoleGameRules.h" #include "XUI_DebugItemEditor.h" -#ifdef _DEBUG_MENUS_ENABLED +#ifdef _DEBUG_MENUS_ENABLED HRESULT CScene_DebugItemEditor::OnInit( XUIMessageInit *pInitData, BOOL &bHandled ) { MapChildControls(); @@ -22,7 +22,7 @@ HRESULT CScene_DebugItemEditor::OnInit( XUIMessageInit *pInitData, BOOL &bHandle if(m_item!=NULL) { - m_icon->SetIcon(m_iPad, m_item->id,m_item->getAuxValue(),m_item->count,10,31,false,m_item->isFoil()); + m_icon->SetIcon(m_iPad, m_item->id,m_item->getAuxValue(),m_item->count,10,31,false,m_item->isFoil()); m_itemName.SetText( app.GetString( Item::items[m_item->id]->getDescriptionId(m_item) ) ); m_itemId .SetText( _toString<int>(m_item->id).c_str() ); @@ -59,8 +59,8 @@ HRESULT CScene_DebugItemEditor::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfH m_slot->set(m_item); Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; - if(player != NULL && player->connection) player->connection->send( shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(m_menu->containerId, m_slot->index, m_item) ) ); + std::shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; + if(player != NULL && player->connection) player->connection->send( std::shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(m_menu->containerId, m_slot->index, m_item) ) ); } // kill the crafting xui app.NavigateBack(m_iPad); @@ -76,7 +76,7 @@ HRESULT CScene_DebugItemEditor::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfH HRESULT CScene_DebugItemEditor::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINotifyValueChanged *pNotifyValueChangedData, BOOL &bHandled) { - if(m_item == NULL) m_item = shared_ptr<ItemInstance>( new ItemInstance(0,1,0) ); + if(m_item == NULL) m_item = std::shared_ptr<ItemInstance>( new ItemInstance(0,1,0) ); if(hObjSource == m_itemId) { int id = 0; @@ -107,7 +107,7 @@ HRESULT CScene_DebugItemEditor::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINot if(!value.empty()) data = _fromString<int>( value ); m_item->set4JData(data); } - + m_icon->SetIcon(m_iPad, m_item->id,m_item->getAuxValue(),m_item->count,10,31,false,m_item->isFoil()); m_itemName.SetText( app.GetString( Item::items[m_item->id]->getDescriptionId(m_item) ) ); diff --git a/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h b/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h index 2e2f5b5a..0445a679 100644 --- a/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h +++ b/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h @@ -8,7 +8,7 @@ using namespace std; class CScene_DebugItemEditor : public CXuiSceneImpl { -#ifdef _DEBUG_MENUS_ENABLED +#ifdef _DEBUG_MENUS_ENABLED public: typedef struct _ItemEditorInput { @@ -18,7 +18,7 @@ public: } ItemEditorInput; private: int m_iPad; - shared_ptr<ItemInstance> m_item; + std::shared_ptr<ItemInstance> m_item; Slot *m_slot; AbstractContainerMenu *m_menu; diff --git a/Minecraft.Client/Common/XUI/XUI_InGameHostOptions.cpp b/Minecraft.Client/Common/XUI/XUI_InGameHostOptions.cpp index f0561745..53e400a8 100644 --- a/Minecraft.Client/Common/XUI/XUI_InGameHostOptions.cpp +++ b/Minecraft.Client/Common/XUI/XUI_InGameHostOptions.cpp @@ -50,7 +50,7 @@ HRESULT CScene_InGameHostOptions::OnInit( XUIMessageInit* pInitData, BOOL& bHand CXuiSceneBase::ShowLogo( m_iPad, FALSE ); - + //SentientManager.RecordMenuShown(m_iPad, eUIScene_CreateWorldMenu, 0); return S_OK; @@ -74,11 +74,11 @@ HRESULT CScene_InGameHostOptions::OnKeyDown(XUIMessageInput* pInputData, BOOL& r // Send update settings packet to server if(hostOptions != app.GetGameHostOption(eGameHostOption_All) ) { - Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + std::shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection) { - player->connection->send( shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); + player->connection->send( std::shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); } } diff --git a/Minecraft.Client/Common/XUI/XUI_InGameInfo.cpp b/Minecraft.Client/Common/XUI/XUI_InGameInfo.cpp index 4839013c..c9b9f76f 100644 --- a/Minecraft.Client/Common/XUI/XUI_InGameInfo.cpp +++ b/Minecraft.Client/Common/XUI/XUI_InGameInfo.cpp @@ -58,7 +58,7 @@ HRESULT CScene_InGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) if(thisPlayer != NULL) m_isHostPlayer = thisPlayer->IsHost() == TRUE; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { m_gameOptionsButton.SetEnable(FALSE); @@ -77,7 +77,7 @@ HRESULT CScene_InGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) int keyA = -1; ui.SetTooltips( m_iPad, keyA,IDS_TOOLTIPS_BACK,keyX,-1); - + CXuiSceneBase::ShowDarkOverlay( m_iPad, TRUE ); SetTimer( TOOLTIP_TIMERID , INGAME_INFO_TOOLTIP_TIMER ); @@ -179,11 +179,11 @@ HRESULT CScene_InGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A); if( hObjPressed == playersList ) - { + { INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ playersList.GetCurSel() ] ); - + Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -220,7 +220,7 @@ HRESULT CScene_InGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* } } else if( hObjPressed == m_gameOptionsButton ) - { + { app.NavigateToScene(pNotifyPressData->UserIndex,eUIScene_InGameHostOptionsMenu); } return S_OK; @@ -330,7 +330,7 @@ HRESULT CScene_InGameInfo::OnGetSourceDataText(XUIMessageGetSourceText *pGetSour } HRESULT hr; - HXUIOBJ hButton, hVisual, hPlayerIcon, hVoiceIcon; + HXUIOBJ hButton, hVisual, hPlayerIcon, hVoiceIcon; hButton = playersList.GetItemControl(pGetSourceTextData->iItem); hr=XuiControlGetVisual(hButton,&hVisual); @@ -415,7 +415,7 @@ HRESULT CScene_InGameInfo::OnGetSourceDataText(XUIMessageGetSourceText *pGetSour XuiElementFindNamedFrame(hVoiceIcon, L"NotSpeaking", &playFrame); } } - + if(playFrame < 0) { XuiElementFindNamedFrame(hVoiceIcon, L"Normal", &playFrame); @@ -465,8 +465,8 @@ void CScene_InGameInfo::updateTooltips() int keyA = -1; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; - + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad]; + bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; bool trust = app.GetGameHostOption(eGameHostOption_TrustPlayers) != 0; @@ -524,12 +524,12 @@ int CScene_InGameInfo::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMes delete pParam; if(result==C4JStorage::EMessage_ResultAccept) - { + { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer != NULL && localPlayer->connection) { - localPlayer->connection->send( shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( std::shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) ); } } diff --git a/Minecraft.Client/Common/XUI/XUI_InGamePlayerOptions.cpp b/Minecraft.Client/Common/XUI/XUI_InGamePlayerOptions.cpp index 156cd092..6334574f 100644 --- a/Minecraft.Client/Common/XUI/XUI_InGamePlayerOptions.cpp +++ b/Minecraft.Client/Common/XUI/XUI_InGamePlayerOptions.cpp @@ -141,7 +141,7 @@ HRESULT CScene_InGamePlayerOptions::OnInit( XUIMessageInit* pInitData, BOOL& bHa m_checkboxes[eControl_HostInvisible].SetText( app.GetString(IDS_CAN_INVISIBLE) ); m_checkboxes[eControl_HostInvisible].SetCheck(checked); - + bool inCreativeMode = Player::getPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode) != 0; if(inCreativeMode) { @@ -191,7 +191,7 @@ HRESULT CScene_InGamePlayerOptions::OnInit( XUIMessageInit* pInitData, BOOL& bHa ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK); - CXuiSceneBase::ShowLogo( m_iPad, FALSE ); + CXuiSceneBase::ShowLogo( m_iPad, FALSE ); g_NetworkManager.RegisterPlayerChangedCallback(m_iPad, &CScene_InGamePlayerOptions::OnPlayerChanged, this); @@ -276,11 +276,11 @@ HRESULT CScene_InGamePlayerOptions::OnKeyDown(XUIMessageInput* pInputData, BOOL& if(originalPrivileges != m_playerPrivileges) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + std::shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection) { - player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); + player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); } } @@ -334,12 +334,12 @@ int CScene_InGamePlayerOptions::KickPlayerReturned(void *pParam,int iPad,C4JStor delete pParam; if(result==C4JStorage::EMessage_ResultAccept) - { + { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer != NULL && localPlayer->connection) { - localPlayer->connection->send( shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( std::shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) ); } // Fix for #61494 - [CRASH]: TU7: Code: Multiplayer: Title may crash while kicking a player from an online game. @@ -478,22 +478,22 @@ void CScene_InGamePlayerOptions::resetCheatCheckboxes() if (!m_editingSelf) { m_checkboxes[eControl_HostInvisible].SetEnable(isModerator); - m_checkboxes[eControl_HostInvisible].SetCheck( isModerator + m_checkboxes[eControl_HostInvisible].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanToggleInvisible) != 0) ); // NOT CREATIVE MODE. { m_checkboxes[eControl_HostFly].SetEnable(isModerator); - m_checkboxes[eControl_HostFly].SetCheck( isModerator + m_checkboxes[eControl_HostFly].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanToggleFly) != 0) ); m_checkboxes[eControl_HostHunger].SetEnable(isModerator); - m_checkboxes[eControl_HostHunger].SetCheck( isModerator + m_checkboxes[eControl_HostHunger].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanToggleClassicHunger) != 0) ); } m_checkboxes[eControl_CheatTeleport].SetEnable(isModerator); - m_checkboxes[eControl_CheatTeleport].SetCheck( isModerator + m_checkboxes[eControl_CheatTeleport].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanTeleport) != 0) ); } }
\ No newline at end of file diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp index 10369d5e..ecdc358a 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp @@ -24,7 +24,7 @@ #include "XUI_Ctrl_SlotItem.h" #include "XUI_Ctrl_SlotItemListItem.h" #include "XUI_Scene_AbstractContainer.h" -#ifdef _DEBUG_MENUS_ENABLED +#ifdef _DEBUG_MENUS_ENABLED #include "XUI_DebugItemEditor.h" #endif @@ -44,14 +44,14 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex) // We may have varying depths of controls here, so base off the pointers parent HXUIOBJ parent; - XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight ); + XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight ); XuiElementGetParent( m_pointerControl->m_hObj, &parent ); m_pointerControl->SetShow(TRUE); - XuiElementGetBounds( parent, &fPanelWidth, &fPanelHeight ); + XuiElementGetBounds( parent, &fPanelWidth, &fPanelHeight ); // Get size of pointer m_fPointerImageOffsetX = floor(fPointerWidth/2.0f); m_fPointerImageOffsetY = floor(fPointerHeight/2.0f); - + m_fPanelMinX = 0.0f; m_fPanelMaxX = fPanelWidth; m_fPanelMinY = 0.0f; @@ -97,13 +97,13 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex) m_pointerPos.x = newPointerPos.x; m_pointerPos.y = newPointerPos.y; -#ifdef USE_POINTER_ACCEL +#ifdef USE_POINTER_ACCEL m_fPointerVelX = 0.0f; m_fPointerVelY = 0.0f; m_fPointerAccelX = 0.0f; m_fPointerAccelY = 0.0f; #endif - + // Add timer to poll controller stick input at 60Hz HRESULT timerResult = SetTimer( POINTER_INPUT_TIMER_ID, ( 1000 / 60 ) ); assert( timerResult == S_OK ); @@ -114,7 +114,7 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex) for ( int iSection = m_eFirstSection; iSection < m_eMaxSection; ++iSection ) { ESceneSection eSection = ( ESceneSection )( iSection ); - + if(!IsSectionSlotList(eSection)) continue; // Get dimensions of this section. @@ -153,7 +153,7 @@ int CXuiSceneAbstractContainer::getSectionRows(ESceneSection eSection) return GetSectionSlotList( eSection )->GetRows(); } -// Adding this so we can turn off the pointer text background, since it flickers on then off at the start of a scene where a tutorial popup is +// Adding this so we can turn off the pointer text background, since it flickers on then off at the start of a scene where a tutorial popup is HRESULT CXuiSceneAbstractContainer::OnTransitionStart( XUIMessageTransition *pTransition, BOOL& bHandled ) { if(pTransition->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) return S_OK; @@ -306,7 +306,7 @@ void CXuiSceneAbstractContainer::GetItemScreenData( ESceneSection eSection, int } } -shared_ptr<ItemInstance> CXuiSceneAbstractContainer::getSlotItem(ESceneSection eSection, int iSlot) +std::shared_ptr<ItemInstance> CXuiSceneAbstractContainer::getSlotItem(ESceneSection eSection, int iSlot) { CXuiCtrlSlotItemListItem* pCXuiCtrlSlotItem; GetSectionSlotList( eSection )->GetCXuiCtrlSlotItem( iSlot, &( pCXuiCtrlSlotItem ) ); @@ -327,7 +327,7 @@ HRESULT CXuiSceneAbstractContainer::OnTimer( XUIMessageTimer *pTimer, BOOL& bHan // Update pointer from stick input on timer. if ( pTimer->nId == POINTER_INPUT_TIMER_ID ) { - + onMouseTick(); D3DXVECTOR3 pointerPos; pointerPos.x = m_pointerPos.x; @@ -348,7 +348,7 @@ HRESULT CXuiSceneAbstractContainer::OnTimer( XUIMessageTimer *pTimer, BOOL& bHan hr = handleCustomTimer( pTimer, bHandled ); } return hr; -} +} HRESULT CXuiSceneAbstractContainer::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled) { @@ -443,7 +443,7 @@ void CXuiSceneAbstractContainer::adjustPointerForSafeZone() D3DXVECTOR2 baseSceneOrigin; float baseWidth, baseHeight; if(CXuiSceneBase::GetBaseSceneSafeZone( m_iPad, baseSceneOrigin, baseWidth, baseHeight)) - { + { D3DXMATRIX pointerBackgroundMatrix; XuiElementGetFullXForm( m_hPointerTextBkg, &pointerBackgroundMatrix); diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.h b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.h index ca191db5..939dda0b 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.h +++ b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.h @@ -25,7 +25,7 @@ protected: CXuiCtrlSlotList* m_useRowControl; CXuiCtrlSlotItem* m_pointerControl; CXuiControl m_InventoryText; - + HRESULT OnKeyDown(XUIMessageInput *pInputData, BOOL& bHandled); // Timer function to poll stick input and update pointer position. HRESULT OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled ); @@ -64,7 +64,7 @@ public: HXUIOBJ m_hPointerText; HXUIOBJ m_hPointerTextBkg; HXUIOBJ m_hPointerImg; - + virtual int getSectionColumns(ESceneSection eSection); virtual int getSectionRows(ESceneSection eSection); virtual CXuiControl* GetSectionControl( ESceneSection eSection ) = 0; @@ -77,7 +77,7 @@ public: void setSectionSelectedSlot(ESceneSection eSection, int x, int y); void setFocusToPointer(int iPad); void SetPointerText(const wstring &description, vector<wstring> &unformattedStrings, bool newSlot); - virtual shared_ptr<ItemInstance> getSlotItem(ESceneSection eSection, int iSlot); + virtual std::shared_ptr<ItemInstance> getSlotItem(ESceneSection eSection, int iSlot); virtual bool isSlotEmpty(ESceneSection eSection, int iSlot); virtual void adjustPointerForSafeZone(); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp index 1a679f58..3f53bfe0 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp @@ -215,7 +215,7 @@ void CXuiSceneBase::_TickAllBaseScenes() } else { - shared_ptr<EnderDragon> boss = EnderDragonRenderer::bossInstance; + std::shared_ptr<EnderDragon> boss = EnderDragonRenderer::bossInstance; EnderDragonRenderer::bossInstance = nullptr; m_ticksWithNoBoss = 0; diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp index 39b836d2..9c556e72 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp @@ -30,12 +30,12 @@ HRESULT CXuiSceneContainer::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) Minecraft *pMinecraft = Minecraft::GetInstance(); ContainerScreenInput* initData = (ContainerScreenInput*)pInitData->pvInitData; - + XuiControlSetText(m_ChestText,app.GetString(initData->container->getName())); ContainerMenu* menu = new ContainerMenu( initData->inventory, initData->container ); - shared_ptr<Container> container = initData->container; + std::shared_ptr<Container> container = initData->container; m_iPad=initData->iPad; m_bSplitscreen=initData->bSplitscreen; @@ -61,7 +61,7 @@ HRESULT CXuiSceneContainer::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) // Adjust the height to show the correct number of container rows float height, width; - this->GetBounds( &width, &height ); + this->GetBounds( &width, &height ); int rowDiff = CONTAINER_DEFAULT_ROWS - rows; //height = height - (rowDiff * ROW_HEIGHT); height = height - (rowDiff * fPointerHeight); @@ -103,7 +103,7 @@ HRESULT CXuiSceneContainer::OnDestroy() #endif // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -156,7 +156,7 @@ void CXuiSceneContainer::InitDataAssociations(int iPad, AbstractContainerMenu *m // TODO Inventory dimensions need defined as constants m_containerControl->SetData( iPad, menu, rows, 9, 0 ); - + CXuiSceneAbstractContainer::InitDataAssociations(iPad, menu, containerSize); } diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.cpp index a5dc6584..90b4b87d 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.cpp @@ -22,7 +22,7 @@ ////////////////////////////////////////////////////////////////////////// // -// +// // ////////////////////////////////////////////////////////////////////////// CXuiSceneCraftingPanel::CXuiSceneCraftingPanel() @@ -46,10 +46,10 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle m_iPad=pCraftingPanelData->iPad; m_bSplitscreen=pCraftingPanelData->bSplitscreen; - HRESULT hr = S_OK; + HRESULT hr = S_OK; MapChildControls(); - + if(m_iContainerType==RECIPE_TYPE_2x2) { // TODO Inventory dimensions need defined as constants @@ -74,7 +74,7 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle // if we are in splitscreen, then we need to figure out if we want to move this scene if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } XuiElementSetShow(m_hGrid,TRUE); @@ -84,7 +84,7 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle if(m_iContainerType==RECIPE_TYPE_3x3) { m_pCursors=m_pHSlotsCraftingTableCursors; - + m_iIngredientsMaxSlotC = m_iIngredients3x3SlotC; for(int i=0;i<m_iIngredients3x3SlotC;i++) { @@ -108,7 +108,7 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle else { m_pCursors=m_pHSlotsCraftingCursors; - + m_iIngredientsMaxSlotC = m_iIngredients2x2SlotC; for(int i=0;i<m_iIngredients2x2SlotC;i++) { @@ -131,7 +131,7 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle } } - // display the first group tab + // display the first group tab m_hTabGroupA[m_iGroupIndex].SetShow(TRUE); // store the slot 0 position @@ -192,8 +192,8 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle ////////////////////////////////////////////////////////////////////////// HRESULT CXuiSceneCraftingPanel::OnTransitionEnd( XUIMessageTransition *pTransData, BOOL& bHandled ) { - // are we being destroyed? If so, don't do anything - if(pTransData->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) + // are we being destroyed? If so, don't do anything + if(pTransData->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) { return S_OK; } @@ -222,7 +222,7 @@ HRESULT CXuiSceneCraftingPanel::OnTransitionEnd( XUIMessageTransition *pTransDat // Display the tooltips ui.SetTooltips(m_iPad, IDS_TOOLTIPS_CREATE,IDS_TOOLTIPS_EXIT, IDS_TOOLTIPS_SHOW_INVENTORY,-1,-1,-1,-2, IDS_TOOLTIPS_CHANGE_GROUP); - CXuiSceneBase::EnableTooltip(m_iPad, BUTTON_TOOLTIP_A, FALSE ); + CXuiSceneBase::EnableTooltip(m_iPad, BUTTON_TOOLTIP_A, FALSE ); // Check which recipes are available with the resources we have CheckRecipesAvailable(); @@ -241,7 +241,7 @@ HRESULT CXuiSceneCraftingPanel::OnCustomMessage_InventoryUpdated() { // Display the tooltips ui.SetTooltips(m_iPad, IDS_TOOLTIPS_CREATE,IDS_TOOLTIPS_EXIT, IDS_TOOLTIPS_SHOW_INVENTORY,-1,-1,-1,-2, IDS_TOOLTIPS_CHANGE_GROUP); - CXuiSceneBase::EnableTooltip(m_iPad, BUTTON_TOOLTIP_A, FALSE ); + CXuiSceneBase::EnableTooltip(m_iPad, BUTTON_TOOLTIP_A, FALSE ); // Check which recipes are available with the resources we have CheckRecipesAvailable(); @@ -359,7 +359,7 @@ HRESULT CXuiSceneCraftingPanel::OnDestroy() } #endif - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; @@ -417,21 +417,21 @@ void CXuiSceneCraftingPanel::hideAllIngredientsSlots() } } -void CXuiSceneCraftingPanel::setCraftHSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha) +void CXuiSceneCraftingPanel::setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha) { m_pHSlotsBrushImageControl[iIndex]->SetIcon(iPad, item, 9, uiAlpha, false); //m_pHSlotsBrushImageControl[iIndex]->SetPassThroughDataAssociation(MAKE_SLOTDISPLAY_ITEM_BITMASK(item->id,item->getAuxValue(),item->isFoil()),MAKE_SLOTDISPLAY_DATA_BITMASK (iPad, uiAlpha, false, item->GetCount(), 9,0) ); //m_pHSlotsBrushImageControl[iIndex]->SetShow(TRUE); } -void CXuiSceneCraftingPanel::setCraftVSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha) +void CXuiSceneCraftingPanel::setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha) { m_pVSlotsBrushImageControl[iIndex]->SetIcon(iPad, item, 9, uiAlpha, false); //m_pVSlotsBrushImageControl[iIndex]->SetPassThroughDataAssociation(MAKE_SLOTDISPLAY_ITEM_BITMASK(item->id,item->getAuxValue(),item->isFoil()),MAKE_SLOTDISPLAY_DATA_BITMASK (iPad, uiAlpha, false, item->GetCount(), 9,0) ); //m_pVSlotsBrushImageControl[iIndex]->SetShow(TRUE); } -void CXuiSceneCraftingPanel::setCraftingOutputSlotItem(int iPad, shared_ptr<ItemInstance> item) +void CXuiSceneCraftingPanel::setCraftingOutputSlotItem(int iPad, std::shared_ptr<ItemInstance> item) { if(item == NULL) { @@ -448,7 +448,7 @@ void CXuiSceneCraftingPanel::setCraftingOutputSlotRedBox(bool show) m_pCraftingOutput->SetRedBox(show?TRUE:FALSE); } -void CXuiSceneCraftingPanel::setIngredientSlotItem(int iPad, int index, shared_ptr<ItemInstance> item) +void CXuiSceneCraftingPanel::setIngredientSlotItem(int iPad, int index, std::shared_ptr<ItemInstance> item) { if(item == NULL) { @@ -465,7 +465,7 @@ void CXuiSceneCraftingPanel::setIngredientSlotRedBox(int index, bool show) m_pCraftingIngredientA[index]->SetRedBox(show?TRUE:FALSE); } -void CXuiSceneCraftingPanel::setIngredientDescriptionItem(int iPad, int index, shared_ptr<ItemInstance> item) +void CXuiSceneCraftingPanel::setIngredientDescriptionItem(int iPad, int index, std::shared_ptr<ItemInstance> item) { m_pCraftIngredientDescA[index]->SetIcon(iPad, item->id,item->getAuxValue(),item->GetCount(),8,31,TRUE,item->isFoil(),FALSE); } @@ -524,7 +524,7 @@ void CXuiSceneCraftingPanel::UpdateMultiPanel() // turn off the inventory XuiElementSetShow(m_hGridInventory,FALSE); XuiElementSetShow(m_DescriptionText,TRUE); - XuiElementSetShow(m_InventoryText,FALSE); + XuiElementSetShow(m_InventoryText,FALSE); break; case DISPLAY_INGREDIENTS: // turn off all the descriptions @@ -544,7 +544,7 @@ void CXuiSceneCraftingPanel::UpdateMultiPanel() { XuiControlSetText(m_InventoryText,app.GetString(IDS_INGREDIENTS)); XuiElementSetShow(m_InventoryText,TRUE); - } + } break; } } diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.h b/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.h index 0c6e22ff..df2090ec 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.h +++ b/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.h @@ -3,7 +3,7 @@ using namespace std; #include "../media/xuiscene_craftingpanel_2x2.h" #include "XUI_Ctrl_MinecraftSlot.h" -#include "..\..\..\Minecraft.World\Recipy.h" +#include "..\..\..\Minecraft.World\Recipy.h" #include "XUI_Ctrl_CraftIngredientSlot.h" #include "..\..\..\Minecraft.World\Item.h" #include "XUI_CustomMessages.h" @@ -137,7 +137,7 @@ public: MAP_CONTROL(IDC_CraftingOutputRed,m_hCraftOutput) END_MAP_CHILD_CONTROLS() - + MAP_CONTROL(IDC_InventoryGrid, m_hGridInventory) BEGIN_MAP_CHILD_CONTROLS(m_hGridInventory) MAP_OVERRIDE(IDC_Inventory, m_inventoryControl) @@ -182,13 +182,13 @@ protected: virtual void hideAllHSlots(); virtual void hideAllVSlots(); virtual void hideAllIngredientsSlots(); - virtual void setCraftHSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha); - virtual void setCraftVSlotItem(int iPad, int iIndex, shared_ptr<ItemInstance> item, unsigned int uiAlpha); - virtual void setCraftingOutputSlotItem(int iPad, shared_ptr<ItemInstance> item); + virtual void setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha); + virtual void setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr<ItemInstance> item, unsigned int uiAlpha); + virtual void setCraftingOutputSlotItem(int iPad, std::shared_ptr<ItemInstance> item); virtual void setCraftingOutputSlotRedBox(bool show); - virtual void setIngredientSlotItem(int iPad, int index, shared_ptr<ItemInstance> item); + virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr<ItemInstance> item); virtual void setIngredientSlotRedBox(int index, bool show); - virtual void setIngredientDescriptionItem(int iPad, int index, shared_ptr<ItemInstance> item); + virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr<ItemInstance> item); virtual void setIngredientDescriptionRedBox(int index, bool show); virtual void setIngredientDescriptionText(int index, LPCWSTR text); virtual void setShowCraftHSlot(int iIndex, bool show); @@ -200,6 +200,6 @@ protected: virtual void scrollDescriptionDown(); virtual void updateHighlightAndScrollPositions(); virtual void updateVSlotPositions(int iSlots, int i); - + virtual void UpdateMultiPanel(); }; diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Inventory.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Inventory.cpp index 04e77e5e..c715bba5 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Inventory.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Inventory.cpp @@ -33,7 +33,7 @@ HRESULT CXuiSceneInventory::OnInit( XUIMessageInit *pInitData, BOOL &bHandled ) { if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } } @@ -57,7 +57,7 @@ HRESULT CXuiSceneInventory::OnInit( XUIMessageInit *pInitData, BOOL &bHandled ) initData->player->awardStat(GenericStats::openInventory(), GenericStats::param_noArgs()); CXuiSceneAbstractContainer::Initialize( initData->iPad, menu, false, InventoryMenu::INV_SLOT_START, eSectionInventoryUsing, eSectionInventoryMax, initData->bNavigateBack ); - + delete initData; float fWidth; @@ -86,7 +86,7 @@ HRESULT CXuiSceneInventory::OnDestroy() } // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -154,7 +154,7 @@ void CXuiSceneInventory::updateEffectsDisplay() { // Update with the current effects Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr<LocalPlayer> player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr<LocalPlayer> player = pMinecraft->localplayers[m_iPad]; if(player == NULL) return; @@ -185,7 +185,7 @@ void CXuiSceneInventory::updateEffectsDisplay() if(i > 0) position.y -= fNextEffectYOffset; // Stack from the bottom m_hEffectDisplayA[i]->SetPosition(&position); - + MobEffectInstance *effect = *it; MobEffect *mobEffect = MobEffect::effects[effect->getId()]; diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Inventory_Creative.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Inventory_Creative.cpp index 0793fc9e..bb5319a3 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Inventory_Creative.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Inventory_Creative.cpp @@ -43,7 +43,7 @@ HRESULT CXuiSceneInventoryCreative::OnInit( XUIMessageInit *pInitData, BOOL &bHa { if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } } @@ -60,12 +60,12 @@ HRESULT CXuiSceneInventoryCreative::OnInit( XUIMessageInit *pInitData, BOOL &bHa initData->player->awardStat(GenericStats::openInventory(), GenericStats::param_noArgs()); // 4J JEV - Item Picker Menu - shared_ptr<SimpleContainer> creativeContainer = shared_ptr<SimpleContainer>(new SimpleContainer( 0, TabSpec::MAX_SIZE + 9 )); + std::shared_ptr<SimpleContainer> creativeContainer = std::shared_ptr<SimpleContainer>(new SimpleContainer( 0, TabSpec::MAX_SIZE + 9 )); itemPickerMenu = new ItemPickerMenu(creativeContainer, initData->player->inventory); - + // 4J JEV - InitDataAssociations. m_containerControl->SetData( initData->iPad, itemPickerMenu, TabSpec::rows, TabSpec::columns, 0, TabSpec::MAX_SIZE ); - m_useRowControl->SetData( initData->iPad, itemPickerMenu, 1, 9, TabSpec::MAX_SIZE, TabSpec::MAX_SIZE + 9 ); + m_useRowControl->SetData( initData->iPad, itemPickerMenu, 1, 9, TabSpec::MAX_SIZE, TabSpec::MAX_SIZE + 9 ); m_pointerControl->SetUserIndex(m_pointerControl->m_hObj, initData->iPad); // Initialize superclass. @@ -79,7 +79,7 @@ HRESULT CXuiSceneInventoryCreative::OnInit( XUIMessageInit *pInitData, BOOL &bHa m_fPointerMinY += containerPos.y; // 4J JEV - Settup Tabs - for (int i = 0; i < eCreativeInventoryTab_COUNT; i++) + for (int i = 0; i < eCreativeInventoryTab_COUNT; i++) { m_hTabGroupA[i].SetShow(FALSE); } @@ -103,7 +103,7 @@ HRESULT CXuiSceneInventoryCreative::OnDestroy() #endif // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -115,8 +115,8 @@ HRESULT CXuiSceneInventoryCreative::OnDestroy() ////////////////////////////////////////////////////////////////////////// HRESULT CXuiSceneInventoryCreative::OnTransitionEnd( XUIMessageTransition *pTransData, BOOL& bHandled ) { - // are we being destroyed? If so, don't do anything - if(pTransData->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) + // are we being destroyed? If so, don't do anything + if(pTransData->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) { return S_OK; } @@ -199,7 +199,7 @@ void CXuiSceneInventoryCreative::updateScrollCurrentPage(int currentPage, int pa m_scrollUp.SetShow(currentPage > 1); m_scrollUp.PlayOptionalVisual(L"ScrollMore",L"EndScrollMore"); - + m_scrollDown.SetShow(currentPage < pageCount); m_scrollDown.PlayOptionalVisual(L"ScrollMore",L"EndScrollMore"); diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp index fec13460..b4b936c2 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp @@ -19,11 +19,11 @@ HRESULT CXuiSceneTrading::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) { MapChildControls(); - + //XuiControlSetText(m_villagerText,app.GetString(IDS_VILLAGER)); XuiControlSetText(m_inventoryLabel,app.GetString(IDS_INVENTORY)); XuiControlSetText(m_requiredLabel,app.GetString(IDS_REQUIRED_ITEMS_FOR_TRADE)); - + Minecraft *pMinecraft = Minecraft::GetInstance(); @@ -36,7 +36,7 @@ HRESULT CXuiSceneTrading::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } if( pMinecraft->localgameModes[m_iPad] != NULL ) @@ -65,7 +65,7 @@ HRESULT CXuiSceneTrading::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) // store the slot 0 highlight position m_tradingSelector.GetPosition(&m_vSelectorInitialPos); - + //app.SetRichPresenceContextValue(m_iPad,CONTEXT_GAME_STATE_FORGING); XuiSetTimer(m_hObj,TRADING_UPDATE_TIMER_ID,TRADING_UPDATE_TIMER_TIME); @@ -86,7 +86,7 @@ HRESULT CXuiSceneTrading::OnDestroy() } // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -245,17 +245,17 @@ void CXuiSceneTrading::setTradeRedBox(int index, bool show) m_tradeHSlots[index]->SetRedBox(show?TRUE:FALSE); } -void CXuiSceneTrading::setRequest1Item(shared_ptr<ItemInstance> item) +void CXuiSceneTrading::setRequest1Item(std::shared_ptr<ItemInstance> item) { m_request1Control->SetIcon(getPad(), item, 12, 31, true); } -void CXuiSceneTrading::setRequest2Item(shared_ptr<ItemInstance> item) +void CXuiSceneTrading::setRequest2Item(std::shared_ptr<ItemInstance> item) { m_request2Control->SetIcon(getPad(), item, 12, 31, true); } -void CXuiSceneTrading::setTradeItem(int index, shared_ptr<ItemInstance> item) +void CXuiSceneTrading::setTradeItem(int index, std::shared_ptr<ItemInstance> item) { m_tradeHSlots[index]->SetIcon(getPad(), item, 12, 31, true); } @@ -299,7 +299,7 @@ void CXuiSceneTrading::setOfferDescription(const wstring &name, vector<wstring> XuiElementSetBounds(m_hOfferInfoText,xuiRect.right+4.0f+4.0f,xuiRect.bottom+4.0f+4.0f); // edge graphics are 8 pixels, text is centred m_offerInfoControl.SetShow(TRUE); - + D3DXVECTOR3 highlightPos, offerInfoPos; float highlightWidth, highlightHeight; m_tradingSelector.GetPosition(&highlightPos); diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Trading.h b/Minecraft.Client/Common/XUI/XUI_Scene_Trading.h index 72194cbc..5ca08b83 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Trading.h +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Trading.h @@ -83,7 +83,7 @@ protected: MAP_OVERRIDE(IDC_Inventory, m_inventoryControl) MAP_OVERRIDE(IDC_UseRow, m_useRowControl) END_MAP_CHILD_CONTROLS() - END_MAP_CHILD_CONTROLS() + END_MAP_CHILD_CONTROLS() END_CONTROL_MAP() HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); @@ -120,9 +120,9 @@ protected: virtual void setRequest2RedBox(bool show); virtual void setTradeRedBox(int index, bool show); - virtual void setRequest1Item(shared_ptr<ItemInstance> item); - virtual void setRequest2Item(shared_ptr<ItemInstance> item); - virtual void setTradeItem(int index, shared_ptr<ItemInstance> item); - + virtual void setRequest1Item(std::shared_ptr<ItemInstance> item); + virtual void setRequest2Item(std::shared_ptr<ItemInstance> item); + virtual void setTradeItem(int index, std::shared_ptr<ItemInstance> item); + virtual void setOfferDescription(const wstring &name, vector<wstring> &unformattedStrings); };
\ No newline at end of file diff --git a/Minecraft.Client/Common/XUI/XUI_SignEntry.cpp b/Minecraft.Client/Common/XUI/XUI_SignEntry.cpp index 378ac147..8fb6678c 100644 --- a/Minecraft.Client/Common/XUI/XUI_SignEntry.cpp +++ b/Minecraft.Client/Common/XUI/XUI_SignEntry.cpp @@ -11,13 +11,13 @@ HRESULT CScene_SignEntry::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) { MapChildControls(); - + XuiControlSetText(m_ButtonDone,app.GetString(IDS_DONE)); XuiControlSetText(m_labelEditSign,app.GetString(IDS_EDIT_SIGN_MESSAGE)); SignEntryScreenInput* initData = (SignEntryScreenInput*)pInitData->pvInitData; m_sign = initData->sign; - + CXuiSceneBase::ShowDarkOverlay( initData->iPad, TRUE ); CXuiSceneBase::ShowLogo( initData->iPad, FALSE); ui.SetTooltips( initData->iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK); @@ -65,7 +65,7 @@ HRESULT CScene_SignEntry::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* p for(int i=0;i<4;i++) { wstring temp=m_signRows[i].GetText(); - m_sign->SetMessage(i,temp); + m_sign->SetMessage(i,temp); } m_sign->setChanged(); @@ -74,10 +74,10 @@ HRESULT CScene_SignEntry::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* p // need to send the new data if (pMinecraft->level->isClientSide) { - shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[pNotifyPressData->UserIndex]; + std::shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[pNotifyPressData->UserIndex]; if(player != NULL && player->connection && player->connection->isStarted()) { - player->connection->send( shared_ptr<SignUpdatePacket>( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) ); + player->connection->send( std::shared_ptr<SignUpdatePacket>( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) ); } } app.CloseXuiScenes(pNotifyPressData->UserIndex); @@ -103,7 +103,7 @@ HRESULT CScene_SignEntry::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled app.CloseXuiScenes(pInputData->UserIndex); rfHandled = TRUE; - + CXuiSceneBase::PlayUISFX(eSFX_Back); break; } diff --git a/Minecraft.Client/Common/XUI/XUI_SignEntry.h b/Minecraft.Client/Common/XUI/XUI_SignEntry.h index 4f8c44d2..c8d5aae2 100644 --- a/Minecraft.Client/Common/XUI/XUI_SignEntry.h +++ b/Minecraft.Client/Common/XUI/XUI_SignEntry.h @@ -43,7 +43,7 @@ public: XUI_IMPLEMENT_CLASS( CScene_SignEntry, L"CScene_SignEntry", XUI_CLASS_SCENE ) private: - shared_ptr<SignTileEntity> m_sign; + std::shared_ptr<SignTileEntity> m_sign; D3DXVECTOR3 m_OriginalPosition; };
\ No newline at end of file diff --git a/Minecraft.Client/Common/XUI/XUI_Teleport.cpp b/Minecraft.Client/Common/XUI/XUI_Teleport.cpp index 1d6ac3bf..90b4b5fa 100644 --- a/Minecraft.Client/Common/XUI/XUI_Teleport.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Teleport.cpp @@ -61,7 +61,7 @@ HRESULT CScene_Teleport::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) g_NetworkManager.RegisterPlayerChangedCallback(m_iPad, &CScene_Teleport::OnPlayerChanged, this); ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK); - + CXuiSceneBase::ShowDarkOverlay( m_iPad, TRUE ); return S_OK; @@ -104,11 +104,11 @@ HRESULT CScene_Teleport::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pN ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A); if( hObjPressed == playersList ) - { + { INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ playersList.GetCurSel() ] ); INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(m_iPad); - - shared_ptr<GameCommandPacket> packet; + + std::shared_ptr<GameCommandPacket> packet; if(m_teleportToPlayer) { packet = TeleportCommand::preparePacket(thisPlayer->GetUID(),selectedPlayer->GetUID()); @@ -186,7 +186,7 @@ HRESULT CScene_Teleport::OnGetSourceDataText(XUIMessageGetSourceText *pGetSource } HRESULT hr; - HXUIOBJ hButton, hVisual, hPlayerIcon, hVoiceIcon; + HXUIOBJ hButton, hVisual, hPlayerIcon, hVoiceIcon; hButton = playersList.GetItemControl(pGetSourceTextData->iItem); hr=XuiControlGetVisual(hButton,&hVisual); @@ -271,7 +271,7 @@ HRESULT CScene_Teleport::OnGetSourceDataText(XUIMessageGetSourceText *pGetSource XuiElementFindNamedFrame(hVoiceIcon, L"NotSpeaking", &playFrame); } } - + if(playFrame < 0) { XuiElementFindNamedFrame(hVoiceIcon, L"Normal", &playFrame); diff --git a/Minecraft.Client/Common/XUI/XUI_TextEntry.cpp b/Minecraft.Client/Common/XUI/XUI_TextEntry.cpp index 8934350d..19c2b34e 100644 --- a/Minecraft.Client/Common/XUI/XUI_TextEntry.cpp +++ b/Minecraft.Client/Common/XUI/XUI_TextEntry.cpp @@ -53,7 +53,7 @@ HRESULT CScene_TextEntry::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyVal if(pValueChangedData->nValue==10) { LPCWSTR pText = m_EditText.GetText(); - + if(pText) { wstring wText = pText; @@ -61,7 +61,7 @@ HRESULT CScene_TextEntry::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyVal } app.NavigateBack(m_iPad); - rfHandled = TRUE; + rfHandled = TRUE; } return S_OK; @@ -86,7 +86,7 @@ HRESULT CScene_TextEntry::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled app.NavigateBack(m_iPad); rfHandled = TRUE; - } + } break; case VK_PAD_B: @@ -125,7 +125,7 @@ HRESULT CScene_TextEntry::InterpretString(wstring &wsText) case eCommand_Teleport: { int x,z; - + #ifdef __PS3__ // 4J Stu - The Xbox version uses swscanf_s which isn't available in GCC. swscanf(wsText.c_str(), L"%40s%c%d%c%d", wchCommand,wchSep,&x,wchSep,&z); @@ -146,9 +146,9 @@ HRESULT CScene_TextEntry::InterpretString(wstring &wsText) } break; case eCommand_Give: - { + { int iItem,iCount; - + #ifdef __PS3__ // 4J Stu - The Xbox version uses swscanf_s which isn't available in GCC. swscanf(wsText.c_str(), L"%40s%c%d%c%d", wchCommand,wchSep,&iItem,wchSep,&iCount); @@ -158,7 +158,7 @@ HRESULT CScene_TextEntry::InterpretString(wstring &wsText) app.DebugPrintf("eCommand_Give, item=%d count=%d\n",iItem,iCount); Minecraft *pMinecraft=Minecraft::GetInstance(); for(int i=0;i<iCount;i++) - pMinecraft->localplayers[m_iPad]->drop(); // shared_ptr<ItemInstance>(new ItemInstance( iItem, 1, 0 )) ); + pMinecraft->localplayers[m_iPad]->drop(); // std::shared_ptr<ItemInstance>(new ItemInstance( iItem, 1, 0 )) ); } break; diff --git a/Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp b/Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp index 98951d81..bea3e055 100644 --- a/Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp +++ b/Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp @@ -23,7 +23,7 @@ HRESULT CScene_TutorialPopup::OnInit( XUIMessageInit* pInitData, BOOL& bHandled // if we are in splitscreen, then we need to figure out if we want to move this scene if(app.GetLocalPlayerCount()>1) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } m_textFontSize = _fromString<int>( m_fontSizeControl.GetText() ); @@ -143,7 +143,7 @@ void CScene_TutorialPopup::UpdateInteractScenePosition(bool visible) } HRESULT CScene_TutorialPopup::_SetDescription(CXuiScene *interactScene, LPCWSTR desc, LPCWSTR title, bool allowFade, bool isReminder) -{ +{ HRESULT hr = S_OK; m_interactScene = interactScene; if( interactScene != m_lastInteractSceneMoved ) m_lastInteractSceneMoved = NULL; @@ -289,7 +289,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS if( icon != TUTORIAL_NO_ICON ) { bool itemIsFoil = false; - itemIsFoil = (shared_ptr<ItemInstance>(new ItemInstance(icon,1,iAuxVal)))->isFoil(); + itemIsFoil = (std::shared_ptr<ItemInstance>(new ItemInstance(icon,1,iAuxVal)))->isFoil(); if(!itemIsFoil) itemIsFoil = isFoil; m_pCraftingPic->SetIcon(m_iPad, icon,iAuxVal,1,10,31,false,itemIsFoil); @@ -322,7 +322,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS } bool itemIsFoil = false; - itemIsFoil = (shared_ptr<ItemInstance>(new ItemInstance(iconId,1,iAuxVal)))->isFoil(); + itemIsFoil = (std::shared_ptr<ItemInstance>(new ItemInstance(iconId,1,iAuxVal)))->isFoil(); if(!itemIsFoil) itemIsFoil = isFoil; m_pCraftingPic->SetIcon(m_iPad, iconId,iAuxVal,1,10,31,false,itemIsFoil); @@ -330,7 +330,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS temp.replace(iconTagStartPos, iconEndPos - iconTagStartPos + closeTag.length(), L""); } } - + // remove any icon text else if(temp.find(L"{*CraftingTableIcon*}")!=wstring::npos) { @@ -410,7 +410,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS m_pCraftingPic->SetIcon(m_iPad, 0,0,0,0,0,false,false,FALSE); } } - + BOOL iconShowAtEnd = m_pCraftingPic->IsShown(); if(iconShowAtStart != iconShowAtEnd) { @@ -432,7 +432,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS } m_description.SetBounds(fDescWidth, fDescHeight); } - + return temp; } @@ -463,7 +463,7 @@ wstring CScene_TutorialPopup::_SetImage(wstring &desc) // hide the icon slot m_image.SetShow( FALSE ); } - + BOOL imageShowAtEnd = m_image.IsShown(); if(imageShowAtStart != imageShowAtEnd) { @@ -485,7 +485,7 @@ wstring CScene_TutorialPopup::_SetImage(wstring &desc) } m_description.SetBounds(fDescWidth, fDescHeight); } - + return desc; } diff --git a/Minecraft.Client/ConnectScreen.cpp b/Minecraft.Client/ConnectScreen.cpp index 2cf005b6..3f93a5b0 100644 --- a/Minecraft.Client/ConnectScreen.cpp +++ b/Minecraft.Client/ConnectScreen.cpp @@ -17,7 +17,7 @@ ConnectScreen::ConnectScreen(Minecraft *minecraft, const wstring& ip, int port) // 4J - removed from separate thread, but need to investigate what we actually need here connection = new ClientConnection(minecraft, ip, port); if (aborted) return; - connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(minecraft->user->name) ) ); + connection->send( std::shared_ptr<PreLoginPacket>( new PreLoginPacket(minecraft->user->name) ) ); #else new Thread() { diff --git a/Minecraft.Client/ContainerScreen.cpp b/Minecraft.Client/ContainerScreen.cpp index 17b45406..0cee4bf5 100644 --- a/Minecraft.Client/ContainerScreen.cpp +++ b/Minecraft.Client/ContainerScreen.cpp @@ -3,7 +3,7 @@ #include "Textures.h" #include "..\Minecraft.World\net.minecraft.world.inventory.h" -ContainerScreen::ContainerScreen(shared_ptr<Container> inventory, shared_ptr<Container> container) : AbstractContainerScreen(new ContainerMenu(inventory, container)) +ContainerScreen::ContainerScreen(std::shared_ptr<Container> inventory, std::shared_ptr<Container> container) : AbstractContainerScreen(new ContainerMenu(inventory, container)) { this->inventory = inventory; this->container = container; diff --git a/Minecraft.Client/ContainerScreen.h b/Minecraft.Client/ContainerScreen.h index 38806c1e..314026ae 100644 --- a/Minecraft.Client/ContainerScreen.h +++ b/Minecraft.Client/ContainerScreen.h @@ -5,13 +5,13 @@ class Container; class ContainerScreen : public AbstractContainerScreen { private: - shared_ptr<Container> inventory; - shared_ptr<Container> container; + std::shared_ptr<Container> inventory; + std::shared_ptr<Container> container; int containerRows; public: - ContainerScreen(shared_ptr<Container>inventory, shared_ptr<Container>container); + ContainerScreen(std::shared_ptr<Container>inventory, std::shared_ptr<Container>container); protected: virtual void renderLabels(); diff --git a/Minecraft.Client/CowModel.h b/Minecraft.Client/CowModel.h index 617bb94f..b3ffba6a 100644 --- a/Minecraft.Client/CowModel.h +++ b/Minecraft.Client/CowModel.h @@ -1,10 +1,10 @@ #pragma once #include "QuadrupedModel.h" -class CowModel : public QuadrupedModel +class CowModel : public QuadrupedModel { public: CowModel(); -// virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); +// virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); // virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale); }; diff --git a/Minecraft.Client/CowRenderer.cpp b/Minecraft.Client/CowRenderer.cpp index c4eaf261..57b0bbb4 100644 --- a/Minecraft.Client/CowRenderer.cpp +++ b/Minecraft.Client/CowRenderer.cpp @@ -5,7 +5,7 @@ CowRenderer::CowRenderer(Model *model, float shadow) : MobRenderer(model, shadow { } -void CowRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void CowRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { MobRenderer::render(_mob, x, y, z, rot, a); }
\ No newline at end of file diff --git a/Minecraft.Client/CowRenderer.h b/Minecraft.Client/CowRenderer.h index e99e1c12..0dabaf29 100644 --- a/Minecraft.Client/CowRenderer.h +++ b/Minecraft.Client/CowRenderer.h @@ -5,5 +5,5 @@ class CowRenderer : public MobRenderer { public: CowRenderer(Model *model, float shadow); - virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/CraftingScreen.cpp b/Minecraft.Client/CraftingScreen.cpp index c28df18d..edbc7ec5 100644 --- a/Minecraft.Client/CraftingScreen.cpp +++ b/Minecraft.Client/CraftingScreen.cpp @@ -4,7 +4,7 @@ #include "MultiplayerLocalPlayer.h" #include "..\Minecraft.World\net.minecraft.world.inventory.h" -CraftingScreen::CraftingScreen(shared_ptr<Inventory> inventory, Level *level, int x, int y, int z) : AbstractContainerScreen(new CraftingMenu(inventory, level, x, y, z)) +CraftingScreen::CraftingScreen(std::shared_ptr<Inventory> inventory, Level *level, int x, int y, int z) : AbstractContainerScreen(new CraftingMenu(inventory, level, x, y, z)) { } diff --git a/Minecraft.Client/CraftingScreen.h b/Minecraft.Client/CraftingScreen.h index 2de1681f..42b2623a 100644 --- a/Minecraft.Client/CraftingScreen.h +++ b/Minecraft.Client/CraftingScreen.h @@ -6,7 +6,7 @@ class Level; class CraftingScreen : public AbstractContainerScreen { public: - CraftingScreen(shared_ptr<Inventory> inventory, Level *level, int x, int y, int z); + CraftingScreen(std::shared_ptr<Inventory> inventory, Level *level, int x, int y, int z); virtual void removed(); protected: virtual void renderLabels(); diff --git a/Minecraft.Client/CreativeMode.cpp b/Minecraft.Client/CreativeMode.cpp index 48342ebc..78183c81 100644 --- a/Minecraft.Client/CreativeMode.cpp +++ b/Minecraft.Client/CreativeMode.cpp @@ -19,7 +19,7 @@ void CreativeMode::init() // initPlayer(); } -void CreativeMode::enableCreativeForPlayer(shared_ptr<Player> player) +void CreativeMode::enableCreativeForPlayer(std::shared_ptr<Player> player) { // please check ServerPlayerGameMode.java if you change these player->abilities.mayfly = true; @@ -27,7 +27,7 @@ void CreativeMode::enableCreativeForPlayer(shared_ptr<Player> player) player->abilities.invulnerable = true; } -void CreativeMode::disableCreativeForPlayer(shared_ptr<Player> player) +void CreativeMode::disableCreativeForPlayer(std::shared_ptr<Player> player) { player->abilities.mayfly = false; player->abilities.flying = false; @@ -35,7 +35,7 @@ void CreativeMode::disableCreativeForPlayer(shared_ptr<Player> player) player->abilities.invulnerable = false; } -void CreativeMode::adjustPlayer(shared_ptr<Player> player) +void CreativeMode::adjustPlayer(std::shared_ptr<Player> player) { enableCreativeForPlayer(player); @@ -43,7 +43,7 @@ void CreativeMode::adjustPlayer(shared_ptr<Player> player) { if (player->inventory->items[i] == NULL) { - player->inventory->items[i] = shared_ptr<ItemInstance>( new ItemInstance(User::allowedTiles[i]) ); + player->inventory->items[i] = std::shared_ptr<ItemInstance>( new ItemInstance(User::allowedTiles[i]) ); } else { @@ -61,7 +61,7 @@ void CreativeMode::creativeDestroyBlock(Minecraft *minecraft, GameMode *gameMode } } -bool CreativeMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly, bool *pbUsedItem) +bool CreativeMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly, bool *pbUsedItem) { int t = level->getTile(x, y, z); if (t > 0) diff --git a/Minecraft.Client/CreativeMode.h b/Minecraft.Client/CreativeMode.h index 10b27a53..9732cfd0 100644 --- a/Minecraft.Client/CreativeMode.h +++ b/Minecraft.Client/CreativeMode.h @@ -9,11 +9,11 @@ private: public: CreativeMode(Minecraft *minecraft); virtual void init(); - static void enableCreativeForPlayer(shared_ptr<Player> player); - static void disableCreativeForPlayer(shared_ptr<Player> player); - virtual void adjustPlayer(shared_ptr<Player> player); + static void enableCreativeForPlayer(std::shared_ptr<Player> player); + static void disableCreativeForPlayer(std::shared_ptr<Player> player); + virtual void adjustPlayer(std::shared_ptr<Player> player); static void creativeDestroyBlock(Minecraft *minecraft, GameMode *gameMode, int x, int y, int z, int face); - virtual bool useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem = NULL); + virtual bool useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem = NULL); virtual void startDestroyBlock(int x, int y, int z, int face); virtual void continueDestroyBlock(int x, int y, int z, int face); virtual void stopDestroyBlock(); diff --git a/Minecraft.Client/CreeperModel.cpp b/Minecraft.Client/CreeperModel.cpp index 51237ce6..6c2737d3 100644 --- a/Minecraft.Client/CreeperModel.cpp +++ b/Minecraft.Client/CreeperModel.cpp @@ -56,7 +56,7 @@ CreeperModel::CreeperModel(float g) : Model() _init(g); } -void CreeperModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void CreeperModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/CreeperModel.h b/Minecraft.Client/CreeperModel.h index 06231d0e..0c4e9448 100644 --- a/Minecraft.Client/CreeperModel.h +++ b/Minecraft.Client/CreeperModel.h @@ -9,6 +9,6 @@ public: void _init(float g); // 4J added CreeperModel(); CreeperModel(float g); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); };
\ No newline at end of file diff --git a/Minecraft.Client/CreeperRenderer.cpp b/Minecraft.Client/CreeperRenderer.cpp index 483d14e3..4afa22a8 100644 --- a/Minecraft.Client/CreeperRenderer.cpp +++ b/Minecraft.Client/CreeperRenderer.cpp @@ -9,9 +9,9 @@ CreeperRenderer::CreeperRenderer() : MobRenderer( new CreeperModel(), 0.5f ) armorModel = new CreeperModel(2); } -void CreeperRenderer::scale(shared_ptr<Mob> mob, float a) +void CreeperRenderer::scale(std::shared_ptr<Mob> mob, float a) { - shared_ptr<Creeper> creeper = dynamic_pointer_cast<Creeper>(mob); + std::shared_ptr<Creeper> creeper = dynamic_pointer_cast<Creeper>(mob); float g = creeper->getSwelling(a); @@ -25,9 +25,9 @@ void CreeperRenderer::scale(shared_ptr<Mob> mob, float a) glScalef(s, hs, s); } -int CreeperRenderer::getOverlayColor(shared_ptr<Mob> mob, float br, float a) +int CreeperRenderer::getOverlayColor(std::shared_ptr<Mob> mob, float br, float a) { - shared_ptr<Creeper> creeper = dynamic_pointer_cast<Creeper>(mob); + std::shared_ptr<Creeper> creeper = dynamic_pointer_cast<Creeper>(mob); float step = creeper->getSwelling(a); @@ -44,10 +44,10 @@ int CreeperRenderer::getOverlayColor(shared_ptr<Mob> mob, float br, float a) return (_a << 24) | (r << 16) | (g << 8) | b; } -int CreeperRenderer::prepareArmor(shared_ptr<Mob> _mob, int layer, float a) +int CreeperRenderer::prepareArmor(std::shared_ptr<Mob> _mob, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Creeper> mob = dynamic_pointer_cast<Creeper>(_mob); + std::shared_ptr<Creeper> mob = dynamic_pointer_cast<Creeper>(_mob); if (mob->isPowered()) { if (mob->isInvisible()) glDepthMask(false); @@ -84,7 +84,7 @@ int CreeperRenderer::prepareArmor(shared_ptr<Mob> _mob, int layer, float a) } -int CreeperRenderer::prepareArmorOverlay(shared_ptr<Mob> mob, int layer, float a) +int CreeperRenderer::prepareArmorOverlay(std::shared_ptr<Mob> mob, int layer, float a) { return -1; }
\ No newline at end of file diff --git a/Minecraft.Client/CreeperRenderer.h b/Minecraft.Client/CreeperRenderer.h index 4d0fac10..3afd511b 100644 --- a/Minecraft.Client/CreeperRenderer.h +++ b/Minecraft.Client/CreeperRenderer.h @@ -9,8 +9,8 @@ private: public: CreeperRenderer(); protected: - virtual void scale(shared_ptr<Mob> _mob, float a); - virtual int getOverlayColor(shared_ptr<Mob> mob, float br, float a); - virtual int prepareArmor(shared_ptr<Mob> mob, int layer, float a); - virtual int prepareArmorOverlay(shared_ptr<Mob> _mob, int layer, float a); + virtual void scale(std::shared_ptr<Mob> _mob, float a); + virtual int getOverlayColor(std::shared_ptr<Mob> mob, float br, float a); + virtual int prepareArmor(std::shared_ptr<Mob> mob, int layer, float a); + virtual int prepareArmorOverlay(std::shared_ptr<Mob> _mob, int layer, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/CritParticle.cpp b/Minecraft.Client/CritParticle.cpp index 6c71b027..ec99d248 100644 --- a/Minecraft.Client/CritParticle.cpp +++ b/Minecraft.Client/CritParticle.cpp @@ -5,7 +5,7 @@ #include "..\Minecraft.World\net.minecraft.world.phys.h" #include "..\Minecraft.World\net.minecraft.world.level.h" -void CritParticle::_init(Level *level, shared_ptr<Entity> entity, ePARTICLE_TYPE type) +void CritParticle::_init(Level *level, std::shared_ptr<Entity> entity, ePARTICLE_TYPE type) { life = 0; this->entity = entity; @@ -15,17 +15,17 @@ void CritParticle::_init(Level *level, shared_ptr<Entity> entity, ePARTICLE_TYPE //tick(); } -CritParticle::CritParticle(Level *level, shared_ptr<Entity> entity) : Particle(level, entity->x, entity->bb->y0 + entity->bbHeight / 2, entity->z, entity->xd, entity->yd, entity->zd) +CritParticle::CritParticle(Level *level, std::shared_ptr<Entity> entity) : Particle(level, entity->x, entity->bb->y0 + entity->bbHeight / 2, entity->z, entity->xd, entity->yd, entity->zd) { _init(level,entity,eParticleType_crit); } -CritParticle::CritParticle(Level *level, shared_ptr<Entity> entity, ePARTICLE_TYPE type) : Particle(level, entity->x, entity->bb->y0 + entity->bbHeight / 2, entity->z, entity->xd, entity->yd, entity->zd) +CritParticle::CritParticle(Level *level, std::shared_ptr<Entity> entity, ePARTICLE_TYPE type) : Particle(level, entity->x, entity->bb->y0 + entity->bbHeight / 2, entity->z, entity->xd, entity->yd, entity->zd) { _init(level, entity, type); } -// 4J - Added this so that we can use some shared_ptr functions that were needed in the ctor +// 4J - Added this so that we can use some std::shared_ptr functions that were needed in the ctor void CritParticle::CritParticlePostConstructor(void) { tick(); @@ -49,7 +49,7 @@ void CritParticle::tick() level->addParticle(particleName, x, y, z, xa, ya+0.2, za); } life++; - if (life >= lifeTime) + if (life >= lifeTime) { remove(); } diff --git a/Minecraft.Client/CritParticle.h b/Minecraft.Client/CritParticle.h index 23f30339..5bad1c25 100644 --- a/Minecraft.Client/CritParticle.h +++ b/Minecraft.Client/CritParticle.h @@ -7,17 +7,17 @@ class Entity; class CritParticle : public Particle { private: - shared_ptr<Entity> entity; + std::shared_ptr<Entity> entity; int life; int lifeTime; ePARTICLE_TYPE particleName; - void _init(Level *level, shared_ptr<Entity> entity, ePARTICLE_TYPE type); + void _init(Level *level, std::shared_ptr<Entity> entity, ePARTICLE_TYPE type); public: virtual eINSTANCEOF GetType() { return eType_CRITPARTICLE; } - CritParticle(Level *level, shared_ptr<Entity> entity); - CritParticle(Level *level, shared_ptr<Entity> entity, ePARTICLE_TYPE type); + CritParticle(Level *level, std::shared_ptr<Entity> entity); + CritParticle(Level *level, std::shared_ptr<Entity> entity, ePARTICLE_TYPE type); void CritParticlePostConstructor(void); void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); void tick(); diff --git a/Minecraft.Client/DefaultRenderer.cpp b/Minecraft.Client/DefaultRenderer.cpp index d4c15737..f6cb38ee 100644 --- a/Minecraft.Client/DefaultRenderer.cpp +++ b/Minecraft.Client/DefaultRenderer.cpp @@ -2,7 +2,7 @@ #include "DefaultRenderer.h" #include "..\Minecraft.World\net.minecraft.world.entity.h" -void DefaultRenderer::render(shared_ptr<Entity> entity, double x, double y, double z, float rot, float a) +void DefaultRenderer::render(std::shared_ptr<Entity> entity, double x, double y, double z, float rot, float a) { glPushMatrix(); // 4J - removed following line as doesn't really make any sense diff --git a/Minecraft.Client/DefaultRenderer.h b/Minecraft.Client/DefaultRenderer.h index dcb5a9c3..651a99c1 100644 --- a/Minecraft.Client/DefaultRenderer.h +++ b/Minecraft.Client/DefaultRenderer.h @@ -4,5 +4,5 @@ class DefaultRenderer : public EntityRenderer { public: - virtual void render(shared_ptr<Entity> entity, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> entity, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/DemoLevel.cpp b/Minecraft.Client/DemoLevel.cpp index 52edc0ba..f112aed4 100644 --- a/Minecraft.Client/DemoLevel.cpp +++ b/Minecraft.Client/DemoLevel.cpp @@ -2,7 +2,7 @@ #include "DemoLevel.h" #include "..\Minecraft.World\net.minecraft.world.level.storage.h" -DemoLevel::DemoLevel(shared_ptr<LevelStorage> levelStorage, const wstring& levelName) : Level(levelStorage, levelName, DEMO_LEVEL_SEED) +DemoLevel::DemoLevel(std::shared_ptr<LevelStorage> levelStorage, const wstring& levelName) : Level(levelStorage, levelName, DEMO_LEVEL_SEED) { } diff --git a/Minecraft.Client/DemoLevel.h b/Minecraft.Client/DemoLevel.h index 6464c32b..4c1ef110 100644 --- a/Minecraft.Client/DemoLevel.h +++ b/Minecraft.Client/DemoLevel.h @@ -9,7 +9,7 @@ private: static const int DEMO_SPAWN_Y = 72; static const int DEMO_SPAWN_Z = -731; public: - DemoLevel(shared_ptr<LevelStorage> levelStorage, const wstring& levelName); + DemoLevel(std::shared_ptr<LevelStorage> levelStorage, const wstring& levelName); DemoLevel(Level *level, Dimension *dimension); protected: virtual void setInitialSpawn(); diff --git a/Minecraft.Client/DemoMode.cpp b/Minecraft.Client/DemoMode.cpp index 0816023b..798f7bd4 100644 --- a/Minecraft.Client/DemoMode.cpp +++ b/Minecraft.Client/DemoMode.cpp @@ -95,7 +95,7 @@ bool DemoMode::destroyBlock(int x, int y, int z, int face) return SurvivalMode::destroyBlock(x, y, z, face); } -bool DemoMode::useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item) +bool DemoMode::useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item) { if (demoHasEnded) { @@ -105,7 +105,7 @@ bool DemoMode::useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemI return SurvivalMode::useItem(player, level, item); } -bool DemoMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face) +bool DemoMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face) { if (demoHasEnded) { outputDemoReminder(); @@ -114,7 +114,7 @@ bool DemoMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<Ite return SurvivalMode::useItemOn(player, level, item, x, y, z, face); } -void DemoMode::attack(shared_ptr<Player> player, shared_ptr<Entity> entity) +void DemoMode::attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity) { if (demoHasEnded) { diff --git a/Minecraft.Client/DemoMode.h b/Minecraft.Client/DemoMode.h index 429c9ec3..9b5f1940 100644 --- a/Minecraft.Client/DemoMode.h +++ b/Minecraft.Client/DemoMode.h @@ -21,7 +21,7 @@ public: virtual void startDestroyBlock(int x, int y, int z, int face); virtual void continueDestroyBlock(int x, int y, int z, int face); virtual bool destroyBlock(int x, int y, int z, int face); - virtual bool useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item); - virtual bool useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face); - virtual void attack(shared_ptr<Player> player, shared_ptr<Entity> entity); + virtual bool useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item); + virtual bool useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face); + virtual void attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity); }; diff --git a/Minecraft.Client/DerivedServerLevel.cpp b/Minecraft.Client/DerivedServerLevel.cpp index a67408d7..114a7d45 100644 --- a/Minecraft.Client/DerivedServerLevel.cpp +++ b/Minecraft.Client/DerivedServerLevel.cpp @@ -3,7 +3,7 @@ #include "..\Minecraft.World\SavedDataStorage.h" #include "..\Minecraft.World\DerivedLevelData.h" -DerivedServerLevel::DerivedServerLevel(MinecraftServer *server, shared_ptr<LevelStorage> levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings, ServerLevel *wrapped) +DerivedServerLevel::DerivedServerLevel(MinecraftServer *server, std::shared_ptr<LevelStorage> levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings, ServerLevel *wrapped) : ServerLevel(server, levelStorage, levelName, dimension, levelSettings) { // 4J-PB - we're going to override the savedDataStorage, so we need to delete the current one diff --git a/Minecraft.Client/DerivedServerLevel.h b/Minecraft.Client/DerivedServerLevel.h index 2d49e4fa..ada362f4 100644 --- a/Minecraft.Client/DerivedServerLevel.h +++ b/Minecraft.Client/DerivedServerLevel.h @@ -4,7 +4,7 @@ class DerivedServerLevel : public ServerLevel { public: - DerivedServerLevel(MinecraftServer *server, shared_ptr<LevelStorage>levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings, ServerLevel *wrapped); + DerivedServerLevel(MinecraftServer *server, std::shared_ptr<LevelStorage>levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings, ServerLevel *wrapped); ~DerivedServerLevel(); protected: diff --git a/Minecraft.Client/DirtyChunkSorter.cpp b/Minecraft.Client/DirtyChunkSorter.cpp index 1a7c10cc..0dd07a2a 100644 --- a/Minecraft.Client/DirtyChunkSorter.cpp +++ b/Minecraft.Client/DirtyChunkSorter.cpp @@ -3,7 +3,7 @@ #include "../Minecraft.World/net.minecraft.world.entity.player.h" #include "Chunk.h" -DirtyChunkSorter::DirtyChunkSorter(shared_ptr<Mob> cameraEntity, int playerIndex) // 4J - added player index +DirtyChunkSorter::DirtyChunkSorter(std::shared_ptr<Mob> cameraEntity, int playerIndex) // 4J - added player index { this->cameraEntity = cameraEntity; this->playerIndex = playerIndex; diff --git a/Minecraft.Client/DirtyChunkSorter.h b/Minecraft.Client/DirtyChunkSorter.h index 4caa2fac..6d13c4e5 100644 --- a/Minecraft.Client/DirtyChunkSorter.h +++ b/Minecraft.Client/DirtyChunkSorter.h @@ -2,13 +2,13 @@ class Chunk; class Mob; -class DirtyChunkSorter : public std::binary_function<const Chunk *,const Chunk *,bool> +class DirtyChunkSorter : public std::binary_function<const Chunk *,const Chunk *,bool> { private: - shared_ptr<Mob> cameraEntity; + std::shared_ptr<Mob> cameraEntity; int playerIndex; // 4J added public: - DirtyChunkSorter(shared_ptr<Mob> cameraEntity, int playerIndex); // 4J - added player index + DirtyChunkSorter(std::shared_ptr<Mob> cameraEntity, int playerIndex); // 4J - added player index bool operator()(const Chunk *a, const Chunk *b) const; };
\ No newline at end of file diff --git a/Minecraft.Client/DistanceChunkSorter.cpp b/Minecraft.Client/DistanceChunkSorter.cpp index 80ac0cdf..6bfeb6d9 100644 --- a/Minecraft.Client/DistanceChunkSorter.cpp +++ b/Minecraft.Client/DistanceChunkSorter.cpp @@ -3,7 +3,7 @@ #include "../Minecraft.World/net.minecraft.world.entity.player.h" #include "Chunk.h" -DistanceChunkSorter::DistanceChunkSorter(shared_ptr<Entity> player) +DistanceChunkSorter::DistanceChunkSorter(std::shared_ptr<Entity> player) { ix = -player->x; iy = -player->y; @@ -15,7 +15,7 @@ bool DistanceChunkSorter::operator()(const Chunk *c0, const Chunk *c1) const double xd0 = c0->xm + ix; double yd0 = c0->ym + iy; double zd0 = c0->zm + iz; - + double xd1 = c1->xm + ix; double yd1 = c1->ym + iy; double zd1 = c1->zm + iz; diff --git a/Minecraft.Client/DistanceChunkSorter.h b/Minecraft.Client/DistanceChunkSorter.h index 4789070d..952c1656 100644 --- a/Minecraft.Client/DistanceChunkSorter.h +++ b/Minecraft.Client/DistanceChunkSorter.h @@ -2,12 +2,12 @@ class Entity; class Chunk; -class DistanceChunkSorter : public std::binary_function<const Chunk *,const Chunk *,bool> +class DistanceChunkSorter : public std::binary_function<const Chunk *,const Chunk *,bool> { private: double ix, iy, iz; public: - DistanceChunkSorter(shared_ptr<Entity> player); + DistanceChunkSorter(std::shared_ptr<Entity> player); bool operator()(const Chunk *a, const Chunk *b) const; };
\ No newline at end of file diff --git a/Minecraft.Client/DragonModel.cpp b/Minecraft.Client/DragonModel.cpp index 39861829..e3ff4c53 100644 --- a/Minecraft.Client/DragonModel.cpp +++ b/Minecraft.Client/DragonModel.cpp @@ -106,15 +106,15 @@ DragonModel::DragonModel(float g) : Model() rearFoot->compile(1.0f/16.0f); } -void DragonModel::prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) +void DragonModel::prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) { this->a = a; } -void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void DragonModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { glPushMatrix(); - shared_ptr<EnderDragon> dragon = dynamic_pointer_cast<EnderDragon>(entity); + std::shared_ptr<EnderDragon> dragon = dynamic_pointer_cast<EnderDragon>(entity); float ttt = dragon->oFlapTime + (dragon->flapTime - dragon->oFlapTime) * a; jaw->xRot = (float) (Mth::sin(ttt * PI * 2) + 1) * 0.2f; @@ -153,7 +153,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b double pComponents[3]; doubleArray p = doubleArray(pComponents,3); - for (int i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { dragon->getLatencyPos(p, 5 - i, a); @@ -185,9 +185,9 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b glTranslatef(0, -1, 0); body->zRot = 0; body->render(scale,usecompiled); - + glEnable(GL_CULL_FACE); - for (int i = 0; i < 2; i++) + for (int i = 0; i < 2; i++) { float flapTime = ttt * PI * 2; wing->xRot = 0.125f - (float) (Mth::cos(flapTime)) * 0.2f; @@ -206,7 +206,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b frontLeg->render(scale,usecompiled); rearLeg->render(scale,usecompiled); glScalef(-1, 1, 1); - if (i == 0) + if (i == 0) { glCullFace(GL_FRONT); } @@ -221,7 +221,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b zz = 60; xx = 0; dragon->getLatencyPos(start, 11, a); - for (int i = 0; i < 12; i++) + for (int i = 0; i < 12; i++) { dragon->getLatencyPos(p, 12 + i, a); rr += Mth::sin(i * 0.45f + roff) * 0.05f; @@ -238,7 +238,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b } glPopMatrix(); } -float DragonModel::rotWrap(double d) +float DragonModel::rotWrap(double d) { while (d >= 180) d -= 360; diff --git a/Minecraft.Client/DragonModel.h b/Minecraft.Client/DragonModel.h index 47c20cba..baee83de 100644 --- a/Minecraft.Client/DragonModel.h +++ b/Minecraft.Client/DragonModel.h @@ -26,8 +26,8 @@ public: ModelPart *cubes[5]; DragonModel(float g); - void prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); private: float rotWrap(double d); diff --git a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp index 232b4dd3..a3b3c981 100644 --- a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp +++ b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp @@ -12,7 +12,7 @@ using namespace Windows::Foundation; using namespace Windows::Xbox::System; -// To integrate the Chat DLL in your game, you can use this ChatIntegrationLayer class with modifications, +// To integrate the Chat DLL in your game, you can use this ChatIntegrationLayer class with modifications, // or create your own design your own class using the code in this file a guide. std::shared_ptr<ChatIntegrationLayer> GetChatIntegrationLayer() { @@ -25,12 +25,12 @@ std::shared_ptr<ChatIntegrationLayer> GetChatIntegrationLayer() return chatIntegrationLayerInstance; } -ChatIntegrationLayer::ChatIntegrationLayer() +ChatIntegrationLayer::ChatIntegrationLayer() { ZeroMemory( m_chatVoicePacketsStatistic, sizeof(m_chatVoicePacketsStatistic) ); } -void ChatIntegrationLayer::InitializeChatManager( +void ChatIntegrationLayer::InitializeChatManager( __in bool combineCaptureBuffersIntoSinglePacket, __in bool useKinectAsCaptureSource, __in bool applySoundEffectsToCapturedAudio, @@ -69,9 +69,9 @@ void ChatIntegrationLayer::InitializeChatManager( m_chatManager->ChatSettings->PerformanceCountersEnabled = true; #endif - // Upon enter constrained mode, mute everyone. + // Upon enter constrained mode, mute everyone. // Upon leaving constrained mode, unmute everyone who was previously muted. - m_tokenResourceAvailabilityChanged = Windows::ApplicationModel::Core::CoreApplication::ResourceAvailabilityChanged += + m_tokenResourceAvailabilityChanged = Windows::ApplicationModel::Core::CoreApplication::ResourceAvailabilityChanged += ref new EventHandler< Platform::Object^ >( [weakPtrToThis] (Platform::Object^, Platform::Object^ ) { // Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released. @@ -99,7 +99,7 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenOnDebugMessage = m_chatManager->OnDebugMessage += + m_tokenOnDebugMessage = m_chatManager->OnDebugMessage += ref new Windows::Foundation::EventHandler<Microsoft::Xbox::GameChat::DebugMessageEventArgs^>( [weakPtrToThis] ( Platform::Object^, Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args ) { @@ -112,8 +112,8 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenOnOutgoingChatPacketReady = m_chatManager->OnOutgoingChatPacketReady += - ref new Windows::Foundation::EventHandler<Microsoft::Xbox::GameChat::ChatPacketEventArgs^>( + m_tokenOnOutgoingChatPacketReady = m_chatManager->OnOutgoingChatPacketReady += + ref new Windows::Foundation::EventHandler<Microsoft::Xbox::GameChat::ChatPacketEventArgs^>( [weakPtrToThis] ( Platform::Object^, Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args ) { // Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released. @@ -125,16 +125,16 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenOnCompareUniqueConsoleIdentifiers = m_chatManager->OnCompareUniqueConsoleIdentifiers += - ref new Microsoft::Xbox::GameChat::CompareUniqueConsoleIdentifiersHandler( - [weakPtrToThis] ( Platform::Object^ obj1, Platform::Object^ obj2 ) - { + m_tokenOnCompareUniqueConsoleIdentifiers = m_chatManager->OnCompareUniqueConsoleIdentifiers += + ref new Microsoft::Xbox::GameChat::CompareUniqueConsoleIdentifiersHandler( + [weakPtrToThis] ( Platform::Object^ obj1, Platform::Object^ obj2 ) + { // Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released. // Simply unregistering the callback in the destructor isn't enough to prevent a dangling pointer std::shared_ptr<ChatIntegrationLayer> sharedPtrToThis(weakPtrToThis.lock()); if( sharedPtrToThis != nullptr ) { - return sharedPtrToThis->CompareUniqueConsoleIdentifiers(obj1, obj2); + return sharedPtrToThis->CompareUniqueConsoleIdentifiers(obj1, obj2); } else { @@ -142,10 +142,10 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenUserAudioDeviceAdded = WXS::User::AudioDeviceAdded += + m_tokenUserAudioDeviceAdded = WXS::User::AudioDeviceAdded += ref new Windows::Foundation::EventHandler<WXS::AudioDeviceAddedEventArgs^>( - [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceAddedEventArgs^ value ) - { + [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceAddedEventArgs^ value ) + { std::shared_ptr<ChatIntegrationLayer> sharedPtrToThis(weakPtrToThis.lock()); if( sharedPtrToThis != nullptr ) { @@ -153,10 +153,10 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenUserAudioDeviceRemoved = WXS::User::AudioDeviceRemoved += + m_tokenUserAudioDeviceRemoved = WXS::User::AudioDeviceRemoved += ref new Windows::Foundation::EventHandler<WXS::AudioDeviceRemovedEventArgs^>( - [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceRemovedEventArgs^ value ) - { + [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceRemovedEventArgs^ value ) + { std::shared_ptr<ChatIntegrationLayer> sharedPtrToThis(weakPtrToThis.lock()); if( sharedPtrToThis != nullptr ) { @@ -164,10 +164,10 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenUserAudioDeviceChanged = WXS::User::AudioDeviceChanged += + m_tokenUserAudioDeviceChanged = WXS::User::AudioDeviceChanged += ref new Windows::Foundation::EventHandler<WXS::AudioDeviceChangedEventArgs^>( - [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceChangedEventArgs^ value ) - { + [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceChangedEventArgs^ value ) + { std::shared_ptr<ChatIntegrationLayer> sharedPtrToThis(weakPtrToThis.lock()); if( sharedPtrToThis != nullptr ) { @@ -175,16 +175,16 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - //m_tokenSuspending = Windows::ApplicationModel::Core::CoreApplication::Suspending += + //m_tokenSuspending = Windows::ApplicationModel::Core::CoreApplication::Suspending += // ref new EventHandler< Windows::ApplicationModel::SuspendingEventArgs^ >( [weakPtrToThis] (Platform::Object^, Windows::ApplicationModel::SuspendingEventArgs^ args) //{ - // // Upon Suspending, nothing needs to be done + // // Upon Suspending, nothing needs to be done //}); - //m_tokenResuming = Windows::ApplicationModel::Core::CoreApplication::Resuming += + //m_tokenResuming = Windows::ApplicationModel::Core::CoreApplication::Resuming += // ref new EventHandler< Platform::Object^ >( [weakPtrToThis] (Platform::Object^, Windows::ApplicationModel::SuspendingEventArgs^ args) //{ - // // Upon Resuming, re-initialize the network, and reinitialize the chat session + // // Upon Resuming, re-initialize the network, and reinitialize the chat session //}); } @@ -215,14 +215,14 @@ void ChatIntegrationLayer::Shutdown() } } -void ChatIntegrationLayer::OnDebugMessageReceived( - __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args +void ChatIntegrationLayer::OnDebugMessageReceived( + __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args ) { - // To integrate the Chat DLL in your game, - // change this to false and remove the LogComment calls, + // To integrate the Chat DLL in your game, + // change this to false and remove the LogComment calls, // or integrate with your game's own UI/debug message logging system - bool outputToUI = false; + bool outputToUI = false; if( outputToUI ) { @@ -237,14 +237,14 @@ void ChatIntegrationLayer::OnDebugMessageReceived( } else { - // The string appear in the Visual Studio Output window + // The string appear in the Visual Studio Output window #ifndef _CONTENT_PACKAGE OutputDebugString( args->Message->Data() ); #endif } } -void ChatIntegrationLayer::GameUI_RecordPacketStatistic( +void ChatIntegrationLayer::GameUI_RecordPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ) @@ -261,7 +261,7 @@ void ChatIntegrationLayer::GameUI_RecordPacketStatistic( } } -int ChatIntegrationLayer::GameUI_GetPacketStatistic( +int ChatIntegrationLayer::GameUI_GetPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ) @@ -278,8 +278,8 @@ int ChatIntegrationLayer::GameUI_GetPacketStatistic( } } -void ChatIntegrationLayer::OnOutgoingChatPacketReady( - __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args +void ChatIntegrationLayer::OnOutgoingChatPacketReady( + __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args ) { byte *bytes; @@ -298,7 +298,7 @@ void ChatIntegrationLayer::OnOutgoingChatPacketReady( } -void ChatIntegrationLayer::OnIncomingChatMessage( +void ChatIntegrationLayer::OnIncomingChatMessage( unsigned int sessionAddress, Platform::Array<byte>^ message ) @@ -308,8 +308,8 @@ void ChatIntegrationLayer::OnIncomingChatMessage( // Instead your title should upon receiving a packet, extract the chat message from it, and then call m_chatManager->ProcessIncomingChatMessage as shown below // You will need to isolate chat messages to be unique from the rest of you game's other message types. - // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. - // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session. + // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. + // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session. // A Windows::Xbox::Networking::SecureDeviceAssociation^ is perfect to use if you have access to it. // This is how you would convert from byte array to a IBuffer^ @@ -331,7 +331,7 @@ void ChatIntegrationLayer::OnIncomingChatMessage( { Microsoft::Xbox::GameChat::ChatMessageType chatMessageType = m_chatManager->ProcessIncomingChatMessage(chatMessage, uniqueRemoteConsoleIdentifier); - GameUI_RecordPacketStatistic( chatMessageType, ChatPacketType::IncomingPacket ); + GameUI_RecordPacketStatistic( chatMessageType, ChatPacketType::IncomingPacket ); } } @@ -341,7 +341,7 @@ void ChatIntegrationLayer::AddAllLocallySignedInUsersToChatClient( __in Windows::Foundation::Collections::IVectorView<Windows::Xbox::System::User^>^ locallySignedInUsers ) { - // To integrate the Chat DLL in your game, + // To integrate the Chat DLL in your game, // add all locally signed in users to the chat client for each( Windows::Xbox::System::User^ user in locallySignedInUsers ) { @@ -486,10 +486,10 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel( __in Windows::Xbox::System::IUser^ user ) { - // Adds a local user to a specific channel. + // Adds a local user to a specific channel. - // This is helper function waits for the task to cm_chatManageromplete so shouldn't be called from the UI thread - // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread + // This is helper function waits for the task to cm_chatManageromplete so shouldn't be called from the UI thread + // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread // and chain PPL tasks together m_pDQRNet->LogComment( L">>>>>>>>>>>>> AddLocalUserToChatChannel" ); @@ -502,7 +502,7 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel( // Error handling try { - t.get(); + t.get(); } catch ( Platform::Exception^ ex ) { @@ -513,19 +513,19 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel( } } -void ChatIntegrationLayer::RemoveRemoteConsole( +void ChatIntegrationLayer::RemoveRemoteConsole( unsigned int address ) { - // uniqueConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. - // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session. + // uniqueConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. + // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session. // A Windows::Xbox::Networking::SecureDeviceAssociation^ is perfect to use if you have access to it. // This is how you would convert from an int to a Platform::Object^ // Platform::Object obj = IntToPlatformObject(5); - // This is helper function waits for the task to complete so shouldn't be called from the UI thread - // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread + // This is helper function waits for the task to complete so shouldn't be called from the UI thread + // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread // and chain PPL tasks together Platform::Object^ uniqueRemoteConsoleIdentifier = (Platform::Object^)address; @@ -538,7 +538,7 @@ void ChatIntegrationLayer::RemoveRemoteConsole( // Error handling try { - t.get(); + t.get(); } catch ( Platform::Exception^ ex ) { @@ -549,15 +549,15 @@ void ChatIntegrationLayer::RemoveRemoteConsole( } } -void ChatIntegrationLayer::RemoveUserFromChatChannel( +void ChatIntegrationLayer::RemoveUserFromChatChannel( __in uint8 channelIndex, - __in Windows::Xbox::System::IUser^ user + __in Windows::Xbox::System::IUser^ user ) { if( m_chatManager != nullptr ) { - // This is helper function waits for the task to complete so shouldn't be called from the UI thread - // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread + // This is helper function waits for the task to complete so shouldn't be called from the UI thread + // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread // and chain PPL tasks together auto asyncOp = m_chatManager->RemoveLocalUserFromChatChannelAsync( channelIndex, user ); @@ -577,13 +577,13 @@ void ChatIntegrationLayer::RemoveUserFromChatChannel( } } -void ChatIntegrationLayer::OnNewSessionAddressAdded( +void ChatIntegrationLayer::OnNewSessionAddressAdded( __in unsigned int address ) { m_pDQRNet->LogCommentFormat( L">>>>>>>>>>>>> OnNewSessionAddressAdded (%d)",address ); Platform::Object^ uniqueConsoleIdentifier = (Platform::Object^)address; - /// Call this when a new console connects. + /// Call this when a new console connects. /// This adds this console to the chat layer if( m_chatManager != nullptr ) { @@ -611,8 +611,8 @@ bool ChatIntegrationLayer::HasMicFocus() return false; } -Platform::Object^ ChatIntegrationLayer::IntToPlatformObject( - __in int val +Platform::Object^ ChatIntegrationLayer::IntToPlatformObject( + __in int val ) { return (Platform::Object^)val; @@ -621,23 +621,23 @@ Platform::Object^ ChatIntegrationLayer::IntToPlatformObject( //return Windows::Foundation::PropertyValue::CreateInt32(val); } -int ChatIntegrationLayer::PlatformObjectToInt( - __in Platform::Object^ uniqueRemoteConsoleIdentifier +int ChatIntegrationLayer::PlatformObjectToInt( + __in Platform::Object^ uniqueRemoteConsoleIdentifier ) { - return safe_cast<int>( uniqueRemoteConsoleIdentifier ); + return safe_cast<int>( uniqueRemoteConsoleIdentifier ); // You can also do the same using a PropertyValue. //return safe_cast<Windows::Foundation::IPropertyValue^>(uniqueRemoteConsoleIdentifier)->GetInt32(); } -void ChatIntegrationLayer::HandleChatChannelChanged( - __in uint8 oldChatChannelIndex, - __in uint8 newChatChannelIndex, - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser +void ChatIntegrationLayer::HandleChatChannelChanged( + __in uint8 oldChatChannelIndex, + __in uint8 newChatChannelIndex, + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ) { - // We remember if the local user was currently muted from all channels. And when we switch channels, + // We remember if the local user was currently muted from all channels. And when we switch channels, // we ensure that the state persists. For remote users, title should implement this themselves // based on title game design if they want to persist the muting state. @@ -674,8 +674,8 @@ void ChatIntegrationLayer::HandleChatChannelChanged( } } -void ChatIntegrationLayer::ChangeChatUserMuteState( - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser +void ChatIntegrationLayer::ChangeChatUserMuteState( + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ) { /// Helper function to swap the mute state of a specific chat user @@ -692,8 +692,8 @@ void ChatIntegrationLayer::ChangeChatUserMuteState( } } -Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUserId( - __in Platform::String^ xboxUserId +Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUserId( + __in Platform::String^ xboxUserId ) { Windows::Foundation::Collections::IVectorView<Microsoft::Xbox::GameChat::ChatUser^>^ chatUsers = GetChatUsers(); @@ -704,14 +704,14 @@ Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUser return chatUser; } } - + return nullptr; } -bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( - __in Platform::Object^ uniqueRemoteConsoleIdentifier1, - __in Platform::Object^ uniqueRemoteConsoleIdentifier2 +bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( + __in Platform::Object^ uniqueRemoteConsoleIdentifier1, + __in Platform::Object^ uniqueRemoteConsoleIdentifier2 ) { if (uniqueRemoteConsoleIdentifier1 == nullptr || uniqueRemoteConsoleIdentifier2 == nullptr) @@ -719,7 +719,7 @@ bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( return false; } - // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. + // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. // We're using XRNS addresses, which are unsigned ints unsigned int address1 = safe_cast<unsigned int>(uniqueRemoteConsoleIdentifier1); unsigned int address2 = safe_cast<unsigned int>(uniqueRemoteConsoleIdentifier2); diff --git a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h index 80b4e10a..4470a22b 100644 --- a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h +++ b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h @@ -16,7 +16,7 @@ enum ChatPacketType OutgoingPacket = 1 }; -class ChatIntegrationLayer +class ChatIntegrationLayer : public std::enable_shared_from_this<ChatIntegrationLayer> // shared_from_this is needed to use a weak ref to 'this' when handling delegate callbacks { public: @@ -26,7 +26,7 @@ public: /// <summary> /// Initializes the chat manager /// </summary> - void InitializeChatManager( + void InitializeChatManager( __in bool combineCaptureBuffersIntoSinglePacketEnabled, __in bool useKinectAsCaptureSource, __in bool applySoundEffectToCapture, @@ -47,8 +47,8 @@ public: bool m_canCaptureAudio; }; - void AddLocalUser( __in Windows::Xbox::System::IUser^ user ); - void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user ); + void AddLocalUser( __in Windows::Xbox::System::IUser^ user ); + void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user ); void EvaluateDevicesForUser(__in Windows::Xbox::System::IUser^ user ); vector<AddedUser *> m_addedUsers; @@ -57,18 +57,18 @@ public: private: /// <summary> /// Adds a local user to a specific channel - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// </summary> /// <param name="channelIndex">The channel to add the user to</param> /// <param name="user">The local user to add</param> - void AddLocalUserToChatChannel( + void AddLocalUserToChatChannel( __in uint8 channelIndex, __in Windows::Xbox::System::IUser^ user - ); + ); /// <summary> /// Removes a local user from a specific channel - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// </summary> /// <param name="channelIndex">The channel to remove the user from</param> /// <param name="user">The local user to remove</param> @@ -80,10 +80,10 @@ public: /// <summary> /// Removes a remote console from chat - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// </summary> /// <param name="uniqueRemoteConsoleIdentifier">A unique ID for the remote console</param> - void RemoveRemoteConsole( + void RemoveRemoteConsole( unsigned int address ); @@ -92,7 +92,7 @@ public: /// </summary> /// <param name="chatPacket">A buffer containing the chat message</param> /// <param name="uniqueRemoteConsoleIdentifier">A unique ID for the remote console</param> - void OnIncomingChatMessage( + void OnIncomingChatMessage( unsigned int sessionAddress, Platform::Array<byte>^ message ); @@ -111,7 +111,7 @@ public: /// Helper function to swap the mute state of a specific chat user /// </summary> void ChangeChatUserMuteState( - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ); /// <summary> @@ -120,20 +120,20 @@ public: void HandleChatChannelChanged( __in uint8 oldChatChannelIndex, __in uint8 newChatChannelIndex, - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ); /// <summary> - /// Call this when a new console connects. + /// Call this when a new console connects. /// This adds this console to the chat layer /// </summary> - void OnNewSessionAddressAdded( - __in unsigned int address + void OnNewSessionAddressAdded( + __in unsigned int address ); /// <summary> /// Adds a list of locally signed in users that have intent to play to the chat session on a specific channel index. - /// Avoid adding any user who is signed in that doesn't have intent to play otherwise users who are biometrically + /// Avoid adding any user who is signed in that doesn't have intent to play otherwise users who are biometrically /// signed in automatically will be added to the chat session /// </summary> /// <param name="channelIndex">The channel to add the users to</param> @@ -147,8 +147,8 @@ public: /// Handles when a debug message is received. Send this to the UI and OutputDebugString. Games should integrate with their existing log system. /// </summary> /// <param name="args">Contains the debug message to log</param> - void OnDebugMessageReceived( - __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args + void OnDebugMessageReceived( + __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args ); /// <summary> @@ -161,8 +161,8 @@ public: /// It should send the chat message in order (if that feature is available) if args->SendInOrder is true /// </summary> /// <param name="args">Describes the packet to send</param> - void OnOutgoingChatPacketReady( - __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args + void OnOutgoingChatPacketReady( + __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args ); /// <summary> @@ -189,13 +189,13 @@ public: /// <summary> /// Helper function to get specific ChatUser by xboxUserId /// </summary> - bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( - __in Platform::Object^ uniqueRemoteConsoleIdentifier1, - __in Platform::Object^ uniqueRemoteConsoleIdentifier2 + bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( + __in Platform::Object^ uniqueRemoteConsoleIdentifier1, + __in Platform::Object^ uniqueRemoteConsoleIdentifier2 ); /// <summary> - /// Helper function to return the ChatPerformanceCounters^ from the ChatManager so perf numbers can be shown on the UI + /// Helper function to return the ChatPerformanceCounters^ from the ChatManager so perf numbers can be shown on the UI /// These numbers will only be valid if m_chatManager->ChatSettings->PerformanceCountersEnabled is set to true. /// </summary> Microsoft::Xbox::GameChat::ChatPerformanceCounters^ GetChatPerformanceCounters(); @@ -204,13 +204,13 @@ public: /// Returns a count of the number of chat packets of a specific type that have been either sent or received. /// It is useful to monitor this number in the UI / logs to debug network issues. /// </summary> - int GameUI_GetPacketStatistic( + int GameUI_GetPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ); - - void OnControllerPairingChanged( - __in Windows::Xbox::Input::ControllerPairingChangedEventArgs^ args + + void OnControllerPairingChanged( + __in Windows::Xbox::Input::ControllerPairingChangedEventArgs^ args ); void ToggleRenderTargetVolume(); @@ -233,7 +233,7 @@ private: // Debug stats for chat packets. Use Debug_GetPacketStatistic() to get the values. /// It is useful to monitor this number in the UI / logs to debug network issues. - void GameUI_RecordPacketStatistic( + void GameUI_RecordPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ); diff --git a/Minecraft.Client/Durango/Sentient/DurangoTelemetry.cpp b/Minecraft.Client/Durango/Sentient/DurangoTelemetry.cpp index d51ce966..1b4f5465 100644 --- a/Minecraft.Client/Durango/Sentient/DurangoTelemetry.cpp +++ b/Minecraft.Client/Durango/Sentient/DurangoTelemetry.cpp @@ -51,13 +51,13 @@ HRESULT CDurangoTelemetryManager::Flush() bool CDurangoTelemetryManager::RecordPlayerSessionStart(int iPad) { durangoStats()->generatePlayerSession(); - + return true; } bool CDurangoTelemetryManager::RecordPlayerSessionExit(int iPad, int exitStatus) { - PlayerUID puid; shared_ptr<Player> plr; + PlayerUID puid; std::shared_ptr<Player> plr; ProfileManager.GetXUID(iPad, &puid, true); plr = Minecraft::GetInstance()->localplayers[iPad]; @@ -123,11 +123,11 @@ bool CDurangoTelemetryManager::RecordPlayerSessionExit(int iPad, int exitStatus) bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, int numberOfLocalPlayers, int numberOfOnlinePlayers) { CTelemetryManager::RecordLevelStart(iPad, friendsOrMatch, competeOrCoop, difficulty, numberOfLocalPlayers, numberOfOnlinePlayers); - + ULONG hr = 0; // Grab player info. - PlayerUID puid; shared_ptr<Player> plr; + PlayerUID puid; std::shared_ptr<Player> plr; ProfileManager.GetXUID(iPad, &puid, true); plr = Minecraft::GetInstance()->localplayers[iPad]; @@ -191,10 +191,10 @@ bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch fri GetSubLevelId(iPad), GetLevelInstanceID(), &ZERO_GUID, - friendsOrMatch, - competeOrCoop, - difficulty, - numberOfLocalPlayers, + friendsOrMatch, + competeOrCoop, + difficulty, + numberOfLocalPlayers, numberOfOnlinePlayers, &ZERO_GUID ); @@ -219,10 +219,10 @@ bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch fri // Durango // /* GUID */ guid2str(DurangoStats::getPlayerSession()).c_str(), /* WSTR */ DurangoStats::getMultiplayerCorrelationId(), - /* int */ friendsOrMatch, - /* int */ competeOrCoop, - /* int */ difficulty, - /* int */ numberOfLocalPlayers, + /* int */ friendsOrMatch, + /* int */ competeOrCoop, + /* int */ difficulty, + /* int */ numberOfLocalPlayers, /* int */ numberOfOnlinePlayers ); @@ -577,7 +577,7 @@ bool CDurangoTelemetryManager::RecordMediaShareUpload(int iPad, ESen_MediaDestin mediaDestination, mediaType ); -#else +#else ULONG hr = -1; #endif diff --git a/Minecraft.Client/EnchantTableRenderer.cpp b/Minecraft.Client/EnchantTableRenderer.cpp index 43f2b040..a16a0473 100644 --- a/Minecraft.Client/EnchantTableRenderer.cpp +++ b/Minecraft.Client/EnchantTableRenderer.cpp @@ -14,10 +14,10 @@ EnchantTableRenderer::~EnchantTableRenderer() delete bookModel; } -void EnchantTableRenderer::render(shared_ptr<TileEntity> _table, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void EnchantTableRenderer::render(std::shared_ptr<TileEntity> _table, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J Convert as we aren't using a templated class - shared_ptr<EnchantmentTableEntity> table = dynamic_pointer_cast<EnchantmentTableEntity>(_table); + std::shared_ptr<EnchantmentTableEntity> table = dynamic_pointer_cast<EnchantmentTableEntity>(_table); #ifdef __PSVITA__ // AP - the book pages are made with 0 depth so the front and back polys are at the same location. This can cause z-fighting if culling is disabled which can sometimes happen diff --git a/Minecraft.Client/EnchantTableRenderer.h b/Minecraft.Client/EnchantTableRenderer.h index 0b738ca9..77485719 100644 --- a/Minecraft.Client/EnchantTableRenderer.h +++ b/Minecraft.Client/EnchantTableRenderer.h @@ -15,5 +15,5 @@ public: EnchantTableRenderer(); ~EnchantTableRenderer(); - virtual void render(shared_ptr<TileEntity> _table, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); + virtual void render(std::shared_ptr<TileEntity> _table, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); }; diff --git a/Minecraft.Client/EnderChestRenderer.cpp b/Minecraft.Client/EnderChestRenderer.cpp index 2996b65f..67e27bf7 100644 --- a/Minecraft.Client/EnderChestRenderer.cpp +++ b/Minecraft.Client/EnderChestRenderer.cpp @@ -3,10 +3,10 @@ #include "ModelPart.h" #include "EnderChestRenderer.h" -void EnderChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void EnderChestRenderer::render(std::shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J Convert as we aren't using a templated class - shared_ptr<EnderChestTileEntity> chest = dynamic_pointer_cast<EnderChestTileEntity>(_chest); + std::shared_ptr<EnderChestTileEntity> chest = dynamic_pointer_cast<EnderChestTileEntity>(_chest); int data = 0; diff --git a/Minecraft.Client/EnderChestRenderer.h b/Minecraft.Client/EnderChestRenderer.h index d0521ae0..0ff14e48 100644 --- a/Minecraft.Client/EnderChestRenderer.h +++ b/Minecraft.Client/EnderChestRenderer.h @@ -9,5 +9,5 @@ private: ChestModel chestModel; public: - void render(shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + void render(std::shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/EnderCrystalModel.cpp b/Minecraft.Client/EnderCrystalModel.cpp index fde03cd8..4d664605 100644 --- a/Minecraft.Client/EnderCrystalModel.cpp +++ b/Minecraft.Client/EnderCrystalModel.cpp @@ -3,7 +3,7 @@ -EnderCrystalModel::EnderCrystalModel(float g) +EnderCrystalModel::EnderCrystalModel(float g) { glass = new ModelPart(this, L"glass"); glass->texOffs(0, 0)->addBox(-4, -4, -4, 8, 8, 8); @@ -21,7 +21,7 @@ EnderCrystalModel::EnderCrystalModel(float g) } -void EnderCrystalModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void EnderCrystalModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { glPushMatrix(); glScalef(2, 2, 2); diff --git a/Minecraft.Client/EnderCrystalModel.h b/Minecraft.Client/EnderCrystalModel.h index 71f1db10..42ae1b3d 100644 --- a/Minecraft.Client/EnderCrystalModel.h +++ b/Minecraft.Client/EnderCrystalModel.h @@ -14,5 +14,5 @@ private: public: EnderCrystalModel(float g); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); };
\ No newline at end of file diff --git a/Minecraft.Client/EnderCrystalRenderer.cpp b/Minecraft.Client/EnderCrystalRenderer.cpp index 452206bc..f392824d 100644 --- a/Minecraft.Client/EnderCrystalRenderer.cpp +++ b/Minecraft.Client/EnderCrystalRenderer.cpp @@ -9,11 +9,11 @@ EnderCrystalRenderer::EnderCrystalRenderer() this->shadowRadius = 0.5f; } -void EnderCrystalRenderer::render(shared_ptr<Entity> _crystal, double x, double y, double z, float rot, float a) +void EnderCrystalRenderer::render(std::shared_ptr<Entity> _crystal, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type EnderCrystal rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type EnderCrystal rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<EnderCrystal> crystal = dynamic_pointer_cast<EnderCrystal>(_crystal); + std::shared_ptr<EnderCrystal> crystal = dynamic_pointer_cast<EnderCrystal>(_crystal); if (currentModel != EnderCrystalModel::MODEL_ID) { model = new EnderCrystalModel(0); diff --git a/Minecraft.Client/EnderCrystalRenderer.h b/Minecraft.Client/EnderCrystalRenderer.h index de5dc820..5ac644d1 100644 --- a/Minecraft.Client/EnderCrystalRenderer.h +++ b/Minecraft.Client/EnderCrystalRenderer.h @@ -13,5 +13,5 @@ private: public: EnderCrystalRenderer(); - virtual void render(shared_ptr<Entity> _crystal, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _crystal, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/EnderDragonRenderer.cpp b/Minecraft.Client/EnderDragonRenderer.cpp index 8c531d4e..7fe0bf3f 100644 --- a/Minecraft.Client/EnderDragonRenderer.cpp +++ b/Minecraft.Client/EnderDragonRenderer.cpp @@ -5,7 +5,7 @@ #include "Lighting.h" #include "EnderDragonRenderer.h" -shared_ptr<EnderDragon> EnderDragonRenderer::bossInstance; +std::shared_ptr<EnderDragon> EnderDragonRenderer::bossInstance; int EnderDragonRenderer::currentModel; EnderDragonRenderer::EnderDragonRenderer() : MobRenderer(new DragonModel(0), 0.5f) @@ -15,10 +15,10 @@ EnderDragonRenderer::EnderDragonRenderer() : MobRenderer(new DragonModel(0), 0.5 this->setArmor(model); } -void EnderDragonRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a) -{ +void EnderDragonRenderer::setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a) +{ // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); + std::shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); // 4J - reorganised a bit so we can free allocations double lpComponents[3]; @@ -32,7 +32,7 @@ void EnderDragonRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float float rot2 = mob->getTilt(a); glRotatef(-yr, 0, 1, 0); - + glRotatef(rot2, 1, 0, 0); //glRotatef(rot2 * 10, 1, 0, 0); @@ -46,10 +46,10 @@ void EnderDragonRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float } } -void EnderDragonRenderer::renderModel(shared_ptr<Entity> _mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) +void EnderDragonRenderer::renderModel(std::shared_ptr<Entity> _mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); + std::shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); if (mob->dragonDeathTime > 0) { @@ -87,10 +87,10 @@ void EnderDragonRenderer::renderModel(shared_ptr<Entity> _mob, float wp, float w } } -void EnderDragonRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void EnderDragonRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); + std::shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); EnderDragonRenderer::bossInstance = mob; if (currentModel != DragonModel::MODEL_ID) { @@ -167,10 +167,10 @@ void EnderDragonRenderer::render(shared_ptr<Entity> _mob, double x, double y, do } } -void EnderDragonRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) -{ +void EnderDragonRenderer::additionalRendering(std::shared_ptr<Mob> _mob, float a) +{ // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); + std::shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); MobRenderer::additionalRendering(mob, a); Tesselator *t = Tesselator::getInstance(); @@ -227,10 +227,10 @@ void EnderDragonRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) } -int EnderDragonRenderer::prepareArmor(shared_ptr<Mob> _mob, int layer, float a) +int EnderDragonRenderer::prepareArmor(std::shared_ptr<Mob> _mob, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); + std::shared_ptr<EnderDragon> mob = dynamic_pointer_cast<EnderDragon>(_mob); if (layer == 1) { diff --git a/Minecraft.Client/EnderDragonRenderer.h b/Minecraft.Client/EnderDragonRenderer.h index ab508d99..095e2cf2 100644 --- a/Minecraft.Client/EnderDragonRenderer.h +++ b/Minecraft.Client/EnderDragonRenderer.h @@ -10,7 +10,7 @@ class DragonModel; class EnderDragonRenderer : public MobRenderer { public: - static shared_ptr<EnderDragon> bossInstance; + static std::shared_ptr<EnderDragon> bossInstance; private: static int currentModel; @@ -22,15 +22,15 @@ public: EnderDragonRenderer(); protected: - virtual void setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a); + virtual void setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a); protected: - void renderModel(shared_ptr<Entity> _mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale); + void renderModel(std::shared_ptr<Entity> _mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale); public: - virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); protected: - virtual void additionalRendering(shared_ptr<Mob> _mob, float a); - virtual int prepareArmor(shared_ptr<Mob> _mob, int layer, float a); + virtual void additionalRendering(std::shared_ptr<Mob> _mob, float a); + virtual int prepareArmor(std::shared_ptr<Mob> _mob, int layer, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/EndermanRenderer.cpp b/Minecraft.Client/EndermanRenderer.cpp index 8802376a..cf96e693 100644 --- a/Minecraft.Client/EndermanRenderer.cpp +++ b/Minecraft.Client/EndermanRenderer.cpp @@ -10,11 +10,11 @@ EndermanRenderer::EndermanRenderer() : MobRenderer(new EndermanModel(), 0.5f) this->setArmor(model); } -void EndermanRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void EndermanRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Boat rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<EnderMan> mob = dynamic_pointer_cast<EnderMan>(_mob); + std::shared_ptr<EnderMan> mob = dynamic_pointer_cast<EnderMan>(_mob); model->carrying = mob->getCarryingTile() > 0; model->creepy = mob->isCreepy(); @@ -29,11 +29,11 @@ void EndermanRenderer::render(shared_ptr<Entity> _mob, double x, double y, doubl MobRenderer::render(mob, x, y, z, rot, a); } -void EndermanRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) +void EndermanRenderer::additionalRendering(std::shared_ptr<Mob> _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Boat rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<EnderMan> mob = dynamic_pointer_cast<EnderMan>(_mob); + std::shared_ptr<EnderMan> mob = dynamic_pointer_cast<EnderMan>(_mob); MobRenderer::additionalRendering(_mob, a); @@ -68,11 +68,11 @@ void EndermanRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) } } -int EndermanRenderer::prepareArmor(shared_ptr<Mob> _mob, int layer, float a) +int EndermanRenderer::prepareArmor(std::shared_ptr<Mob> _mob, int layer, float a) { - // 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Boat rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<EnderMan> mob = dynamic_pointer_cast<EnderMan>(_mob); + std::shared_ptr<EnderMan> mob = dynamic_pointer_cast<EnderMan>(_mob); if (layer != 0) return -1; diff --git a/Minecraft.Client/EndermanRenderer.h b/Minecraft.Client/EndermanRenderer.h index 6f5126bd..eaf6393e 100644 --- a/Minecraft.Client/EndermanRenderer.h +++ b/Minecraft.Client/EndermanRenderer.h @@ -14,9 +14,9 @@ private: public: EndermanRenderer(); - virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); - virtual void additionalRendering(shared_ptr<Mob> _mob, float a); + virtual void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + virtual void additionalRendering(std::shared_ptr<Mob> _mob, float a); protected: - virtual int prepareArmor(shared_ptr<Mob> _mob, int layer, float a); + virtual int prepareArmor(std::shared_ptr<Mob> _mob, int layer, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/EntityRenderDispatcher.cpp b/Minecraft.Client/EntityRenderDispatcher.cpp index dfc9a11e..352d05e9 100644 --- a/Minecraft.Client/EntityRenderDispatcher.cpp +++ b/Minecraft.Client/EntityRenderDispatcher.cpp @@ -168,12 +168,12 @@ EntityRenderer *EntityRenderDispatcher::getRenderer(eINSTANCEOF e) return it->second; } -EntityRenderer *EntityRenderDispatcher::getRenderer(shared_ptr<Entity> e) +EntityRenderer *EntityRenderDispatcher::getRenderer(std::shared_ptr<Entity> e) { return getRenderer(e->GetType()); } -void EntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *font, shared_ptr<Mob> player, Options *options, float a) +void EntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *font, std::shared_ptr<Mob> player, Options *options, float a) { this->level = level; this->textures = textures; @@ -197,7 +197,7 @@ void EntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *fon playerRotX = player->xRotO + (player->xRot - player->xRotO) * a; } - shared_ptr<Player> pl = dynamic_pointer_cast<Player>(player); + std::shared_ptr<Player> pl = dynamic_pointer_cast<Player>(player); if (pl->ThirdPersonView() == 2) { playerRotY += 180; @@ -209,7 +209,7 @@ void EntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *fon } -void EntityRenderDispatcher::render(shared_ptr<Entity> entity, float a) +void EntityRenderDispatcher::render(std::shared_ptr<Entity> entity, float a) { double x = entity->xOld + (entity->x - entity->xOld) * a; double y = entity->yOld + (entity->y - entity->yOld) * a; @@ -230,7 +230,7 @@ void EntityRenderDispatcher::render(shared_ptr<Entity> entity, float a) } } float r = entity->yRotO + (rotDiff) * a; - + int col = entity->getLightColor(a); if (entity->isOnFire()) { @@ -244,13 +244,13 @@ void EntityRenderDispatcher::render(shared_ptr<Entity> entity, float a) render(entity, x - xOff, y - yOff, z - zOff, r, a); } -void EntityRenderDispatcher::render(shared_ptr<Entity> entity, double x, double y, double z, float rot, float a, bool bItemFrame, bool bRenderPlayerShadow) +void EntityRenderDispatcher::render(std::shared_ptr<Entity> entity, double x, double y, double z, float rot, float a, bool bItemFrame, bool bRenderPlayerShadow) { EntityRenderer *renderer = getRenderer(entity); if (renderer != NULL) - { + { renderer->SetItemFrame(bItemFrame); - + renderer->render(entity, x, y, z, rot, a); renderer->postRender(entity, x, y, z, rot, a, bRenderPlayerShadow); } diff --git a/Minecraft.Client/EntityRenderDispatcher.h b/Minecraft.Client/EntityRenderDispatcher.h index 248be18f..a750a109 100644 --- a/Minecraft.Client/EntityRenderDispatcher.h +++ b/Minecraft.Client/EntityRenderDispatcher.h @@ -26,7 +26,7 @@ public: Textures *textures; ItemInHandRenderer *itemInHandRenderer; Level *level; - shared_ptr<Mob> cameraEntity; + std::shared_ptr<Mob> cameraEntity; float playerRotY; float playerRotX; Options *options; @@ -38,10 +38,10 @@ private: EntityRenderDispatcher(); public: EntityRenderer *getRenderer(eINSTANCEOF e); - EntityRenderer *getRenderer(shared_ptr<Entity> e); - void prepare(Level *level, Textures *textures, Font *font, shared_ptr<Mob> player, Options *options, float a); - void render(shared_ptr<Entity> entity, float a); - void render(shared_ptr<Entity> entity, double x, double y, double z, float rot, float a, bool bItemFrame = false, bool bRenderPlayerShadow = true); + EntityRenderer *getRenderer(std::shared_ptr<Entity> e); + void prepare(Level *level, Textures *textures, Font *font, std::shared_ptr<Mob> player, Options *options, float a); + void render(std::shared_ptr<Entity> entity, float a); + void render(std::shared_ptr<Entity> entity, double x, double y, double z, float rot, float a, bool bItemFrame = false, bool bRenderPlayerShadow = true); void setLevel(Level *level); double distanceToSqr(double x, double y, double z); Font *getFont(); diff --git a/Minecraft.Client/EntityRenderer.cpp b/Minecraft.Client/EntityRenderer.cpp index 6c0247ed..3c09382f 100644 --- a/Minecraft.Client/EntityRenderer.cpp +++ b/Minecraft.Client/EntityRenderer.cpp @@ -41,7 +41,7 @@ bool EntityRenderer::bindTexture(const wstring& urlTexture, int backupTexture) Textures *t = entityRenderDispatcher->textures; // 4J-PB - no http textures on the xbox, mem textures instead - + //int id = t->loadHttpTexture(urlTexture, backupTexture); int id = t->loadMemTexture(urlTexture, backupTexture); @@ -62,7 +62,7 @@ bool EntityRenderer::bindTexture(const wstring& urlTexture, const wstring& backu Textures *t = entityRenderDispatcher->textures; // 4J-PB - no http textures on the xbox, mem textures instead - + //int id = t->loadHttpTexture(urlTexture, backupTexture); int id = t->loadMemTexture(urlTexture, backupTexture); @@ -78,7 +78,7 @@ bool EntityRenderer::bindTexture(const wstring& urlTexture, const wstring& backu } } -void EntityRenderer::renderFlame(shared_ptr<Entity> e, double x, double y, double z, float a) +void EntityRenderer::renderFlame(std::shared_ptr<Entity> e, double x, double y, double z, float a) { glDisable(GL_LIGHTING); @@ -146,7 +146,7 @@ void EntityRenderer::renderFlame(shared_ptr<Entity> e, double x, double y, doubl glEnable(GL_LIGHTING); } -void EntityRenderer::renderShadow(shared_ptr<Entity> e, double x, double y, double z, float pow, float a) +void EntityRenderer::renderShadow(std::shared_ptr<Entity> e, double x, double y, double z, float pow, float a) { glDisable(GL_LIGHTING); glEnable(GL_BLEND); @@ -160,17 +160,17 @@ void EntityRenderer::renderShadow(shared_ptr<Entity> e, double x, double y, doub glDepthMask(false); float r = shadowRadius; - shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(e); + std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(e); bool isLocalPlayer = false; float fYLocalPlayerShadowOffset=0.0f; //if (dynamic_pointer_cast<Mob>(e) != NULL) if (mob != NULL) { - //shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(e); + //std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(e); r *= mob->getSizeScale(); - shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(mob); + std::shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(mob); if (animal != NULL) { if (animal->isBaby()) @@ -213,12 +213,12 @@ void EntityRenderer::renderShadow(shared_ptr<Entity> e, double x, double y, doub for (int xt = x0; xt <= x1; xt++) for (int yt = y0; yt <= y1; yt++) for (int zt = z0; zt <= z1; zt++) - { + { int t = level->getTile(xt, yt - 1, zt); if (t > 0 && level->getRawBrightness(xt, yt, zt) > 3) { renderTileShadow(Tile::tiles[t], x, y + e->getShadowHeightOffs() + fYLocalPlayerShadowOffset, z, xt, yt , zt, pow, r, xo, yo + e->getShadowHeightOffs() + fYLocalPlayerShadowOffset, zo); - } + } } tt->end(); @@ -242,7 +242,7 @@ void EntityRenderer::renderTileShadow(Tile *tt, double x, double y, double z, in double a = ((pow - (y - (yt + yo)) / 2) * 0.5f) * getLevel()->getBrightness(xt, yt, zt); if (a < 0) return; if (a > 1) a = 1; - + t->color(1.0f, 1.0f, 1.0f, (float) a); // glColor4f(1, 1, 1, (float) a); @@ -383,7 +383,7 @@ void EntityRenderer::init(EntityRenderDispatcher *entityRenderDispatcher) this->entityRenderDispatcher = entityRenderDispatcher; } -void EntityRenderer::postRender(shared_ptr<Entity> entity, double x, double y, double z, float rot, float a, bool bRenderPlayerShadow) +void EntityRenderer::postRender(std::shared_ptr<Entity> entity, double x, double y, double z, float rot, float a, bool bRenderPlayerShadow) { if( !entityRenderDispatcher->isGuiRender ) // 4J - added, don't render shadow in gui as it uses its own blending, and we have globally enabled blending for interface opacity { diff --git a/Minecraft.Client/EntityRenderer.h b/Minecraft.Client/EntityRenderer.h index e0c264a5..f8c91685 100644 --- a/Minecraft.Client/EntityRenderer.h +++ b/Minecraft.Client/EntityRenderer.h @@ -36,16 +36,16 @@ public: EntityRenderer(); // 4J - added virtual ~EntityRenderer(); public: - virtual void render(shared_ptr<Entity> entity, double x, double y, double z, float rot, float a) = 0; + virtual void render(std::shared_ptr<Entity> entity, double x, double y, double z, float rot, float a) = 0; protected: virtual void bindTexture(int resourceName); // 4J - added virtual void bindTexture(const wstring& resourceName); virtual bool bindTexture(const wstring& urlTexture, int backupTexture); // 4J added - virtual bool bindTexture(const wstring& urlTexture, const wstring& backupTexture); + virtual bool bindTexture(const wstring& urlTexture, const wstring& backupTexture); private: - virtual void renderFlame(shared_ptr<Entity> e, double x, double y, double z, float a); - virtual void renderShadow(shared_ptr<Entity> e, double x, double y, double z, float pow, float a); + virtual void renderFlame(std::shared_ptr<Entity> e, double x, double y, double z, float a); + virtual void renderShadow(std::shared_ptr<Entity> e, double x, double y, double z, float pow, float a); virtual Level *getLevel(); virtual void renderTileShadow(Tile *tt, double x, double y, double z, int xt, int yt, int zt, float pow, float r, double xo, double yo, double zo); @@ -54,7 +54,7 @@ public: static void renderFlat(AABB *bb); static void renderFlat(float x0, float y0, float z0, float x1, float y1, float z1); virtual void init(EntityRenderDispatcher *entityRenderDispatcher); - virtual void postRender(shared_ptr<Entity> entity, double x, double y, double z, float rot, float a, bool bRenderPlayerShadow); + virtual void postRender(std::shared_ptr<Entity> entity, double x, double y, double z, float rot, float a, bool bRenderPlayerShadow); virtual Font *getFont(); virtual void registerTerrainTextures(IconRegister *iconRegister); diff --git a/Minecraft.Client/EntityTileRenderer.cpp b/Minecraft.Client/EntityTileRenderer.cpp index a2301d42..2898de27 100644 --- a/Minecraft.Client/EntityTileRenderer.cpp +++ b/Minecraft.Client/EntityTileRenderer.cpp @@ -7,8 +7,8 @@ EntityTileRenderer *EntityTileRenderer::instance = new EntityTileRenderer; EntityTileRenderer::EntityTileRenderer() { - chest = shared_ptr<ChestTileEntity>(new ChestTileEntity()); - enderChest = shared_ptr<EnderChestTileEntity>(new EnderChestTileEntity()); + chest = std::shared_ptr<ChestTileEntity>(new ChestTileEntity()); + enderChest = std::shared_ptr<EnderChestTileEntity>(new EnderChestTileEntity()); } void EntityTileRenderer::render(Tile *tile, int data, float brightness, float alpha, bool setColor, bool useCompiled) diff --git a/Minecraft.Client/EntityTileRenderer.h b/Minecraft.Client/EntityTileRenderer.h index cc572cad..14ba6bfc 100644 --- a/Minecraft.Client/EntityTileRenderer.h +++ b/Minecraft.Client/EntityTileRenderer.h @@ -10,8 +10,8 @@ class EntityTileRenderer static EntityTileRenderer *instance; private: - shared_ptr<ChestTileEntity> chest; - shared_ptr<EnderChestTileEntity> enderChest; + std::shared_ptr<ChestTileEntity> chest; + std::shared_ptr<EnderChestTileEntity> enderChest; public: EntityTileRenderer(); diff --git a/Minecraft.Client/EntityTracker.cpp b/Minecraft.Client/EntityTracker.cpp index 8f1dbcd8..ca31c03e 100644 --- a/Minecraft.Client/EntityTracker.cpp +++ b/Minecraft.Client/EntityTracker.cpp @@ -26,12 +26,12 @@ EntityTracker::EntityTracker(ServerLevel *level) maxRange = level->getServer()->getPlayers()->getMaxRange(); } -void EntityTracker::addEntity(shared_ptr<Entity> e) +void EntityTracker::addEntity(std::shared_ptr<Entity> e) { if (e->GetType() == eTYPE_SERVERPLAYER) { addEntity(e, 32 * 16, 2); - shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(e); + std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(e); for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { if( (*it)->e != player ) @@ -65,12 +65,12 @@ void EntityTracker::addEntity(shared_ptr<Entity> e) else if (e->GetType() == eTYPE_ITEM_FRAME) addEntity(e, 16 * 10, INT_MAX, false); } -void EntityTracker::addEntity(shared_ptr<Entity> e, int range, int updateInterval) +void EntityTracker::addEntity(std::shared_ptr<Entity> e, int range, int updateInterval) { addEntity(e, range, updateInterval, false); } -void EntityTracker::addEntity(shared_ptr<Entity> e, int range, int updateInterval, bool trackDeltas) +void EntityTracker::addEntity(std::shared_ptr<Entity> e, int range, int updateInterval, bool trackDeltas) { if (range > maxRange) range = maxRange; if (entityMap.find(e->entityId) != entityMap.end()) @@ -81,7 +81,7 @@ void EntityTracker::addEntity(shared_ptr<Entity> e, int range, int updateInterva { __debugbreak(); } - shared_ptr<TrackedEntity> te = shared_ptr<TrackedEntity>( new TrackedEntity(e, range, updateInterval, trackDeltas) ); + std::shared_ptr<TrackedEntity> te = std::shared_ptr<TrackedEntity>( new TrackedEntity(e, range, updateInterval, trackDeltas) ); entities.insert(te); entityMap[e->entityId] = te; te->updatePlayers(this, &level->players); @@ -89,23 +89,23 @@ void EntityTracker::addEntity(shared_ptr<Entity> e, int range, int updateInterva // 4J - have split removeEntity into two bits - it used to do the equivalent of EntityTracker::removePlayer followed by EntityTracker::removeEntity. // This is to allow us to now choose to remove the player as a "seenBy" only when the player has actually been removed from the level's own player array -void EntityTracker::removeEntity(shared_ptr<Entity> e) +void EntityTracker::removeEntity(std::shared_ptr<Entity> e) { AUTO_VAR(it, entityMap.find(e->entityId)); if( it != entityMap.end() ) { - shared_ptr<TrackedEntity> te = it->second; + std::shared_ptr<TrackedEntity> te = it->second; entityMap.erase(it); entities.erase(te); te->broadcastRemoved(); } } -void EntityTracker::removePlayer(shared_ptr<Entity> e) +void EntityTracker::removePlayer(std::shared_ptr<Entity> e) { if (e->GetType() == eTYPE_SERVERPLAYER) { - shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(e); + std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(e); for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { (*it)->removePlayer(player); @@ -115,10 +115,10 @@ void EntityTracker::removePlayer(shared_ptr<Entity> e) void EntityTracker::tick() { - vector<shared_ptr<ServerPlayer> > movedPlayers; + vector<std::shared_ptr<ServerPlayer> > movedPlayers; for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { - shared_ptr<TrackedEntity> te = *it; + std::shared_ptr<TrackedEntity> te = *it; te->tick(this, &level->players); if (te->moved && te->e->GetType() == eTYPE_SERVERPLAYER) { @@ -132,7 +132,7 @@ void EntityTracker::tick() MinecraftServer *server = MinecraftServer::getInstance(); for( unsigned int i = 0; i < server->getPlayers()->players.size(); i++ ) { - shared_ptr<ServerPlayer> ep = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> ep = server->getPlayers()->players[i]; if( ep->dimension != level->dimension->id ) continue; if( ep->connection == NULL ) continue; @@ -142,7 +142,7 @@ void EntityTracker::tick() bool addPlayer = false; for (unsigned int j = 0; j < movedPlayers.size(); j++) { - shared_ptr<ServerPlayer> sp = movedPlayers[j]; + std::shared_ptr<ServerPlayer> sp = movedPlayers[j]; if( sp == ep ) break; @@ -153,17 +153,17 @@ void EntityTracker::tick() addPlayer = true; break; } - } + } if( addPlayer ) movedPlayers.push_back( ep ); } for (unsigned int i = 0; i < movedPlayers.size(); i++) { - shared_ptr<ServerPlayer> player = movedPlayers[i]; + std::shared_ptr<ServerPlayer> player = movedPlayers[i]; if(player->connection == NULL) continue; for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { - shared_ptr<TrackedEntity> te = *it; + std::shared_ptr<TrackedEntity> te = *it; if (te->e != player) { te->updatePlayer(this, player); @@ -174,7 +174,7 @@ void EntityTracker::tick() // 4J Stu - We want to do this for dead players as they don't tick normally for(AUTO_VAR(it, level->players.begin()); it != level->players.end(); ++it) { - shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(*it); + std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(*it); if(!player->isAlive()) { player->flushEntitiesToRemove(); @@ -182,31 +182,31 @@ void EntityTracker::tick() } } -void EntityTracker::broadcast(shared_ptr<Entity> e, shared_ptr<Packet> packet) +void EntityTracker::broadcast(std::shared_ptr<Entity> e, std::shared_ptr<Packet> packet) { AUTO_VAR(it, entityMap.find( e->entityId )); if( it != entityMap.end() ) { - shared_ptr<TrackedEntity> te = it->second; + std::shared_ptr<TrackedEntity> te = it->second; te->broadcast(packet); } } -void EntityTracker::broadcastAndSend(shared_ptr<Entity> e, shared_ptr<Packet> packet) +void EntityTracker::broadcastAndSend(std::shared_ptr<Entity> e, std::shared_ptr<Packet> packet) { AUTO_VAR(it, entityMap.find( e->entityId )); if( it != entityMap.end() ) { - shared_ptr<TrackedEntity> te = it->second; + std::shared_ptr<TrackedEntity> te = it->second; te->broadcastAndSend(packet); } } -void EntityTracker::clear(shared_ptr<ServerPlayer> serverPlayer) +void EntityTracker::clear(std::shared_ptr<ServerPlayer> serverPlayer) { for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { - shared_ptr<TrackedEntity> te = *it; + std::shared_ptr<TrackedEntity> te = *it; te->clear(serverPlayer); } } @@ -218,7 +218,7 @@ void EntityTracker::updateMaxRange() } -shared_ptr<TrackedEntity> EntityTracker::getTracker(shared_ptr<Entity> e) +std::shared_ptr<TrackedEntity> EntityTracker::getTracker(std::shared_ptr<Entity> e) { AUTO_VAR(it, entityMap.find(e->entityId)); if( it != entityMap.end() ) diff --git a/Minecraft.Client/EntityTracker.h b/Minecraft.Client/EntityTracker.h index 82b01d07..3fabc4b1 100644 --- a/Minecraft.Client/EntityTracker.h +++ b/Minecraft.Client/EntityTracker.h @@ -13,24 +13,24 @@ class EntityTracker { private: ServerLevel *level; - unordered_set<shared_ptr<TrackedEntity> > entities; - unordered_map<int, shared_ptr<TrackedEntity> , IntKeyHash2, IntKeyEq> entityMap; // was IntHashMap + unordered_set<std::shared_ptr<TrackedEntity> > entities; + unordered_map<int, std::shared_ptr<TrackedEntity> , IntKeyHash2, IntKeyEq> entityMap; // was IntHashMap int maxRange; public: EntityTracker(ServerLevel *level); - void addEntity(shared_ptr<Entity> e); - void addEntity(shared_ptr<Entity> e, int range, int updateInterval); - void addEntity(shared_ptr<Entity> e, int range, int updateInterval, bool trackDeltas); - void removeEntity(shared_ptr<Entity> e); - void removePlayer(shared_ptr<Entity> e); // 4J added + void addEntity(std::shared_ptr<Entity> e); + void addEntity(std::shared_ptr<Entity> e, int range, int updateInterval); + void addEntity(std::shared_ptr<Entity> e, int range, int updateInterval, bool trackDeltas); + void removeEntity(std::shared_ptr<Entity> e); + void removePlayer(std::shared_ptr<Entity> e); // 4J added void tick(); - void broadcast(shared_ptr<Entity> e, shared_ptr<Packet> packet); - void broadcastAndSend(shared_ptr<Entity> e, shared_ptr<Packet> packet); - void clear(shared_ptr<ServerPlayer> serverPlayer); + void broadcast(std::shared_ptr<Entity> e, std::shared_ptr<Packet> packet); + void broadcastAndSend(std::shared_ptr<Entity> e, std::shared_ptr<Packet> packet); + void clear(std::shared_ptr<ServerPlayer> serverPlayer); void updateMaxRange(); // AP added for Vita // 4J-JEV: Added, needed access to tracked entity of a riders mount. - shared_ptr<TrackedEntity> getTracker(shared_ptr<Entity> entity); + std::shared_ptr<TrackedEntity> getTracker(std::shared_ptr<Entity> entity); }; diff --git a/Minecraft.Client/ExperienceOrbRenderer.cpp b/Minecraft.Client/ExperienceOrbRenderer.cpp index 1771f833..97d00f79 100644 --- a/Minecraft.Client/ExperienceOrbRenderer.cpp +++ b/Minecraft.Client/ExperienceOrbRenderer.cpp @@ -19,9 +19,9 @@ ExperienceOrbRenderer::ExperienceOrbRenderer() } -void ExperienceOrbRenderer::render(shared_ptr<Entity> _orb, double x, double y, double z, float rot, float a) +void ExperienceOrbRenderer::render(std::shared_ptr<Entity> _orb, double x, double y, double z, float rot, float a) { - shared_ptr<ExperienceOrb> orb = dynamic_pointer_cast<ExperienceOrb>(_orb); + std::shared_ptr<ExperienceOrb> orb = dynamic_pointer_cast<ExperienceOrb>(_orb); glPushMatrix(); glTranslatef((float) x, (float) y, (float) z); diff --git a/Minecraft.Client/ExperienceOrbRenderer.h b/Minecraft.Client/ExperienceOrbRenderer.h index ebd166f4..5237ecb8 100644 --- a/Minecraft.Client/ExperienceOrbRenderer.h +++ b/Minecraft.Client/ExperienceOrbRenderer.h @@ -12,6 +12,6 @@ public: ExperienceOrbRenderer(); - void render(shared_ptr<Entity> _orb, double x, double y, double z, float rot, float a); + void render(std::shared_ptr<Entity> _orb, double x, double y, double z, float rot, float a); void blit(int x, int y, int sx, int sy, int w, int h); };
\ No newline at end of file diff --git a/Minecraft.Client/FallingTileRenderer.cpp b/Minecraft.Client/FallingTileRenderer.cpp index 02e23dad..ad3d9ce3 100644 --- a/Minecraft.Client/FallingTileRenderer.cpp +++ b/Minecraft.Client/FallingTileRenderer.cpp @@ -12,10 +12,10 @@ FallingTileRenderer::FallingTileRenderer() : EntityRenderer() this->shadowRadius = 0.5f; } -void FallingTileRenderer::render(shared_ptr<Entity> _tile, double x, double y, double z, float rot, float a) +void FallingTileRenderer::render(std::shared_ptr<Entity> _tile, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<FallingTile> tile = dynamic_pointer_cast<FallingTile>(_tile); + std::shared_ptr<FallingTile> tile = dynamic_pointer_cast<FallingTile>(_tile); glPushMatrix(); glTranslatef((float) x, (float) y, (float) z); diff --git a/Minecraft.Client/FallingTileRenderer.h b/Minecraft.Client/FallingTileRenderer.h index 0ece6033..c3181c96 100644 --- a/Minecraft.Client/FallingTileRenderer.h +++ b/Minecraft.Client/FallingTileRenderer.h @@ -10,5 +10,5 @@ private: public: FallingTileRenderer(); - virtual void render(shared_ptr<Entity> _tile, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _tile, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/FireballRenderer.cpp b/Minecraft.Client/FireballRenderer.cpp index 836e8be3..c5f379a6 100644 --- a/Minecraft.Client/FireballRenderer.cpp +++ b/Minecraft.Client/FireballRenderer.cpp @@ -12,10 +12,10 @@ FireballRenderer::FireballRenderer(float scale) this->scale = scale; } -void FireballRenderer::render(shared_ptr<Entity> _fireball, double x, double y, double z, float rot, float a) +void FireballRenderer::render(std::shared_ptr<Entity> _fireball, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Fireball> fireball = dynamic_pointer_cast<Fireball>(_fireball); + std::shared_ptr<Fireball> fireball = dynamic_pointer_cast<Fireball>(_fireball); glPushMatrix(); @@ -54,7 +54,7 @@ void FireballRenderer::render(shared_ptr<Entity> _fireball, double x, double y, } // 4J Added override. Based on EntityRenderer::renderFlame -void FireballRenderer::renderFlame(shared_ptr<Entity> e, double x, double y, double z, float a) +void FireballRenderer::renderFlame(std::shared_ptr<Entity> e, double x, double y, double z, float a) { glDisable(GL_LIGHTING); Icon *tex = Tile::fire->getTextureLayer(0); @@ -78,7 +78,7 @@ void FireballRenderer::renderFlame(shared_ptr<Entity> e, double x, double y, dou //glRotatef(-entityRenderDispatcher->playerRotY, 0, 1, 0); - + glRotatef(180 - entityRenderDispatcher->playerRotY, 0, 1, 0); glRotatef(-entityRenderDispatcher->playerRotX, 1, 0, 0); glTranslatef(0,0,0.1f); diff --git a/Minecraft.Client/FireballRenderer.h b/Minecraft.Client/FireballRenderer.h index 9b22e74a..201e3aad 100644 --- a/Minecraft.Client/FireballRenderer.h +++ b/Minecraft.Client/FireballRenderer.h @@ -9,9 +9,9 @@ private: public: FireballRenderer(float scale); - virtual void render(shared_ptr<Entity> _fireball, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _fireball, double x, double y, double z, float rot, float a); private: // 4J Added override - virtual void renderFlame(shared_ptr<Entity> e, double x, double y, double z, float a); + virtual void renderFlame(std::shared_ptr<Entity> e, double x, double y, double z, float a); }; diff --git a/Minecraft.Client/FishingHookRenderer.cpp b/Minecraft.Client/FishingHookRenderer.cpp index 0408e96e..a746db18 100644 --- a/Minecraft.Client/FishingHookRenderer.cpp +++ b/Minecraft.Client/FishingHookRenderer.cpp @@ -8,10 +8,10 @@ #include "..\Minecraft.World\Mth.h" #include "MultiPlayerLocalPlayer.h" -void FishingHookRenderer::render(shared_ptr<Entity> _hook, double x, double y, double z, float rot, float a) +void FishingHookRenderer::render(std::shared_ptr<Entity> _hook, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<FishingHook> hook = dynamic_pointer_cast<FishingHook>(_hook); + std::shared_ptr<FishingHook> hook = dynamic_pointer_cast<FishingHook>(_hook); glPushMatrix(); diff --git a/Minecraft.Client/FishingHookRenderer.h b/Minecraft.Client/FishingHookRenderer.h index 2683f187..8bcfd252 100644 --- a/Minecraft.Client/FishingHookRenderer.h +++ b/Minecraft.Client/FishingHookRenderer.h @@ -3,6 +3,6 @@ class FishingHookRenderer : public EntityRenderer { -public: - virtual void render(shared_ptr<Entity> _hook, double x, double y, double z, float rot, float a); +public: + virtual void render(std::shared_ptr<Entity> _hook, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/FurnaceScreen.cpp b/Minecraft.Client/FurnaceScreen.cpp index 20ec7104..3e6b76e5 100644 --- a/Minecraft.Client/FurnaceScreen.cpp +++ b/Minecraft.Client/FurnaceScreen.cpp @@ -6,7 +6,7 @@ #include "..\Minecraft.World\net.minecraft.world.inventory.h" #include "..\Minecraft.World\FurnaceTileEntity.h" -FurnaceScreen::FurnaceScreen(shared_ptr<Inventory> inventory, shared_ptr<FurnaceTileEntity> furnace) : AbstractContainerScreen(new FurnaceMenu(inventory, furnace)) +FurnaceScreen::FurnaceScreen(std::shared_ptr<Inventory> inventory, std::shared_ptr<FurnaceTileEntity> furnace) : AbstractContainerScreen(new FurnaceMenu(inventory, furnace)) { this->furnace = furnace; } diff --git a/Minecraft.Client/FurnaceScreen.h b/Minecraft.Client/FurnaceScreen.h index f018093f..98c0bba7 100644 --- a/Minecraft.Client/FurnaceScreen.h +++ b/Minecraft.Client/FurnaceScreen.h @@ -7,10 +7,10 @@ class Inventory; class FurnaceScreen : public AbstractContainerScreen { private: - shared_ptr<FurnaceTileEntity> furnace; + std::shared_ptr<FurnaceTileEntity> furnace; public: - FurnaceScreen(shared_ptr<Inventory> inventory, shared_ptr<FurnaceTileEntity> furnace); + FurnaceScreen(std::shared_ptr<Inventory> inventory, std::shared_ptr<FurnaceTileEntity> furnace); protected: virtual void renderLabels(); virtual void renderBg(float a); diff --git a/Minecraft.Client/GameMode.cpp b/Minecraft.Client/GameMode.cpp index a11d6c07..975f81f8 100644 --- a/Minecraft.Client/GameMode.cpp +++ b/Minecraft.Client/GameMode.cpp @@ -46,11 +46,11 @@ void GameMode::render(float a) { } -bool GameMode::useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, bool bTestUseOnly) +bool GameMode::useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, bool bTestUseOnly) { } -void GameMode::initPlayer(shared_ptr<Player> player) +void GameMode::initPlayer(std::shared_ptr<Player> player) { } @@ -58,11 +58,11 @@ void GameMode::tick() { } -void GameMode::adjustPlayer(shared_ptr<Player> player) +void GameMode::adjustPlayer(std::shared_ptr<Player> player) { } -//bool GameMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly) +//bool GameMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly) //{ // // 4J-PB - Adding a test only version to allow tooltips to be displayed // int t = level->getTile(x, y, z); @@ -72,9 +72,9 @@ void GameMode::adjustPlayer(shared_ptr<Player> player) // { // switch(t) // { -// case Tile::recordPlayer_Id: +// case Tile::recordPlayer_Id: // case Tile::bed_Id: // special case for a bed -// if (Tile::tiles[t]->TestUse(level, x, y, z, player )) +// if (Tile::tiles[t]->TestUse(level, x, y, z, player )) // { // return true; // } @@ -89,38 +89,38 @@ void GameMode::adjustPlayer(shared_ptr<Player> player) // break; // } // } -// else +// else // { // if (Tile::tiles[t]->use(level, x, y, z, player )) return true; // } // } -// +// // if (item == NULL) return false; // return item->useOn(player, level, x, y, z, face, bTestUseOnOnly); //} -shared_ptr<Player> GameMode::createPlayer(Level *level) +std::shared_ptr<Player> GameMode::createPlayer(Level *level) { - return shared_ptr<Player>( new LocalPlayer(minecraft, level, minecraft->user, level->dimension->id) ); + return std::shared_ptr<Player>( new LocalPlayer(minecraft, level, minecraft->user, level->dimension->id) ); } -bool GameMode::interact(shared_ptr<Player> player, shared_ptr<Entity> entity) +bool GameMode::interact(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity) { return player->interact(entity); } -void GameMode::attack(shared_ptr<Player> player, shared_ptr<Entity> entity) +void GameMode::attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity) { player->attack(entity); } -shared_ptr<ItemInstance> GameMode::handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, shared_ptr<Player> player) +std::shared_ptr<ItemInstance> GameMode::handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, std::shared_ptr<Player> player) { return nullptr; } -void GameMode::handleCloseInventory(int containerId, shared_ptr<Player> player) +void GameMode::handleCloseInventory(int containerId, std::shared_ptr<Player> player) { player->containerMenu->removed(player); delete player->containerMenu; @@ -137,7 +137,7 @@ bool GameMode::isCutScene() return false; } -void GameMode::releaseUsingItem(shared_ptr<Player> player) +void GameMode::releaseUsingItem(std::shared_ptr<Player> player) { player->releaseUsingItem(); } @@ -162,21 +162,21 @@ bool GameMode::hasFarPickRange() return false; } -void GameMode::handleCreativeModeItemAdd(shared_ptr<ItemInstance> clicked, int i) +void GameMode::handleCreativeModeItemAdd(std::shared_ptr<ItemInstance> clicked, int i) { } -void GameMode::handleCreativeModeItemDrop(shared_ptr<ItemInstance> clicked) +void GameMode::handleCreativeModeItemDrop(std::shared_ptr<ItemInstance> clicked) { } -bool GameMode::handleCraftItem(int recipe, shared_ptr<Player> player) +bool GameMode::handleCraftItem(int recipe, std::shared_ptr<Player> player) { return true; } // 4J-PB -void GameMode::handleDebugOptions(unsigned int uiVal, shared_ptr<Player> player) +void GameMode::handleDebugOptions(unsigned int uiVal, std::shared_ptr<Player> player) { player->SetDebugOptions(uiVal); } diff --git a/Minecraft.Client/GameMode.h b/Minecraft.Client/GameMode.h index ab9ec9d1..71559708 100644 --- a/Minecraft.Client/GameMode.h +++ b/Minecraft.Client/GameMode.h @@ -25,32 +25,32 @@ public: virtual void stopDestroyBlock() = 0; virtual void render(float a); virtual float getPickRange() = 0; - virtual void initPlayer(shared_ptr<Player> player); + virtual void initPlayer(std::shared_ptr<Player> player); virtual void tick(); virtual bool canHurtPlayer() = 0; - virtual void adjustPlayer(shared_ptr<Player> player); - virtual bool useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, bool bTestUseOnly=false); - virtual bool useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem = NULL) = 0; - - virtual shared_ptr<Player> createPlayer(Level *level); - virtual bool interact(shared_ptr<Player> player, shared_ptr<Entity> entity); - virtual void attack(shared_ptr<Player> player, shared_ptr<Entity> entity); - virtual shared_ptr<ItemInstance> handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, shared_ptr<Player> player); - virtual void handleCloseInventory(int containerId, shared_ptr<Player> player); + virtual void adjustPlayer(std::shared_ptr<Player> player); + virtual bool useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, bool bTestUseOnly=false); + virtual bool useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem = NULL) = 0; + + virtual std::shared_ptr<Player> createPlayer(Level *level); + virtual bool interact(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity); + virtual void attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity); + virtual std::shared_ptr<ItemInstance> handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, std::shared_ptr<Player> player); + virtual void handleCloseInventory(int containerId, std::shared_ptr<Player> player); virtual void handleInventoryButtonClick(int containerId, int buttonId); virtual bool isCutScene(); - virtual void releaseUsingItem(shared_ptr<Player> player); + virtual void releaseUsingItem(std::shared_ptr<Player> player); virtual bool hasExperience(); virtual bool hasMissTime(); virtual bool hasInfiniteItems(); virtual bool hasFarPickRange(); - virtual void handleCreativeModeItemAdd(shared_ptr<ItemInstance> clicked, int i); - virtual void handleCreativeModeItemDrop(shared_ptr<ItemInstance> clicked); + virtual void handleCreativeModeItemAdd(std::shared_ptr<ItemInstance> clicked, int i); + virtual void handleCreativeModeItemDrop(std::shared_ptr<ItemInstance> clicked); // 4J Stu - Added so we can send packets for this in the network game - virtual bool handleCraftItem(int recipe, shared_ptr<Player> player); - virtual void handleDebugOptions(unsigned int uiVal, shared_ptr<Player> player); + virtual bool handleCraftItem(int recipe, std::shared_ptr<Player> player); + virtual void handleDebugOptions(unsigned int uiVal, std::shared_ptr<Player> player); // 4J Stu - Added for tutorial checks virtual bool isInputAllowed(int mapping) { return true; } diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp index 716d3307..1cc1044f 100644 --- a/Minecraft.Client/GameRenderer.cpp +++ b/Minecraft.Client/GameRenderer.cpp @@ -352,13 +352,13 @@ void GameRenderer::pick(float a) Vec3 *to = from->add(b->x * range, b->y * range, b->z * range); hovered = nullptr; float overlap = 1; - vector<shared_ptr<Entity> > *objects = mc->level->getEntities(mc->cameraTargetPlayer, mc->cameraTargetPlayer->bb->expand(b->x * (range), b->y * (range), b->z * (range))->grow(overlap, overlap, overlap)); + vector<std::shared_ptr<Entity> > *objects = mc->level->getEntities(mc->cameraTargetPlayer, mc->cameraTargetPlayer->bb->expand(b->x * (range), b->y * (range), b->z * (range))->grow(overlap, overlap, overlap)); double nearest = dist; AUTO_VAR(itEnd, objects->end()); for (AUTO_VAR(it, objects->begin()); it != itEnd; it++) { - shared_ptr<Entity> e = *it; //objects->at(i); + std::shared_ptr<Entity> e = *it; //objects->at(i); if (!e->isPickable()) continue; float rr = e->getPickRadius(); @@ -407,7 +407,7 @@ float GameRenderer::GetFovVal() void GameRenderer::tickFov() { - shared_ptr<LocalPlayer>player = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); + std::shared_ptr<LocalPlayer>player = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); int playerIdx = player ? player->GetXboxPad() : 0; tFov[playerIdx] = player->getFieldOfViewModifier(); @@ -420,7 +420,7 @@ float GameRenderer::getFov(float a, bool applyEffects) { if (cameraFlip > 0 ) return 90; - shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); + std::shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); int playerIdx = player ? player->GetXboxPad() : 0; float fov = m_fov;//70; if (applyEffects) @@ -444,7 +444,7 @@ float GameRenderer::getFov(float a, bool applyEffects) void GameRenderer::bobHurt(float a) { - shared_ptr<Mob> player = mc->cameraTargetPlayer; + std::shared_ptr<Mob> player = mc->cameraTargetPlayer; float hurt = player->hurtTime - a; @@ -470,12 +470,12 @@ void GameRenderer::bobHurt(float a) void GameRenderer::bobView(float a) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>(mc->cameraTargetPlayer); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(mc->cameraTargetPlayer); if(player==NULL) { return; } - //shared_ptr<Player> player = dynamic_pointer_cast<Player>(mc->cameraTargetPlayer); + //std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(mc->cameraTargetPlayer); float wda = player->walkDist - player->walkDistO; float b = -(player->walkDist + wda * a); @@ -489,8 +489,8 @@ void GameRenderer::bobView(float a) void GameRenderer::moveCameraToPlayer(float a) { - shared_ptr<Mob> player = mc->cameraTargetPlayer; - shared_ptr<LocalPlayer> localplayer = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); + std::shared_ptr<Mob> player = mc->cameraTargetPlayer; + std::shared_ptr<LocalPlayer> localplayer = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); float heightOffset = player->heightOffset - 1.62f; double x = player->xo + (player->x - player->xo) * a; @@ -719,12 +719,12 @@ void GameRenderer::renderItemInHand(float a, int eye) { if (cameraFlip > 0) return; - shared_ptr<LocalPlayer> localplayer = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); + std::shared_ptr<LocalPlayer> localplayer = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); // 4J-PB - to turn off the hand for screenshots, but not when the item held is a map if ( localplayer!=NULL) { - shared_ptr<ItemInstance> item = localplayer->inventory->getSelected(); + std::shared_ptr<ItemInstance> item = localplayer->inventory->getSelected(); if(!(item && item->getItem()->id==Item::map_Id) && app.GetGameSettings(localplayer->GetXboxPad(),eGameSetting_DisplayHand)==0 ) return; } @@ -864,7 +864,7 @@ void GameRenderer::updateLightTexture(float a) for(int j = 0; j < XUSER_MAX_COUNT; j++ ) { // Loop over all the players - shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[j]; + std::shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[j]; if (player == NULL) continue; Level *level = player->level; // 4J - was mc->level when it was just to update the one light texture @@ -969,7 +969,7 @@ void GameRenderer::updateLightTexture(float a) } } -float GameRenderer::getNightVisionScale(shared_ptr<Player> player, float a) +float GameRenderer::getNightVisionScale(std::shared_ptr<Player> player, float a) { int duration = player->getEffect(MobEffect::nightVision)->getDuration(); if (duration > (SharedConstants::TICKS_PER_SECOND * 10)) @@ -1269,7 +1269,7 @@ void GameRenderer::renderLevel(float a, int64_t until) } pick(a); - shared_ptr<Mob> cameraEntity = mc->cameraTargetPlayer; + std::shared_ptr<Mob> cameraEntity = mc->cameraTargetPlayer; LevelRenderer *levelRenderer = mc->levelRenderer; ParticleEngine *particleEngine = mc->particleEngine; double xOff = cameraEntity->xOld + (cameraEntity->x - cameraEntity->xOld) * a; @@ -1383,10 +1383,10 @@ void GameRenderer::renderLevel(float a, int64_t until) PIXEndNamedEvent(); turnOffLightLayer(a); // 4J - brought forward from 1.8.2 - shared_ptr<Player> player = dynamic_pointer_cast<Player>(cameraEntity); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(cameraEntity); if (mc->hitResult != NULL && cameraEntity->isUnderLiquid(Material::water) && player!=NULL) //&& !mc->options.hideGui) { - //shared_ptr<Player> player = dynamic_pointer_cast<Player>(cameraEntity); + //std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(cameraEntity); glDisable(GL_ALPHA_TEST); levelRenderer->renderHit(player, mc->hitResult, 0, player->inventory->getSelected(), a); levelRenderer->renderHitOutline(player, mc->hitResult, 0, player->inventory->getSelected(), a); @@ -1445,7 +1445,7 @@ void GameRenderer::renderLevel(float a, int64_t until) { if (mc->hitResult != NULL && !cameraEntity->isUnderLiquid(Material::water)) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>(cameraEntity); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(cameraEntity); glDisable(GL_ALPHA_TEST); levelRenderer->renderHit(player, mc->hitResult, 0, player->inventory->getSelected(), a); levelRenderer->renderHitOutline(player, mc->hitResult, 0, player->inventory->getSelected(), a); @@ -1512,7 +1512,7 @@ void GameRenderer::tickRain() rainLevel /= ( mc->levelRenderer->activePlayers() + 1 ); random->setSeed(_tick * 312987231l); - shared_ptr<Mob> player = mc->cameraTargetPlayer; + std::shared_ptr<Mob> player = mc->cameraTargetPlayer; Level *level = mc->level; int x0 = Mth::floor(player->x); @@ -1549,7 +1549,7 @@ void GameRenderer::tickRain() { if (Tile::tiles[t]->material == Material::lava) { - mc->particleEngine->add( shared_ptr<SmokeParticle>( new SmokeParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za, 0, 0, 0) ) ); + mc->particleEngine->add( std::shared_ptr<SmokeParticle>( new SmokeParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za, 0, 0, 0) ) ); } else { @@ -1559,7 +1559,7 @@ void GameRenderer::tickRain() rainPosY = y + 0.1f - Tile::tiles[t]->getShapeY0(); rainPosZ = z + za; } - mc->particleEngine->add( shared_ptr<WaterDropParticle>( new WaterDropParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za) ) ); + mc->particleEngine->add( std::shared_ptr<WaterDropParticle>( new WaterDropParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za) ) ); } } } @@ -1612,7 +1612,7 @@ void GameRenderer::renderSnowAndRain(float a) } } - shared_ptr<Mob> player = mc->cameraTargetPlayer; + std::shared_ptr<Mob> player = mc->cameraTargetPlayer; Level *level = mc->level; int x0 = Mth::floor(player->x); @@ -1796,7 +1796,7 @@ void GameRenderer::setupGuiScreen(int forceScale /*=-1*/) void GameRenderer::setupClearColor(float a) { Level *level = mc->level; - shared_ptr<Mob> player = mc->cameraTargetPlayer; + std::shared_ptr<Mob> player = mc->cameraTargetPlayer; float whiteness = 1.0f / (4 - mc->options->viewDistance); whiteness = 1 - (float) pow((double)whiteness, 0.25); @@ -1953,7 +1953,7 @@ void GameRenderer::setupClearColor(float a) void GameRenderer::setupFog(int i, float alpha) { - shared_ptr<Mob> player = mc->cameraTargetPlayer; + std::shared_ptr<Mob> player = mc->cameraTargetPlayer; // 4J - check for creative mode brought forward from 1.2.3 bool creative = false; diff --git a/Minecraft.Client/GameRenderer.h b/Minecraft.Client/GameRenderer.h index fca091a1..6be8d03e 100644 --- a/Minecraft.Client/GameRenderer.h +++ b/Minecraft.Client/GameRenderer.h @@ -25,7 +25,7 @@ public: ItemInHandRenderer *itemInHandRenderer; private: int _tick; - shared_ptr<Entity> hovered; + std::shared_ptr<Entity> hovered; // smooth camera movement SmoothFloat smoothTurnX; @@ -108,7 +108,7 @@ public: private: void tickLightTexture(); void updateLightTexture(float a); - float getNightVisionScale(shared_ptr<Player> player, float a); + float getNightVisionScale(std::shared_ptr<Player> player, float a); public: void render(float a, bool bFirst); // 4J added bFirst void renderLevel(float a); diff --git a/Minecraft.Client/GhastModel.cpp b/Minecraft.Client/GhastModel.cpp index 460c28ff..bc41c774 100644 --- a/Minecraft.Client/GhastModel.cpp +++ b/Minecraft.Client/GhastModel.cpp @@ -42,7 +42,7 @@ void GhastModel::setupAnim(float time, float r, float bob, float yRot, float xRo } } -void GhastModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void GhastModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/GhastModel.h b/Minecraft.Client/GhastModel.h index 22e9023c..59ce7b7d 100644 --- a/Minecraft.Client/GhastModel.h +++ b/Minecraft.Client/GhastModel.h @@ -10,5 +10,5 @@ public: GhastModel(); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); };
\ No newline at end of file diff --git a/Minecraft.Client/GhastRenderer.cpp b/Minecraft.Client/GhastRenderer.cpp index 1d8a2833..59dd361e 100644 --- a/Minecraft.Client/GhastRenderer.cpp +++ b/Minecraft.Client/GhastRenderer.cpp @@ -7,10 +7,10 @@ GhastRenderer::GhastRenderer() : MobRenderer(new GhastModel(), 0.5f) { } -void GhastRenderer::scale(shared_ptr<Mob> mob, float a) +void GhastRenderer::scale(std::shared_ptr<Mob> mob, float a) { - shared_ptr<Ghast> ghast = dynamic_pointer_cast<Ghast>(mob); - + std::shared_ptr<Ghast> ghast = dynamic_pointer_cast<Ghast>(mob); + float ss = (ghast->oCharge+(ghast->charge-ghast->oCharge)*a)/20.0f; if (ss<0) ss = 0; ss = 1/(ss*ss*ss*ss*ss*2+1); diff --git a/Minecraft.Client/GhastRenderer.h b/Minecraft.Client/GhastRenderer.h index 6778b9a5..1bd3131f 100644 --- a/Minecraft.Client/GhastRenderer.h +++ b/Minecraft.Client/GhastRenderer.h @@ -7,5 +7,5 @@ public: GhastRenderer(); protected: - virtual void scale(shared_ptr<Mob> mob, float a); + virtual void scale(std::shared_ptr<Mob> mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/GiantMobRenderer.cpp b/Minecraft.Client/GiantMobRenderer.cpp index 6dabf7cb..7df83317 100644 --- a/Minecraft.Client/GiantMobRenderer.cpp +++ b/Minecraft.Client/GiantMobRenderer.cpp @@ -1,12 +1,12 @@ #include "stdafx.h" -#include "GiantMobRenderer.h" +#include "GiantMobRenderer.h" GiantMobRenderer::GiantMobRenderer(Model *model, float shadow, float _scale) : MobRenderer(model, shadow *_scale) { this->_scale = _scale; } -void GiantMobRenderer::scale(shared_ptr<Mob> mob, float a) +void GiantMobRenderer::scale(std::shared_ptr<Mob> mob, float a) { glScalef(_scale, _scale, _scale); }
\ No newline at end of file diff --git a/Minecraft.Client/GiantMobRenderer.h b/Minecraft.Client/GiantMobRenderer.h index 5b1cce1d..c4070863 100644 --- a/Minecraft.Client/GiantMobRenderer.h +++ b/Minecraft.Client/GiantMobRenderer.h @@ -10,5 +10,5 @@ public: GiantMobRenderer(Model *model, float shadow, float scale); protected: - virtual void scale(shared_ptr<Mob> mob, float a); + virtual void scale(std::shared_ptr<Mob> mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/Gui.cpp b/Minecraft.Client/Gui.cpp index ffdf5055..ff1f407d 100644 --- a/Minecraft.Client/Gui.cpp +++ b/Minecraft.Client/Gui.cpp @@ -225,7 +225,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) // Display the pumpkin screen effect ///////////////////////////////////////////////////////////////////////////////////// - shared_ptr<ItemInstance> headGear = minecraft->player->inventory->getArmor(3); + std::shared_ptr<ItemInstance> headGear = minecraft->player->inventory->getArmor(3); // 4J-PB - changing this to be per player //if (!minecraft->options->thirdPersonView && headGear != NULL && headGear->id == Tile::pumpkin_Id) renderPumpkin(screenWidth, screenHeight); @@ -302,7 +302,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) minecraft->textures->bindTexture(TN_GUI_GUI); // 4J was L"/gui/gui.png" MemSect(0); - shared_ptr<Inventory> inventory = minecraft->player->inventory; + std::shared_ptr<Inventory> inventory = minecraft->player->inventory; if(bTwoPlayerSplitscreen) { // need to apply scale factors depending on the mode @@ -1027,7 +1027,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) // { // if (EnderDragonRenderer::bossInstance == NULL) return; // -// shared_ptr<EnderDragon> boss = EnderDragonRenderer::bossInstance; +// std::shared_ptr<EnderDragon> boss = EnderDragonRenderer::bossInstance; // EnderDragonRenderer::bossInstance = NULL; // // Minecraft *pMinecraft=Minecraft::GetInstance(); @@ -1148,7 +1148,7 @@ void Gui::renderTp(float br, int w, int h) void Gui::renderSlot(int slot, int x, int y, float a) { - shared_ptr<ItemInstance> item = minecraft->player->inventory->items[slot]; + std::shared_ptr<ItemInstance> item = minecraft->player->inventory->items[slot]; if (item == NULL) return; float pop = item->popTime - a; diff --git a/Minecraft.Client/HumanoidMobRenderer.cpp b/Minecraft.Client/HumanoidMobRenderer.cpp index 389116ed..af2dc0a2 100644 --- a/Minecraft.Client/HumanoidMobRenderer.cpp +++ b/Minecraft.Client/HumanoidMobRenderer.cpp @@ -36,12 +36,12 @@ void HumanoidMobRenderer::createArmorParts() armorParts2 = new HumanoidModel(0.5f); } -void HumanoidMobRenderer::additionalRendering(shared_ptr<Mob> mob, float a) +void HumanoidMobRenderer::additionalRendering(std::shared_ptr<Mob> mob, float a) { float brightness = SharedConstants::TEXTURE_LIGHTING ? 1 : mob->getBrightness(a); glColor3f(brightness, brightness, brightness); - shared_ptr<ItemInstance> item = mob->getCarriedItem(); - shared_ptr<ItemInstance> headGear = mob->getArmor(3); + std::shared_ptr<ItemInstance> item = mob->getCarriedItem(); + std::shared_ptr<ItemInstance> headGear = mob->getArmor(3); if (headGear != NULL) { @@ -49,7 +49,7 @@ void HumanoidMobRenderer::additionalRendering(shared_ptr<Mob> mob, float a) // 4J-PB - need to disable rendering armour/skulls/pumpkins for some special skins (Daleks) if((mob->getAnimOverrideBitmask()&(1<<HumanoidModel::eAnim_DontRenderArmour))==0) - { + { glPushMatrix(); humanoidModel->head->translateTo(1 / 16.0f); @@ -138,13 +138,13 @@ void HumanoidMobRenderer::additionalRendering(shared_ptr<Mob> mob, float a) { this->entityRenderDispatcher->itemInHandRenderer->renderItem(mob, item, 1); } - + glPopMatrix(); } } -void HumanoidMobRenderer::scale(shared_ptr<Mob> mob, float a) +void HumanoidMobRenderer::scale(std::shared_ptr<Mob> mob, float a) { glScalef(_scale, _scale, _scale); }
\ No newline at end of file diff --git a/Minecraft.Client/HumanoidMobRenderer.h b/Minecraft.Client/HumanoidMobRenderer.h index 6c718fb9..6654f765 100644 --- a/Minecraft.Client/HumanoidMobRenderer.h +++ b/Minecraft.Client/HumanoidMobRenderer.h @@ -7,7 +7,7 @@ class HumanoidMobRenderer : public MobRenderer { protected: HumanoidModel *humanoidModel; - float _scale; + float _scale; HumanoidModel *armorParts1; HumanoidModel *armorParts2; @@ -17,6 +17,6 @@ public: HumanoidMobRenderer(HumanoidModel *humanoidModel, float shadow, float scale); protected: virtual void createArmorParts(); - virtual void additionalRendering(shared_ptr<Mob> mob, float a); - void scale(shared_ptr<Mob> mob, float a); + virtual void additionalRendering(std::shared_ptr<Mob> mob, float a); + void scale(std::shared_ptr<Mob> mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/HumanoidModel.cpp b/Minecraft.Client/HumanoidModel.cpp index 444d9c90..5a9c465a 100644 --- a/Minecraft.Client/HumanoidModel.cpp +++ b/Minecraft.Client/HumanoidModel.cpp @@ -4,7 +4,7 @@ #include "..\Minecraft.World\Entity.h" #include "ModelPart.h" -// 4J added +// 4J added ModelPart * HumanoidModel::AddOrRetrievePart(SKIN_BOX *pBox) { @@ -49,9 +49,9 @@ ModelPart * HumanoidModel::AddOrRetrievePart(SKIN_BOX *pBox) pNewBox = new ModelPart(this, (int)pBox->fU, (int)pBox->fV); pNewBox->visible=false; - pNewBox->addHumanoidBox(pBox->fX, pBox->fY, pBox->fZ, pBox->fW, pBox->fH, pBox->fD, 0); + pNewBox->addHumanoidBox(pBox->fX, pBox->fY, pBox->fZ, pBox->fW, pBox->fH, pBox->fD, 0); // 4J-PB - don't compile here, since the lighting isn't set up. It'll be compiled on first use. - //pNewBox->compile(1.0f/16.0f); + //pNewBox->compile(1.0f/16.0f); pAttachTo->addChild(pNewBox); } @@ -69,7 +69,7 @@ void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight) ear = new ModelPart(this, 24, 0); ear->addHumanoidBox(-3, -6, -1, 6, 6, 1, g); // Ear - + head = new ModelPart(this, 0, 0); head->addHumanoidBox(-4, -8, -4, 8, 8, 8, g); // Head head->setPos(0, 0 + yOffset, 0); @@ -140,8 +140,8 @@ HumanoidModel::HumanoidModel(float g, float yOffset, int texWidth, int texHeight _init(g,yOffset,texWidth,texHeight); } -void HumanoidModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) -{ +void HumanoidModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +{ if(entity!=NULL) { m_uiAnimOverrideBitmask=entity->getAnimOverrideBitmask(); @@ -183,7 +183,7 @@ void HumanoidModel::render(shared_ptr<Entity> entity, float time, float r, float void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim) { //bool bIsAttacking = (attackTime > -9990.0f); - + { head->yRot = yRot / (float) (180.0f / PI); head->xRot = xRot / (float) (180.0f / PI); @@ -253,7 +253,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float leg1->xRot = -HALF_PI; leg0->yRot = HALF_PI * 0.2f; leg1->yRot = -HALF_PI * 0.2f; - } + } else if(uiBitmaskOverrideAnim&(1<<eAnim_NoLegAnim)) { leg0->xRot=0.0f; @@ -261,7 +261,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float leg1->xRot=0.0f; leg1->zRot=0.0f; leg0->yRot = 0.0f; - leg1->yRot = 0.0f; + leg1->yRot = 0.0f; } else if(uiBitmaskOverrideAnim&(1<<eAnim_SingleLegs)) { @@ -275,11 +275,11 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float } - if (holdingLeftHand != 0) + if (holdingLeftHand != 0) { arm1->xRot = arm1->xRot * 0.5f - HALF_PI * 0.2f * holdingLeftHand; } - if (holdingRightHand != 0) + if (holdingRightHand != 0) { arm0->xRot = arm0->xRot * 0.5f - HALF_PI * 0.2f * holdingRightHand; } @@ -305,7 +305,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float float aa = Mth::sin(swing * PI); float bb = Mth::sin(attackTime * PI) * -(head->xRot - 0.7f) * 0.75f; arm0->xRot -= aa * 1.2f + bb; // 4J - changed 1.2 -> 1.2f - arm0->yRot += body->yRot * 2.0f; + arm0->yRot += body->yRot * 2.0f; if((uiBitmaskOverrideAnim&(1<<eAnim_StatueOfLiberty))&& (holdingRightHand==0) && (attackTime==0.0f)) { @@ -389,7 +389,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float arm0->xRot += ((Mth::sin(bob * 0.067f)) * 0.05f); arm1->xRot -= ((Mth::sin(bob * 0.067f)) * 0.05f); - if (bowAndArrow) + if (bowAndArrow) { float attack2 = 0.0f; float attack = 0.0f; @@ -441,15 +441,15 @@ void HumanoidModel::render(HumanoidModel *model, float scale, bool usecompiled) hair->xRot = head->xRot; body->yRot = model->body->yRot; - + arm0->xRot = model->arm0->xRot; arm0->yRot = model->arm0->yRot; arm0->zRot = model->arm0->zRot; - + arm1->xRot = model->arm1->xRot; arm1->yRot = model->arm1->yRot; arm1->zRot = model->arm1->zRot; - + leg0->xRot = model->leg0->xRot; leg1->xRot = model->leg1->xRot; diff --git a/Minecraft.Client/HumanoidModel.h b/Minecraft.Client/HumanoidModel.h index 0ca10f4b..e0ebca55 100644 --- a/Minecraft.Client/HumanoidModel.h +++ b/Minecraft.Client/HumanoidModel.h @@ -5,7 +5,7 @@ class HumanoidModel : public Model { public: ModelPart *head, *hair, *body, *arm0, *arm1, *leg0, *leg1, *ear, *cloak; - //ModelPart *hat; + //ModelPart *hat; int holdingLeftHand; int holdingRightHand; @@ -53,11 +53,11 @@ public: HumanoidModel(); HumanoidModel(float g); HumanoidModel(float g, float yOffset, int texWidth, int texHeight); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); void renderHair(float scale, bool usecompiled); void renderEars(float scale, bool usecompiled); - void renderCloak(float scale, bool usecompiled); + void renderCloak(float scale, bool usecompiled); void render(HumanoidModel *model, float scale, bool usecompiled); // Add new bits to models diff --git a/Minecraft.Client/InventoryScreen.cpp b/Minecraft.Client/InventoryScreen.cpp index 726a5e8d..61f06bae 100644 --- a/Minecraft.Client/InventoryScreen.cpp +++ b/Minecraft.Client/InventoryScreen.cpp @@ -10,7 +10,7 @@ #include "StatsScreen.h" #include "..\Minecraft.World\net.minecraft.stats.h" -InventoryScreen::InventoryScreen(shared_ptr<Player> player) : AbstractContainerScreen(player->inventoryMenu) +InventoryScreen::InventoryScreen(std::shared_ptr<Player> player) : AbstractContainerScreen(player->inventoryMenu) { xMouse = yMouse = 0.0f; // 4J added diff --git a/Minecraft.Client/InventoryScreen.h b/Minecraft.Client/InventoryScreen.h index c39edfe0..4f62ce35 100644 --- a/Minecraft.Client/InventoryScreen.h +++ b/Minecraft.Client/InventoryScreen.h @@ -6,7 +6,7 @@ class Button; class InventoryScreen : public AbstractContainerScreen { public: - InventoryScreen(shared_ptr<Player> player); + InventoryScreen(std::shared_ptr<Player> player); virtual void init(); protected: virtual void renderLabels(); diff --git a/Minecraft.Client/ItemFrameRenderer.cpp b/Minecraft.Client/ItemFrameRenderer.cpp index 40769fb9..06f8992e 100644 --- a/Minecraft.Client/ItemFrameRenderer.cpp +++ b/Minecraft.Client/ItemFrameRenderer.cpp @@ -23,11 +23,11 @@ void ItemFrameRenderer::registerTerrainTextures(IconRegister *iconRegister) backTexture = iconRegister->registerIcon(L"itemframe_back"); } -void ItemFrameRenderer::render(shared_ptr<Entity> _itemframe, double x, double y, double z, float rot, float a) +void ItemFrameRenderer::render(std::shared_ptr<Entity> _itemframe, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type EnderCrystal rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type EnderCrystal rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<ItemFrame> itemFrame = dynamic_pointer_cast<ItemFrame>(_itemframe); + std::shared_ptr<ItemFrame> itemFrame = dynamic_pointer_cast<ItemFrame>(_itemframe); glPushMatrix(); float xOffs = (float) (itemFrame->x - x) - 0.5f; @@ -47,7 +47,7 @@ void ItemFrameRenderer::render(shared_ptr<Entity> _itemframe, double x, double } -void ItemFrameRenderer::drawFrame(shared_ptr<ItemFrame> itemFrame) +void ItemFrameRenderer::drawFrame(std::shared_ptr<ItemFrame> itemFrame) { Minecraft *pMinecraft=Minecraft::GetInstance(); @@ -102,14 +102,14 @@ void ItemFrameRenderer::drawFrame(shared_ptr<ItemFrame> itemFrame) glPopMatrix(); } -void ItemFrameRenderer::drawItem(shared_ptr<ItemFrame> entity) +void ItemFrameRenderer::drawItem(std::shared_ptr<ItemFrame> entity) { Minecraft *pMinecraft=Minecraft::GetInstance(); - shared_ptr<ItemInstance> instance = entity->getItem(); + std::shared_ptr<ItemInstance> instance = entity->getItem(); if (instance == NULL) return; - shared_ptr<ItemEntity> itemEntity = shared_ptr<ItemEntity>(new ItemEntity(entity->level, 0, 0, 0, instance)); + std::shared_ptr<ItemEntity> itemEntity = std::shared_ptr<ItemEntity>(new ItemEntity(entity->level, 0, 0, 0, instance)); itemEntity->getItem()->count = 1; itemEntity->bobOffs = 0; @@ -119,7 +119,7 @@ void ItemFrameRenderer::drawItem(shared_ptr<ItemFrame> entity) glRotatef(180 + entity->yRot, 0, 1, 0); glRotatef(-90 * entity->getRotation(), 0, 0, 1); - switch (entity->getRotation()) + switch (entity->getRotation()) { case 1: glTranslatef(-0.16f, -0.16f, 0); @@ -132,7 +132,7 @@ void ItemFrameRenderer::drawItem(shared_ptr<ItemFrame> entity) break; } - if (itemEntity->getItem()->getItem() == Item::map) + if (itemEntity->getItem()->getItem() == Item::map) { entityRenderDispatcher->textures->bindTexture(TN_MISC_MAPBG); Tesselator *t = Tesselator::getInstance(); @@ -150,13 +150,13 @@ void ItemFrameRenderer::drawItem(shared_ptr<ItemFrame> entity) t->vertexUV(0 - vo, 0 - vo, 0, 0, 0); t->end(); - shared_ptr<MapItemSavedData> data = Item::map->getSavedData(itemEntity->getItem(), entity->level); - if (data != NULL) + std::shared_ptr<MapItemSavedData> data = Item::map->getSavedData(itemEntity->getItem(), entity->level); + if (data != NULL) { entityRenderDispatcher->itemInHandRenderer->minimap->render(nullptr, entityRenderDispatcher->textures, data, entity->entityId); } - } - else + } + else { if (itemEntity->getItem()->getItem() == Item::compass) { @@ -178,7 +178,7 @@ void ItemFrameRenderer::drawItem(shared_ptr<ItemFrame> entity) ct->cycleFrames(); } } - + glPopMatrix(); } diff --git a/Minecraft.Client/ItemFrameRenderer.h b/Minecraft.Client/ItemFrameRenderer.h index 47f2fe90..b63ebf83 100644 --- a/Minecraft.Client/ItemFrameRenderer.h +++ b/Minecraft.Client/ItemFrameRenderer.h @@ -9,9 +9,9 @@ private: //@Override public: void registerTerrainTextures(IconRegister *iconRegister); - virtual void render(shared_ptr<Entity> _itemframe, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _itemframe, double x, double y, double z, float rot, float a); private: - void drawFrame(shared_ptr<ItemFrame> itemFrame); - void drawItem(shared_ptr<ItemFrame> entity); + void drawFrame(std::shared_ptr<ItemFrame> itemFrame); + void drawItem(std::shared_ptr<ItemFrame> entity); }; diff --git a/Minecraft.Client/ItemInHandRenderer.cpp b/Minecraft.Client/ItemInHandRenderer.cpp index cee9254d..14c28f02 100644 --- a/Minecraft.Client/ItemInHandRenderer.cpp +++ b/Minecraft.Client/ItemInHandRenderer.cpp @@ -87,7 +87,7 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap) t->vertexUV(x0, y1, z1, u, v); t->vertexUV(x0, y1, z0, u, v); t->vertexUV(x1, y1, z0, u, v); - } + } t->end(); glEndList(); } @@ -150,7 +150,7 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap) t->vertexUV(x0, y1, z1, u0, v1); t->vertexUV(x0, y1, z0, u0, v1); t->vertexUV(x1, y1, z0, u1, v1); - } + } t->end(); glDepthFunc(GL_LEQUAL); glEndList(); @@ -158,7 +158,7 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap) } -void ItemInHandRenderer::renderItem(shared_ptr<Mob> mob, shared_ptr<ItemInstance> item, int layer, bool setColor/* = true*/) +void ItemInHandRenderer::renderItem(std::shared_ptr<Mob> mob, std::shared_ptr<ItemInstance> item, int layer, bool setColor/* = true*/) { // 4J - code borrowed from render method below, although not factoring in brightness as that should already be being taken into account // by texture lighting. This is for colourising things held in 3rd person view. @@ -203,7 +203,7 @@ void ItemInHandRenderer::renderItem(shared_ptr<Mob> mob, shared_ptr<ItemInstance MemSect(0); Tesselator *t = Tesselator::getInstance(); - // Consider forcing the mipmap LOD level to use, if this is to be rendered from a larger than standard source texture. + // Consider forcing the mipmap LOD level to use, if this is to be rendered from a larger than standard source texture. int iconWidth = icon->getWidth(); int LOD = -1; // Default to not doing anything special with LOD forcing if( iconWidth == 32 ) @@ -312,14 +312,14 @@ void ItemInHandRenderer::renderItem3D(Tesselator *t, float u0, float v0, float u void ItemInHandRenderer::render(float a) { float h = oHeight + (height - oHeight) * a; - shared_ptr<Player> player = mc->player; + std::shared_ptr<Player> player = mc->player; // 4J - added so we can adjust the position of the hands for horizontal & vertical split screens float fudgeX = 0.0f; float fudgeY = 0.0f; float fudgeZ = 0.0f; bool splitHoriz = false; - shared_ptr<LocalPlayer> localPlayer = dynamic_pointer_cast<LocalPlayer>(player); + std::shared_ptr<LocalPlayer> localPlayer = dynamic_pointer_cast<LocalPlayer>(player); if( localPlayer ) { if( localPlayer->m_iScreenSection == C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM || @@ -353,7 +353,7 @@ void ItemInHandRenderer::render(float a) glRotatef((yr - yrr) * 0.1f, 0, 1, 0); } - shared_ptr<ItemInstance> item = selectedItem; + std::shared_ptr<ItemInstance> item = selectedItem; float br = mc->level->getBrightness(Mth::floor(player->x), Mth::floor(player->y), Mth::floor(player->z)); // 4J - change brought forward from 1.8.2 @@ -433,7 +433,7 @@ void ItemInHandRenderer::render(float a) glScalef(ss, ss, ss); // Can't turn off the hand if the player is holding a map - shared_ptr<ItemInstance> itemInstance = player->inventory->getSelected(); + std::shared_ptr<ItemInstance> itemInstance = player->inventory->getSelected(); if ((itemInstance && (itemInstance->getItem()->id==Item::map_Id)) || app.GetGameSettings(localPlayer->GetXboxPad(),eGameSetting_DisplayHand)!=0 ) { playerRenderer->renderHand(); @@ -477,7 +477,7 @@ void ItemInHandRenderer::render(float a) t->vertexUV((float)(0 - vo), (float)( 0 - vo), (float)( 0), (float)( 0), (float)( 0)); t->end(); - shared_ptr<MapItemSavedData> data = Item::map->getSavedData(item, mc->level); + std::shared_ptr<MapItemSavedData> data = Item::map->getSavedData(item, mc->level); PIXBeginNamedEvent(0,"Minimap render"); if(data != NULL) minimap->render(mc->player, mc->textures, data, mc->player->entityId); PIXEndNamedEvent(); @@ -652,7 +652,7 @@ void ItemInHandRenderer::render(float a) glScalef(ss, ss, ss); MemSect(31); // Can't turn off the hand if the player is holding a map - shared_ptr<ItemInstance> itemInstance = player->inventory->getSelected(); + std::shared_ptr<ItemInstance> itemInstance = player->inventory->getSelected(); if ( (itemInstance && (itemInstance->getItem()->id==Item::map_Id)) || app.GetGameSettings(localPlayer->GetXboxPad(),eGameSetting_DisplayHand)!=0 ) { @@ -837,8 +837,8 @@ void ItemInHandRenderer::tick() oHeight = height; - shared_ptr<Player> player = mc->player; - shared_ptr<ItemInstance> nextTile = player->inventory->getSelected(); + std::shared_ptr<Player> player = mc->player; + std::shared_ptr<ItemInstance> nextTile = player->inventory->getSelected(); bool matches = lastSlot == player->inventory->selected && nextTile == selectedItem; if (selectedItem == NULL && nextTile == NULL) diff --git a/Minecraft.Client/ItemInHandRenderer.h b/Minecraft.Client/ItemInHandRenderer.h index dee51a7f..975dd360 100644 --- a/Minecraft.Client/ItemInHandRenderer.h +++ b/Minecraft.Client/ItemInHandRenderer.h @@ -11,7 +11,7 @@ class ItemInHandRenderer { private: Minecraft *mc; - shared_ptr<ItemInstance> selectedItem; + std::shared_ptr<ItemInstance> selectedItem; float height; float oHeight; TileRenderer *tileRenderer; @@ -23,7 +23,7 @@ public: public: ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap = true); // 4J Added optimisedMinimap param - void renderItem(shared_ptr<Mob> mob, shared_ptr<ItemInstance> item, int layer, bool setColor = true); // 4J added setColor parameter + void renderItem(std::shared_ptr<Mob> mob, std::shared_ptr<ItemInstance> item, int layer, bool setColor = true); // 4J added setColor parameter static void renderItem3D(Tesselator *t, float u0, float v0, float u1, float v1, int width, int height, float depth, bool isGlint); // 4J added isGlint parameter public: void render(float a); diff --git a/Minecraft.Client/ItemRenderer.cpp b/Minecraft.Client/ItemRenderer.cpp index 03d0d3a5..fc5e5fde 100644 --- a/Minecraft.Client/ItemRenderer.cpp +++ b/Minecraft.Client/ItemRenderer.cpp @@ -29,13 +29,13 @@ ItemRenderer::~ItemRenderer() delete random; } -void ItemRenderer::render(shared_ptr<Entity> _itemEntity, double x, double y, double z, float rot, float a) +void ItemRenderer::render(std::shared_ptr<Entity> _itemEntity, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<ItemEntity> itemEntity = dynamic_pointer_cast<ItemEntity>(_itemEntity); + std::shared_ptr<ItemEntity> itemEntity = dynamic_pointer_cast<ItemEntity>(_itemEntity); random->setSeed(187); - shared_ptr<ItemInstance> item = itemEntity->getItem(); + std::shared_ptr<ItemInstance> item = itemEntity->getItem(); glPushMatrix(); float bob = Mth::sin((itemEntity->age + a) / 10.0f + itemEntity->bobOffs) * 0.1f + 0.1f; @@ -54,7 +54,7 @@ void ItemRenderer::render(shared_ptr<Entity> _itemEntity, double x, double y, do { glRotatef(spin, 0, 1, 0); - if (m_bItemFrame) + if (m_bItemFrame) { glScalef(1.25f, 1.25f, 1.25f); glTranslatef(0, 0.05f, 0); @@ -73,7 +73,7 @@ void ItemRenderer::render(shared_ptr<Entity> _itemEntity, double x, double y, do for (int i = 0; i < count; i++) { glPushMatrix(); - if (i > 0) + if (i > 0) { float xo = (random->nextFloat() * 2 - 1) * 0.2f / s; float yo = (random->nextFloat() * 2 - 1) * 0.2f / s; @@ -88,13 +88,13 @@ void ItemRenderer::render(shared_ptr<Entity> _itemEntity, double x, double y, do } else if (item->getItem()->hasMultipleSpriteLayers()) { - if (m_bItemFrame) + if (m_bItemFrame) { glScalef(1 / 1.95f, 1 / 1.95f, 1 / 1.95f); glTranslatef(0, -0.05f, 0); glDisable(GL_LIGHTING); - } - else + } + else { glScalef(1 / 2.0f, 1 / 2.0f, 1 / 2.0f); } @@ -124,17 +124,17 @@ void ItemRenderer::render(shared_ptr<Entity> _itemEntity, double x, double y, do } else { - if (m_bItemFrame) + if (m_bItemFrame) { glScalef(1 / 1.95f, 1 / 1.95f, 1 / 1.95f); glTranslatef(0, -0.05f, 0); glDisable(GL_LIGHTING); - } - else + } + else { glScalef(1 / 2.0f, 1 / 2.0f, 1 / 2.0f); } - + // 4J Stu - For rendering the static compass, we give it a non-zero aux value if(item->id == Item::compass_Id) item->setAuxValue(255); Icon *icon = item->getIcon(); @@ -172,7 +172,7 @@ void ItemRenderer::render(shared_ptr<Entity> _itemEntity, double x, double y, do } } -void ItemRenderer::renderItemBillboard(shared_ptr<ItemEntity> entity, Icon *icon, int count, float a, float red, float green, float blue) +void ItemRenderer::renderItemBillboard(std::shared_ptr<ItemEntity> entity, Icon *icon, int count, float a, float red, float green, float blue) { Tesselator *t = Tesselator::getInstance(); @@ -188,7 +188,7 @@ void ItemRenderer::renderItemBillboard(shared_ptr<ItemEntity> entity, Icon *icon if (entityRenderDispatcher->options->fancyGraphics) { - // Consider forcing the mipmap LOD level to use, if this is to be rendered from a larger than standard source texture. + // Consider forcing the mipmap LOD level to use, if this is to be rendered from a larger than standard source texture. int iconWidth = icon->getWidth(); int LOD = -1; // Default to not doing anything special with LOD forcing if( iconWidth == 32 ) @@ -213,7 +213,7 @@ void ItemRenderer::renderItemBillboard(shared_ptr<ItemEntity> entity, Icon *icon float width = 1 / 16.0f; float margin = 0.35f / 16.0f; - shared_ptr<ItemInstance> item = entity->getItem(); + std::shared_ptr<ItemInstance> item = entity->getItem(); int items = item->count; if (items < 2) @@ -315,7 +315,7 @@ void ItemRenderer::renderItemBillboard(shared_ptr<ItemEntity> entity, Icon *icon } } -void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr<ItemInstance> item, float x, float y, float fScale, float fAlpha) +void ItemRenderer::renderGuiItem(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, float x, float y, float fScale, float fAlpha) { renderGuiItem(font,textures,item,x,y,fScale,fScale,fAlpha, true); } @@ -325,7 +325,7 @@ extern IDirect3DDevice9 *g_pD3DDevice; #endif // 4J - this used to take x and y as ints, and no scale and alpha - but this interface is now implemented as a wrapper round this more fully featured one -void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr<ItemInstance> item, float x, float y, float fScaleX,float fScaleY, float fAlpha, bool useCompiled) +void ItemRenderer::renderGuiItem(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, float x, float y, float fScaleX,float fScaleY, float fAlpha, bool useCompiled) { int itemId = item->id; int itemAuxValue = item->getAuxValue(); @@ -447,13 +447,13 @@ void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr<Item } // 4J - original interface, now just a wrapper for preceding overload -void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr<ItemInstance> item, int x, int y) +void ItemRenderer::renderGuiItem(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, int x, int y) { renderGuiItem(font, textures, item, (float)x, (float)y, 1.0f, 1.0f ); } // 4J - this used to take x and y as ints, and no scale, alpha or foil - but this interface is now implemented as a wrapper round this more fully featured one -void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr<ItemInstance> item, float x, float y,float fScale,float fAlpha, bool isFoil) +void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr<ItemInstance> item, float x, float y,float fScale,float fAlpha, bool isFoil) { if(item==NULL) return; renderAndDecorateItem(font, textures, item, x, y,fScale, fScale, fAlpha, isFoil, true); @@ -461,7 +461,7 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s // 4J - added isConstantBlended and blendFactor parameters. This is true if the gui item is being rendered from a context where it already has blending enabled to do general interface fading // (ie from the gui rather than xui). In this case we dno't want to enable/disable blending, and do need to restore the blend state when we are done. -void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr<ItemInstance> item, float x, float y,float fScaleX, float fScaleY,float fAlpha, bool isFoil, bool isConstantBlended, bool useCompiled) +void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr<ItemInstance> item, float x, float y,float fScaleX, float fScaleY,float fAlpha, bool isFoil, bool isConstantBlended, bool useCompiled) { if (item == NULL) { @@ -469,7 +469,7 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s } renderGuiItem(font, textures, item, x, y,fScaleX,fScaleY,fAlpha, useCompiled); - + if (isFoil || item->isFoil()) { glDepthFunc(GL_GREATER); @@ -478,7 +478,7 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s textures->bindTexture(TN__BLUR__MISC_GLINT); // 4J was "%blur%/misc/glint.png" blitOffset -= 50; if( !isConstantBlended ) glEnable(GL_BLEND); - + glBlendFunc(GL_DST_COLOR, GL_ONE); // 4J - changed blend equation from GL_DST_COLOR, GL_DST_COLOR so we can fade this out float blendFactor = isConstantBlended ? Gui::currentGuiBlendFactor : 1.0f; @@ -507,7 +507,7 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s } // 4J - original interface, now just a wrapper for preceding overload -void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr<ItemInstance> item, int x, int y) +void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr<ItemInstance> item, int x, int y) { renderAndDecorateItem( font, textures, item, (float)x, (float)y, 1.0f, 1.0f, item->isFoil() ); } @@ -560,18 +560,18 @@ void ItemRenderer::blitGlint(int id, float x, float y, float w, float h) } } -void ItemRenderer::renderGuiItemDecorations(Font *font, Textures *textures, shared_ptr<ItemInstance> item, int x, int y, float fAlpha) +void ItemRenderer::renderGuiItemDecorations(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, int x, int y, float fAlpha) { renderGuiItemDecorations(font, textures, item, x, y, L"", fAlpha); } -void ItemRenderer::renderGuiItemDecorations(Font *font, Textures *textures, shared_ptr<ItemInstance> item, int x, int y, const wstring &countText, float fAlpha) +void ItemRenderer::renderGuiItemDecorations(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, int x, int y, const wstring &countText, float fAlpha) { if (item == NULL) { return; } - + glEnable(GL_BLEND); RenderManager.StateSetBlendFactor(0xffffff |(((unsigned int)(fAlpha * 0xff))<<24)); glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA); diff --git a/Minecraft.Client/ItemRenderer.h b/Minecraft.Client/ItemRenderer.h index 9690f77c..830e8510 100644 --- a/Minecraft.Client/ItemRenderer.h +++ b/Minecraft.Client/ItemRenderer.h @@ -18,20 +18,20 @@ public: ItemRenderer(); virtual ~ItemRenderer(); - virtual void render(shared_ptr<Entity> _itemEntity, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _itemEntity, double x, double y, double z, float rot, float a); private: - virtual void renderItemBillboard(shared_ptr<ItemEntity> entity, Icon *icon, int count, float a, float red, float green, float blue); + virtual void renderItemBillboard(std::shared_ptr<ItemEntity> entity, Icon *icon, int count, float a, float red, float green, float blue); public: // 4J - original 2 interface variants - void renderGuiItem(Font *font, Textures *textures, shared_ptr<ItemInstance> item, int x, int y); - void renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr<ItemInstance> item, int x, int y); + void renderGuiItem(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, int x, int y); + void renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr<ItemInstance> item, int x, int y); // 4J - new interfaces added - void renderGuiItem(Font *font, Textures *textures, shared_ptr<ItemInstance> item, float x, float y, float fScale, float fAlpha); - void renderGuiItem(Font *font, Textures *textures, shared_ptr<ItemInstance> item, float x, float y, float fScaleX,float fScaleY, float fAlpha, bool useCompiled); // 4J Added useCompiled - void renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr<ItemInstance> item, float x, float y, float fScale, float fAlpha, bool isFoil); - void renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr<ItemInstance> item, float x, float y, float fScaleX, float fScaleY, float fAlpha, bool isFoil, bool isConstantBlended, bool useCompiled = true); // 4J - added isConstantBlended and useCompiled + void renderGuiItem(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, float x, float y, float fScale, float fAlpha); + void renderGuiItem(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, float x, float y, float fScaleX,float fScaleY, float fAlpha, bool useCompiled); // 4J Added useCompiled + void renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr<ItemInstance> item, float x, float y, float fScale, float fAlpha, bool isFoil); + void renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr<ItemInstance> item, float x, float y, float fScaleX, float fScaleY, float fAlpha, bool isFoil, bool isConstantBlended, bool useCompiled = true); // 4J - added isConstantBlended and useCompiled // 4J Added virtual void SetItemFrame(bool bSet) {m_bItemFrame=bSet;} @@ -42,8 +42,8 @@ private: void blitGlint(int id, float x, float y, float w, float h); // 4J - changed x,y,w,h to floats public: - void renderGuiItemDecorations(Font *font, Textures *textures, shared_ptr<ItemInstance> item, int x, int y, float fAlpha = 1.0f); - void renderGuiItemDecorations(Font *font, Textures *textures, shared_ptr<ItemInstance> item, int x, int y, const wstring &countText, float fAlpha = 1.0f); + void renderGuiItemDecorations(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, int x, int y, float fAlpha = 1.0f); + void renderGuiItemDecorations(Font *font, Textures *textures, std::shared_ptr<ItemInstance> item, int x, int y, const wstring &countText, float fAlpha = 1.0f); private: void fillRect(Tesselator *t, int x, int y, int w, int h, int c); public: diff --git a/Minecraft.Client/ItemSpriteRenderer.cpp b/Minecraft.Client/ItemSpriteRenderer.cpp index 5a1ea620..1cc60b62 100644 --- a/Minecraft.Client/ItemSpriteRenderer.cpp +++ b/Minecraft.Client/ItemSpriteRenderer.cpp @@ -17,7 +17,7 @@ ItemSpriteRenderer::ItemSpriteRenderer(Item *sourceItem, int sourceItemAuxValue // this(sourceItem, 0); //} -void ItemSpriteRenderer::render(shared_ptr<Entity> e, double x, double y, double z, float rot, float a) +void ItemSpriteRenderer::render(std::shared_ptr<Entity> e, double x, double y, double z, float rot, float a) { // the icon is already cached in the item object, so there should not be any performance impact by not caching it here Icon *icon = sourceItem->getIcon(sourceItemAuxValue); diff --git a/Minecraft.Client/ItemSpriteRenderer.h b/Minecraft.Client/ItemSpriteRenderer.h index e60feece..e8359783 100644 --- a/Minecraft.Client/ItemSpriteRenderer.h +++ b/Minecraft.Client/ItemSpriteRenderer.h @@ -11,7 +11,7 @@ private: public: ItemSpriteRenderer(Item *sourceItem, int sourceItemAuxValue = 0); //ItemSpriteRenderer(Item *icon); - virtual void render(shared_ptr<Entity> e, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> e, double x, double y, double z, float rot, float a); private: void renderIcon(Tesselator *t, Icon *icon); diff --git a/Minecraft.Client/LavaSlimeModel.cpp b/Minecraft.Client/LavaSlimeModel.cpp index 427b9547..4c024cfe 100644 --- a/Minecraft.Client/LavaSlimeModel.cpp +++ b/Minecraft.Client/LavaSlimeModel.cpp @@ -5,18 +5,18 @@ #include "..\Minecraft.World\LavaSlime.h" -LavaSlimeModel::LavaSlimeModel() +LavaSlimeModel::LavaSlimeModel() { - for (int i = 0; i < BODYCUBESLENGTH; i++) + for (int i = 0; i < BODYCUBESLENGTH; i++) { int u = 0; int v = i; - if (i == 2) + if (i == 2) { u = 24; v = 10; - } - else if (i == 3) + } + else if (i == 3) { u = 24; v = 19; @@ -36,33 +36,33 @@ LavaSlimeModel::LavaSlimeModel() } } -int LavaSlimeModel::getModelVersion() +int LavaSlimeModel::getModelVersion() { return 5; } -void LavaSlimeModel::prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) +void LavaSlimeModel::prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) { - shared_ptr<LavaSlime> lavaSlime = dynamic_pointer_cast<LavaSlime>(mob); + std::shared_ptr<LavaSlime> lavaSlime = dynamic_pointer_cast<LavaSlime>(mob); float slimeSquish = (lavaSlime->oSquish + (lavaSlime->squish - lavaSlime->oSquish) * a); - if (slimeSquish < 0) + if (slimeSquish < 0) { slimeSquish = 0.0f; } - for (int i = 0; i < BODYCUBESLENGTH; i++) + for (int i = 0; i < BODYCUBESLENGTH; i++) { bodyCubes[i]->y = -(4 - i) * slimeSquish * 1.7f; } } -void LavaSlimeModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void LavaSlimeModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); insideCube->render(scale, usecompiled); - for (int i = 0; i < BODYCUBESLENGTH; i++) + for (int i = 0; i < BODYCUBESLENGTH; i++) { bodyCubes[i]->render(scale, usecompiled); } diff --git a/Minecraft.Client/LavaSlimeModel.h b/Minecraft.Client/LavaSlimeModel.h index 44bd1663..ead7147f 100644 --- a/Minecraft.Client/LavaSlimeModel.h +++ b/Minecraft.Client/LavaSlimeModel.h @@ -1,7 +1,7 @@ #pragma once #include "Model.h" -class LavaSlimeModel : public Model +class LavaSlimeModel : public Model { static const int BODYCUBESLENGTH=8; ModelPart *bodyCubes[BODYCUBESLENGTH]; @@ -10,6 +10,6 @@ class LavaSlimeModel : public Model public: LavaSlimeModel(); int getModelVersion(); - virtual void prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; diff --git a/Minecraft.Client/LavaSlimeRenderer.cpp b/Minecraft.Client/LavaSlimeRenderer.cpp index 3d2cbf47..6bb75720 100644 --- a/Minecraft.Client/LavaSlimeRenderer.cpp +++ b/Minecraft.Client/LavaSlimeRenderer.cpp @@ -8,11 +8,11 @@ LavaSlimeRenderer::LavaSlimeRenderer() : MobRenderer(new LavaSlimeModel(), .25f) this->modelVersion = ((LavaSlimeModel *) model)->getModelVersion(); } -void LavaSlimeRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) -{ - // 4J - original version used generics and thus had an input parameter of type LavaSlime rather than shared_ptr<Entity> we have here - +void LavaSlimeRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +{ + // 4J - original version used generics and thus had an input parameter of type LavaSlime rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<LavaSlime> mob = dynamic_pointer_cast<LavaSlime>(_mob); + std::shared_ptr<LavaSlime> mob = dynamic_pointer_cast<LavaSlime>(_mob); int modelVersion = ((LavaSlimeModel *) model)->getModelVersion(); if (modelVersion != this->modelVersion) { @@ -23,11 +23,11 @@ void LavaSlimeRenderer::render(shared_ptr<Entity> _mob, double x, double y, doub MobRenderer::render(mob, x, y, z, rot, a); } -void LavaSlimeRenderer::scale(shared_ptr<Mob> _slime, float a) +void LavaSlimeRenderer::scale(std::shared_ptr<Mob> _slime, float a) { - // 4J - original version used generics and thus had an input parameter of type LavaSlime rather than shared_ptr<Mob> we have here - + // 4J - original version used generics and thus had an input parameter of type LavaSlime rather than std::shared_ptr<Mob> we have here - // do some casting around instead - shared_ptr<LavaSlime> slime = dynamic_pointer_cast<LavaSlime>(_slime); + std::shared_ptr<LavaSlime> slime = dynamic_pointer_cast<LavaSlime>(_slime); int size = slime->getSize(); float ss = (slime->oSquish + (slime->squish - slime->oSquish) * a) / (size * 0.5f + 1); float w = 1 / (ss + 1); diff --git a/Minecraft.Client/LavaSlimeRenderer.h b/Minecraft.Client/LavaSlimeRenderer.h index b0c44d1e..29afb390 100644 --- a/Minecraft.Client/LavaSlimeRenderer.h +++ b/Minecraft.Client/LavaSlimeRenderer.h @@ -10,8 +10,8 @@ private: public: LavaSlimeRenderer(); - virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); protected: - virtual void scale(shared_ptr<Mob> _slime, float a); + virtual void scale(std::shared_ptr<Mob> _slime, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/LevelRenderer.cpp b/Minecraft.Client/LevelRenderer.cpp index 917fa9f3..4cdb0cbe 100644 --- a/Minecraft.Client/LevelRenderer.cpp +++ b/Minecraft.Client/LevelRenderer.cpp @@ -475,7 +475,7 @@ void LevelRenderer::allChanged(int playerIndex) if (level != NULL) { - shared_ptr<Entity> player = mc->cameraTargetPlayer; + std::shared_ptr<Entity> player = mc->cameraTargetPlayer; if (player != NULL) { this->resortChunks(Mth::floor(player->x), Mth::floor(player->y), Mth::floor(player->z)); @@ -509,7 +509,7 @@ void LevelRenderer::renderEntities(Vec3 *cam, Culler *culler, float a) renderedEntities = 0; culledEntities = 0; - shared_ptr<Entity> player = mc->cameraTargetPlayer; + std::shared_ptr<Entity> player = mc->cameraTargetPlayer; EntityRenderDispatcher::xOff = (player->xOld + (player->x - player->xOld) * a); EntityRenderDispatcher::yOff = (player->yOld + (player->y - player->yOld) * a); @@ -520,13 +520,13 @@ void LevelRenderer::renderEntities(Vec3 *cam, Culler *culler, float a) mc->gameRenderer->turnOnLightLayer(a); // 4J - brought forward from 1.8.2 - vector<shared_ptr<Entity> > entities = level[playerIndex]->getAllEntities(); + vector<std::shared_ptr<Entity> > entities = level[playerIndex]->getAllEntities(); totalEntities = (int)entities.size(); AUTO_VAR(itEndGE, level[playerIndex]->globalEntities.end()); for (AUTO_VAR(it, level[playerIndex]->globalEntities.begin()); it != itEndGE; it++) { - shared_ptr<Entity> entity = *it; //level->globalEntities[i]; + std::shared_ptr<Entity> entity = *it; //level->globalEntities[i]; renderedEntities++; if (entity->shouldRender(cam)) EntityRenderDispatcher::instance->render(entity, a); } @@ -534,13 +534,13 @@ void LevelRenderer::renderEntities(Vec3 *cam, Culler *culler, float a) AUTO_VAR(itEndEnts, entities.end()); for (AUTO_VAR(it, entities.begin()); it != itEndEnts; it++) { - shared_ptr<Entity> entity = *it; //entities[i]; + std::shared_ptr<Entity> entity = *it; //entities[i]; if ((entity->shouldRender(cam) && (entity->noCulling || culler->isVisible(entity->bb)))) { // 4J-PB - changing this to be per player //if (entity == mc->cameraTargetPlayer && !mc->options->thirdPersonView && !mc->cameraTargetPlayer->isSleeping()) continue; - shared_ptr<LocalPlayer> localplayer = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); + std::shared_ptr<LocalPlayer> localplayer = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer); if (localplayer && entity == mc->cameraTargetPlayer && !localplayer->ThirdPersonView() && !mc->cameraTargetPlayer->isSleeping()) continue; @@ -669,7 +669,7 @@ void LevelRenderer::resortChunks(int xc, int yc, int zc) LeaveCriticalSection(&m_csDirtyChunks); } -int LevelRenderer::render(shared_ptr<Mob> player, int layer, double alpha, bool updateChunks) +int LevelRenderer::render(std::shared_ptr<Mob> player, int layer, double alpha, bool updateChunks) { int playerIndex = mc->player->GetXboxPad(); @@ -741,7 +741,7 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) #if 1 // 4J - cut down version, we're not using offsetted render lists, or a sorted chunk list, anymore mc->gameRenderer->turnOnLightLayer(alpha); // 4J - brought forward from 1.8.2 - shared_ptr<Mob> player = mc->cameraTargetPlayer; + std::shared_ptr<Mob> player = mc->cameraTargetPlayer; double xOff = player->xOld + (player->x - player->xOld) * alpha; double yOff = player->yOld + (player->y - player->yOld) * alpha; double zOff = player->zOld + (player->z - player->zOld) * alpha; @@ -854,7 +854,7 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) } } - shared_ptr<Mob> player = mc->cameraTargetPlayer; + std::shared_ptr<Mob> player = mc->cameraTargetPlayer; double xOff = player->xOld + (player->x - player->xOld) * alpha; double yOff = player->yOld + (player->y - player->yOld) * alpha; double zOff = player->zOld + (player->z - player->zOld) * alpha; @@ -1909,8 +1909,8 @@ bool LevelRenderer::updateDirtyChunks() for( int p = 0; p < XUSER_MAX_COUNT; p++ ) { // It's possible that the localplayers member can be set to NULL on the main thread when a player chooses to exit the game - // So take a reference to the player object now. As it is a shared_ptr it should live as long as we need it - shared_ptr<LocalPlayer> player = mc->localplayers[p]; + // So take a reference to the player object now. As it is a std::shared_ptr it should live as long as we need it + std::shared_ptr<LocalPlayer> player = mc->localplayers[p]; if( player == NULL ) continue; if( chunks[p].data == NULL ) continue; if( level[p] == NULL ) continue; @@ -2161,7 +2161,7 @@ bool LevelRenderer::updateDirtyChunks() } -void LevelRenderer::renderHit(shared_ptr<Player> player, HitResult *h, int mode, shared_ptr<ItemInstance> inventoryItem, float a) +void LevelRenderer::renderHit(std::shared_ptr<Player> player, HitResult *h, int mode, std::shared_ptr<ItemInstance> inventoryItem, float a) { Tesselator *t = Tesselator::getInstance(); glEnable(GL_BLEND); @@ -2180,7 +2180,7 @@ void LevelRenderer::renderHit(shared_ptr<Player> player, HitResult *h, int mode, glDisable(GL_ALPHA_TEST); } -void LevelRenderer::renderDestroyAnimation(Tesselator *t, shared_ptr<Player> player, float a) +void LevelRenderer::renderDestroyAnimation(Tesselator *t, std::shared_ptr<Player> player, float a) { double xo = player->xOld + (player->x - player->xOld) * a; double yo = player->yOld + (player->y - player->yOld) * a; @@ -2246,7 +2246,7 @@ void LevelRenderer::renderDestroyAnimation(Tesselator *t, shared_ptr<Player> pla } } -void LevelRenderer::renderHitOutline(shared_ptr<Player> player, HitResult *h, int mode, shared_ptr<ItemInstance> inventoryItem, float a) +void LevelRenderer::renderHitOutline(std::shared_ptr<Player> player, HitResult *h, int mode, std::shared_ptr<ItemInstance> inventoryItem, float a) { if (mode == 0 && h->type == HitResult::TILE) @@ -2586,7 +2586,7 @@ void LevelRenderer::playSound(int iSound, double x, double y, double z, float vo } */ } -void LevelRenderer::playSound(shared_ptr<Entity> entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist) +void LevelRenderer::playSound(std::shared_ptr<Entity> entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist) { } @@ -2606,21 +2606,21 @@ if (xd * xd + yd * yd + zd * zd > particleDistance * particleDistance) return; int playerIndex = mc->player->GetXboxPad(); // 4J added -if (name== L"bubble") mc->particleEngine->add(shared_ptr<BubbleParticle>( new BubbleParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"smoke") mc->particleEngine->add(shared_ptr<SmokeParticle>( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"note") mc->particleEngine->add(shared_ptr<NoteParticle>( new NoteParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"portal") mc->particleEngine->add(shared_ptr<PortalParticle>( new PortalParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"explode") mc->particleEngine->add(shared_ptr<ExplodeParticle>( new ExplodeParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"flame") mc->particleEngine->add(shared_ptr<FlameParticle>( new FlameParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"lava") mc->particleEngine->add(shared_ptr<LavaParticle>( new LavaParticle(level[playerIndex], x, y, z) ) ); -else if (name== L"footstep") mc->particleEngine->add(shared_ptr<FootstepParticle>( new FootstepParticle(textures, level[playerIndex], x, y, z) ) ); -else if (name== L"splash") mc->particleEngine->add(shared_ptr<SplashParticle>( new SplashParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"largesmoke") mc->particleEngine->add(shared_ptr<SmokeParticle>( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za, 2.5f) ) ); -else if (name== L"reddust") mc->particleEngine->add(shared_ptr<RedDustParticle>( new RedDustParticle(level[playerIndex], x, y, z, (float) xa, (float) ya, (float) za) ) ); -else if (name== L"snowballpoof") mc->particleEngine->add(shared_ptr<BreakingItemParticle>( new BreakingItemParticle(level[playerIndex], x, y, z, Item::snowBall) ) ); -else if (name== L"snowshovel") mc->particleEngine->add(shared_ptr<SnowShovelParticle>( new SnowShovelParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"slime") mc->particleEngine->add(shared_ptr<BreakingItemParticle>( new BreakingItemParticle(level[playerIndex], x, y, z, Item::slimeBall)) ) ; -else if (name== L"heart") mc->particleEngine->add(shared_ptr<HeartParticle>( new HeartParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +if (name== L"bubble") mc->particleEngine->add(std::shared_ptr<BubbleParticle>( new BubbleParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"smoke") mc->particleEngine->add(std::shared_ptr<SmokeParticle>( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"note") mc->particleEngine->add(std::shared_ptr<NoteParticle>( new NoteParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"portal") mc->particleEngine->add(std::shared_ptr<PortalParticle>( new PortalParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"explode") mc->particleEngine->add(std::shared_ptr<ExplodeParticle>( new ExplodeParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"flame") mc->particleEngine->add(std::shared_ptr<FlameParticle>( new FlameParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"lava") mc->particleEngine->add(std::shared_ptr<LavaParticle>( new LavaParticle(level[playerIndex], x, y, z) ) ); +else if (name== L"footstep") mc->particleEngine->add(std::shared_ptr<FootstepParticle>( new FootstepParticle(textures, level[playerIndex], x, y, z) ) ); +else if (name== L"splash") mc->particleEngine->add(std::shared_ptr<SplashParticle>( new SplashParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"largesmoke") mc->particleEngine->add(std::shared_ptr<SmokeParticle>( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za, 2.5f) ) ); +else if (name== L"reddust") mc->particleEngine->add(std::shared_ptr<RedDustParticle>( new RedDustParticle(level[playerIndex], x, y, z, (float) xa, (float) ya, (float) za) ) ); +else if (name== L"snowballpoof") mc->particleEngine->add(std::shared_ptr<BreakingItemParticle>( new BreakingItemParticle(level[playerIndex], x, y, z, Item::snowBall) ) ); +else if (name== L"snowshovel") mc->particleEngine->add(std::shared_ptr<SnowShovelParticle>( new SnowShovelParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"slime") mc->particleEngine->add(std::shared_ptr<BreakingItemParticle>( new BreakingItemParticle(level[playerIndex], x, y, z, Item::slimeBall)) ) ; +else if (name== L"heart") mc->particleEngine->add(std::shared_ptr<HeartParticle>( new HeartParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); } */ @@ -2629,7 +2629,7 @@ void LevelRenderer::addParticle(ePARTICLE_TYPE eParticleType, double x, double y addParticleInternal( eParticleType, x, y, z, xa, ya, za ); } -shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za) +std::shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za) { if (mc == NULL || mc->cameraTargetPlayer == NULL || mc->particleEngine == NULL) { @@ -2683,7 +2683,7 @@ shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle bool inRange = false; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { - shared_ptr<Player> thisPlayer = mc->localplayers[i]; + std::shared_ptr<Player> thisPlayer = mc->localplayers[i]; if(thisPlayer != NULL && level[i] == lev) { xd = thisPlayer->x - x; @@ -2706,35 +2706,35 @@ shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle return nullptr; } - shared_ptr<Particle> particle; + std::shared_ptr<Particle> particle; switch(eParticleType) { case eParticleType_hugeexplosion: - particle = shared_ptr<Particle>(new HugeExplosionSeedParticle(lev, x, y, z, xa, ya, za)); + particle = std::shared_ptr<Particle>(new HugeExplosionSeedParticle(lev, x, y, z, xa, ya, za)); break; case eParticleType_largeexplode: - particle = shared_ptr<Particle>(new HugeExplosionParticle(textures, lev, x, y, z, xa, ya, za)); + particle = std::shared_ptr<Particle>(new HugeExplosionParticle(textures, lev, x, y, z, xa, ya, za)); break; case eParticleType_bubble: - particle = shared_ptr<Particle>( new BubbleParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new BubbleParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_suspended: - particle = shared_ptr<Particle>( new SuspendedParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new SuspendedParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_depthsuspend: - particle = shared_ptr<Particle>( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_townaura: - particle = shared_ptr<Particle>( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_crit: { - shared_ptr<CritParticle2> critParticle2 = shared_ptr<CritParticle2>(new CritParticle2(lev, x, y, z, xa, ya, za)); + std::shared_ptr<CritParticle2> critParticle2 = std::shared_ptr<CritParticle2>(new CritParticle2(lev, x, y, z, xa, ya, za)); critParticle2->CritParticle2PostConstructor(); - particle = shared_ptr<Particle>( critParticle2 ); + particle = std::shared_ptr<Particle>( critParticle2 ); // request from 343 to set pink for the needler in the Halo Texture Pack // Set particle colour from colour-table. unsigned int cStart = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Particle_CritStart ); @@ -2758,15 +2758,15 @@ shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle break; case eParticleType_magicCrit: { - shared_ptr<CritParticle2> critParticle2 = shared_ptr<CritParticle2>(new CritParticle2(lev, x, y, z, xa, ya, za)); + std::shared_ptr<CritParticle2> critParticle2 = std::shared_ptr<CritParticle2>(new CritParticle2(lev, x, y, z, xa, ya, za)); critParticle2->CritParticle2PostConstructor(); - particle = shared_ptr<Particle>(critParticle2); + particle = std::shared_ptr<Particle>(critParticle2); particle->setColor(particle->getRedCol() * 0.3f, particle->getGreenCol() * 0.8f, particle->getBlueCol()); particle->setNextMiscAnimTex(); } break; case eParticleType_smoke: - particle = shared_ptr<Particle>( new SmokeParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new SmokeParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_endportal: // 4J - Added. { @@ -2776,94 +2776,94 @@ shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle unsigned int col = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Particle_EnderPortal ); tmp->setColor( ( (col>>16)&0xFF )/255.0f, ( (col>>8)&0xFF )/255.0, ( col&0xFF )/255.0 ); - particle = shared_ptr<Particle>(tmp); + particle = std::shared_ptr<Particle>(tmp); } break; case eParticleType_mobSpell: - particle = shared_ptr<Particle>(new SpellParticle(lev, x, y, z, 0, 0, 0)); + particle = std::shared_ptr<Particle>(new SpellParticle(lev, x, y, z, 0, 0, 0)); particle->setColor((float) xa, (float) ya, (float) za); break; case eParticleType_spell: - particle = shared_ptr<Particle>( new SpellParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new SpellParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_instantSpell: - particle = shared_ptr<Particle>(new SpellParticle(lev, x, y, z, xa, ya, za)); + particle = std::shared_ptr<Particle>(new SpellParticle(lev, x, y, z, xa, ya, za)); dynamic_pointer_cast<SpellParticle>(particle)->setBaseTex(9 * 16); break; case eParticleType_note: - particle = shared_ptr<Particle>( new NoteParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new NoteParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_netherportal: - particle = shared_ptr<Particle>( new NetherPortalParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new NetherPortalParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_ender: - particle = shared_ptr<Particle>( new EnderParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new EnderParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_enchantmenttable: - particle = shared_ptr<Particle>(new EchantmentTableParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>(new EchantmentTableParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_explode: - particle = shared_ptr<Particle>( new ExplodeParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new ExplodeParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_flame: - particle = shared_ptr<Particle>( new FlameParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new FlameParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_lava: - particle = shared_ptr<Particle>( new LavaParticle(lev, x, y, z) ); + particle = std::shared_ptr<Particle>( new LavaParticle(lev, x, y, z) ); break; case eParticleType_footstep: - particle = shared_ptr<Particle>( new FootstepParticle(textures, lev, x, y, z) ); + particle = std::shared_ptr<Particle>( new FootstepParticle(textures, lev, x, y, z) ); break; case eParticleType_splash: - particle = shared_ptr<Particle>( new SplashParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new SplashParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_largesmoke: - particle = shared_ptr<Particle>( new SmokeParticle(lev, x, y, z, xa, ya, za, 2.5f) ); + particle = std::shared_ptr<Particle>( new SmokeParticle(lev, x, y, z, xa, ya, za, 2.5f) ); break; case eParticleType_reddust: - particle = shared_ptr<Particle>( new RedDustParticle(lev, x, y, z, (float) xa, (float) ya, (float) za) ); + particle = std::shared_ptr<Particle>( new RedDustParticle(lev, x, y, z, (float) xa, (float) ya, (float) za) ); break; case eParticleType_snowballpoof: - particle = shared_ptr<Particle>( new BreakingItemParticle(lev, x, y, z, Item::snowBall, textures) ); + particle = std::shared_ptr<Particle>( new BreakingItemParticle(lev, x, y, z, Item::snowBall, textures) ); break; case eParticleType_dripWater: - particle = shared_ptr<Particle>( new DripParticle(lev, x, y, z, Material::water) ); + particle = std::shared_ptr<Particle>( new DripParticle(lev, x, y, z, Material::water) ); break; case eParticleType_dripLava: - particle = shared_ptr<Particle>( new DripParticle(lev, x, y, z, Material::lava) ); + particle = std::shared_ptr<Particle>( new DripParticle(lev, x, y, z, Material::lava) ); break; case eParticleType_snowshovel: - particle = shared_ptr<Particle>( new SnowShovelParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new SnowShovelParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_slime: - particle = shared_ptr<Particle>( new BreakingItemParticle(lev, x, y, z, Item::slimeBall, textures)); + particle = std::shared_ptr<Particle>( new BreakingItemParticle(lev, x, y, z, Item::slimeBall, textures)); break; case eParticleType_heart: - particle = shared_ptr<Particle>( new HeartParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new HeartParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_angryVillager: - particle = shared_ptr<Particle>( new HeartParticle(lev, x, y + 0.5f, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new HeartParticle(lev, x, y + 0.5f, z, xa, ya, za) ); particle->setMiscTex(1 + 16 * 5); particle->setColor(1, 1, 1); break; case eParticleType_happyVillager: - particle = shared_ptr<Particle>( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); particle->setMiscTex(2 + 16 * 5); particle->setColor(1, 1, 1); break; case eParticleType_dragonbreath: - particle = shared_ptr<Particle>( new DragonBreathParticle(lev, x, y, z, xa, ya, za) ); + particle = std::shared_ptr<Particle>( new DragonBreathParticle(lev, x, y, z, xa, ya, za) ); break; default: if( ( eParticleType >= eParticleType_iconcrack_base ) && ( eParticleType <= eParticleType_iconcrack_last ) ) { int id = PARTICLE_CRACK_ID(eParticleType), data = PARTICLE_CRACK_DATA(eParticleType); - particle = shared_ptr<Particle>(new BreakingItemParticle(lev, x, y, z, xa, ya, za, Item::items[id], textures, data)); + particle = std::shared_ptr<Particle>(new BreakingItemParticle(lev, x, y, z, xa, ya, za, Item::items[id], textures, data)); } else if( ( eParticleType >= eParticleType_tilecrack_base ) && ( eParticleType <= eParticleType_tilecrack_last ) ) { int id = PARTICLE_CRACK_ID(eParticleType), data = PARTICLE_CRACK_DATA(eParticleType); - particle = dynamic_pointer_cast<Particle>( shared_ptr<TerrainParticle>(new TerrainParticle(lev, x, y, z, xa, ya, za, Tile::tiles[id], 0, data, textures))->init(data) ); + particle = dynamic_pointer_cast<Particle>( std::shared_ptr<TerrainParticle>(new TerrainParticle(lev, x, y, z, xa, ya, za, Tile::tiles[id], 0, data, textures))->init(data) ); } } @@ -2875,7 +2875,7 @@ shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle return particle; } -void LevelRenderer::entityAdded(shared_ptr<Entity> entity) +void LevelRenderer::entityAdded(std::shared_ptr<Entity> entity) { entity->prepareCustomTextures(); // 4J - these empty string comparisons used to check for NULL references, but we don't have string pointers (currently) in entities, @@ -2899,7 +2899,7 @@ void LevelRenderer::entityAdded(shared_ptr<Entity> entity) } -void LevelRenderer::entityRemoved(shared_ptr<Entity> entity) +void LevelRenderer::entityRemoved(std::shared_ptr<Entity> entity) { /* 4J - removed temp if (entity->customTextureUrl != L"") textures->removeHttpTexture(entity->customTextureUrl); @@ -2936,7 +2936,7 @@ void LevelRenderer::clear() MemoryTracker::releaseLists(chunkLists); } -void LevelRenderer::levelEvent(shared_ptr<Player> source, int type, int x, int y, int z, int data) +void LevelRenderer::levelEvent(std::shared_ptr<Player> source, int type, int x, int y, int z, int data) { int playerIndex = mc->player->GetXboxPad(); // 4J added Random *random = level[playerIndex]->random; @@ -3048,7 +3048,7 @@ void LevelRenderer::levelEvent(shared_ptr<Player> source, int type, int x, int y double ys = 0.01 + random->nextDouble() * 0.5; double zs = sin(angle) * dist; - shared_ptr<Particle> spellParticle = addParticleInternal(particleName, xp + xs * 0.1, yp + 0.3, zp + zs * 0.1, xs, ys, zs); + std::shared_ptr<Particle> spellParticle = addParticleInternal(particleName, xp + xs * 0.1, yp + 0.3, zp + zs * 0.1, xs, ys, zs); if (spellParticle != NULL) { float randBrightness = 0.75f + random->nextFloat() * 0.25f; @@ -3075,7 +3075,7 @@ void LevelRenderer::levelEvent(shared_ptr<Player> source, int type, int x, int y double ys = 0.01 + random->nextDouble() * 0.5; double zs = sin(angle) * dist; - shared_ptr<Particle> acidParticle = addParticleInternal(particleName, xp + xs * 0.1, yp + 0.3, zp + zs * 0.1, xs, ys, zs); + std::shared_ptr<Particle> acidParticle = addParticleInternal(particleName, xp + xs * 0.1, yp + 0.3, zp + zs * 0.1, xs, ys, zs); if (acidParticle != NULL) { float randBrightness = 0.75f + random->nextFloat() * 0.25f; diff --git a/Minecraft.Client/LevelRenderer.h b/Minecraft.Client/LevelRenderer.h index b2bd5eb2..7db67d08 100644 --- a/Minecraft.Client/LevelRenderer.h +++ b/Minecraft.Client/LevelRenderer.h @@ -71,7 +71,7 @@ public: private: void resortChunks(int xc, int yc, int zc); public: - int render(shared_ptr<Mob> player, int layer, double alpha, bool updateChunks); + int render(std::shared_ptr<Mob> player, int layer, double alpha, bool updateChunks); private: int renderChunks(int from, int to, int layer, double alpha); public: @@ -87,9 +87,9 @@ public: bool updateDirtyChunks(); public: - void renderHit(shared_ptr<Player> player, HitResult *h, int mode, shared_ptr<ItemInstance> inventoryItem, float a); - void renderDestroyAnimation(Tesselator *t, shared_ptr<Player> player, float a); - void renderHitOutline(shared_ptr<Player> player, HitResult *h, int mode, shared_ptr<ItemInstance> inventoryItem, float a); + void renderHit(std::shared_ptr<Player> player, HitResult *h, int mode, std::shared_ptr<ItemInstance> inventoryItem, float a); + void renderDestroyAnimation(Tesselator *t, std::shared_ptr<Player> player, float a); + void renderHitOutline(std::shared_ptr<Player> player, HitResult *h, int mode, std::shared_ptr<ItemInstance> inventoryItem, float a); void render(AABB *b); void setDirty(int x0, int y0, int z0, int x1, int y1, int z1, Level *level); // 4J - added level param void tileChanged(int x, int y, int z); @@ -106,26 +106,26 @@ public: void cull(Culler *culler, float a); void playStreamingMusic(const wstring& name, int x, int y, int z); void playSound(int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); - void playSound(shared_ptr<Entity> entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); + void playSound(std::shared_ptr<Entity> entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); void addParticle(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added - shared_ptr<Particle> addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added - void entityAdded(shared_ptr<Entity> entity); - void entityRemoved(shared_ptr<Entity> entity); - void playerRemoved(shared_ptr<Entity> entity) {} // 4J added - for when a player is removed from the level's player array, not just the entity storage + std::shared_ptr<Particle> addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added + void entityAdded(std::shared_ptr<Entity> entity); + void entityRemoved(std::shared_ptr<Entity> entity); + void playerRemoved(std::shared_ptr<Entity> entity) {} // 4J added - for when a player is removed from the level's player array, not just the entity storage void skyColorChanged(); void clear(); - void levelEvent(shared_ptr<Player> source, int type, int x, int y, int z, int data); + void levelEvent(std::shared_ptr<Player> source, int type, int x, int y, int z, int data); void destroyTileProgress(int id, int x, int y, int z, int progress); void registerTextures(IconRegister *iconRegister); - typedef unordered_map<int, vector<shared_ptr<TileEntity> >, IntKeyHash, IntKeyEq> rteMap; + typedef unordered_map<int, vector<std::shared_ptr<TileEntity> >, IntKeyHash, IntKeyEq> rteMap; private: // debug int m_freezeticks; // used to freeze the clouds // 4J - this block of declarations was scattered round the code but have gathered everything into one place - rteMap renderableTileEntities; // 4J - changed - was vector<shared_ptr<TileEntity>, now hashed by chunk so we can find them + rteMap renderableTileEntities; // 4J - changed - was vector<std::shared_ptr<TileEntity>, now hashed by chunk so we can find them CRITICAL_SECTION m_csRenderableTileEntities; MultiPlayerLevel *level[4]; // 4J - now one per player Textures *textures; diff --git a/Minecraft.Client/LightningBoltRenderer.cpp b/Minecraft.Client/LightningBoltRenderer.cpp index d02ea7f7..9bf7af05 100644 --- a/Minecraft.Client/LightningBoltRenderer.cpp +++ b/Minecraft.Client/LightningBoltRenderer.cpp @@ -3,10 +3,10 @@ #include "Tesselator.h" #include "..\Minecraft.World\net.minecraft.world.entity.global.h" -void LightningBoltRenderer::render(shared_ptr<Entity> _bolt, double x, double y, double z, float rot, float a) +void LightningBoltRenderer::render(std::shared_ptr<Entity> _bolt, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<LightningBolt> bolt = dynamic_pointer_cast<LightningBolt>(_bolt); + std::shared_ptr<LightningBolt> bolt = dynamic_pointer_cast<LightningBolt>(_bolt); Tesselator *t = Tesselator::getInstance(); diff --git a/Minecraft.Client/LightningBoltRenderer.h b/Minecraft.Client/LightningBoltRenderer.h index 5a2b33a3..bf5c7c82 100644 --- a/Minecraft.Client/LightningBoltRenderer.h +++ b/Minecraft.Client/LightningBoltRenderer.h @@ -4,5 +4,5 @@ class LightningBoltRenderer : public EntityRenderer { public: - virtual void render(shared_ptr<Entity> bolt, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> bolt, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/LocalPlayer.cpp b/Minecraft.Client/LocalPlayer.cpp index ed286cd9..64fddbf1 100644 --- a/Minecraft.Client/LocalPlayer.cpp +++ b/Minecraft.Client/LocalPlayer.cpp @@ -165,7 +165,7 @@ void LocalPlayer::calculateFlight(float xa, float ya, float za) void LocalPlayer::serverAiStep() { Player::serverAiStep(); - + if( abilities.flying && abilities.mayfly ) { // snap y rotation for flying to nearest 90 degrees in world space @@ -183,7 +183,7 @@ void LocalPlayer::serverAiStep() float yRotDiff = yRotSnapped - yRotFinal; // Apply the same difference to the player rotated space angle float yRotInputAdjust = yRotInput + yRotDiff; - + // Calculate final x/y player-space movement required this->xxa = cos(yRotInputAdjust * ( PI / 180.0f) ) * fMag; this->yya = sin(yRotInputAdjust * ( PI / 180.0f) ) * fMag; @@ -355,7 +355,7 @@ void LocalPlayer::aiStep() if (isSprinting() && (!forwardEnoughToContinueSprint || !enoughFoodToSprint || isSneaking() || isUsingItem())) { setSprinting(false); - } + } // 4J Stu - Fix for #52705 - Customer Encountered: Player can fly in bed while being in Creative mode. if (!isSleeping() && (abilities.mayfly || isAllowedToFly() )) @@ -396,7 +396,7 @@ void LocalPlayer::aiStep() abilities.flying = false; } } - + if (abilities.flying) { @@ -515,7 +515,7 @@ void LocalPlayer::aiStep() else { ProfileManager.SetCurrentGameActivity(m_iPad,CONTEXT_PRESENCE_MULTIPLAYER,false); - } + } } else { @@ -605,14 +605,14 @@ void LocalPlayer::closeContainer() ui.CloseUIScenes( m_iPad ); } -void LocalPlayer::openTextEdit(shared_ptr<SignTileEntity> sign) +void LocalPlayer::openTextEdit(std::shared_ptr<SignTileEntity> sign) { bool success = app.LoadSignEntryMenu(GetXboxPad(), sign ); if( success ) ui.PlayUISFX(eSFX_Press); //minecraft->setScreen(new TextEditScreen(sign)); } -bool LocalPlayer::openContainer(shared_ptr<Container> container) +bool LocalPlayer::openContainer(std::shared_ptr<Container> container) { bool success = app.LoadContainerMenu(GetXboxPad(), inventory, container ); if( success ) ui.PlayUISFX(eSFX_Press); @@ -645,7 +645,7 @@ bool LocalPlayer::startRepairing(int x, int y, int z) return success; } -bool LocalPlayer::openFurnace(shared_ptr<FurnaceTileEntity> furnace) +bool LocalPlayer::openFurnace(std::shared_ptr<FurnaceTileEntity> furnace) { bool success = app.LoadFurnaceMenu(GetXboxPad(),inventory, furnace); if( success ) ui.PlayUISFX(eSFX_Press); @@ -653,7 +653,7 @@ bool LocalPlayer::openFurnace(shared_ptr<FurnaceTileEntity> furnace) return success; } -bool LocalPlayer::openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingStand) +bool LocalPlayer::openBrewingStand(std::shared_ptr<BrewingStandTileEntity> brewingStand) { bool success = app.LoadBrewingStandMenu(GetXboxPad(),inventory, brewingStand); if( success ) ui.PlayUISFX(eSFX_Press); @@ -661,7 +661,7 @@ bool LocalPlayer::openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingSta return success; } -bool LocalPlayer::openTrap(shared_ptr<DispenserTileEntity> trap) +bool LocalPlayer::openTrap(std::shared_ptr<DispenserTileEntity> trap) { bool success = app.LoadTrapMenu(GetXboxPad(),inventory, trap); if( success ) ui.PlayUISFX(eSFX_Press); @@ -669,7 +669,7 @@ bool LocalPlayer::openTrap(shared_ptr<DispenserTileEntity> trap) return success; } -bool LocalPlayer::openTrading(shared_ptr<Merchant> traderTarget) +bool LocalPlayer::openTrading(std::shared_ptr<Merchant> traderTarget) { bool success = app.LoadTradingMenu(GetXboxPad(),inventory, traderTarget, level); if( success ) ui.PlayUISFX(eSFX_Press); @@ -677,23 +677,23 @@ bool LocalPlayer::openTrading(shared_ptr<Merchant> traderTarget) return success; } -void LocalPlayer::crit(shared_ptr<Entity> e) +void LocalPlayer::crit(std::shared_ptr<Entity> e) { - shared_ptr<CritParticle> critParticle = shared_ptr<CritParticle>( new CritParticle((Level *)minecraft->level, e) ); + std::shared_ptr<CritParticle> critParticle = std::shared_ptr<CritParticle>( new CritParticle((Level *)minecraft->level, e) ); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add(critParticle); } -void LocalPlayer::magicCrit(shared_ptr<Entity> e) +void LocalPlayer::magicCrit(std::shared_ptr<Entity> e) { - shared_ptr<CritParticle> critParticle = shared_ptr<CritParticle>( new CritParticle((Level *)minecraft->level, e, eParticleType_magicCrit) ); + std::shared_ptr<CritParticle> critParticle = std::shared_ptr<CritParticle>( new CritParticle((Level *)minecraft->level, e, eParticleType_magicCrit) ); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add(critParticle); } -void LocalPlayer::take(shared_ptr<Entity> e, int orgCount) +void LocalPlayer::take(std::shared_ptr<Entity> e, int orgCount) { - minecraft->particleEngine->add( shared_ptr<TakeAnimationParticle>( new TakeAnimationParticle((Level *)minecraft->level, e, shared_from_this(), -0.5f) ) ); + minecraft->particleEngine->add( std::shared_ptr<TakeAnimationParticle>( new TakeAnimationParticle((Level *)minecraft->level, e, shared_from_this(), -0.5f) ) ); } void LocalPlayer::chat(const wstring& message) @@ -761,7 +761,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) { #ifdef _DURANGO // 4J-JEV: Maybe we want to fine tune this later? #TODO - if ( !ProfileManager.IsGuest(GetXboxPad()) + if ( !ProfileManager.IsGuest(GetXboxPad()) && app.CanRecordStatsAndAchievements() && ProfileManager.IsFullVersion() ) @@ -840,7 +840,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) toolStats[0][2] = GenericStats::itemsCrafted(Item::shovel_iron->id); toolStats[0][3] = GenericStats::itemsCrafted(Item::shovel_diamond->id); toolStats[0][4] = GenericStats::itemsCrafted(Item::shovel_gold->id); - toolStats[1][0] = GenericStats::itemsCrafted(Item::pickAxe_wood->id); + toolStats[1][0] = GenericStats::itemsCrafted(Item::pickAxe_wood->id); toolStats[1][1] = GenericStats::itemsCrafted(Item::pickAxe_stone->id); toolStats[1][2] = GenericStats::itemsCrafted(Item::pickAxe_iron->id); toolStats[1][3] = GenericStats::itemsCrafted(Item::pickAxe_diamond->id); @@ -855,7 +855,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) toolStats[3][2] = GenericStats::itemsCrafted(Item::hoe_iron->id); toolStats[3][3] = GenericStats::itemsCrafted(Item::hoe_diamond->id); toolStats[3][4] = GenericStats::itemsCrafted(Item::hoe_gold->id); - + bool justCraftedTool = false; for (int i=0; i<4; i++) { @@ -893,7 +893,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) awardStat(GenericStats::MOARTools(), GenericStats::param_noArgs()); } } - + } #ifdef _XBOX @@ -977,7 +977,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) numEmeraldMined = pStats->getTotalValue(emeraldMined); numEmeraldBought = pStats->getTotalValue(emeraldBought); totalSum = numEmeraldMined + numEmeraldBought; - + app.DebugPrintf( "[AwardStat] Check unlock 'The Haggler': " "emerald_mined=%i, emerald_bought=%i, sum=%i.\n", @@ -1033,7 +1033,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) // AWARD : Rainbow Collection, collect all different colours of wool. { bool justPickedupWool = false; - + for (int i=0; i<16; i++) if ( stat == GenericStats::itemsCollected(Tile::cloth_Id, i) ) justPickedupWool = true; @@ -1041,7 +1041,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) if (justPickedupWool) { unsigned int woolCount = 0; - + for (unsigned int i = 0; i < 16; i++) { if (pStats->getTotalValue(GenericStats::itemsCollected(Tile::cloth_Id, i)) > 0) @@ -1152,7 +1152,7 @@ bool LocalPlayer::hasPermission(EGameCommand command) return level->getLevelData()->getAllowCommands(); } -void LocalPlayer::onCrafted(shared_ptr<ItemInstance> item) +void LocalPlayer::onCrafted(std::shared_ptr<ItemInstance> item) { if( minecraft->localgameModes[m_iPad] != NULL ) { @@ -1195,7 +1195,7 @@ void LocalPlayer::mapPlayerChunk(const unsigned int flagTileType) cout << "O"; else for (unsigned int y = 127; y > 0; y--) { - int t = cc->getTile(x,y,z); + int t = cc->getTile(x,y,z); if (flagTileType != 0 && t == flagTileType) { cout << "@"; break; } else if (t != 0 && t < 10) { cout << t; break; } else if (t > 0) { cout << "#"; break; } @@ -1229,7 +1229,7 @@ void LocalPlayer::handleMouseDown(int button, bool down) if( ( ( y == 0 ) || ( ( y == 127 ) && level->dimension->hasCeiling ) ) && level->dimension->id != 1 ) return; minecraft->gameMode->continueDestroyBlock(x, y, z, minecraft->hitResult->f); - + if(mayBuild(x,y,z)) { minecraft->particleEngine->crack(x, y, z, minecraft->hitResult->f); @@ -1267,7 +1267,7 @@ bool LocalPlayer::creativeModeHandleMouseClick(int button, bool buttonPressed) } // Get distance from last click point in each axis - float dX = (float)x - lastClickX; + float dX = (float)x - lastClickX; float dY = (float)y - lastClickY; float dZ = (float)z - lastClickZ; bool newClick = false; @@ -1415,13 +1415,13 @@ bool LocalPlayer::handleMouseClick(int button) bool returnItemPlaced = false; if (button == 0 && missTime > 0) return false; - if (button == 0) + if (button == 0) { //app.DebugPrintf("handleMouseClick - Player %d is swinging\n",GetXboxPad()); swing(); } - bool mayUse = true; + bool mayUse = true; // 4J-PB - Adding a special case in here for sleeping in a bed in a multiplayer game - we need to wake up, and we don't have the inbedchatscreen with a button @@ -1430,10 +1430,10 @@ bool LocalPlayer::handleMouseClick(int button) if(lastClickState == lastClick_oldRepeat) return false; - shared_ptr<MultiplayerLocalPlayer> mplp = dynamic_pointer_cast<MultiplayerLocalPlayer>( shared_from_this() ); + std::shared_ptr<MultiplayerLocalPlayer> mplp = dynamic_pointer_cast<MultiplayerLocalPlayer>( shared_from_this() ); if(mplp && mplp->connection) mplp->StopSleeping(); - + } // 4J Stu - We should not accept any input while asleep, except the above to wake up if(isSleeping() && level != NULL && level->isClientSide) @@ -1441,7 +1441,7 @@ bool LocalPlayer::handleMouseClick(int button) return false; } - shared_ptr<ItemInstance> oldItem = inventory->getSelected(); + std::shared_ptr<ItemInstance> oldItem = inventory->getSelected(); if (minecraft->hitResult == NULL) { @@ -1455,15 +1455,15 @@ bool LocalPlayer::handleMouseClick(int button) } if (button == 1) { - // 4J-PB - if we milk a cow here, and end up with a bucket of milk, the if (mayUse && button == 1) further down will + // 4J-PB - if we milk a cow here, and end up with a bucket of milk, the if (mayUse && button == 1) further down will // then empty our bucket if we're pointing at a tile - // It looks like interact really should be returning a result so we can check this, but it's possibly just the + // It looks like interact really should be returning a result so we can check this, but it's possibly just the // milk bucket that causes a problem if(minecraft->hitResult->entity->GetType()==eTYPE_COW) { // If I have an empty bucket in my hand, it's going to be filled with milk, so turn off mayUse - shared_ptr<ItemInstance> item = inventory->getSelected(); + std::shared_ptr<ItemInstance> item = inventory->getSelected(); if(item && (item->id==Item::bucket_empty_Id)) { mayUse=false; @@ -1493,7 +1493,7 @@ bool LocalPlayer::handleMouseClick(int button) } else { - shared_ptr<ItemInstance> item = oldItem; + std::shared_ptr<ItemInstance> item = oldItem; int oldCount = item != NULL ? item->count : 0; bool usedItem = false; if (minecraft->gameMode->useItemOn(minecraft->localplayers[GetXboxPad()], level, item, x, y, z, face, minecraft->hitResult->pos, false, &usedItem)) @@ -1525,7 +1525,7 @@ bool LocalPlayer::handleMouseClick(int button) if (mayUse && button == 1) { - shared_ptr<ItemInstance> item = inventory->getSelected(); + std::shared_ptr<ItemInstance> item = inventory->getSelected(); if (item != NULL) { if (minecraft->gameMode->useItem(minecraft->localplayers[GetXboxPad()], level, item)) @@ -1541,7 +1541,7 @@ void LocalPlayer::updateRichPresence() { if((m_iPad!=-1)/* && !ui.GetMenuDisplayed(m_iPad)*/ ) { - shared_ptr<ItemInstance> selectedItem = inventory->getSelected(); + std::shared_ptr<ItemInstance> selectedItem = inventory->getSelected(); if(selectedItem != NULL && selectedItem->id == Item::fishingRod_Id) { app.SetRichPresenceContext(m_iPad,CONTEXT_GAME_STATE_FISHING); @@ -1549,7 +1549,7 @@ void LocalPlayer::updateRichPresence() else if(selectedItem != NULL && selectedItem->id == Item::map_Id) { app.SetRichPresenceContext(m_iPad,CONTEXT_GAME_STATE_MAP); - } + } else if(riding != NULL && dynamic_pointer_cast<Minecart>(riding) != NULL) { app.SetRichPresenceContext(m_iPad,CONTEXT_GAME_STATE_RIDING_MINECART); @@ -1597,7 +1597,7 @@ float LocalPlayer::getAndResetChangeDimensionTimer() return returnVal; } -void LocalPlayer::handleCollectItem(shared_ptr<ItemInstance> item) +void LocalPlayer::handleCollectItem(std::shared_ptr<ItemInstance> item) { if(item != NULL) { diff --git a/Minecraft.Client/LocalPlayer.h b/Minecraft.Client/LocalPlayer.h index 865af154..e4c0142c 100644 --- a/Minecraft.Client/LocalPlayer.h +++ b/Minecraft.Client/LocalPlayer.h @@ -99,18 +99,18 @@ public: virtual void addAdditonalSaveData(CompoundTag *entityTag); virtual void readAdditionalSaveData(CompoundTag *entityTag); virtual void closeContainer(); - virtual void openTextEdit(shared_ptr<SignTileEntity> sign); - virtual bool openContainer(shared_ptr<Container> container); // 4J added bool return + virtual void openTextEdit(std::shared_ptr<SignTileEntity> sign); + virtual bool openContainer(std::shared_ptr<Container> container); // 4J added bool return virtual bool startCrafting(int x, int y, int z); // 4J added bool return virtual bool startEnchanting(int x, int y, int z); // 4J added bool return virtual bool startRepairing(int x, int y, int z); - virtual bool openFurnace(shared_ptr<FurnaceTileEntity> furnace); // 4J added bool return - virtual bool openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingStand); // 4J added bool return - virtual bool openTrap(shared_ptr<DispenserTileEntity> trap); // 4J added bool return - virtual bool openTrading(shared_ptr<Merchant> traderTarget); - virtual void crit(shared_ptr<Entity> e); - virtual void magicCrit(shared_ptr<Entity> e); - virtual void take(shared_ptr<Entity> e, int orgCount); + virtual bool openFurnace(std::shared_ptr<FurnaceTileEntity> furnace); // 4J added bool return + virtual bool openBrewingStand(std::shared_ptr<BrewingStandTileEntity> brewingStand); // 4J added bool return + virtual bool openTrap(std::shared_ptr<DispenserTileEntity> trap); // 4J added bool return + virtual bool openTrading(std::shared_ptr<Merchant> traderTarget); + virtual void crit(std::shared_ptr<Entity> e); + virtual void magicCrit(std::shared_ptr<Entity> e); + virtual void take(std::shared_ptr<Entity> e, int orgCount); virtual void chat(const wstring& message); virtual bool isSneaking(); //virtual bool isIdle(); @@ -159,7 +159,7 @@ public: int lastClickState; // 4J Stu - Added to allow callback to tutorial to stay within Minecraft.Client - virtual void onCrafted(shared_ptr<ItemInstance> item); + virtual void onCrafted(std::shared_ptr<ItemInstance> item); virtual void setAndBroadcastCustomSkin(DWORD skinId); virtual void setAndBroadcastCustomCape(DWORD capeId); @@ -189,7 +189,7 @@ public: float getAndResetChangeDimensionTimer(); - virtual void handleCollectItem(shared_ptr<ItemInstance> item); + virtual void handleCollectItem(std::shared_ptr<ItemInstance> item); void SetPlayerAdditionalModelParts(vector<ModelPart *>pAdditionalModelParts); private: diff --git a/Minecraft.Client/MinecartModel.cpp b/Minecraft.Client/MinecartModel.cpp index 8a1ce0d7..d4ff04c0 100644 --- a/Minecraft.Client/MinecartModel.cpp +++ b/Minecraft.Client/MinecartModel.cpp @@ -18,22 +18,22 @@ MinecartModel::MinecartModel() : Model() cubes[0]->addBox((float)(-w / 2), (float)(-h / 2), -1, w, h, 2, 0); cubes[0]->setPos(0, (float)(0 + yOff), 0); - + cubes[5]->addBox((float)(-w / 2 + 1), (float)(-h / 2 + 1), -1, w - 2, h - 2, 1, 0); cubes[5]->setPos(0, (float)(0 + yOff), 0); - + cubes[1]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[1]->setPos((float)(-w / 2 + 1), (float)(0 + yOff), 0); - + cubes[2]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[2]->setPos((float)(+w / 2 - 1), (float)(0 + yOff), 0); - + cubes[3]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[3]->setPos(0, (float)(0 + yOff), (float)(-h / 2 + 1)); - + cubes[4]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[4]->setPos(0, (float)(0 + yOff), (float)(+h / 2 - 1)); - + cubes[0]->xRot = PI / 2; cubes[1]->yRot = PI / 2 * 3; cubes[2]->yRot = PI / 2 * 1; @@ -47,7 +47,7 @@ MinecartModel::MinecartModel() : Model() } } -void MinecartModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void MinecartModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { cubes[5]->y = 4 - bob; for (int i = 0; i < MINECART_LENGTH; i++) diff --git a/Minecraft.Client/MinecartModel.h b/Minecraft.Client/MinecartModel.h index de925566..2cf6d0ef 100644 --- a/Minecraft.Client/MinecartModel.h +++ b/Minecraft.Client/MinecartModel.h @@ -9,5 +9,5 @@ public: ModelPart *cubes[MINECART_LENGTH]; MinecartModel(); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; diff --git a/Minecraft.Client/MinecartRenderer.cpp b/Minecraft.Client/MinecartRenderer.cpp index 1fa4a1d9..cd274992 100644 --- a/Minecraft.Client/MinecartRenderer.cpp +++ b/Minecraft.Client/MinecartRenderer.cpp @@ -10,10 +10,10 @@ MinecartRenderer::MinecartRenderer() model = new MinecartModel(); } -void MinecartRenderer::render(shared_ptr<Entity> _cart, double x, double y, double z, float rot, float a) +void MinecartRenderer::render(std::shared_ptr<Entity> _cart, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Minecart> cart = dynamic_pointer_cast<Minecart>(_cart); + std::shared_ptr<Minecart> cart = dynamic_pointer_cast<Minecart>(_cart); glPushMatrix(); diff --git a/Minecraft.Client/MinecartRenderer.h b/Minecraft.Client/MinecartRenderer.h index 0335ba8d..6902a3bf 100644 --- a/Minecraft.Client/MinecartRenderer.h +++ b/Minecraft.Client/MinecartRenderer.h @@ -8,5 +8,5 @@ protected: public: MinecartRenderer(); - void render(shared_ptr<Entity> _cart, double x, double y, double z, float rot, float a); + void render(std::shared_ptr<Entity> _cart, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index aef61677..315eb52b 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -977,7 +977,7 @@ bool Minecraft::addLocalPlayer(int idx) if(success) { app.DebugPrintf("Adding temp local player on pad %d\n", idx); - localplayers[idx] = shared_ptr<MultiplayerLocalPlayer>( new MultiplayerLocalPlayer(this, level, user, NULL ) ); + localplayers[idx] = std::shared_ptr<MultiplayerLocalPlayer>( new MultiplayerLocalPlayer(this, level, user, NULL ) ); localgameModes[idx] = NULL; updatePlayerViewportAssignments(); @@ -1025,7 +1025,7 @@ void Minecraft::addPendingLocalConnection(int idx, ClientConnection *connection) m_pendingLocalConnections[idx] = connection; } -shared_ptr<MultiplayerLocalPlayer> Minecraft::createExtraLocalPlayer(int idx, const wstring& name, int iPad, int iDimension, ClientConnection *clientConnection /*= NULL*/,MultiPlayerLevel *levelpassedin) +std::shared_ptr<MultiplayerLocalPlayer> Minecraft::createExtraLocalPlayer(int idx, const wstring& name, int iPad, int iDimension, ClientConnection *clientConnection /*= NULL*/,MultiPlayerLevel *levelpassedin) { if( clientConnection == NULL) return nullptr; @@ -1141,7 +1141,7 @@ void Minecraft::removeLocalPlayerIdx(int idx) { if( getLevel( localplayers[idx]->dimension )->isClientSide ) { - shared_ptr<MultiplayerLocalPlayer> mplp = localplayers[idx]; + std::shared_ptr<MultiplayerLocalPlayer> mplp = localplayers[idx]; ( (MultiPlayerLevel *)getLevel( localplayers[idx]->dimension ) )->removeClientConnection(mplp->connection, true); delete mplp->connection; mplp->connection = NULL; @@ -1163,7 +1163,7 @@ void Minecraft::removeLocalPlayerIdx(int idx) } else if( m_pendingLocalConnections[idx] != NULL ) { - m_pendingLocalConnections[idx]->sendAndDisconnect( shared_ptr<DisconnectPacket>( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) );; + m_pendingLocalConnections[idx]->sendAndDisconnect( std::shared_ptr<DisconnectPacket>( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) );; delete m_pendingLocalConnections[idx]; m_pendingLocalConnections[idx] = NULL; g_NetworkManager.RemoveLocalPlayerByUserIndex(idx); @@ -1676,7 +1676,7 @@ void Minecraft::run_middle() else { // create the localplayer - shared_ptr<Player> player = localplayers[i]; + std::shared_ptr<Player> player = localplayers[i]; if( player == NULL) { player = createExtraLocalPlayer(i, (convStringToWstring( ProfileManager.GetGamertag(i) )).c_str(), i, level->dimension->id); @@ -1892,7 +1892,7 @@ void Minecraft::run_middle() // if (pause) timer.a = 1; PIXBeginNamedEvent(0,"Sound engine update"); - soundEngine->tick((shared_ptr<Mob> *)localplayers, timer->a); + soundEngine->tick((std::shared_ptr<Mob> *)localplayers, timer->a); PIXEndNamedEvent(); PIXBeginNamedEvent(0,"Light update"); @@ -2427,7 +2427,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) else { // no hit result, but we may have something in our hand that we can do something with - shared_ptr<ItemInstance> itemInstance = player->inventory->getSelected(); + std::shared_ptr<ItemInstance> itemInstance = player->inventory->getSelected(); // 4J-JEV: Moved all this here to avoid having it in 3 different places. if (itemInstance) @@ -2798,14 +2798,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) // is there an object in hand? if(player->inventory->IsHeldItem()) { - shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); + std::shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; switch(iID) { default: { - shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); + std::shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -2822,7 +2822,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) // is there an object in hand? if(player->inventory->IsHeldItem()) { - shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); + std::shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; // It's an item @@ -2834,7 +2834,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; default: { - shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); + std::shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -2851,7 +2851,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { if(player->isAllowedToAttackAnimals()) *piAction=IDS_TOOLTIPS_HIT; - shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); + std::shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; // It's an item @@ -2865,13 +2865,13 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) case Item::shears_Id: { if(player->isAllowedToAttackAnimals()) *piAction=IDS_TOOLTIPS_HIT; - shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); + std::shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); if(!animal->isBaby()) *piUse=IDS_TOOLTIPS_SHEAR; } break; default: { - shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); + std::shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -2924,7 +2924,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) // is there an object in hand? if(player->inventory->IsHeldItem()) { - shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); + std::shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; if(iID==Item::coal->id) @@ -2946,14 +2946,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if(player->isAllowedToAttackAnimals()) *piAction=IDS_TOOLTIPS_HIT; if(player->inventory->IsHeldItem()) { - shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); + std::shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; switch(iID) { case Item::dye_powder_Id: { - shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(hitResult->entity); + std::shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(hitResult->entity); // convert to tile-based color value (0 is white instead of black) int newColor = ClothTile::getTileDataForItemAuxValue(heldItem->getAuxValue()); @@ -2966,7 +2966,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; case Item::shears_Id: { - shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(hitResult->entity); + std::shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(hitResult->entity); // can only shear a sheep that hasn't been sheared if(!sheep->isSheared() ) @@ -2978,7 +2978,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; default: { - shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); + std::shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -3008,7 +3008,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { if(player->inventory->IsHeldItem()) { - shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); + std::shared_ptr<ItemInstance> heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; switch(iID) @@ -3018,7 +3018,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; default: { - shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); + std::shared_ptr<Animal> animal = dynamic_pointer_cast<Animal>(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -3036,8 +3036,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) // can be tamed, fed, and made to sit/stand, or enter love mode { int iID=-1; - shared_ptr<ItemInstance> heldItem=nullptr; - shared_ptr<Wolf> wolf = dynamic_pointer_cast<Wolf>(hitResult->entity); + std::shared_ptr<ItemInstance> heldItem=nullptr; + std::shared_ptr<Wolf> wolf = dynamic_pointer_cast<Wolf>(hitResult->entity); if(player->inventory->IsHeldItem()) { @@ -3126,8 +3126,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) case eTYPE_OZELOT: { int iID=-1; - shared_ptr<ItemInstance> heldItem=nullptr; - shared_ptr<Ozelot> ocelot = dynamic_pointer_cast<Ozelot>(hitResult->entity); + std::shared_ptr<ItemInstance> heldItem=nullptr; + std::shared_ptr<Ozelot> ocelot = dynamic_pointer_cast<Ozelot>(hitResult->entity); if(player->inventory->IsHeldItem()) { @@ -3188,7 +3188,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) case eTYPE_PLAYER: { // Fix for #58576 - TU6: Content: Gameplay: Hit button prompt is available when attacking a host who has "Invisible" option turned on - shared_ptr<Player> TargetPlayer = dynamic_pointer_cast<Player>(hitResult->entity); + std::shared_ptr<Player> TargetPlayer = dynamic_pointer_cast<Player>(hitResult->entity); if(!TargetPlayer->hasInvisiblePrivilege()) // This means they are invisible, not just that they have the privilege { @@ -3201,7 +3201,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; case eTYPE_ITEM_FRAME: { - shared_ptr<ItemFrame> itemFrame = dynamic_pointer_cast<ItemFrame>(hitResult->entity); + std::shared_ptr<ItemFrame> itemFrame = dynamic_pointer_cast<ItemFrame>(hitResult->entity); // is the frame occupied? if(itemFrame->getItem()!=NULL) @@ -3223,7 +3223,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; case eTYPE_VILLAGER: { - shared_ptr<Villager> villager = dynamic_pointer_cast<Villager>(hitResult->entity); + std::shared_ptr<Villager> villager = dynamic_pointer_cast<Villager>(hitResult->entity); if (!villager->isBaby()) { *piUse=IDS_TOOLTIPS_TRADE; @@ -3233,8 +3233,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; case eTYPE_ZOMBIE: { - shared_ptr<Zombie> zomb = dynamic_pointer_cast<Zombie>(hitResult->entity); - shared_ptr<ItemInstance> heldItem=nullptr; + std::shared_ptr<Zombie> zomb = dynamic_pointer_cast<Zombie>(hitResult->entity); + std::shared_ptr<ItemInstance> heldItem=nullptr; if(player->inventory->IsHeldItem()) { @@ -3470,9 +3470,9 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if((player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_SPAWN_CREEPER)) && app.GetMobsDontAttackEnabled()) { - //shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(Creeper::_class->newInstance( level )); - //shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(Wolf::_class->newInstance( level )); - shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(shared_ptr<Spider>(new Spider( level ))); + //std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(Creeper::_class->newInstance( level )); + //std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(Wolf::_class->newInstance( level )); + std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(std::shared_ptr<Spider>(new Spider( level ))); mob->moveTo(player->x+1, player->y, player->z+1, level->random->nextFloat() * 360, 0); level->addEntity(mob); } @@ -3502,14 +3502,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if((player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_INVENTORY)) && gameMode->isInputAllowed(MINECRAFT_ACTION_INVENTORY)) { - shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>( Minecraft::GetInstance()->player ); + std::shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>( Minecraft::GetInstance()->player ); ui.PlayUISFX(eSFX_Press); app.LoadInventoryMenu(iPad,player); } if((player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_CRAFTING)) && gameMode->isInputAllowed(MINECRAFT_ACTION_CRAFTING)) { - shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>( Minecraft::GetInstance()->player ); + std::shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>( Minecraft::GetInstance()->player ); // 4J-PB - reordered the if statement so creative mode doesn't bring up the crafting table // Fix for #39014 - TU5: Creative Mode: Pressing X to access the creative menu while looking at a crafting table causes the crafting menu to display @@ -3573,7 +3573,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if( selected || wheel != 0 || (player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_DROP)) ) { wstring itemName = L""; - shared_ptr<ItemInstance> selectedItem = player->getSelectedItem(); + std::shared_ptr<ItemInstance> selectedItem = player->getSelectedItem(); // Dropping items happens over network, so if we only have one then assume that we dropped it and should hide the item int iCount=0; @@ -3841,7 +3841,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) setLocalPlayerIdx(idx); gameRenderer->setupCamera(timer->a, i); Camera::prepare(localplayers[idx], localplayers[idx]->ThirdPersonView() == 2); - shared_ptr<Mob> cameraEntity = cameraTargetPlayer; + std::shared_ptr<Mob> cameraEntity = cameraTargetPlayer; double xOff = cameraEntity->xOld + (cameraEntity->x - cameraEntity->xOld) * timer->a; double yOff = cameraEntity->yOld + (cameraEntity->y - cameraEntity->yOld) * timer->a; double zOff = cameraEntity->zOld + (cameraEntity->z - cameraEntity->zOld) * timer->a; @@ -3967,7 +3967,7 @@ MultiPlayerLevel *Minecraft::getLevel(int dimension) //} // Also causing ambiguous call for some reason -// as it is matching shared_ptr<Player> from the func below with bool from this one +// as it is matching std::shared_ptr<Player> from the func below with bool from this one //void Minecraft::setLevel(Level *level, const wstring& message, bool doForceStatsSave /*= true*/) //{ // setLevel(level, message, NULL, doForceStatsSave); @@ -3981,7 +3981,7 @@ void Minecraft::forceaddLevel(MultiPlayerLevel *level) else levels[0] = level; } -void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_ptr<Player> forceInsertPlayer /*=NULL*/, bool doForceStatsSave /*=true*/, bool bPrimaryPlayerSignedOut /*=false*/) +void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, std::shared_ptr<Player> forceInsertPlayer /*=NULL*/, bool doForceStatsSave /*=true*/, bool bPrimaryPlayerSignedOut /*=false*/) { EnterCriticalSection(&m_setLevelCS); bool playerAdded = false; @@ -4046,7 +4046,7 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt // Delete all the player objects for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { - shared_ptr<MultiplayerLocalPlayer> mplp = localplayers[idx]; + std::shared_ptr<MultiplayerLocalPlayer> mplp = localplayers[idx]; if(mplp != NULL && mplp->connection != NULL ) { delete mplp->connection; @@ -4293,7 +4293,7 @@ wstring Minecraft::gatherStats4() void Minecraft::respawnPlayer(int iPad, int dimension, int newEntityId) { gameRenderer->DisableUpdateThread(); // 4J - don't do updating whilst we are adjusting the player & localplayer array - shared_ptr<MultiplayerLocalPlayer> localPlayer = localplayers[iPad]; + std::shared_ptr<MultiplayerLocalPlayer> localPlayer = localplayers[iPad]; level->validateSpawn(); level->removeAllPendingEntityRemovals(); @@ -4304,7 +4304,7 @@ void Minecraft::respawnPlayer(int iPad, int dimension, int newEntityId) level->removeEntity(localPlayer); } - shared_ptr<Player> oldPlayer = localPlayer; + std::shared_ptr<Player> oldPlayer = localPlayer; cameraTargetPlayer = nullptr; // 4J-PB - copy and set the players xbox pad @@ -4692,7 +4692,7 @@ bool mayUse = true; if(button==1 && (player->isSleeping() && level != NULL && level->isClientSide)) { -shared_ptr<MultiplayerLocalPlayer> mplp = dynamic_pointer_cast<MultiplayerLocalPlayer>( player ); +std::shared_ptr<MultiplayerLocalPlayer> mplp = dynamic_pointer_cast<MultiplayerLocalPlayer>( player ); if(mplp) mplp->StopSleeping(); @@ -4741,7 +4741,7 @@ gameMode->startDestroyBlock(x, y, z, hitResult->f); } else { -shared_ptr<ItemInstance> item = player->inventory->getSelected(); +std::shared_ptr<ItemInstance> item = player->inventory->getSelected(); int oldCount = item != NULL ? item->count : 0; if (gameMode->useItemOn(player, level, item, x, y, z, face)) { @@ -4767,7 +4767,7 @@ gameRenderer->itemInHandRenderer->itemPlaced(); if (mayUse && button == 1) { -shared_ptr<ItemInstance> item = player->inventory->getSelected(); +std::shared_ptr<ItemInstance> item = player->inventory->getSelected(); if (item != NULL) { if (gameMode->useItem(player, level, item)) @@ -4854,7 +4854,7 @@ void Minecraft::inGameSignInCheckAllPrivilegesCallback(LPVOID lpParam, bool hasP else if( ProfileManager.IsSignedInLive(iPad) && ProfileManager.AllowedToPlayMultiplayer(iPad) ) { // create the local player for the iPad - shared_ptr<Player> player = pClass->localplayers[iPad]; + std::shared_ptr<Player> player = pClass->localplayers[iPad]; if( player == NULL) { if( pClass->level->isClientSide ) @@ -4864,7 +4864,7 @@ void Minecraft::inGameSignInCheckAllPrivilegesCallback(LPVOID lpParam, bool hasP else { // create the local player for the iPad - shared_ptr<Player> player = pClass->localplayers[iPad]; + std::shared_ptr<Player> player = pClass->localplayers[iPad]; if( player == NULL) { player = pClass->createExtraLocalPlayer(iPad, (convStringToWstring( ProfileManager.GetGamertag(iPad) )).c_str(), iPad, pClass->level->dimension->id); @@ -4935,7 +4935,7 @@ int Minecraft::InGame_SignInReturned(void *pParam,bool bContinue, int iPad) else { // create the local player for the iPad - shared_ptr<Player> player = pMinecraftClass->localplayers[iPad]; + std::shared_ptr<Player> player = pMinecraftClass->localplayers[iPad]; if( player == NULL) { player = pMinecraftClass->createExtraLocalPlayer(iPad, (convStringToWstring( ProfileManager.GetGamertag(iPad) )).c_str(), iPad, pMinecraftClass->level->dimension->id); @@ -4964,7 +4964,7 @@ void Minecraft::tickAllConnections() int oldIdx = getLocalPlayerIdx(); for(unsigned int i = 0; i < XUSER_MAX_COUNT; i++ ) { - shared_ptr<MultiplayerLocalPlayer> mplp = localplayers[i]; + std::shared_ptr<MultiplayerLocalPlayer> mplp = localplayers[i]; if( mplp && mplp->connection) { setLocalPlayerIdx(i); diff --git a/Minecraft.Client/Minecraft.h b/Minecraft.Client/Minecraft.h index 2e943de7..cbe13e09 100644 --- a/Minecraft.Client/Minecraft.h +++ b/Minecraft.Client/Minecraft.h @@ -90,11 +90,11 @@ public: MultiPlayerLevel *level; LevelRenderer *levelRenderer; - shared_ptr<MultiplayerLocalPlayer> player; + std::shared_ptr<MultiplayerLocalPlayer> player; MultiPlayerLevelArray levels; - shared_ptr<MultiplayerLocalPlayer> localplayers[XUSER_MAX_COUNT]; + std::shared_ptr<MultiplayerLocalPlayer> localplayers[XUSER_MAX_COUNT]; MultiPlayerGameMode *localgameModes[XUSER_MAX_COUNT]; int localPlayerIdx; ItemInHandRenderer *localitemInHandRenderers[XUSER_MAX_COUNT]; @@ -110,7 +110,7 @@ public: void addPendingLocalConnection(int idx, ClientConnection *connection); void connectionDisconnected(int idx, DisconnectPacket::eDisconnectReason reason) { m_connectionFailed[idx] = true; m_connectionFailedReason[idx] = reason; } - shared_ptr<MultiplayerLocalPlayer> createExtraLocalPlayer(int idx, const wstring& name, int pad, int iDimension, ClientConnection *clientConnection = NULL,MultiPlayerLevel *levelpassedin=NULL); + std::shared_ptr<MultiplayerLocalPlayer> createExtraLocalPlayer(int idx, const wstring& name, int pad, int iDimension, ClientConnection *clientConnection = NULL,MultiPlayerLevel *levelpassedin=NULL); void createPrimaryLocalPlayer(int iPad); bool setLocalPlayerIdx(int idx); int getLocalPlayerIdx(); @@ -119,7 +119,7 @@ public: void updatePlayerViewportAssignments(); int unoccupiedQuadrant; // 4J - added - shared_ptr<Mob> cameraTargetPlayer; + std::shared_ptr<Mob> cameraTargetPlayer; ParticleEngine *particleEngine; User *user; wstring serverDomain; @@ -276,7 +276,7 @@ public: // 4J Stu - Added the doForceStatsSave param //void setLevel(Level *level, bool doForceStatsSave = true); //void setLevel(Level *level, const wstring& message, bool doForceStatsSave = true); - void setLevel(MultiPlayerLevel *level, int message = -1, shared_ptr<Player> forceInsertPlayer = nullptr, bool doForceStatsSave = true,bool bPrimaryPlayerSignedOut=false); + void setLevel(MultiPlayerLevel *level, int message = -1, std::shared_ptr<Player> forceInsertPlayer = nullptr, bool doForceStatsSave = true,bool bPrimaryPlayerSignedOut=false); // 4J-PB - added to force in the 'other' level when the main player creates the level at game load time void forceaddLevel(MultiPlayerLevel *level); void prepareLevel(int title); // 4J - changed to public diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index a57b798b..b94330d7 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -395,7 +395,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring if( app.GetGameHostOption(eGameHostOption_BonusChest ) ) levelSettings->enableStartingBonusItems(); // 4J - temp - load existing level - shared_ptr<McRegionLevelStorage> storage = nullptr; + std::shared_ptr<McRegionLevelStorage> storage = nullptr; bool levelChunksNeedConverted = false; if( initData->saveData != NULL ) { @@ -413,7 +413,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring levelChunksNeedConverted = true; pSave->ConvertToLocalPlatform(); // check if we need to convert this file from PS3->PS4 - storage = shared_ptr<McRegionLevelStorage>(new McRegionLevelStorage(pSave, File(L"."), name, true)); + storage = std::shared_ptr<McRegionLevelStorage>(new McRegionLevelStorage(pSave, File(L"."), name, true)); } else { @@ -438,9 +438,9 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring newFormatSave = new ConsoleSaveFileSplit( L"" ); } - storage = shared_ptr<McRegionLevelStorage>(new McRegionLevelStorage(newFormatSave, File(L"."), name, true)); + storage = std::shared_ptr<McRegionLevelStorage>(new McRegionLevelStorage(newFormatSave, File(L"."), name, true)); #else - storage = shared_ptr<McRegionLevelStorage>(new McRegionLevelStorage(new ConsoleSaveFileOriginal( L"" ), File(L"."), name, true)); + storage = std::shared_ptr<McRegionLevelStorage>(new McRegionLevelStorage(new ConsoleSaveFileOriginal( L"" ), File(L"."), name, true)); #endif } @@ -1245,7 +1245,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) players->saveAll(Minecraft::GetInstance()->progressRenderer); } - players->broadcastAll( shared_ptr<UpdateProgressPacket>( new UpdateProgressPacket(20) ) ); + players->broadcastAll( std::shared_ptr<UpdateProgressPacket>( new UpdateProgressPacket(20) ) ); for (unsigned int j = 0; j < levels.length; j++) { @@ -1256,7 +1256,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) ServerLevel *level = levels[levels.length - 1 - j]; level->save(true, Minecraft::GetInstance()->progressRenderer, (eAction==eXuiServerAction_AutoSaveGame)); - players->broadcastAll( shared_ptr<UpdateProgressPacket>( new UpdateProgressPacket(33 + (j*33) ) ) ); + players->broadcastAll( std::shared_ptr<UpdateProgressPacket>( new UpdateProgressPacket(33 + (j*33) ) ) ); } if( !s_bServerHalted ) { @@ -1269,16 +1269,16 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) case eXuiServerAction_DropItem: // Find the player, and drop the id at their feet { - shared_ptr<ServerPlayer> player = players->players.at(0); + std::shared_ptr<ServerPlayer> player = players->players.at(0); size_t id = (size_t) param; - player->drop( shared_ptr<ItemInstance>( new ItemInstance(id, 1, 0 ) ) ); + player->drop( std::shared_ptr<ItemInstance>( new ItemInstance(id, 1, 0 ) ) ); } break; case eXuiServerAction_SpawnMob: { - shared_ptr<ServerPlayer> player = players->players.at(0); + std::shared_ptr<ServerPlayer> player = players->players.at(0); eINSTANCEOF factory = (eINSTANCEOF)((size_t)param); - shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(EntityIO::newByEnumType(factory,player->level )); + std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(EntityIO::newByEnumType(factory,player->level )); mob->moveTo(player->x+1, player->y, player->z+1, player->level->random->nextFloat() * 360, 0); mob->setDespawnProtected(); // 4J added, default to being protected against despawning (has to be done after initial position is set) player->level->addEntity(mob); @@ -1306,20 +1306,20 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) } break; case eXuiServerAction_ServerSettingChanged_Gamertags: - players->broadcastAll( shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_OPTIONS, app.GetGameHostOption(eGameHostOption_Gamertags)) ) ); + players->broadcastAll( std::shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_OPTIONS, app.GetGameHostOption(eGameHostOption_Gamertags)) ) ); break; case eXuiServerAction_ServerSettingChanged_BedrockFog: - players->broadcastAll( shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, app.GetGameHostOption(eGameHostOption_All)) ) ); + players->broadcastAll( std::shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, app.GetGameHostOption(eGameHostOption_All)) ) ); break; case eXuiServerAction_ServerSettingChanged_Difficulty: - players->broadcastAll( shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_DIFFICULTY, Minecraft::GetInstance()->options->difficulty) ) ); + players->broadcastAll( std::shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_DIFFICULTY, Minecraft::GetInstance()->options->difficulty) ) ); break; case eXuiServerAction_ExportSchematic: #ifndef _CONTENT_PACKAGE app.EnterSaveNotificationSection(); - //players->broadcastAll( shared_ptr<UpdateProgressPacket>( new UpdateProgressPacket(20) ) ); + //players->broadcastAll( std::shared_ptr<UpdateProgressPacket>( new UpdateProgressPacket(20) ) ); if( !s_bServerHalted ) { @@ -1357,7 +1357,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) pos->m_yRot, pos->m_elev ); - shared_ptr<ServerPlayer> player = players->players.at(pos->player); + std::shared_ptr<ServerPlayer> player = players->players.at(pos->player); player->debug_setPosition( pos->m_camX, pos->m_camY, pos->m_camZ, pos->m_yRot, pos->m_elev ); @@ -1414,14 +1414,14 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) void MinecraftServer::broadcastStartSavingPacket() { - players->broadcastAll( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::START_SAVING, 0) ) );; + players->broadcastAll( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::START_SAVING, 0) ) );; } void MinecraftServer::broadcastStopSavingPacket() { if( !s_bServerHalted ) { - players->broadcastAll( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::STOP_SAVING, 0) ) );; + players->broadcastAll( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::STOP_SAVING, 0) ) );; } } @@ -1456,7 +1456,7 @@ void MinecraftServer::tick() /* if(m_lastSentDifficulty != pMinecraft->options->difficulty) { m_lastSentDifficulty = pMinecraft->options->difficulty; - players->broadcastAll( shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_DIFFICULTY, pMinecraft->options->difficulty) ) ); + players->broadcastAll( std::shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_DIFFICULTY, pMinecraft->options->difficulty) ) ); }*/ for (unsigned int i = 0; i < levels.length; i++) @@ -1476,7 +1476,7 @@ void MinecraftServer::tick() if (tickCount % 20 == 0) { - players->broadcastAll( shared_ptr<SetTimePacket>( new SetTimePacket(level->getTime() ) ), level->dimension->id); + players->broadcastAll( std::shared_ptr<SetTimePacket>( new SetTimePacket(level->getTime() ) ), level->dimension->id); } // #ifndef __PS3__ static int64_t stc = 0; diff --git a/Minecraft.Client/Minimap.cpp b/Minecraft.Client/Minimap.cpp index c18cd267..88552b01 100644 --- a/Minecraft.Client/Minimap.cpp +++ b/Minecraft.Client/Minimap.cpp @@ -85,7 +85,7 @@ void Minimap::reloadColours() LUT[i] = 255 << 24 | r << 16 | g << 8 | b; #elif defined __ORBIS__ r >>= 3; g >>= 3; b >>= 3; - LUT[i] = 1 << 15 | ( r << 10 ) | ( g << 5 ) | b; + LUT[i] = 1 << 15 | ( r << 10 ) | ( g << 5 ) | b; #else LUT[i] = r << 24 | g << 16 | b << 8 | 255; #endif @@ -98,7 +98,7 @@ void Minimap::reloadColours() } // 4J added entityId -void Minimap::render(shared_ptr<Player> player, Textures *textures, shared_ptr<MapItemSavedData> data, int entityId) +void Minimap::render(std::shared_ptr<Player> player, Textures *textures, std::shared_ptr<MapItemSavedData> data, int entityId) { // 4J - only update every 8 renders, as an optimisation // We don't want to use this for ItemFrame renders of maps, as then we can't have different maps together @@ -203,7 +203,7 @@ void Minimap::render(shared_ptr<Player> player, Textures *textures, shared_ptr<M for( AUTO_VAR(it,m_edgeIcons.begin()); it != m_edgeIcons.end(); it++ ) { MapItemSavedData::MapDecoration *dec = *it; - + char imgIndex = dec->img; imgIndex -= 16; @@ -253,7 +253,7 @@ void Minimap::render(shared_ptr<Player> player, Textures *textures, shared_ptr<M int posy = floor(player->y); int posz = floor(player->z); swprintf(playerPosText, 32, L"X: %d, Y: %d, Z: %d", posx, posy, posz); - + font->draw(playerPosText, x, y, Minecraft::GetInstance()->getColourTable()->getColour(eMinecraftColour_Map_Text)); } //#endif diff --git a/Minecraft.Client/Minimap.h b/Minecraft.Client/Minimap.h index 758d8a8a..6b4776f9 100644 --- a/Minecraft.Client/Minimap.h +++ b/Minecraft.Client/Minimap.h @@ -31,5 +31,5 @@ private: public: Minimap(Font *font, Options *options, Textures *textures, bool optimised = true); // 4J Added optimised param static void reloadColours(); - void render(shared_ptr<Player> player, Textures *textures, shared_ptr<MapItemSavedData> data, int entityId); // 4J added entityId param + void render(std::shared_ptr<Player> player, Textures *textures, std::shared_ptr<MapItemSavedData> data, int entityId); // 4J added entityId param }; diff --git a/Minecraft.Client/MobRenderer.cpp b/Minecraft.Client/MobRenderer.cpp index 8874ab9c..7399f2c2 100644 --- a/Minecraft.Client/MobRenderer.cpp +++ b/Minecraft.Client/MobRenderer.cpp @@ -31,11 +31,11 @@ float MobRenderer::rotlerp(float from, float to, float a) return from + a * diff; } -void MobRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void MobRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { // 4J - added - this used to use generics so the input parameter could be a mob (or derived type), but we aren't // able to do that so dynamically casting to get the more specific type here. - shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(_mob); + std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(_mob); glPushMatrix(); glDisable(GL_CULL_FACE); @@ -54,7 +54,7 @@ void MobRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, if (mob->isRiding() && dynamic_pointer_cast<Mob>(mob->riding)) { - shared_ptr<Mob> riding = dynamic_pointer_cast<Mob>(mob->riding); + std::shared_ptr<Mob> riding = dynamic_pointer_cast<Mob>(mob->riding); bodyRot = rotlerp(riding->yBodyRotO, riding->yBodyRot, a); float headDiff = Mth::wrapDegrees(headRot - bodyRot); @@ -233,9 +233,9 @@ void MobRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, MemSect(0); } -void MobRenderer::renderModel(shared_ptr<Entity> mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) +void MobRenderer::renderModel(std::shared_ptr<Entity> mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>(Minecraft::GetInstance()->player); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(Minecraft::GetInstance()->player); bindTexture(mob->customTextureUrl, mob->getTexture()); if (!mob->isInvisible()) @@ -262,15 +262,15 @@ void MobRenderer::renderModel(shared_ptr<Entity> mob, float wp, float ws, float } } -void MobRenderer::setupPosition(shared_ptr<Mob> mob, double x, double y, double z) +void MobRenderer::setupPosition(std::shared_ptr<Mob> mob, double x, double y, double z) { glTranslatef((float) x, (float) y, (float) z); } -void MobRenderer::setupRotations(shared_ptr<Mob> mob, float bob, float bodyRot, float a) +void MobRenderer::setupRotations(std::shared_ptr<Mob> mob, float bob, float bodyRot, float a) { glRotatef(180 - bodyRot, 0, 1, 0); - if (mob->deathTime > 0) + if (mob->deathTime > 0) { float fall = (mob->deathTime + a - 1) / 20.0f * 1.6f; fall = (float)sqrt(fall); @@ -279,49 +279,49 @@ void MobRenderer::setupRotations(shared_ptr<Mob> mob, float bob, float bodyRot, } } -float MobRenderer::getAttackAnim(shared_ptr<Mob> mob, float a) +float MobRenderer::getAttackAnim(std::shared_ptr<Mob> mob, float a) { return mob->getAttackAnim(a); } -float MobRenderer::getBob(shared_ptr<Mob> mob, float a) +float MobRenderer::getBob(std::shared_ptr<Mob> mob, float a) { return (mob->tickCount + a); } -void MobRenderer::additionalRendering(shared_ptr<Mob> mob, float a) +void MobRenderer::additionalRendering(std::shared_ptr<Mob> mob, float a) { } -int MobRenderer::prepareArmorOverlay(shared_ptr<Mob> mob, int layer, float a) +int MobRenderer::prepareArmorOverlay(std::shared_ptr<Mob> mob, int layer, float a) { return prepareArmor(mob, layer, a); } -int MobRenderer::prepareArmor(shared_ptr<Mob> mob, int layer, float a) +int MobRenderer::prepareArmor(std::shared_ptr<Mob> mob, int layer, float a) { return -1; } -void MobRenderer::prepareSecondPassArmor(shared_ptr<Mob> mob, int layer, float a) +void MobRenderer::prepareSecondPassArmor(std::shared_ptr<Mob> mob, int layer, float a) { } -float MobRenderer::getFlipDegrees(shared_ptr<Mob> mob) +float MobRenderer::getFlipDegrees(std::shared_ptr<Mob> mob) { return 90; } -int MobRenderer::getOverlayColor(shared_ptr<Mob> mob, float br, float a) +int MobRenderer::getOverlayColor(std::shared_ptr<Mob> mob, float br, float a) { return 0; } -void MobRenderer::scale(shared_ptr<Mob> mob, float a) +void MobRenderer::scale(std::shared_ptr<Mob> mob, float a) { } -void MobRenderer::renderName(shared_ptr<Mob> mob, double x, double y, double z) +void MobRenderer::renderName(std::shared_ptr<Mob> mob, double x, double y, double z) { if (Minecraft::renderDebug()) { @@ -330,7 +330,7 @@ void MobRenderer::renderName(shared_ptr<Mob> mob, double x, double y, double z) } // 4J Added parameter for color here so that we can colour players names -void MobRenderer::renderNameTag(shared_ptr<Mob> mob, const wstring& OriginalName, double x, double y, double z, int maxDist, int color /*= 0xffffffff*/) +void MobRenderer::renderNameTag(std::shared_ptr<Mob> mob, const wstring& OriginalName, double x, double y, double z, int maxDist, int color /*= 0xffffffff*/) { if ( app.GetGameSettings(eGameSetting_DisplayHUD)==0 ) @@ -390,13 +390,13 @@ void MobRenderer::renderNameTag(shared_ptr<Mob> mob, const wstring& OriginalName if( textOpacity < 0.0f ) textOpacity = 0.0f; if( textOpacity > 1.0f ) textOpacity = 1.0f; - + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); Tesselator *t = Tesselator::getInstance(); int offs = 0; - shared_ptr<Player> player = dynamic_pointer_cast<Player>(mob); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(mob); if (player != NULL && app.isXuidDeadmau5( player->getXuid() ) ) offs = -10; wstring playerName; @@ -415,7 +415,7 @@ void MobRenderer::renderNameTag(shared_ptr<Mob> mob, const wstring& OriginalName else { memset(wchName,0,sizeof(WCHAR)*2); - swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); + swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); playerName=wchName; player->SetPlayerNameValidState(false); } @@ -425,8 +425,8 @@ void MobRenderer::renderNameTag(shared_ptr<Mob> mob, const wstring& OriginalName break; case Player::ePlayerNameValid_False: memset(wchName,0,sizeof(WCHAR)*2); - swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); - playerName=wchName; + swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); + playerName=wchName; break; } @@ -459,7 +459,7 @@ void MobRenderer::renderNameTag(shared_ptr<Mob> mob, const wstring& OriginalName t->vertex((float)(+w + 1), (float)( +8 + offs + 1), (float)( 0)); t->vertex((float)(+w + 1), (float)( -1 + offs), (float)( 0)); t->end(); - + glEnable(GL_DEPTH_TEST); glDepthMask(true); glDepthFunc(GL_ALWAYS); @@ -479,7 +479,7 @@ void MobRenderer::renderNameTag(shared_ptr<Mob> mob, const wstring& OriginalName glEnable(GL_TEXTURE_2D); font->draw(playerName, -font->width(playerName) / 2, offs, 0x20ffffff); glEnable(GL_DEPTH_TEST); - + glDepthMask(true); } @@ -495,10 +495,10 @@ void MobRenderer::renderNameTag(shared_ptr<Mob> mob, const wstring& OriginalName t->vertex((float)(-w - 1), (float)( +8 + offs), (float)( 0)); t->vertex((float)(+w + 1), (float)( +8 + offs), (float)( 0)); t->vertex((float)(+w + 1), (float)( -1 + offs), (float)( 0)); - t->end(); + t->end(); glDepthFunc(GL_LEQUAL); glEnable(GL_TEXTURE_2D); - + glTranslatef(0.0f, 0.0f, -0.04f); } @@ -507,7 +507,7 @@ void MobRenderer::renderNameTag(shared_ptr<Mob> mob, const wstring& OriginalName int textColor = ( ( (int)(textOpacity*255) << 24 ) | 0xffffff ); font->draw(playerName, -font->width(playerName) / 2, offs, textColor); } - + glEnable(GL_LIGHTING); glDisable(GL_BLEND); glColor4f(1, 1, 1, 1); diff --git a/Minecraft.Client/MobRenderer.h b/Minecraft.Client/MobRenderer.h index a8b2b93e..6a5df478 100644 --- a/Minecraft.Client/MobRenderer.h +++ b/Minecraft.Client/MobRenderer.h @@ -23,22 +23,22 @@ public: private: float rotlerp(float from, float to, float a); public: - virtual void render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); protected: - virtual void renderModel(shared_ptr<Entity> mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale); - virtual void setupPosition(shared_ptr<Mob> mob, double x, double y, double z); - virtual void setupRotations(shared_ptr<Mob> mob, float bob, float bodyRot, float a); - virtual float getAttackAnim(shared_ptr<Mob> mob, float a); - virtual float getBob(shared_ptr<Mob> mob, float a); - virtual void additionalRendering(shared_ptr<Mob> mob, float a); - virtual int prepareArmorOverlay(shared_ptr<Mob> mob, int layer, float a); - virtual int prepareArmor(shared_ptr<Mob> mob, int layer, float a); - virtual void prepareSecondPassArmor(shared_ptr<Mob> mob, int layer, float a); - virtual float getFlipDegrees(shared_ptr<Mob> mob); - virtual int getOverlayColor(shared_ptr<Mob> mob, float br, float a); - virtual void scale(shared_ptr<Mob> mob, float a); - virtual void renderName(shared_ptr<Mob> mob, double x, double y, double z); - virtual void renderNameTag(shared_ptr<Mob> mob, const wstring& name, double x, double y, double z, int maxDist, int color = 0xff000000); + virtual void renderModel(std::shared_ptr<Entity> mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale); + virtual void setupPosition(std::shared_ptr<Mob> mob, double x, double y, double z); + virtual void setupRotations(std::shared_ptr<Mob> mob, float bob, float bodyRot, float a); + virtual float getAttackAnim(std::shared_ptr<Mob> mob, float a); + virtual float getBob(std::shared_ptr<Mob> mob, float a); + virtual void additionalRendering(std::shared_ptr<Mob> mob, float a); + virtual int prepareArmorOverlay(std::shared_ptr<Mob> mob, int layer, float a); + virtual int prepareArmor(std::shared_ptr<Mob> mob, int layer, float a); + virtual void prepareSecondPassArmor(std::shared_ptr<Mob> mob, int layer, float a); + virtual float getFlipDegrees(std::shared_ptr<Mob> mob); + virtual int getOverlayColor(std::shared_ptr<Mob> mob, float br, float a); + virtual void scale(std::shared_ptr<Mob> mob, float a); + virtual void renderName(std::shared_ptr<Mob> mob, double x, double y, double z); + virtual void renderNameTag(std::shared_ptr<Mob> mob, const wstring& name, double x, double y, double z, int maxDist, int color = 0xff000000); public: // 4J Added diff --git a/Minecraft.Client/MobSpawnerRenderer.cpp b/Minecraft.Client/MobSpawnerRenderer.cpp index 4ee772dd..50a8cbb2 100644 --- a/Minecraft.Client/MobSpawnerRenderer.cpp +++ b/Minecraft.Client/MobSpawnerRenderer.cpp @@ -5,15 +5,15 @@ #include "..\Minecraft.World\net.minecraft.world.level.tile.entity.h" #include "..\Minecraft.World\net.minecraft.world.entity.h" -void MobSpawnerRenderer::render(shared_ptr<TileEntity> _spawner, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void MobSpawnerRenderer::render(std::shared_ptr<TileEntity> _spawner, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<MobSpawnerTileEntity> spawner = dynamic_pointer_cast<MobSpawnerTileEntity>(_spawner); + std::shared_ptr<MobSpawnerTileEntity> spawner = dynamic_pointer_cast<MobSpawnerTileEntity>(_spawner); glPushMatrix(); glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f); - shared_ptr<Entity> e = spawner->getDisplayEntity(); + std::shared_ptr<Entity> e = spawner->getDisplayEntity(); if (e != NULL) { e->setLevel(spawner->level); diff --git a/Minecraft.Client/MobSpawnerRenderer.h b/Minecraft.Client/MobSpawnerRenderer.h index ad7dfe67..c8b392ad 100644 --- a/Minecraft.Client/MobSpawnerRenderer.h +++ b/Minecraft.Client/MobSpawnerRenderer.h @@ -5,7 +5,7 @@ using namespace std; class MobSpawnerRenderer : public TileEntityRenderer { private: - unordered_map<wstring, shared_ptr<Entity> > models; + unordered_map<wstring, std::shared_ptr<Entity> > models; public: - virtual void render(shared_ptr<TileEntity> _spawner, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + virtual void render(std::shared_ptr<TileEntity> _spawner, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/Model.h b/Minecraft.Client/Model.h index e4161d0c..e7595845 100644 --- a/Minecraft.Client/Model.h +++ b/Minecraft.Client/Model.h @@ -19,9 +19,9 @@ public: int texHeight; Model(); // 4J added - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) {} + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) {} virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0) {} - virtual void prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) {} + virtual void prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) {} virtual ModelPart *getRandomCube(Random random) {return cubes.at(random.nextInt((int)cubes.size()));} virtual ModelPart * AddOrRetrievePart(SKIN_BOX *pBox) { return NULL;} diff --git a/Minecraft.Client/MultiPlayerGameMode.cpp b/Minecraft.Client/MultiPlayerGameMode.cpp index 7de59803..2f048d95 100644 --- a/Minecraft.Client/MultiPlayerGameMode.cpp +++ b/Minecraft.Client/MultiPlayerGameMode.cpp @@ -38,7 +38,7 @@ void MultiPlayerGameMode::creativeDestroyBlock(Minecraft *minecraft, MultiPlayer } } -void MultiPlayerGameMode::adjustPlayer(shared_ptr<Player> player) +void MultiPlayerGameMode::adjustPlayer(std::shared_ptr<Player> player) { localPlayerMode->updatePlayerAbilities(&player->abilities); } @@ -54,7 +54,7 @@ void MultiPlayerGameMode::setLocalMode(GameType *mode) localPlayerMode->updatePlayerAbilities(&minecraft->player->abilities); } -void MultiPlayerGameMode::initPlayer(shared_ptr<Player> player) +void MultiPlayerGameMode::initPlayer(std::shared_ptr<Player> player) { player->yRot = -180; } @@ -87,7 +87,7 @@ bool MultiPlayerGameMode::destroyBlock(int x, int y, int z, int face) if (!localPlayerMode->isCreative()) { - shared_ptr<ItemInstance> item = minecraft->player->getSelectedItem(); + std::shared_ptr<ItemInstance> item = minecraft->player->getSelectedItem(); if (item != NULL) { item->mineBlock(level, oldTile->id, x, y, z, minecraft->player); @@ -102,7 +102,7 @@ bool MultiPlayerGameMode::destroyBlock(int x, int y, int z, int face) } void MultiPlayerGameMode::startDestroyBlock(int x, int y, int z, int face) -{ +{ if(!minecraft->player->isAllowedToMine()) return; if (localPlayerMode->isReadOnly()) { @@ -111,13 +111,13 @@ void MultiPlayerGameMode::startDestroyBlock(int x, int y, int z, int face) if (localPlayerMode->isCreative()) { - connection->send(shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) )); + connection->send(std::shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) )); creativeDestroyBlock(minecraft, this, x, y, z, face); destroyDelay = 5; } else if (!isDestroying || x != xDestroyBlock || y != yDestroyBlock || z != zDestroyBlock) { - connection->send( shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) ) ); + connection->send( std::shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) ) ); int t = minecraft->level->getTile(x, y, z); if (t > 0 && destroyProgress == 0) Tile::tiles[t]->attack(minecraft->level, x, y, z, minecraft->player); if (t > 0 && @@ -147,7 +147,7 @@ void MultiPlayerGameMode::stopDestroyBlock() { if (isDestroying) { - connection->send(shared_ptr<PlayerActionPacket>(new PlayerActionPacket(PlayerActionPacket::ABORT_DESTROY_BLOCK, xDestroyBlock, yDestroyBlock, zDestroyBlock, -1))); + connection->send(std::shared_ptr<PlayerActionPacket>(new PlayerActionPacket(PlayerActionPacket::ABORT_DESTROY_BLOCK, xDestroyBlock, yDestroyBlock, zDestroyBlock, -1))); } isDestroying = false; @@ -170,7 +170,7 @@ void MultiPlayerGameMode::continueDestroyBlock(int x, int y, int z, int face) if (localPlayerMode->isCreative()) { destroyDelay = 5; - connection->send(shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) ) ); + connection->send(std::shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) ) ); creativeDestroyBlock(minecraft, this, x, y, z, face); return; } @@ -202,7 +202,7 @@ void MultiPlayerGameMode::continueDestroyBlock(int x, int y, int z, int face) if (destroyProgress >= 1) { isDestroying = false; - connection->send( shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::STOP_DESTROY_BLOCK, x, y, z, face) ) ); + connection->send( std::shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::STOP_DESTROY_BLOCK, x, y, z, face) ) ); destroyBlock(x, y, z, face); destroyProgress = 0; oDestroyProgress = 0; @@ -241,11 +241,11 @@ void MultiPlayerGameMode::ensureHasSentCarriedItem() if (newItem != carriedItem) { carriedItem = newItem; - connection->send( shared_ptr<SetCarriedItemPacket>( new SetCarriedItemPacket(carriedItem) ) ); + connection->send( std::shared_ptr<SetCarriedItemPacket>( new SetCarriedItemPacket(carriedItem) ) ); } } -bool MultiPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly, bool *pbUsedItem) +bool MultiPlayerGameMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly, bool *pbUsedItem) { if( pbUsedItem ) *pbUsedItem = false; // Did we actually use the held item? @@ -259,16 +259,16 @@ bool MultiPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, sha float clickZ = (float) hit->z - z; bool didSomething = false; int t = level->getTile(x, y, z); - + if (t > 0 && player->isAllowedToUse(Tile::tiles[t])) { if(bTestUseOnly) { switch(t) { - case Tile::recordPlayer_Id: + case Tile::recordPlayer_Id: case Tile::bed_Id: // special case for a bed - if (Tile::tiles[t]->TestUse(level, x, y, z, player )) + if (Tile::tiles[t]->TestUse(level, x, y, z, player )) { return true; } @@ -283,7 +283,7 @@ bool MultiPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, sha break; } } - else + else { if (Tile::tiles[t]->use(level, x, y, z, player, face, clickX, clickY, clickZ)) didSomething = true; } @@ -321,7 +321,7 @@ bool MultiPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, sha } else { - // 4J - Bit of a hack, however seems preferable to any larger changes which would have more chance of causing unwanted side effects. + // 4J - Bit of a hack, however seems preferable to any larger changes which would have more chance of causing unwanted side effects. // If we aren't going to be actually performing the use method locally, then call this method with its "soundOnly" parameter set to true. // This is an addition from the java version, and as its name suggests, doesn't actually perform the use locally but just makes any sounds that // are meant to be directly caused by this. If we don't do this, then the sounds never happen as the tile's use method is only called on the @@ -333,17 +333,17 @@ bool MultiPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, sha } } - // 4J Stu - Do the action before we send the packet, so that our predicted count is sent in the packet and the server + // 4J Stu - Do the action before we send the packet, so that our predicted count is sent in the packet and the server // doesn't think it has to update us // Fix for #7904 - Gameplay: Players can dupe torches by throwing them repeatedly into water. if(!bTestUseOnly) { - connection->send( shared_ptr<UseItemPacket>( new UseItemPacket(x, y, z, face, player->inventory->getSelected(), clickX, clickY, clickZ) ) ); + connection->send( std::shared_ptr<UseItemPacket>( new UseItemPacket(x, y, z, face, player->inventory->getSelected(), clickX, clickY, clickZ) ) ); } return didSomething; } -bool MultiPlayerGameMode::useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, bool bTestUseOnly) +bool MultiPlayerGameMode::useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, bool bTestUseOnly) { if(!player->isAllowedToUse(item)) return false; @@ -353,11 +353,11 @@ bool MultiPlayerGameMode::useItem(shared_ptr<Player> player, Level *level, share ensureHasSentCarriedItem(); } - // 4J Stu - Do the action before we send the packet, so that our predicted count is sent in the packet and the server + // 4J Stu - Do the action before we send the packet, so that our predicted count is sent in the packet and the server // doesn't think it has to update us, or can update us if we are wrong // Fix for #13120 - Using a bucket of water or lava in the spawn area (centre of the map) causes the inventory to get out of sync bool result = false; - + // 4J-PB added for tooltips to test use only if(bTestUseOnly) { @@ -366,7 +366,7 @@ bool MultiPlayerGameMode::useItem(shared_ptr<Player> player, Level *level, share else { int oldCount = item->count; - shared_ptr<ItemInstance> itemInstance = item->use(level, player); + std::shared_ptr<ItemInstance> itemInstance = item->use(level, player); if ((itemInstance != NULL && itemInstance != item) || (itemInstance != NULL && itemInstance->count != oldCount)) { player->inventory->items[player->inventory->selected] = itemInstance; @@ -377,68 +377,68 @@ bool MultiPlayerGameMode::useItem(shared_ptr<Player> player, Level *level, share result = true; } } - + if(!bTestUseOnly) { - connection->send( shared_ptr<UseItemPacket>( new UseItemPacket(-1, -1, -1, 255, player->inventory->getSelected(), 0, 0, 0) ) ); + connection->send( std::shared_ptr<UseItemPacket>( new UseItemPacket(-1, -1, -1, 255, player->inventory->getSelected(), 0, 0, 0) ) ); } return result; } -shared_ptr<MultiplayerLocalPlayer> MultiPlayerGameMode::createPlayer(Level *level) +std::shared_ptr<MultiplayerLocalPlayer> MultiPlayerGameMode::createPlayer(Level *level) { - return shared_ptr<MultiplayerLocalPlayer>( new MultiplayerLocalPlayer(minecraft, level, minecraft->user, connection) ); + return std::shared_ptr<MultiplayerLocalPlayer>( new MultiplayerLocalPlayer(minecraft, level, minecraft->user, connection) ); } -void MultiPlayerGameMode::attack(shared_ptr<Player> player, shared_ptr<Entity> entity) +void MultiPlayerGameMode::attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity) { ensureHasSentCarriedItem(); - connection->send( shared_ptr<InteractPacket>( new InteractPacket(player->entityId, entity->entityId, InteractPacket::ATTACK) ) ); + connection->send( std::shared_ptr<InteractPacket>( new InteractPacket(player->entityId, entity->entityId, InteractPacket::ATTACK) ) ); player->attack(entity); } -bool MultiPlayerGameMode::interact(shared_ptr<Player> player, shared_ptr<Entity> entity) +bool MultiPlayerGameMode::interact(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity) { ensureHasSentCarriedItem(); - connection->send(shared_ptr<InteractPacket>( new InteractPacket(player->entityId, entity->entityId, InteractPacket::INTERACT) ) ); + connection->send(std::shared_ptr<InteractPacket>( new InteractPacket(player->entityId, entity->entityId, InteractPacket::INTERACT) ) ); return player->interact(entity); } -shared_ptr<ItemInstance> MultiPlayerGameMode::handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, shared_ptr<Player> player) +std::shared_ptr<ItemInstance> MultiPlayerGameMode::handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, std::shared_ptr<Player> player) { short changeUid = player->containerMenu->backup(player->inventory); - shared_ptr<ItemInstance> clicked = player->containerMenu->clicked(slotNum, buttonNum, quickKeyHeld?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, player); - connection->send( shared_ptr<ContainerClickPacket>( new ContainerClickPacket(containerId, slotNum, buttonNum, quickKeyHeld, clicked, changeUid) ) ); + std::shared_ptr<ItemInstance> clicked = player->containerMenu->clicked(slotNum, buttonNum, quickKeyHeld?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, player); + connection->send( std::shared_ptr<ContainerClickPacket>( new ContainerClickPacket(containerId, slotNum, buttonNum, quickKeyHeld, clicked, changeUid) ) ); return clicked; } void MultiPlayerGameMode::handleInventoryButtonClick(int containerId, int buttonId) { - connection->send(shared_ptr<ContainerButtonClickPacket>( new ContainerButtonClickPacket(containerId, buttonId) )); + connection->send(std::shared_ptr<ContainerButtonClickPacket>( new ContainerButtonClickPacket(containerId, buttonId) )); } -void MultiPlayerGameMode::handleCreativeModeItemAdd(shared_ptr<ItemInstance> clicked, int slot) +void MultiPlayerGameMode::handleCreativeModeItemAdd(std::shared_ptr<ItemInstance> clicked, int slot) { if (localPlayerMode->isCreative()) { - connection->send(shared_ptr<SetCreativeModeSlotPacket>( new SetCreativeModeSlotPacket(slot, clicked) ) ); + connection->send(std::shared_ptr<SetCreativeModeSlotPacket>( new SetCreativeModeSlotPacket(slot, clicked) ) ); } } -void MultiPlayerGameMode::handleCreativeModeItemDrop(shared_ptr<ItemInstance> clicked) +void MultiPlayerGameMode::handleCreativeModeItemDrop(std::shared_ptr<ItemInstance> clicked) { if (localPlayerMode->isCreative() && clicked != NULL) { - connection->send(shared_ptr<SetCreativeModeSlotPacket>( new SetCreativeModeSlotPacket(-1, clicked) ) ); + connection->send(std::shared_ptr<SetCreativeModeSlotPacket>( new SetCreativeModeSlotPacket(-1, clicked) ) ); } } -void MultiPlayerGameMode::releaseUsingItem(shared_ptr<Player> player) +void MultiPlayerGameMode::releaseUsingItem(std::shared_ptr<Player> player) { ensureHasSentCarriedItem(); - connection->send(shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::RELEASE_USE_ITEM, 0, 0, 0, 255) ) ); + connection->send(std::shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::RELEASE_USE_ITEM, 0, 0, 0, 255) ) ); player->releaseUsingItem(); } @@ -462,17 +462,17 @@ bool MultiPlayerGameMode::hasFarPickRange() return localPlayerMode->isCreative(); } -bool MultiPlayerGameMode::handleCraftItem(int recipe, shared_ptr<Player> player) +bool MultiPlayerGameMode::handleCraftItem(int recipe, std::shared_ptr<Player> player) { short changeUid = player->containerMenu->backup(player->inventory); - connection->send( shared_ptr<CraftItemPacket>( new CraftItemPacket(recipe, changeUid) ) ); + connection->send( std::shared_ptr<CraftItemPacket>( new CraftItemPacket(recipe, changeUid) ) ); return true; } -void MultiPlayerGameMode::handleDebugOptions(unsigned int uiVal, shared_ptr<Player> player) +void MultiPlayerGameMode::handleDebugOptions(unsigned int uiVal, std::shared_ptr<Player> player) { player->SetDebugOptions(uiVal); - connection->send( shared_ptr<DebugOptionsPacket>( new DebugOptionsPacket(uiVal) ) ); + connection->send( std::shared_ptr<DebugOptionsPacket>( new DebugOptionsPacket(uiVal) ) ); } diff --git a/Minecraft.Client/MultiPlayerGameMode.h b/Minecraft.Client/MultiPlayerGameMode.h index c84410fa..8fc88df8 100644 --- a/Minecraft.Client/MultiPlayerGameMode.h +++ b/Minecraft.Client/MultiPlayerGameMode.h @@ -24,10 +24,10 @@ protected: public: MultiPlayerGameMode(Minecraft *minecraft, ClientConnection *connection); static void creativeDestroyBlock(Minecraft *minecraft, MultiPlayerGameMode *gameMode, int x, int y, int z, int face); - void adjustPlayer(shared_ptr<Player> player); + void adjustPlayer(std::shared_ptr<Player> player); bool isCutScene(); void setLocalMode(GameType *mode); - virtual void initPlayer(shared_ptr<Player> player); + virtual void initPlayer(std::shared_ptr<Player> player); virtual bool canHurtPlayer(); virtual bool destroyBlock(int x, int y, int z, int face); virtual void startDestroyBlock(int x, int y, int z, int face); @@ -41,24 +41,24 @@ private: private: void ensureHasSentCarriedItem(); public: - virtual bool useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly=false, bool *pbUsedItem=NULL); - virtual bool useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, bool bTestUseOnly=false); - virtual shared_ptr<MultiplayerLocalPlayer> createPlayer(Level *level); - virtual void attack(shared_ptr<Player> player, shared_ptr<Entity> entity); - virtual bool interact(shared_ptr<Player> player, shared_ptr<Entity> entity); - virtual shared_ptr<ItemInstance> handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, shared_ptr<Player> player); + virtual bool useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly=false, bool *pbUsedItem=NULL); + virtual bool useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, bool bTestUseOnly=false); + virtual std::shared_ptr<MultiplayerLocalPlayer> createPlayer(Level *level); + virtual void attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity); + virtual bool interact(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity); + virtual std::shared_ptr<ItemInstance> handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, std::shared_ptr<Player> player); virtual void handleInventoryButtonClick(int containerId, int buttonId); - virtual void handleCreativeModeItemAdd(shared_ptr<ItemInstance> clicked, int slot); - virtual void handleCreativeModeItemDrop(shared_ptr<ItemInstance> clicked); - virtual void releaseUsingItem(shared_ptr<Player> player); + virtual void handleCreativeModeItemAdd(std::shared_ptr<ItemInstance> clicked, int slot); + virtual void handleCreativeModeItemDrop(std::shared_ptr<ItemInstance> clicked); + virtual void releaseUsingItem(std::shared_ptr<Player> player); virtual bool hasExperience(); virtual bool hasMissTime(); virtual bool hasInfiniteItems(); virtual bool hasFarPickRange(); - + // 4J Stu - Added so we can send packets for this in the network game - virtual bool handleCraftItem(int recipe, shared_ptr<Player> player); - virtual void handleDebugOptions(unsigned int uiVal, shared_ptr<Player> player); + virtual bool handleCraftItem(int recipe, std::shared_ptr<Player> player); + virtual void handleDebugOptions(unsigned int uiVal, std::shared_ptr<Player> player); // 4J Stu - Added for tutorial checks virtual bool isInputAllowed(int mapping) { return true; } diff --git a/Minecraft.Client/MultiPlayerLevel.cpp b/Minecraft.Client/MultiPlayerLevel.cpp index 24b12bcd..16594955 100644 --- a/Minecraft.Client/MultiPlayerLevel.cpp +++ b/Minecraft.Client/MultiPlayerLevel.cpp @@ -24,7 +24,7 @@ MultiPlayerLevel::ResetInfo::ResetInfo(int x, int y, int z, int tile, int data) } MultiPlayerLevel::MultiPlayerLevel(ClientConnection *connection, LevelSettings *levelSettings, int dimension, int difficulty) - : Level(shared_ptr<MockedLevelStorage >(new MockedLevelStorage()), L"MpServer", Dimension::getNew(dimension), levelSettings, false) + : Level(std::shared_ptr<MockedLevelStorage >(new MockedLevelStorage()), L"MpServer", Dimension::getNew(dimension), levelSettings, false) { minecraft = Minecraft::GetInstance(); @@ -108,7 +108,7 @@ void MultiPlayerLevel::tick() EnterCriticalSection(&m_entitiesCS); for (int i = 0; i < 10 && !reEntries.empty(); i++) { - shared_ptr<Entity> e = *(reEntries.begin()); + std::shared_ptr<Entity> e = *(reEntries.begin()); if (find(entities.begin(), entities.end(), e) == entities.end() ) addEntity(e); } @@ -134,7 +134,7 @@ void MultiPlayerLevel::tick() { Level::setTileAndDataNoUpdate(r.x, r.y, r.z, r.tile, r.data); Level::sendTileUpdated(r.x, r.y, r.z); - + //updatesToReset.erase(updatesToReset.begin()+i); eraseElements = true; lastIndexToRemove = 0; @@ -156,7 +156,7 @@ void MultiPlayerLevel::tick() // 4J - added this section. Each tick we'll check a different block, and force it to share data if it has been // more than 2 minutes since we last wanted to unshare it. This shouldn't really ever happen, and is added // here as a safe guard against accumulated memory leaks should a lot of chunks become unshared over time. - + int ls = dimension->getXZSize(); if( g_NetworkManager.IsHost() ) { @@ -403,7 +403,7 @@ void MultiPlayerLevel::setChunkVisible(int x, int z, bool visible) } -bool MultiPlayerLevel::addEntity(shared_ptr<Entity> e) +bool MultiPlayerLevel::addEntity(std::shared_ptr<Entity> e) { bool ok = Level::addEntity(e); forced.insert(e); @@ -416,7 +416,7 @@ bool MultiPlayerLevel::addEntity(shared_ptr<Entity> e) return ok; } -void MultiPlayerLevel::removeEntity(shared_ptr<Entity> e) +void MultiPlayerLevel::removeEntity(std::shared_ptr<Entity> e) { // 4J Stu - Add this remove from the reEntries collection to stop us continually removing and re-adding things, // in particular the MultiPlayerLocalPlayer when they die @@ -430,7 +430,7 @@ void MultiPlayerLevel::removeEntity(shared_ptr<Entity> e) forced.erase(e); } -void MultiPlayerLevel::entityAdded(shared_ptr<Entity> e) +void MultiPlayerLevel::entityAdded(std::shared_ptr<Entity> e) { Level::entityAdded(e); AUTO_VAR(it, reEntries.find(e)); @@ -440,7 +440,7 @@ void MultiPlayerLevel::entityAdded(shared_ptr<Entity> e) } } -void MultiPlayerLevel::entityRemoved(shared_ptr<Entity> e) +void MultiPlayerLevel::entityRemoved(std::shared_ptr<Entity> e) { Level::entityRemoved(e); AUTO_VAR(it, forced.find(e)); @@ -450,9 +450,9 @@ void MultiPlayerLevel::entityRemoved(shared_ptr<Entity> e) } } -void MultiPlayerLevel::putEntity(int id, shared_ptr<Entity> e) +void MultiPlayerLevel::putEntity(int id, std::shared_ptr<Entity> e) { - shared_ptr<Entity> old = getEntity(id); + std::shared_ptr<Entity> old = getEntity(id); if (old != NULL) { removeEntity(old); @@ -467,16 +467,16 @@ void MultiPlayerLevel::putEntity(int id, shared_ptr<Entity> e) entitiesById[id] = e; } -shared_ptr<Entity> MultiPlayerLevel::getEntity(int id) +std::shared_ptr<Entity> MultiPlayerLevel::getEntity(int id) { AUTO_VAR(it, entitiesById.find(id)); if( it == entitiesById.end() ) return nullptr; return it->second; } -shared_ptr<Entity> MultiPlayerLevel::removeEntity(int id) +std::shared_ptr<Entity> MultiPlayerLevel::removeEntity(int id) { - shared_ptr<Entity> e; + std::shared_ptr<Entity> e; AUTO_VAR(it, entitiesById.find(id)); if( it != entitiesById.end() ) { @@ -493,11 +493,11 @@ shared_ptr<Entity> MultiPlayerLevel::removeEntity(int id) // 4J Added to remove the entities from the forced list // This gets called when a chunk is unloaded, but we only do half an unload to remove entities slightly differently -void MultiPlayerLevel::removeEntities(vector<shared_ptr<Entity> > *list) +void MultiPlayerLevel::removeEntities(vector<std::shared_ptr<Entity> > *list) { for(AUTO_VAR(it, list->begin()); it < list->end(); ++it) { - shared_ptr<Entity> e = *it; + std::shared_ptr<Entity> e = *it; AUTO_VAR(reIt, reEntries.find(e)); if (reIt!=reEntries.end()) @@ -582,7 +582,7 @@ bool MultiPlayerLevel::doSetTileAndData(int x, int y, int z, int tile, int data) // and so the thing being notified of any update through tileUpdated is the renderer int prevTile = getTile(x, y, z); bool visuallyImportant = (!( ( ( prevTile == Tile::water_Id ) && ( tile == Tile::calmWater_Id ) ) || - ( ( prevTile == Tile::calmWater_Id ) && ( tile == Tile::water_Id ) ) || + ( ( prevTile == Tile::calmWater_Id ) && ( tile == Tile::water_Id ) ) || ( ( prevTile == Tile::lava_Id ) && ( tile == Tile::calmLava_Id ) ) || ( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::calmLava_Id ) ) || ( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::lava_Id ) ) ) ); @@ -609,7 +609,7 @@ void MultiPlayerLevel::disconnect(bool sendDisconnect /*= true*/) { for(AUTO_VAR(it, connections.begin()); it < connections.end(); ++it ) { - (*it)->sendAndDisconnect( shared_ptr<DisconnectPacket>( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) ); + (*it)->sendAndDisconnect( std::shared_ptr<DisconnectPacket>( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) ); } } else @@ -687,7 +687,7 @@ void MultiPlayerLevel::animateTick(int xt, int yt, int zt) void MultiPlayerLevel::animateTickDoWork() { const int ticksPerChunk = 16; // This ought to give us roughly the same 1000/32768 chance of a tile being animated as the original - + // Horrible hack to communicate with the level renderer, which is just attached as a listener to this level. This let's the particle // rendering know to use this level (rather than try to work it out from the current player), and to not bother distance clipping particles // which would again be based on the current player. @@ -730,7 +730,7 @@ void MultiPlayerLevel::animateTickDoWork() } -void MultiPlayerLevel::playSound(shared_ptr<Entity> entity, int iSound, float volume, float pitch) +void MultiPlayerLevel::playSound(std::shared_ptr<Entity> entity, int iSound, float volume, float pitch) { playLocalSound(entity->x, entity->y - entity->heightOffset, entity->z, iSound, volume, pitch); } @@ -790,7 +790,7 @@ void MultiPlayerLevel::removeAllPendingEntityRemovals() AUTO_VAR(endIt, entitiesToRemove.end()); for (AUTO_VAR(it, entitiesToRemove.begin()); it != endIt; it++) { - shared_ptr<Entity> e = *it; + std::shared_ptr<Entity> e = *it; int xc = e->xChunk; int zc = e->zChunk; if (e->inChunk && hasChunk(xc, zc)) @@ -809,10 +809,10 @@ void MultiPlayerLevel::removeAllPendingEntityRemovals() //for (int i = 0; i < entities.size(); i++) EnterCriticalSection(&m_entitiesCS); - vector<shared_ptr<Entity> >::iterator it = entities.begin(); + vector<std::shared_ptr<Entity> >::iterator it = entities.begin(); while( it != entities.end() ) { - shared_ptr<Entity> e = *it;//entities.at(i); + std::shared_ptr<Entity> e = *it;//entities.at(i); if (e->riding != NULL) { @@ -821,7 +821,7 @@ void MultiPlayerLevel::removeAllPendingEntityRemovals() e->riding->rider = weak_ptr<Entity>(); e->riding = nullptr; } - else + else { ++it; continue; @@ -853,7 +853,7 @@ void MultiPlayerLevel::removeClientConnection(ClientConnection *c, bool sendDisc { if( sendDisconnect ) { - c->sendAndDisconnect( shared_ptr<DisconnectPacket>( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) ); + c->sendAndDisconnect( std::shared_ptr<DisconnectPacket>( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) ); } AUTO_VAR(it, find( connections.begin(), connections.end(), c )); @@ -886,7 +886,7 @@ void MultiPlayerLevel::removeUnusedTileEntitiesInRegion(int x0, int y0, int z0, for (unsigned int i = 0; i < tileEntityList.size();) { bool removed = false; - shared_ptr<TileEntity> te = tileEntityList[i]; + std::shared_ptr<TileEntity> te = tileEntityList[i]; if (te->x >= x0 && te->y >= y0 && te->z >= z0 && te->x < x1 && te->y < y1 && te->z < z1) { LevelChunk *lc = getChunk(te->x >> 4, te->z >> 4); diff --git a/Minecraft.Client/MultiPlayerLevel.h b/Minecraft.Client/MultiPlayerLevel.h index c07b5583..e075cb8d 100644 --- a/Minecraft.Client/MultiPlayerLevel.h +++ b/Minecraft.Client/MultiPlayerLevel.h @@ -54,21 +54,21 @@ public: void setChunkVisible(int x, int z, bool visible); private: - unordered_map<int, shared_ptr<Entity>, IntKeyHash2, IntKeyEq> entitiesById; // 4J - was IntHashMap - unordered_set<shared_ptr<Entity> > forced; - unordered_set<shared_ptr<Entity> > reEntries; + unordered_map<int, std::shared_ptr<Entity>, IntKeyHash2, IntKeyEq> entitiesById; // 4J - was IntHashMap + unordered_set<std::shared_ptr<Entity> > forced; + unordered_set<std::shared_ptr<Entity> > reEntries; public: - virtual bool addEntity(shared_ptr<Entity> e); - virtual void removeEntity(shared_ptr<Entity> e); + virtual bool addEntity(std::shared_ptr<Entity> e); + virtual void removeEntity(std::shared_ptr<Entity> e); protected: - virtual void entityAdded(shared_ptr<Entity> e); - virtual void entityRemoved(shared_ptr<Entity> e); + virtual void entityAdded(std::shared_ptr<Entity> e); + virtual void entityRemoved(std::shared_ptr<Entity> e); public: - void putEntity(int id, shared_ptr<Entity> e); - shared_ptr<Entity> getEntity(int id); - shared_ptr<Entity> removeEntity(int id); - virtual void removeEntities(vector<shared_ptr<Entity> > *list); // 4J Added override + void putEntity(int id, std::shared_ptr<Entity> e); + std::shared_ptr<Entity> getEntity(int id); + std::shared_ptr<Entity> removeEntity(int id); + virtual void removeEntities(vector<std::shared_ptr<Entity> > *list); // 4J Added override virtual bool setDataNoUpdate(int x, int y, int z, int data); virtual bool setTileAndDataNoUpdate(int x, int y, int z, int tile, int data); virtual bool setTileNoUpdate(int x, int y, int z, int tile); @@ -77,7 +77,7 @@ public: void animateTick(int xt, int yt, int zt); protected: virtual void tickWeather(); - + static const int ANIMATE_TICK_MAX_PARTICLES = 500; public: @@ -87,7 +87,7 @@ public: public: void removeAllPendingEntityRemovals(); - virtual void playSound(shared_ptr<Entity> entity, int iSound, float volume, float pitch); + virtual void playSound(std::shared_ptr<Entity> entity, int iSound, float volume, float pitch); virtual void playLocalSound(double x, double y, double z, int iSound, float volume, float pitch, float fClipSoundDist=16.0f); diff --git a/Minecraft.Client/MultiPlayerLocalPlayer.cpp b/Minecraft.Client/MultiPlayerLocalPlayer.cpp index bb2630e5..29d1caa8 100644 --- a/Minecraft.Client/MultiPlayerLocalPlayer.cpp +++ b/Minecraft.Client/MultiPlayerLocalPlayer.cpp @@ -49,18 +49,18 @@ void MultiplayerLocalPlayer::tick() /*if((app.GetGameSettings(m_iPad,eGameSetting_PlayerVisibleInMap)!=0) != m_bShownOnMaps) { m_bShownOnMaps = (app.GetGameSettings(m_iPad,eGameSetting_PlayerVisibleInMap)!=0); - if (m_bShownOnMaps) connection->send( shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::SHOW_ON_MAPS) ) ); - else connection->send( shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::HIDE_ON_MAPS) ) ); + if (m_bShownOnMaps) connection->send( std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::SHOW_ON_MAPS) ) ); + else connection->send( std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::HIDE_ON_MAPS) ) ); }*/ if (!level->hasChunkAt(Mth::floor(x), 0, Mth::floor(z))) return; double tempX = x, tempY = y, tempZ = z; LocalPlayer::tick(); - + //if( !minecraft->localgameModes[m_iPad]->isTutorial() || minecraft->localgameModes[m_iPad]->getTutorial()->canMoveToPosition(tempX, tempY, tempZ, x, y, z) ) if(minecraft->localgameModes[m_iPad]->getTutorial()->canMoveToPosition(tempX, tempY, tempZ, x, y, z)) - { + { sendPosition(); } else @@ -75,8 +75,8 @@ void MultiplayerLocalPlayer::sendPosition() bool sprinting = isSprinting(); if (sprinting != lastSprinting) { - if (sprinting) connection->send(shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_SPRINTING))); - else connection->send(shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SPRINTING))); + if (sprinting) connection->send(std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_SPRINTING))); + else connection->send(std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SPRINTING))); lastSprinting = sprinting; } @@ -84,8 +84,8 @@ void MultiplayerLocalPlayer::sendPosition() bool sneaking = isSneaking(); if (sneaking != lastSneaked) { - if (sneaking) connection->send( shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_SNEAKING) ) ); - else connection->send( shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SNEAKING) ) ); + if (sneaking) connection->send( std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_SNEAKING) ) ); + else connection->send( std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SNEAKING) ) ); lastSneaked = sneaking; } @@ -93,8 +93,8 @@ void MultiplayerLocalPlayer::sendPosition() bool idle = isIdle(); if (idle != lastIdle) { - if (idle) connection->send( shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_IDLEANIM) ) ); - else connection->send( shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_IDLEANIM) ) ); + if (idle) connection->send( std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_IDLEANIM) ) ); + else connection->send( std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_IDLEANIM) ) ); lastIdle = idle; } @@ -110,26 +110,26 @@ void MultiplayerLocalPlayer::sendPosition() bool rot = rydd != 0 || rxdd != 0; if (riding != NULL) { - connection->send( shared_ptr<MovePlayerPacket>( new MovePlayerPacket::PosRot(xd, -999, -999, zd, yRot, xRot, onGround, abilities.flying) ) ); + connection->send( std::shared_ptr<MovePlayerPacket>( new MovePlayerPacket::PosRot(xd, -999, -999, zd, yRot, xRot, onGround, abilities.flying) ) ); move = false; } else { if (move && rot) { - connection->send( shared_ptr<MovePlayerPacket>( new MovePlayerPacket::PosRot(x, bb->y0, y, z, yRot, xRot, onGround, abilities.flying) ) ); + connection->send( std::shared_ptr<MovePlayerPacket>( new MovePlayerPacket::PosRot(x, bb->y0, y, z, yRot, xRot, onGround, abilities.flying) ) ); } else if (move) { - connection->send( shared_ptr<MovePlayerPacket>( new MovePlayerPacket::Pos(x, bb->y0, y, z, onGround, abilities.flying) ) ); + connection->send( std::shared_ptr<MovePlayerPacket>( new MovePlayerPacket::Pos(x, bb->y0, y, z, onGround, abilities.flying) ) ); } else if (rot) { - connection->send( shared_ptr<MovePlayerPacket>( new MovePlayerPacket::Rot(yRot, xRot, onGround, abilities.flying) ) ); + connection->send( std::shared_ptr<MovePlayerPacket>( new MovePlayerPacket::Rot(yRot, xRot, onGround, abilities.flying) ) ); } else { - connection->send( shared_ptr<MovePlayerPacket>( new MovePlayerPacket(onGround, abilities.flying) ) ); + connection->send( std::shared_ptr<MovePlayerPacket>( new MovePlayerPacket(onGround, abilities.flying) ) ); } } @@ -152,31 +152,31 @@ void MultiplayerLocalPlayer::sendPosition() } -shared_ptr<ItemEntity> MultiplayerLocalPlayer::drop() +std::shared_ptr<ItemEntity> MultiplayerLocalPlayer::drop() { - connection->send( shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::DROP_ITEM, 0, 0, 0, 0) ) ); + connection->send( std::shared_ptr<PlayerActionPacket>( new PlayerActionPacket(PlayerActionPacket::DROP_ITEM, 0, 0, 0, 0) ) ); return nullptr; } -void MultiplayerLocalPlayer::reallyDrop(shared_ptr<ItemEntity> itemEntity) +void MultiplayerLocalPlayer::reallyDrop(std::shared_ptr<ItemEntity> itemEntity) { } void MultiplayerLocalPlayer::chat(const wstring& message) { - connection->send( shared_ptr<ChatPacket>( new ChatPacket(message) ) ); + connection->send( std::shared_ptr<ChatPacket>( new ChatPacket(message) ) ); } void MultiplayerLocalPlayer::swing() { LocalPlayer::swing(); - connection->send( shared_ptr<AnimatePacket>( new AnimatePacket(shared_from_this(), AnimatePacket::SWING) ) ); + connection->send( std::shared_ptr<AnimatePacket>( new AnimatePacket(shared_from_this(), AnimatePacket::SWING) ) ); } void MultiplayerLocalPlayer::respawn() { - connection->send( shared_ptr<ClientCommandPacket>( new ClientCommandPacket(ClientCommandPacket::PERFORM_RESPAWN))); + connection->send( std::shared_ptr<ClientCommandPacket>( new ClientCommandPacket(ClientCommandPacket::PERFORM_RESPAWN))); } @@ -238,7 +238,7 @@ void MultiplayerLocalPlayer::onEffectRemoved(MobEffectInstance *effect) void MultiplayerLocalPlayer::closeContainer() { - connection->send( shared_ptr<ContainerClosePacket>( new ContainerClosePacket(containerMenu->containerId) ) ); + connection->send( std::shared_ptr<ContainerClosePacket>( new ContainerClosePacket(containerMenu->containerId) ) ); inventory->setCarried(nullptr); LocalPlayer::closeContainer(); } @@ -286,7 +286,7 @@ void MultiplayerLocalPlayer::awardStatFromServer(Stat *stat, byteArray param) void MultiplayerLocalPlayer::onUpdateAbilities() { - connection->send(shared_ptr<PlayerAbilitiesPacket>(new PlayerAbilitiesPacket(&abilities))); + connection->send(std::shared_ptr<PlayerAbilitiesPacket>(new PlayerAbilitiesPacket(&abilities))); } bool MultiplayerLocalPlayer::isLocalPlayer() @@ -294,7 +294,7 @@ bool MultiplayerLocalPlayer::isLocalPlayer() return true; } -void MultiplayerLocalPlayer::ride(shared_ptr<Entity> e) +void MultiplayerLocalPlayer::ride(std::shared_ptr<Entity> e) { bool wasRiding = riding != NULL; LocalPlayer::ride(e); @@ -324,7 +324,7 @@ void MultiplayerLocalPlayer::ride(shared_ptr<Entity> e) updateRichPresence(); Minecraft *pMinecraft = Minecraft::GetInstance(); - + if( pMinecraft->localgameModes[m_iPad] != NULL ) { TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad]; @@ -344,7 +344,7 @@ void MultiplayerLocalPlayer::ride(shared_ptr<Entity> e) void MultiplayerLocalPlayer::StopSleeping() { - connection->send( shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SLEEPING) ) ); + connection->send( std::shared_ptr<PlayerCommandPacket>( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SLEEPING) ) ); } // 4J Added @@ -355,7 +355,7 @@ void MultiplayerLocalPlayer::setAndBroadcastCustomSkin(DWORD skinId) #ifndef _CONTENT_PACKAGE wprintf(L"Skin for local player %ls has changed to %ls (%d)\n", name.c_str(), customTextureUrl.c_str(), getPlayerDefaultSkin() ); #endif - if(getCustomSkin() != oldSkinIndex) connection->send( shared_ptr<TextureAndGeometryChangePacket>( new TextureAndGeometryChangePacket( shared_from_this(), app.GetPlayerSkinName(GetXboxPad()) ) ) ); + if(getCustomSkin() != oldSkinIndex) connection->send( std::shared_ptr<TextureAndGeometryChangePacket>( new TextureAndGeometryChangePacket( shared_from_this(), app.GetPlayerSkinName(GetXboxPad()) ) ) ); } void MultiplayerLocalPlayer::setAndBroadcastCustomCape(DWORD capeId) @@ -365,5 +365,5 @@ void MultiplayerLocalPlayer::setAndBroadcastCustomCape(DWORD capeId) #ifndef _CONTENT_PACKAGE wprintf(L"Cape for local player %ls has changed to %ls\n", name.c_str(), customTextureUrl2.c_str()); #endif - if(getCustomCape() != oldCapeIndex) connection->send( shared_ptr<TextureChangePacket>( new TextureChangePacket( shared_from_this(), TextureChangePacket::e_TextureChange_Cape, app.GetPlayerCapeName(GetXboxPad()) ) ) ); + if(getCustomCape() != oldCapeIndex) connection->send( std::shared_ptr<TextureChangePacket>( new TextureChangePacket( shared_from_this(), TextureChangePacket::e_TextureChange_Cape, app.GetPlayerCapeName(GetXboxPad()) ) ) ); } diff --git a/Minecraft.Client/MultiPlayerLocalPlayer.h b/Minecraft.Client/MultiPlayerLocalPlayer.h index 8687b36a..24244564 100644 --- a/Minecraft.Client/MultiPlayerLocalPlayer.h +++ b/Minecraft.Client/MultiPlayerLocalPlayer.h @@ -33,9 +33,9 @@ public: void sendPosition(); using Player::drop; - virtual shared_ptr<ItemEntity> drop(); + virtual std::shared_ptr<ItemEntity> drop(); protected: - virtual void reallyDrop(shared_ptr<ItemEntity> itemEntity); + virtual void reallyDrop(std::shared_ptr<ItemEntity> itemEntity); public: virtual void chat(const wstring& message); virtual void swing(); @@ -62,7 +62,7 @@ public: //void CustomSkin(PBYTE pbData, DWORD dwBytes); // 4J Overriding this so we can flag an event for the tutorial - virtual void ride(shared_ptr<Entity> e); + virtual void ride(std::shared_ptr<Entity> e); // 4J - added for the Stop Sleeping virtual void StopSleeping(); diff --git a/Minecraft.Client/MushroomCowRenderer.cpp b/Minecraft.Client/MushroomCowRenderer.cpp index 688fab5c..b34ffaf1 100644 --- a/Minecraft.Client/MushroomCowRenderer.cpp +++ b/Minecraft.Client/MushroomCowRenderer.cpp @@ -9,21 +9,21 @@ MushroomCowRenderer::MushroomCowRenderer(Model *model, float shadow) : MobRender { } -void MushroomCowRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void MushroomCowRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type MushroomCow rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type MushroomCow rather than std::shared_ptr<Entity> we have here - // do some casting around instead - //shared_ptr<MushroomCow> mob = dynamic_pointer_cast<MushroomCow>(_mob); + //std::shared_ptr<MushroomCow> mob = dynamic_pointer_cast<MushroomCow>(_mob); // 4J Stu - No need to do the cast, just pass through as-is MobRenderer::render(_mob, x, y, z, rot, a); } -void MushroomCowRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) +void MushroomCowRenderer::additionalRendering(std::shared_ptr<Mob> _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type MushroomCow rather than shared_ptr<Mob> we have here - + // 4J - original version used generics and thus had an input parameter of type MushroomCow rather than std::shared_ptr<Mob> we have here - // do some casting around instead - shared_ptr<MushroomCow> mob = dynamic_pointer_cast<MushroomCow>(_mob); + std::shared_ptr<MushroomCow> mob = dynamic_pointer_cast<MushroomCow>(_mob); MobRenderer::additionalRendering(mob, a); if (mob->isBaby()) return; bindTexture(TN_TERRAIN); // 4J was "/terrain.png" diff --git a/Minecraft.Client/MushroomCowRenderer.h b/Minecraft.Client/MushroomCowRenderer.h index c5f6f3c4..8d01ea81 100644 --- a/Minecraft.Client/MushroomCowRenderer.h +++ b/Minecraft.Client/MushroomCowRenderer.h @@ -7,8 +7,8 @@ class MushroomCowRenderer : public MobRenderer public: MushroomCowRenderer(Model *model, float shadow); - virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); protected: - virtual void additionalRendering(shared_ptr<Mob> _mob, float a); + virtual void additionalRendering(std::shared_ptr<Mob> _mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/OzelotModel.cpp b/Minecraft.Client/OzelotModel.cpp index 9c22cc4b..b0557012 100644 --- a/Minecraft.Client/OzelotModel.cpp +++ b/Minecraft.Client/OzelotModel.cpp @@ -78,7 +78,7 @@ OzelotModel::OzelotModel() backLegR->compile(1.0f/16.0f); } -void OzelotModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void OzelotModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); if (young) @@ -180,9 +180,9 @@ void OzelotModel::setupAnim(float time, float r, float bob, float yRot, float xR } } -void OzelotModel::prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) +void OzelotModel::prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) { - shared_ptr<Ozelot> ozelot = dynamic_pointer_cast<Ozelot>(mob); + std::shared_ptr<Ozelot> ozelot = dynamic_pointer_cast<Ozelot>(mob); body->y = bodyWalkY; body->z = bodyWalkZ; diff --git a/Minecraft.Client/OzelotModel.h b/Minecraft.Client/OzelotModel.h index 2c08f3df..cdccc8fe 100644 --- a/Minecraft.Client/OzelotModel.h +++ b/Minecraft.Client/OzelotModel.h @@ -36,8 +36,8 @@ private: public: OzelotModel(); - void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); void render(OzelotModel *model, float scale, bool usecompiled); void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - void prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a); + void prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/OzelotRenderer.cpp b/Minecraft.Client/OzelotRenderer.cpp index d56b35f9..54c50d69 100644 --- a/Minecraft.Client/OzelotRenderer.cpp +++ b/Minecraft.Client/OzelotRenderer.cpp @@ -6,16 +6,16 @@ OzelotRenderer::OzelotRenderer(Model *model, float shadow) : MobRenderer(model, { } -void OzelotRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void OzelotRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { MobRenderer::render(_mob, x, y, z, rot, a); } -void OzelotRenderer::scale(shared_ptr<Mob> _mob, float a) +void OzelotRenderer::scale(std::shared_ptr<Mob> _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<Ozelot> mob = dynamic_pointer_cast<Ozelot>(_mob); + std::shared_ptr<Ozelot> mob = dynamic_pointer_cast<Ozelot>(_mob); MobRenderer::scale(mob, a); if (mob->isTame()) { diff --git a/Minecraft.Client/OzelotRenderer.h b/Minecraft.Client/OzelotRenderer.h index 9627b4f1..a9fc1223 100644 --- a/Minecraft.Client/OzelotRenderer.h +++ b/Minecraft.Client/OzelotRenderer.h @@ -7,8 +7,8 @@ class OzelotRenderer : public MobRenderer public: OzelotRenderer(Model *model, float shadow); - void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); protected: - void scale(shared_ptr<Mob> _mob, float a); + void scale(std::shared_ptr<Mob> _mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/PS3/PS3Extras/Ps3Types.h b/Minecraft.Client/PS3/PS3Extras/Ps3Types.h index ade37607..6cacd7a0 100644 --- a/Minecraft.Client/PS3/PS3Extras/Ps3Types.h +++ b/Minecraft.Client/PS3/PS3Extras/Ps3Types.h @@ -25,7 +25,7 @@ using std::tr1::const_pointer_cast; using std::tr1::dynamic_pointer_cast; using std::tr1::enable_shared_from_this; using std::tr1::get_deleter; -using std::tr1::shared_ptr; +using std::tr1::std::shared_ptr; using std::tr1::static_pointer_cast; using std::tr1::swap; using std::tr1::weak_ptr; @@ -62,7 +62,7 @@ using boost::hash; class Cnullptr{ public: template<typename T> - operator shared_ptr<T>() { return shared_ptr<T>(); } + operator std::shared_ptr<T>() { return std::shared_ptr<T>(); } }; extern Cnullptr nullptr; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_iarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_iarchive.hpp index 638d9967..9d786645 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_iarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,7 +25,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { // do not derive from the classes below. If you want to extend this functionality @@ -33,10 +33,10 @@ namespace archive { // preserve correct static polymorphism. // same as binary_iarchive below - without the shared_ptr_helper -class naked_binary_iarchive : +class naked_binary_iarchive : public binary_iarchive_impl< - boost::archive::naked_binary_iarchive, - std::istream::char_type, + boost::archive::naked_binary_iarchive, + std::istream::char_type, std::istream::traits_type > { @@ -56,22 +56,22 @@ public: } // namespace archive } // namespace boost -// note special treatment of shared_ptr. This type needs a special +// note special treatment of std::shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a +// class to provide this functionality. Since std::shared_ptr holds a // special esteem in the boost library - we included it here by default. #include <boost/archive/shared_ptr_helper.hpp> -namespace boost { +namespace boost { namespace archive { // do not derive from this class. If you want to extend this functionality // via inhertance, derived from binary_iarchive_impl instead. This will // preserve correct static polymorphism. -class binary_iarchive : +class binary_iarchive : public binary_iarchive_impl< - boost::archive::binary_iarchive, - std::istream::char_type, + boost::archive::binary_iarchive, + std::istream::char_type, std::istream::traits_type >, public detail::shared_ptr_helper diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_wiarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_wiarchive.hpp index b5f6a710..81f67c04 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_wiarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,29 +25,29 @@ #include <boost/archive/binary_iarchive_impl.hpp> #include <boost/archive/detail/register_archive.hpp> -namespace boost { +namespace boost { namespace archive { // same as binary_wiarchive below - without the shared_ptr_helper -class naked_binary_wiarchive : +class naked_binary_wiarchive : public binary_iarchive_impl< - boost::archive::naked_binary_wiarchive, - std::wistream::char_type, + boost::archive::naked_binary_wiarchive, + std::wistream::char_type, std::wistream::traits_type > { public: naked_binary_wiarchive(std::wistream & is, unsigned int flags = 0) : binary_iarchive_impl< - naked_binary_wiarchive, - std::wistream::char_type, + naked_binary_wiarchive, + std::wistream::char_type, std::wistream::traits_type >(is, flags) {} naked_binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) : binary_iarchive_impl< - naked_binary_wiarchive, - std::wistream::char_type, + naked_binary_wiarchive, + std::wistream::char_type, std::wistream::traits_type >(bsb, flags) {} @@ -56,16 +56,16 @@ public: } // namespace archive } // namespace boost -// note special treatment of shared_ptr. This type needs a special +// note special treatment of std::shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a +// class to provide this functionality. Since std::shared_ptr holds a // special esteem in the boost library - we included it here by default. #include <boost/archive/shared_ptr_helper.hpp> -namespace boost { +namespace boost { namespace archive { -class binary_wiarchive : +class binary_wiarchive : public binary_iarchive_impl< binary_wiarchive, std::wistream::char_type, std::wistream::traits_type > diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_iarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_iarchive.hpp index ce780c84..828f03f6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_iarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_iarchive.hpp @@ -40,7 +40,7 @@ namespace std{ namespace boost { template<class T> -class shared_ptr; +class std::shared_ptr; namespace serialization { class extended_type_info; } // namespace serialization @@ -155,9 +155,9 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special +// note special treatment of std::shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a +// class to provide this functionality. Since std::shared_ptr holds a // special esteem in the boost library - we included it here by default. #include <boost/archive/shared_ptr_helper.hpp> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_oarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_oarchive.hpp index 183140ee..458df7eb 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_oarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_oarchive.hpp @@ -39,7 +39,7 @@ namespace std{ namespace boost { template<class T> -class shared_ptr; +class std::shared_ptr; namespace serialization { class extended_type_info; } // namespace serialization diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/shared_ptr_helper.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/shared_ptr_helper.hpp index 39e6eb82..f49f768c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/shared_ptr_helper.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/shared_ptr_helper.hpp @@ -22,7 +22,7 @@ #include <cstddef> // NULL #include <boost/config.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/type_traits/is_polymorphic.hpp> #include <boost/serialization/type_info_implementation.hpp> @@ -35,16 +35,16 @@ #include <boost/archive/detail/abi_prefix.hpp> // must be the last headern namespace boost_132 { - template<class T> class shared_ptr; + template<class T> class std::shared_ptr; } namespace boost { - template<class T> class shared_ptr; + template<class T> class std::shared_ptr; namespace serialization { class extended_type_info; template<class Archive, class T> inline void load( Archive & ar, - boost::shared_ptr< T > &t, + boost::std::shared_ptr< T > &t, const unsigned int file_version ); } @@ -57,14 +57,14 @@ namespace detail { class shared_ptr_helper { struct collection_type_compare { bool operator()( - const shared_ptr<const void> &lhs, - const shared_ptr<const void> &rhs + const std::shared_ptr<const void> &lhs, + const std::shared_ptr<const void> &rhs )const{ return lhs.get() < rhs.get(); } }; typedef std::set< - boost::shared_ptr<const void>, + boost::std::shared_ptr<const void>, collection_type_compare > collection_type; typedef collection_type::const_iterator iterator_type; @@ -72,7 +72,7 @@ class shared_ptr_helper { // is used to "match up" shared pointers loaded at different // points in the archive. Note, we delay construction until // it is actually used since this is by default included as - // a "mix-in" even if shared_ptr isn't used. + // a "mix-in" even if std::shared_ptr isn't used. collection_type * m_pointers; struct null_deleter { @@ -95,7 +95,7 @@ public: template<class Archive, class T> friend inline void boost::serialization::load( Archive & ar, - boost::shared_ptr< T > &t, + boost::std::shared_ptr< T > &t, const unsigned int file_version ); #endif @@ -109,44 +109,44 @@ public: // new system which is disjoint from this set. This is implemented // by a change in load_construct_data below. It makes this file suitable // only for loading pointers into a 1.33 or later boost system. - std::list<boost_132::shared_ptr<const void> > * m_pointers_132; + std::list<boost_132::std::shared_ptr<const void> > * m_pointers_132; // #endif // returns pointer to object and an indicator whether this is a // new entry (true) or a previous one (false) - BOOST_ARCHIVE_DECL(shared_ptr<void>) + BOOST_ARCHIVE_DECL(std::shared_ptr<void>) get_od( const void * od, - const boost::serialization::extended_type_info * true_type, + const boost::serialization::extended_type_info * true_type, const boost::serialization::extended_type_info * this_type ); BOOST_ARCHIVE_DECL(void) - append(const boost::shared_ptr<const void> &); + append(const boost::std::shared_ptr<const void> &); template<class T> struct non_polymorphic { - static const boost::serialization::extended_type_info * + static const boost::serialization::extended_type_info * get_object_identifier(T &){ return & boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + BOOST_DEDUCED_TYPENAME boost::serialization::type_info_implementation< T >::type >::get_const_instance(); } }; template<class T> struct polymorphic { - static const boost::serialization::extended_type_info * + static const boost::serialization::extended_type_info * get_object_identifier(T & t){ return boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + BOOST_DEDUCED_TYPENAME boost::serialization::type_info_implementation< T >::type >::get_const_instance().get_derived_extended_type_info(t); } }; public: template<class T> - void reset(shared_ptr< T > & s, T * t){ + void reset(std::shared_ptr< T > & s, T * t){ if(NULL == t){ s.reset(); return; @@ -175,9 +175,9 @@ public: this_type->get_debug_info() ) ); - shared_ptr<void> r = + std::shared_ptr<void> r = get_od( - static_cast<const void *>(t), + static_cast<const void *>(t), true_type, this_type ); @@ -188,11 +188,11 @@ public: *this_type, static_cast<const void *>(t) ); - shared_ptr<const void> sp(s, od); + std::shared_ptr<const void> sp(s, od); append(sp); } else{ - s = shared_ptr< T >( + s = std::shared_ptr< T >( r, static_cast<T *>(r.get()) ); @@ -201,7 +201,7 @@ public: // #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP BOOST_ARCHIVE_DECL(void) - append(const boost_132::shared_ptr<const void> & t); + append(const boost_132::std::shared_ptr<const void> & t); // #endif public: BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_iarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_iarchive.hpp index 298928b3..00be983e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_iarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,11 +32,11 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { template<class Archive> -class text_iarchive_impl : +class text_iarchive_impl : public basic_text_iprimitive<std::istream>, public basic_text_iarchive<Archive> { @@ -62,16 +62,16 @@ protected: load(v); t = boost::serialization::item_version_type(v); } - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL(void) load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL(void) load(wchar_t * t); #endif - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL(void) load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL(void) load(std::wstring &ws); #endif // note: the following should not needed - but one compiler (vc 7.1) @@ -85,10 +85,10 @@ protected: load_override(class_name_type & t, int); BOOST_ARCHIVE_DECL(void) init(); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) text_iarchive_impl(std::istream & is, unsigned int flags); // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~text_iarchive_impl(){}; }; @@ -97,7 +97,7 @@ protected: // preserve correct static polymorphism. // same as text_iarchive below - without the shared_ptr_helper -class naked_text_iarchive : +class naked_text_iarchive : public text_iarchive_impl<naked_text_iarchive> { public: @@ -117,9 +117,9 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special +// note special treatment of std::shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a +// class to provide this functionality. Since std::shared_ptr holds a // special esteem in the boost library - we included it here by default. #include <boost/archive/shared_ptr_helper.hpp> @@ -128,10 +128,10 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class text_iarchive : +class text_iarchive : public text_iarchive_impl<text_iarchive>, public detail::shared_ptr_helper { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_wiarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_wiarchive.hpp index 7451f3a6..d96b816b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_wiarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -36,11 +36,11 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { template<class Archive> -class text_wiarchive_impl : +class text_wiarchive_impl : public basic_text_iprimitive<std::wistream>, public basic_text_iarchive<Archive> { @@ -84,7 +84,7 @@ protected: void load_override(T & t, BOOST_PFTO int){ basic_text_iarchive<Archive>::load_override(t, 0); } - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) text_wiarchive_impl(std::wistream & is, unsigned int flags); ~text_wiarchive_impl(){}; }; @@ -94,7 +94,7 @@ protected: // preserve correct static polymorphism. // same as text_wiarchive below - without the shared_ptr_helper -class naked_text_wiarchive : +class naked_text_wiarchive : public text_wiarchive_impl<naked_text_wiarchive> { public: @@ -113,9 +113,9 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special +// note special treatment of std::shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a +// class to provide this functionality. Since std::shared_ptr holds a // special esteem in the boost library - we included it here by default. #include <boost/archive/shared_ptr_helper.hpp> @@ -124,10 +124,10 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class text_wiarchive : +class text_wiarchive : public text_wiarchive_impl<text_wiarchive>, public detail::shared_ptr_helper { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_iarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_iarchive.hpp index be6cfe49..cdf51642 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_iarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,7 +32,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { template<class CharType> @@ -40,7 +40,7 @@ class basic_xml_grammar; typedef basic_xml_grammar<char> xml_grammar; template<class Archive> -class xml_iarchive_impl : +class xml_iarchive_impl : public basic_text_iprimitive<std::istream>, public basic_xml_iarchive<Archive> { @@ -64,13 +64,13 @@ protected: void load(T & t){ basic_text_iprimitive<std::istream>::load(t); } - void + void load(version_type & t){ unsigned int v; load(v); t = version_type(v); } - void + void load(boost::serialization::item_version_type & t){ unsigned int v; load(v); @@ -96,7 +96,7 @@ protected: load_override(class_name_type & t, int); BOOST_ARCHIVE_DECL(void) init(); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_iarchive_impl(std::istream & is, unsigned int flags); BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~xml_iarchive_impl(); @@ -107,7 +107,7 @@ protected: // preserve correct static polymorphism. // same as xml_iarchive below - without the shared_ptr_helper -class naked_xml_iarchive : +class naked_xml_iarchive : public xml_iarchive_impl<naked_xml_iarchive> { public: @@ -126,9 +126,9 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special +// note special treatment of std::shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a +// class to provide this functionality. Since std::shared_ptr holds a // special esteem in the boost library - we included it here by default. #include <boost/archive/shared_ptr_helper.hpp> @@ -137,10 +137,10 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class xml_iarchive : +class xml_iarchive : public xml_iarchive_impl<xml_iarchive>, public detail::shared_ptr_helper { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_wiarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_wiarchive.hpp index 59ebbb5e..2fb0a538 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_wiarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -37,7 +37,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { template<class CharType> @@ -45,7 +45,7 @@ class basic_xml_grammar; typedef basic_xml_grammar<wchar_t> xml_wgrammar; template<class Archive> -class xml_wiarchive_impl : +class xml_wiarchive_impl : public basic_text_iprimitive<std::wistream>, public basic_xml_iarchive<Archive> { @@ -65,17 +65,17 @@ protected: return is; } template<class T> - void + void load(T & t){ basic_text_iprimitive<std::wistream>::load(t); } - void + void load(version_type & t){ unsigned int v; load(v); t = version_type(v); } - void + void load(boost::serialization::item_version_type & t){ unsigned int v; load(v); @@ -99,11 +99,11 @@ protected: } BOOST_WARCHIVE_DECL(void) load_override(class_name_type & t, int); - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL(void) init(); - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~xml_wiarchive_impl(); }; @@ -112,7 +112,7 @@ protected: // preserve correct static polymorphism. // same as xml_wiarchive below - without the shared_ptr_helper -class naked_xml_wiarchive : +class naked_xml_wiarchive : public xml_wiarchive_impl<naked_xml_wiarchive> { public: @@ -126,14 +126,14 @@ public: } // namespace boost #ifdef BOOST_MSVC -# pragma warning(pop) +# pragma warning(pop) #endif #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special +// note special treatment of std::shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a +// class to provide this functionality. Since std::shared_ptr holds a // special esteem in the boost library - we included it here by default. #include <boost/archive/shared_ptr_helper.hpp> @@ -142,10 +142,10 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class xml_wiarchive : +class xml_wiarchive : public xml_wiarchive_impl<xml_wiarchive>, public detail::shared_ptr_helper { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/config.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/config.hpp index 40f770ca..9c93a2c7 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/config.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/config.hpp @@ -144,7 +144,7 @@ # endif // defined(BOOST_MSVC) #endif // !defined(BOOST_ASIO_DISABLE_STD_ARRAY) -// Standard library support for shared_ptr and weak_ptr. +// Standard library support for std::shared_ptr and weak_ptr. #if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/shared_ptr.hpp index 5f0da22e..30ce3ffd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/shared_ptr.hpp @@ -1,5 +1,5 @@ // -// detail/shared_ptr.hpp +// detail/std::shared_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) @@ -20,7 +20,7 @@ #if defined(BOOST_ASIO_HAS_STD_SHARED_PTR) # include <memory> #else // defined(BOOST_ASIO_HAS_STD_SHARED_PTR) -# include <boost/shared_ptr.hpp> +# include <boost/std::shared_ptr.hpp> #endif // defined(BOOST_ASIO_HAS_STD_SHARED_PTR) namespace boost { @@ -30,7 +30,7 @@ namespace detail { #if defined(BOOST_ASIO_HAS_STD_SHARED_PTR) using std::shared_ptr; #else // defined(BOOST_ASIO_HAS_STD_SHARED_PTR) -using boost::shared_ptr; +using boost::std::shared_ptr; #endif // defined(BOOST_ASIO_HAS_STD_SHARED_PTR) } // namespace detail diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/socket_ops.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/socket_ops.hpp index 92af9fbe..78b9da3f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/socket_ops.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/socket_ops.hpp @@ -18,7 +18,7 @@ #include <boost/asio/detail/config.hpp> #include <boost/system/error_code.hpp> -#include <boost/asio/detail/shared_ptr.hpp> +#include <boost/asio/detail/std::shared_ptr.hpp> #include <boost/asio/detail/socket_types.hpp> #include <boost/asio/detail/weak_ptr.hpp> @@ -60,7 +60,7 @@ enum typedef unsigned char state_type; struct noop_deleter { void operator()(void*) {} }; -typedef shared_ptr<void> shared_cancel_token_type; +typedef std::shared_ptr<void> shared_cancel_token_type; typedef weak_ptr<void> weak_cancel_token_type; BOOST_ASIO_DECL socket_type accept(socket_type s, socket_addr_type* addr, diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/io_service.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/io_service.hpp index 43b94e46..e56aea45 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/io_service.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/io_service.hpp @@ -232,19 +232,19 @@ public: * <tt>delete static_cast<io_service::service*>(svc)</tt>. * * @note The destruction sequence described above permits programs to - * simplify their resource management by using @c shared_ptr<>. Where an + * simplify their resource management by using @c std::shared_ptr<>. Where an * object's lifetime is tied to the lifetime of a connection (or some other - * sequence of asynchronous operations), a @c shared_ptr to the object would + * sequence of asynchronous operations), a @c std::shared_ptr to the object would * be bound into the handlers for all asynchronous operations associated with * it. This works as follows: * * @li When a single connection ends, all associated asynchronous operations * complete. The corresponding handler objects are destroyed, and all - * @c shared_ptr references to the objects are destroyed. + * @c std::shared_ptr references to the objects are destroyed. * * @li To shut down the whole program, the io_service function stop() is * called to terminate any run() calls as soon as possible. The io_service - * destructor defined above destroys all handlers, causing all @c shared_ptr + * destructor defined above destroys all handlers, causing all @c std::shared_ptr * references to all connection objects to be destroyed. */ BOOST_ASIO_DECL ~io_service(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ip/basic_resolver_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ip/basic_resolver_iterator.hpp index 6e52a852..fda14dcd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ip/basic_resolver_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ip/basic_resolver_iterator.hpp @@ -21,7 +21,7 @@ #include <iterator> #include <string> #include <vector> -#include <boost/asio/detail/shared_ptr.hpp> +#include <boost/asio/detail/std::shared_ptr.hpp> #include <boost/asio/detail/socket_ops.hpp> #include <boost/asio/detail/socket_types.hpp> #include <boost/asio/ip/basic_resolver_entry.hpp> @@ -184,7 +184,7 @@ private: } typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type; - boost::asio::detail::shared_ptr<values_type> values_; + boost::asio::detail::std::shared_ptr<values_type> values_; std::size_t index_; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/impl/openssl_init.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/impl/openssl_init.ipp index fe62e6ea..ec1b26d5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/impl/openssl_init.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/impl/openssl_init.ipp @@ -37,7 +37,7 @@ public: do_init() { ::SSL_library_init(); - ::SSL_load_error_strings(); + ::SSL_load_error_strings(); ::OpenSSL_add_all_algorithms(); mutexes_.resize(::CRYPTO_num_locks()); @@ -75,7 +75,7 @@ private: #endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__) } - static void openssl_locking_func(int mode, int n, + static void openssl_locking_func(int mode, int n, const char* /*file*/, int /*line*/) { if (mode & CRYPTO_LOCK) @@ -85,7 +85,7 @@ private: } // Mutexes to be used in locking callbacks. - std::vector<boost::asio::detail::shared_ptr< + std::vector<boost::asio::detail::std::shared_ptr< boost::asio::detail::mutex> > mutexes_; #if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) @@ -94,10 +94,10 @@ private: #endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) }; -boost::asio::detail::shared_ptr<openssl_init_base::do_init> +boost::asio::detail::std::shared_ptr<openssl_init_base::do_init> openssl_init_base::instance() { - static boost::asio::detail::shared_ptr<do_init> init(new do_init); + static boost::asio::detail::std::shared_ptr<do_init> init(new do_init); return init; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/openssl_init.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/openssl_init.hpp index c68909d1..24d033fe 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/openssl_init.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/openssl_init.hpp @@ -18,7 +18,7 @@ #include <boost/asio/detail/config.hpp> #include <cstring> #include <boost/asio/detail/noncopyable.hpp> -#include <boost/asio/detail/shared_ptr.hpp> +#include <boost/asio/detail/std::shared_ptr.hpp> #include <boost/asio/detail/push_options.hpp> @@ -39,7 +39,7 @@ protected: // main, and therefore before any other threads can get started. The do_init // instance must be static in this function to ensure that it gets // initialised before any other global objects try to use it. - BOOST_ASIO_DECL static boost::asio::detail::shared_ptr<do_init> instance(); + BOOST_ASIO_DECL static boost::asio::detail::std::shared_ptr<do_init> instance(); }; template <bool Do_Init = true> @@ -68,7 +68,7 @@ private: // Reference to singleton do_init object to ensure that openssl does not get // cleaned up until the last user has finished with it. - boost::asio::detail::shared_ptr<do_init> ref_; + boost::asio::detail::std::shared_ptr<do_init> ref_; }; template <bool Do_Init> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/gcc.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/gcc.hpp index c0ac30af..a3469766 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/gcc.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/gcc.hpp @@ -1,12 +1,12 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Jens Maurer 2001 - 2002. -// (C) Copyright Beman Dawes 2001 - 2003. -// (C) Copyright Douglas Gregor 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Synge Todo 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Jens Maurer 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Douglas Gregor 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Synge Todo 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. @@ -15,7 +15,7 @@ #if __GNUC__ < 3 # if __GNUC_MINOR__ == 91 - // egcs 1.1 won't parse shared_ptr.hpp without this: + // egcs 1.1 won't parse std::shared_ptr.hpp without this: # define BOOST_NO_AUTO_PTR # endif # if __GNUC_MINOR__ < 95 @@ -97,7 +97,7 @@ // #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) # define BOOST_HAS_THREADS -#endif +#endif // // gcc has "long long" @@ -116,7 +116,7 @@ // #if __GNUC__ >= 4 # if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) - // All Win32 development environments, including 64-bit Windows and MinGW, define + // All Win32 development environments, including 64-bit Windows and MinGW, define // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, // so does not define _WIN32 or its variants. # define BOOST_HAS_DECLSPEC @@ -128,7 +128,7 @@ # endif # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) #else -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif @@ -169,7 +169,7 @@ # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT -// Variadic templates compiler: +// Variadic templates compiler: // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html # if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__)) # define BOOST_HAS_VARIADIC_TMPL diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/sunpro_cc.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/sunpro_cc.hpp index 65beb501..e796a16d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/sunpro_cc.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/sunpro_cc.hpp @@ -1,10 +1,10 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Peter Dimov 2002. -// (C) Copyright Aleksey Gurtovoy 2002 - 2003. -// (C) Copyright David Abrahams 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Peter Dimov 2002. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright David Abrahams 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. @@ -34,7 +34,7 @@ # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif -# if (__SUNPRO_CC <= 0x530) +# if (__SUNPRO_CC <= 0x530) // Requesting debug info (-g) with Boost.Python results // in an internal compiler error for "static const" // initialized in-class. @@ -44,7 +44,7 @@ # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION // SunPro 5.3 has better support for partial specialization, - // but breaks when compiling std::less<shared_ptr<T> > + // but breaks when compiling std::less<std::shared_ptr<T> > // (Jens Maurer 4 Nov 2001). // std::less specialization fixed as reported by George @@ -57,7 +57,7 @@ # define BOOST_NO_INTEGRAL_INT64_T # endif -# if (__SUNPRO_CC < 0x570) +# if (__SUNPRO_CC < 0x570) # define BOOST_NO_TEMPLATE_TEMPLATES // see http://lists.boost.org/MailArchives/boost/msg47184.php // and http://lists.boost.org/MailArchives/boost/msg47220.php @@ -65,7 +65,7 @@ # define BOOST_NO_SFINAE # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS # endif -# if (__SUNPRO_CC <= 0x580) +# if (__SUNPRO_CC <= 0x580) # define BOOST_NO_IS_ABSTRACT # endif diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/platform/win32.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/platform/win32.hpp index 39220127..066b2e88 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/platform/win32.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/platform/win32.hpp @@ -1,9 +1,9 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Bill Kempf 2001. -// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Bill Kempf 2001. +// (C) Copyright Aleksey Gurtovoy 2003. // (C) Copyright Rene Rivera 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. @@ -46,11 +46,11 @@ // // Win32 will normally be using native Win32 threads, // but there is a pthread library avaliable as an option, -// we used to disable this when BOOST_DISABLE_WIN32 was +// we used to disable this when BOOST_DISABLE_WIN32 was // defined but no longer - this should allow some // files to be compiled in strict mode - while maintaining // a consistent setting of BOOST_HAS_THREADS across -// all translation units (needed for shared_ptr etc). +// all translation units (needed for std::shared_ptr etc). // #ifdef _WIN32_WCE diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/gregorian/greg_month.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/gregorian/greg_month.hpp index b48a8a89..f326f91a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/gregorian/greg_month.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/gregorian/greg_month.hpp @@ -2,7 +2,7 @@ #define GREG_MONTH_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst @@ -11,7 +11,7 @@ #include "boost/date_time/constrained_value.hpp" #include "boost/date_time/date_defs.hpp" -#include "boost/shared_ptr.hpp" +#include "boost/std::shared_ptr.hpp" #include "boost/date_time/compiler_config.hpp" #include <stdexcept> #include <string> @@ -39,7 +39,7 @@ namespace gregorian { using date_time::Dec; using date_time::NotAMonth; using date_time::NumMonths; - + //! Exception thrown if a greg_month is constructed with a value out of range struct bad_month : public std::out_of_range { @@ -50,15 +50,15 @@ namespace gregorian { //! A constrained range that implements the gregorian_month rules typedef CV::constrained_value<greg_month_policies> greg_month_rep; - + //! Wrapper class to represent months in gregorian based calendar class BOOST_DATE_TIME_DECL greg_month : public greg_month_rep { public: typedef date_time::months_of_year month_enum; typedef std::map<std::string, unsigned short> month_map_type; - typedef boost::shared_ptr<month_map_type> month_map_ptr_type; + typedef boost::std::shared_ptr<month_map_type> month_map_ptr_type; //! Construct a month from the months_of_year enumeration - greg_month(month_enum theMonth) : + greg_month(month_enum theMonth) : greg_month_rep(static_cast<greg_month_rep::value_type>(theMonth)) {} //! Construct from a short value greg_month(unsigned short theMonth) : greg_month_rep(theMonth) {} diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/custom_time_zone.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/custom_time_zone.hpp index 84c59a3a..1c36d575 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/custom_time_zone.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/custom_time_zone.hpp @@ -14,7 +14,7 @@ #include "boost/date_time/local_time/dst_transition_day_rules.hpp" #include "boost/date_time/string_convert.hpp" //#include "boost/date_time/special_defs.hpp" -#include "boost/shared_ptr.hpp" +#include "boost/std::shared_ptr.hpp" namespace boost { namespace local_time { @@ -22,7 +22,7 @@ namespace local_time { //typedef boost::date_time::time_zone_names time_zone_names; typedef boost::date_time::dst_adjustment_offsets<boost::posix_time::time_duration> dst_adjustment_offsets; //typedef boost::date_time::time_zone_base<boost::posix_time::ptime> time_zone; - typedef boost::shared_ptr<dst_calc_rule> dst_calc_rule_ptr; + typedef boost::std::shared_ptr<dst_calc_rule> dst_calc_rule_ptr; //! A real time zone template<class CharT> @@ -38,7 +38,7 @@ namespace local_time { custom_time_zone_base(const time_zone_names& zone_names, const time_duration_type& utc_offset, const dst_adjustment_offsets& dst_shift, - boost::shared_ptr<dst_calc_rule> calc_rule) : + boost::std::shared_ptr<dst_calc_rule> calc_rule) : zone_names_(zone_names), base_utc_offset_(utc_offset), dst_offsets_(dst_shift), @@ -100,7 +100,7 @@ namespace local_time { // std offset dst [offset],start[/time],end[/time] - w/o spaces stringstream_type ss; ss.fill('0'); - boost::shared_ptr<dst_calc_rule> no_rules; + boost::std::shared_ptr<dst_calc_rule> no_rules; // std ss << std_zone_abbrev(); // offset @@ -157,7 +157,7 @@ namespace local_time { bool has_dst_; time_duration_type base_utc_offset_; dst_adjustment_offsets dst_offsets_; - boost::shared_ptr<dst_calc_rule> dst_calc_rules_; + boost::std::shared_ptr<dst_calc_rule> dst_calc_rules_; }; typedef custom_time_zone_base<char> custom_time_zone; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_date_time.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_date_time.hpp index 96b29158..3eed3eff 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_date_time.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_date_time.hpp @@ -12,7 +12,7 @@ #include <iomanip> #include <sstream> #include <stdexcept> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/throw_exception.hpp> #include <boost/date_time/time.hpp> #include <boost/date_time/posix_time/posix_time.hpp> //todo remove? @@ -57,7 +57,7 @@ namespace local_time { * to wall clock time are made as needed. This approach allows for * operations between wall-clock times in different time zones, and * daylight savings time considerations, to be made. Time zones are - * required to be in the form of a boost::shared_ptr<time_zone_base>. + * required to be in the form of a boost::std::shared_ptr<time_zone_base>. */ template<class utc_time_=posix_time::ptime, class tz_type=date_time::time_zone_base<utc_time_,char> > @@ -79,7 +79,7 @@ namespace local_time { *@param tz Timezone for to adjust the UTC time to. */ local_date_time_base(utc_time_type t, - boost::shared_ptr<tz_type> tz) : + boost::std::shared_ptr<tz_type> tz) : date_time::base_time<utc_time_type, time_system_type>(t), zone_(tz) { @@ -99,12 +99,12 @@ namespace local_time { */ local_date_time_base(date_type d, time_duration_type td, - boost::shared_ptr<tz_type> tz, + boost::std::shared_ptr<tz_type> tz, bool dst_flag) : //necessary for constr_adj() date_time::base_time<utc_time_type,time_system_type>(construction_adjustment(utc_time_type(d, td), tz, dst_flag)), zone_(tz) { - if(tz != boost::shared_ptr<tz_type>() && tz->has_dst()){ + if(tz != boost::std::shared_ptr<tz_type>() && tz->has_dst()){ // d & td are already local so we use them time_is_dst_result result = check_dst(d, td, tz); @@ -140,7 +140,7 @@ namespace local_time { */ local_date_time_base(date_type d, time_duration_type td, - boost::shared_ptr<tz_type> tz, + boost::std::shared_ptr<tz_type> tz, DST_CALC_OPTIONS calc_option) : // dummy value - time_ is set in constructor code date_time::base_time<utc_time_type,time_system_type>(utc_time_type(d,td)), @@ -189,9 +189,9 @@ namespace local_time { */ static time_is_dst_result check_dst(date_type d, time_duration_type td, - boost::shared_ptr<tz_type> tz) + boost::std::shared_ptr<tz_type> tz) { - if(tz != boost::shared_ptr<tz_type>() && tz->has_dst()) { + if(tz != boost::std::shared_ptr<tz_type>() && tz->has_dst()) { typedef typename date_time::dst_calculator<date_type, time_duration_type> dst_calculator; return dst_calculator::local_is_dst( d, td, @@ -218,20 +218,20 @@ namespace local_time { //! Special values constructor explicit local_date_time_base(const boost::date_time::special_values sv, - boost::shared_ptr<tz_type> tz = boost::shared_ptr<tz_type>()) : + boost::std::shared_ptr<tz_type> tz = boost::std::shared_ptr<tz_type>()) : date_time::base_time<utc_time_type, time_system_type>(utc_time_type(sv)), zone_(tz) {} //! returns time zone associated with calling instance - boost::shared_ptr<tz_type> zone() const + boost::std::shared_ptr<tz_type> zone() const { return zone_; } //! returns false is time_zone is NULL and if time value is a special_value bool is_dst() const { - if(zone_ != boost::shared_ptr<tz_type>() && zone_->has_dst() && !this->is_special()) { + if(zone_ != boost::std::shared_ptr<tz_type>() && zone_->has_dst() && !this->is_special()) { // check_dst takes a local time, *this is utc utc_time_type lt(this->time_); lt += zone_->base_utc_offset(); @@ -265,7 +265,7 @@ namespace local_time { //! Returns object's time value as a local representation utc_time_type local_time() const { - if(zone_ != boost::shared_ptr<tz_type>()){ + if(zone_ != boost::std::shared_ptr<tz_type>()){ utc_time_type lt = this->utc_time() + zone_->base_utc_offset(); if (is_dst()) { lt += zone_->dst_offset(); @@ -286,7 +286,7 @@ namespace local_time { ss << utc_time(); return ss.str(); } - if(zone_ == boost::shared_ptr<tz_type>()) { + if(zone_ == boost::std::shared_ptr<tz_type>()) { ss << utc_time() << " UTC"; return ss.str(); } @@ -306,7 +306,7 @@ namespace local_time { } /*! returns a local_date_time_base in the given time zone with the * optional time_duration added. */ - local_date_time_base local_time_in(boost::shared_ptr<tz_type> new_tz, + local_date_time_base local_time_in(boost::std::shared_ptr<tz_type> new_tz, time_duration_type td=time_duration_type(0,0,0)) const { return local_date_time_base(utc_time_type(this->time_) + td, new_tz); @@ -318,7 +318,7 @@ namespace local_time { * classes that do not use a time_zone */ std::string zone_name(bool as_offset=false) const { - if(zone_ == boost::shared_ptr<tz_type>()) { + if(zone_ == boost::std::shared_ptr<tz_type>()) { if(as_offset) { return std::string("Z"); } @@ -352,7 +352,7 @@ namespace local_time { * that do not use a time_zone */ std::string zone_abbrev(bool as_offset=false) const { - if(zone_ == boost::shared_ptr<tz_type>()) { + if(zone_ == boost::std::shared_ptr<tz_type>()) { if(as_offset) { return std::string("Z"); } @@ -384,7 +384,7 @@ namespace local_time { //! returns a posix_time_zone string for the associated time_zone. If no time_zone, "UTC+00" is returned. std::string zone_as_posix_string() const { - if(zone_ == shared_ptr<tz_type>()) { + if(zone_ == std::shared_ptr<tz_type>()) { return std::string("UTC+00"); } return zone_->to_posix_string(); @@ -477,16 +477,16 @@ namespace local_time { return utc_time_type(this->time_) - utc_time_type(rhs.time_); } private: - boost::shared_ptr<tz_type> zone_; + boost::std::shared_ptr<tz_type> zone_; //bool is_dst_; /*! Adjust the passed in time to UTC? */ utc_time_type construction_adjustment(utc_time_type t, - boost::shared_ptr<tz_type> z, + boost::std::shared_ptr<tz_type> z, bool dst_flag) { - if(z != boost::shared_ptr<tz_type>()) { + if(z != boost::std::shared_ptr<tz_type>()) { if(dst_flag && z->has_dst()) { t -= z->dst_offset(); } // else no adjust diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_time_types.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_time_types.hpp index 5e04422e..30b0540b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_time_types.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_time_types.hpp @@ -2,7 +2,7 @@ #define LOCAL_TIME_LOCAL_TIME_TYPES_HPP__ /* Copyright (c) 2003-2004 CrystalClear Software, Inc. - * Subject to the Boost Software License, Version 1.0. + * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ @@ -20,21 +20,21 @@ namespace boost { namespace local_time { - typedef boost::date_time::period<local_date_time, + typedef boost::date_time::period<local_date_time, boost::posix_time::time_duration> local_time_period; typedef date_time::time_itr<local_date_time> local_time_iterator; - typedef date_time::second_clock<local_date_time> local_sec_clock; + typedef date_time::second_clock<local_date_time> local_sec_clock; typedef date_time::microsec_clock<local_date_time> local_microsec_clock; - + typedef date_time::time_zone_base<posix_time::ptime, char> time_zone; typedef date_time::time_zone_base<posix_time::ptime, wchar_t> wtime_zone; //! Shared Pointer for custom_time_zone and posix_time_zone objects - typedef boost::shared_ptr<time_zone> time_zone_ptr; - typedef boost::shared_ptr<wtime_zone> wtime_zone_ptr; - + typedef boost::std::shared_ptr<time_zone> time_zone_ptr; + typedef boost::std::shared_ptr<wtime_zone> wtime_zone_ptr; + typedef date_time::time_zone_names_base<char> time_zone_names; typedef date_time::time_zone_names_base<wchar_t> wtime_zone_names; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/posix_time_zone.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/posix_time_zone.hpp index ee1b553e..1d886983 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/posix_time_zone.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/posix_time_zone.hpp @@ -184,7 +184,7 @@ namespace local_time{ // std offset dst [offset],start[/time],end[/time] - w/o spaces stringstream_type ss; ss.fill('0'); - boost::shared_ptr<dst_calc_rule> no_rules; + boost::std::shared_ptr<dst_calc_rule> no_rules; // std ss << std_zone_abbrev(); // offset @@ -241,7 +241,7 @@ namespace local_time{ bool has_dst_; time_duration_type base_utc_offset_; dst_adjustment_offsets dst_offsets_; - boost::shared_ptr<dst_calc_rule> dst_calc_rules_; + boost::std::shared_ptr<dst_calc_rule> dst_calc_rules_; /*! Extract time zone abbreviations for STD & DST as well * as the offsets for the time shift that occurs and how @@ -399,7 +399,7 @@ namespace local_time{ ew = lexical_cast<unsigned short>(*it++); ed = lexical_cast<unsigned short>(*it); - dst_calc_rules_ = shared_ptr<dst_calc_rule>( + dst_calc_rules_ = std::shared_ptr<dst_calc_rule>( new nth_kday_dst_rule( nth_last_dst_rule::start_rule( static_cast<nkday::week_num>(sw),sd,sm), @@ -427,7 +427,7 @@ namespace local_time{ ed -= calendar::end_of_month_day(year,em++); } - dst_calc_rules_ = shared_ptr<dst_calc_rule>( + dst_calc_rules_ = std::shared_ptr<dst_calc_rule>( new partial_date_dst_rule( partial_date_dst_rule::start_rule( sd, static_cast<date_time::months_of_year>(sm)), @@ -443,7 +443,7 @@ namespace local_time{ int sd=0, ed=0; sd = lexical_cast<int>(s); ed = lexical_cast<int>(e); - dst_calc_rules_ = shared_ptr<dst_calc_rule>( + dst_calc_rules_ = std::shared_ptr<dst_calc_rule>( new partial_date_dst_rule( partial_date_dst_rule::start_rule(++sd),// args are 0-365 partial_date_dst_rule::end_rule(++ed) // pd expects 1-366 diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/tz_database.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/tz_database.hpp index aceda939..26afe449 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/tz_database.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/tz_database.hpp @@ -2,7 +2,7 @@ #define BOOST_DATE_TIME_TZ_DATABASE_HPP__ /* Copyright (c) 2003-2004 CrystalClear Software, Inc. - * Subject to the Boost Software License, Version 1.0. + * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ @@ -17,11 +17,11 @@ namespace boost { namespace local_time { - using date_time::data_not_accessible; - using date_time::bad_field_count; + using date_time::data_not_accessible; + using date_time::bad_field_count; - //! Object populated with boost::shared_ptr<time_zone_base> objects - /*! Object populated with boost::shared_ptr<time_zone_base> objects + //! Object populated with boost::std::shared_ptr<time_zone_base> objects + /*! Object populated with boost::std::shared_ptr<time_zone_base> objects * Database is populated from specs stored in external csv file. See * date_time::tz_db_base for greater detail */ typedef date_time::tz_db_base<custom_time_zone, nth_kday_dst_rule> tz_database; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/microsec_time_clock.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/microsec_time_clock.hpp index 177811ee..beb1d70d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/microsec_time_clock.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/microsec_time_clock.hpp @@ -15,7 +15,7 @@ */ #include <boost/cstdint.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/detail/workaround.hpp> #include <boost/date_time/compiler_config.hpp> #include <boost/date_time/c_time.hpp> @@ -50,7 +50,7 @@ namespace date_time { //! return a local time object for the given zone, based on computer clock //JKG -- looks like we could rewrite this against universal_time template<class time_zone_type> - static time_type local_time(shared_ptr<time_zone_type> tz_ptr) + static time_type local_time(std::shared_ptr<time_zone_type> tz_ptr) { typedef typename time_type::utc_time_type utc_time_type; typedef second_clock<utc_time_type> second_clock; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/time_clock.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/time_clock.hpp index 9aa2ff0e..c73466ed 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/time_clock.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/time_clock.hpp @@ -14,7 +14,7 @@ */ #include "boost/date_time/c_time.hpp" -#include "boost/shared_ptr.hpp" +#include "boost/std::shared_ptr.hpp" namespace boost { namespace date_time { @@ -54,7 +54,7 @@ namespace date_time { } template<class time_zone_type> - static time_type local_time(boost::shared_ptr<time_zone_type> tz_ptr) + static time_type local_time(boost::std::shared_ptr<time_zone_type> tz_ptr) { typedef typename time_type::utc_time_type utc_time_type; utc_time_type utc_time = second_clock<utc_time_type>::universal_time(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/tz_db_base.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/tz_db_base.hpp index a6d8ea9e..fff9f91e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/tz_db_base.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/tz_db_base.hpp @@ -2,7 +2,7 @@ #define DATE_TIME_TZ_DB_BASE_HPP__ /* Copyright (c) 2003-2005 CrystalClear Software, Inc. - * Subject to the Boost Software License, Version 1.0. + * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $ @@ -15,7 +15,7 @@ #include <fstream> #include <stdexcept> #include <boost/tokenizer.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/throw_exception.hpp> #include <boost/date_time/compiler_config.hpp> #include <boost/date_time/time_zone_names.hpp> @@ -29,20 +29,20 @@ namespace boost { class data_not_accessible : public std::logic_error { public: - data_not_accessible() : - std::logic_error(std::string("Unable to locate or access the required datafile.")) + data_not_accessible() : + std::logic_error(std::string("Unable to locate or access the required datafile.")) {} - data_not_accessible(const std::string& filespec) : - std::logic_error(std::string("Unable to locate or access the required datafile. Filespec: " + filespec)) + data_not_accessible(const std::string& filespec) : + std::logic_error(std::string("Unable to locate or access the required datafile. Filespec: " + filespec)) {} }; - + //! Exception thrown when tz database locates incorrect field structure in data file class bad_field_count : public std::out_of_range { public: - bad_field_count(const std::string& s) : - std::out_of_range(s) + bad_field_count(const std::string& s) : + std::out_of_range(s) {} }; @@ -51,48 +51,48 @@ namespace boost { * tz_db_base is intended to be customized by the * library user. When customizing this file (or creating your own) the * file must follow a specific format. - * + * * This first line is expected to contain column headings and is therefore * not processed by the tz_db_base. * * Each record (line) must have eleven fields. Some of those fields can - * be empty. Every field (even empty ones) must be enclosed in + * be empty. Every field (even empty ones) must be enclosed in * double-quotes. * Ex: * @code * "America/Phoenix" <- string enclosed in quotes * "" <- empty field * @endcode - * - * Some fields represent a length of time. The format of these fields + * + * Some fields represent a length of time. The format of these fields * must be: * @code * "{+|-}hh:mm[:ss]" <- length-of-time format * @endcode * Where the plus or minus is mandatory and the seconds are optional. - * - * Since some time zones do not use daylight savings it is not always - * necessary for every field in a zone_spec to contain a value. All - * zone_specs must have at least ID and GMT offset. Zones that use - * daylight savings must have all fields filled except: - * STD ABBR, STD NAME, DST NAME. You should take note - * that DST ABBR is mandatory for zones that use daylight savings + * + * Since some time zones do not use daylight savings it is not always + * necessary for every field in a zone_spec to contain a value. All + * zone_specs must have at least ID and GMT offset. Zones that use + * daylight savings must have all fields filled except: + * STD ABBR, STD NAME, DST NAME. You should take note + * that DST ABBR is mandatory for zones that use daylight savings * (see field descriptions for further details). * - * ******* Fields and their description/details ********* - * - * ID: + * ******* Fields and their description/details ********* + * + * ID: * Contains the identifying string for the zone_spec. Any string will - * do as long as it's unique. No two ID's can be the same. + * do as long as it's unique. No two ID's can be the same. * * STD ABBR: * STD NAME: * DST ABBR: * DST NAME: - * These four are all the names and abbreviations used by the time - * zone being described. While any string will do in these fields, - * care should be taken. These fields hold the strings that will be - * used in the output of many of the local_time classes. + * These four are all the names and abbreviations used by the time + * zone being described. While any string will do in these fields, + * care should be taken. These fields hold the strings that will be + * used in the output of many of the local_time classes. * Ex: * @code * time_zone nyc = tz_db.time_zone_from_region("America/New_York"); @@ -103,42 +103,42 @@ namespace boost { * // 2004-Aug-30 00:00:00 EDT * @endcode * - * NOTE: The exact format/function names may vary - see local_time + * NOTE: The exact format/function names may vary - see local_time * documentation for further details. * * GMT offset: - * This is the number of hours added to utc to get the local time - * before any daylight savings adjustments are made. Some examples + * This is the number of hours added to utc to get the local time + * before any daylight savings adjustments are made. Some examples * are: America/New_York offset -5 hours, & Africa/Cairo offset +2 hours. * The format must follow the length-of-time format described above. * * DST adjustment: - * The amount of time added to gmt_offset when daylight savings is in + * The amount of time added to gmt_offset when daylight savings is in * effect. The format must follow the length-of-time format described * above. * * DST Start Date rule: * This is a specially formatted string that describes the day of year * in which the transition take place. It holds three fields of it's own, - * separated by semicolons. - * The first field indicates the "nth" weekday of the month. The possible - * values are: 1 (first), 2 (second), 3 (third), 4 (fourth), 5 (fifth), + * separated by semicolons. + * The first field indicates the "nth" weekday of the month. The possible + * values are: 1 (first), 2 (second), 3 (third), 4 (fourth), 5 (fifth), * and -1 (last). * The second field indicates the day-of-week from 0-6 (Sun=0). * The third field indicates the month from 1-12 (Jan=1). - * - * Examples are: "-1;5;9"="Last Friday of September", + * + * Examples are: "-1;5;9"="Last Friday of September", * "2;1;3"="Second Monday of March" * * Start time: * Start time is the number of hours past midnight, on the day of the - * start transition, the transition takes place. More simply put, the + * start transition, the transition takes place. More simply put, the * time of day the transition is made (in 24 hours format). The format - * must follow the length-of-time format described above with the + * must follow the length-of-time format described above with the * exception that it must always be positive. * * DST End date rule: - * See DST Start date rule. The difference here is this is the day + * See DST Start date rule. The difference here is this is the day * daylight savings ends (transition to STD). * * End time: @@ -147,13 +147,13 @@ namespace boost { template<class time_zone_type, class rule_type> class tz_db_base { public: - /* Having CharT as a template parameter created problems - * with posix_time::duration_from_string. Templatizing - * duration_from_string was not possible at this time, however, - * it should be possible in the future (when poor compilers get - * fixed or stop being used). - * Since this class was designed to use CharT as a parameter it - * is simply typedef'd here to ease converting in back to a + /* Having CharT as a template parameter created problems + * with posix_time::duration_from_string. Templatizing + * duration_from_string was not possible at this time, however, + * it should be possible in the future (when poor compilers get + * fixed or stop being used). + * Since this class was designed to use CharT as a parameter it + * is simply typedef'd here to ease converting in back to a * parameter the future */ typedef char char_type; @@ -182,7 +182,7 @@ namespace boost { { string_type in_str; std::string buff; - + std::ifstream ifs(pathspec.c_str()); if(!ifs){ boost::throw_exception(data_not_accessible(pathspec)); @@ -192,27 +192,27 @@ namespace boost { } //! returns true if record successfully added to map - /*! Takes a region name in the form of "America/Phoenix", and a - * time_zone object for that region. The id string must be a unique + /*! Takes a region name in the form of "America/Phoenix", and a + * time_zone object for that region. The id string must be a unique * name that does not already exist in the database. */ - bool add_record(const string_type& region, - boost::shared_ptr<time_zone_base_type> tz) + bool add_record(const string_type& region, + boost::std::shared_ptr<time_zone_base_type> tz) { - typename map_type::value_type p(region, tz); + typename map_type::value_type p(region, tz); return (m_zone_map.insert(p)).second; } //! Returns a time_zone object built from the specs for the given region - /*! Returns a time_zone object built from the specs for the given - * region. If region does not exist a local_time::record_not_found + /*! Returns a time_zone object built from the specs for the given + * region. If region does not exist a local_time::record_not_found * exception will be thrown */ - boost::shared_ptr<time_zone_base_type> - time_zone_from_region(const string_type& region) const + boost::std::shared_ptr<time_zone_base_type> + time_zone_from_region(const string_type& region) const { // get the record typename map_type::const_iterator record = m_zone_map.find(region); if(record == m_zone_map.end()){ - return boost::shared_ptr<time_zone_base_type>(); //null pointer + return boost::std::shared_ptr<time_zone_base_type>(); //null pointer } return record->second; } @@ -229,9 +229,9 @@ namespace boost { } return regions; } - + private: - typedef std::map<string_type, boost::shared_ptr<time_zone_base_type> > map_type; + typedef std::map<string_type, boost::std::shared_ptr<time_zone_base_type> > map_type; map_type m_zone_map; // start and end rule are of the same type @@ -240,27 +240,27 @@ namespace boost { /* TODO: mechanisms need to be put in place to handle different * types of rule specs. parse_rules() only handles nth_kday * rule types. */ - + //! parses rule specs for transition day rules rule_type* parse_rules(const string_type& sr, const string_type& er) const { using namespace gregorian; - // start and end rule are of the same type, + // start and end rule are of the same type, // both are included here for readability typedef typename rule_type::start_rule start_rule; typedef typename rule_type::end_rule end_rule; - + // these are: [start|end] nth, day, month int s_nth = 0, s_d = 0, s_m = 0; int e_nth = 0, e_d = 0, e_m = 0; split_rule_spec(s_nth, s_d, s_m, sr); split_rule_spec(e_nth, e_d, e_m, er); - + typename start_rule::week_num s_wn, e_wn; s_wn = get_week_num(s_nth); e_wn = get_week_num(e_nth); - - + + return new rule_type(start_rule(s_wn, s_d, s_m), end_rule(e_wn, e_d, e_m)); } @@ -286,7 +286,7 @@ namespace boost { } return start_rule::fifth; // silence warnings } - + //! splits the [start|end]_date_rule string into 3 ints void split_rule_spec(int& nth, int& d, int& m, string_type rule) const { @@ -297,22 +297,22 @@ namespace boost { typedef boost::tokenizer<char_separator_type, std::basic_string<char_type>::const_iterator, std::basic_string<char_type> >::iterator tokenizer_iterator; - + const char_type sep_char[] = { ';', '\0'}; char_separator_type sep(sep_char); tokenizer tokens(rule, sep); // 3 fields - - tokenizer_iterator tok_iter = tokens.begin(); + + tokenizer_iterator tok_iter = tokens.begin(); nth = std::atoi(tok_iter->c_str()); ++tok_iter; d = std::atoi(tok_iter->c_str()); ++tok_iter; m = std::atoi(tok_iter->c_str()); } - + //! Take a line from the csv, turn it into a time_zone_type. /*! Take a line from the csv, turn it into a time_zone_type, - * and add it to the map. Zone_specs in csv file are expected to - * have eleven fields that describe the time zone. Returns true if + * and add it to the map. Zone_specs in csv file are expected to + * have eleven fields that describe the time zone. Returns true if * zone_spec successfully added to database */ bool parse_string(string_type& s) { @@ -333,16 +333,16 @@ namespace boost { //take a shot at fixing gcc 4.x error const unsigned int expected_fields = static_cast<unsigned int>(FIELD_COUNT); - if (result.size() != expected_fields) { + if (result.size() != expected_fields) { std::ostringstream msg; - msg << "Expecting " << FIELD_COUNT << " fields, got " + msg << "Expecting " << FIELD_COUNT << " fields, got " << result.size() << " fields in line: " << s; boost::throw_exception(bad_field_count(msg.str())); BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return false); // should never reach } // initializations - bool has_dst = true; + bool has_dst = true; if(result[DSTABBR] == std::string()){ has_dst = false; } @@ -352,14 +352,14 @@ namespace boost { time_zone_names names(result[STDNAME], result[STDABBR], result[DSTNAME], result[DSTABBR]); - time_duration_type utc_offset = + time_duration_type utc_offset = str_from_delimited_time_duration<time_duration_type,char_type>(result[GMTOFFSET]); - + dst_adjustment_offsets adjust(time_duration_type(0,0,0), time_duration_type(0,0,0), time_duration_type(0,0,0)); - boost::shared_ptr<rule_type> rules; + boost::std::shared_ptr<rule_type> rules; if(has_dst){ adjust = dst_adjustment_offsets( @@ -368,16 +368,16 @@ namespace boost { str_from_delimited_time_duration<time_duration_type,char_type>(result[END_TIME]) ); - rules = - boost::shared_ptr<rule_type>(parse_rules(result[START_DATE_RULE], + rules = + boost::std::shared_ptr<rule_type>(parse_rules(result[START_DATE_RULE], result[END_DATE_RULE])); } string_type id(result[ID]); - boost::shared_ptr<time_zone_base_type> zone(new time_zone_type(names, utc_offset, adjust, rules)); + boost::std::shared_ptr<time_zone_base_type> zone(new time_zone_type(names, utc_offset, adjust, rules)); return (add_record(id, zone)); - - } - + + } + }; } } // namespace diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/detail/exception_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/detail/exception_ptr.hpp index 5e5a2679..283cdad4 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/detail/exception_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/detail/exception_ptr.hpp @@ -21,7 +21,7 @@ #include <boost/exception/diagnostic_information.hpp> #include <boost/exception/detail/type_info.hpp> #include <boost/exception/detail/clone_current_exception.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <stdexcept> #include <new> #include <ios> @@ -37,7 +37,7 @@ boost class exception_ptr { - typedef boost::shared_ptr<exception_detail::clone_base const> impl; + typedef boost::std::shared_ptr<exception_detail::clone_base const> impl; impl ptr_; friend void rethrow_exception( exception_ptr const & ); typedef exception_detail::clone_base const * (impl::*unspecified_bool_type)() const; @@ -122,7 +122,7 @@ boost throw_function(BOOST_CURRENT_FUNCTION) << throw_file(__FILE__) << throw_line(__LINE__); - static exception_ptr ep(shared_ptr<exception_detail::clone_base const>(new exception_detail::clone_impl<Exception>(c))); + static exception_ptr ep(std::shared_ptr<exception_detail::clone_base const>(new exception_detail::clone_impl<Exception>(c))); return ep; } @@ -305,7 +305,7 @@ boost success: { BOOST_ASSERT(e!=0); - return exception_ptr(shared_ptr<exception_detail::clone_base const>(e)); + return exception_ptr(std::shared_ptr<exception_detail::clone_base const>(e)); } case exception_detail::clone_current_exception_result:: bad_alloc: @@ -332,7 +332,7 @@ boost catch( exception_detail::clone_base & e ) { - return exception_ptr(shared_ptr<exception_detail::clone_base const>(e.clone())); + return exception_ptr(std::shared_ptr<exception_detail::clone_base const>(e.clone())); } catch( std::domain_error & e ) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/exception.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/exception.hpp index 42d27871..6cd51f88 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/exception.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/exception.hpp @@ -145,7 +145,7 @@ boost #endif template <class T> - class shared_ptr; + class std::shared_ptr; namespace exception_detail @@ -157,8 +157,8 @@ boost error_info_container { virtual char const * diagnostic_information( char const * ) const = 0; - virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0; - virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0; + virtual std::shared_ptr<error_info_base> get( type_info_ const & ) const = 0; + virtual void set( std::shared_ptr<error_info_base> const &, type_info_ const & ) = 0; virtual void add_ref() const = 0; virtual bool release() const = 0; virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/get_error_info.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/get_error_info.hpp index 046f05ae..e9b7ce8d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/get_error_info.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/get_error_info.hpp @@ -15,7 +15,7 @@ #include <boost/exception/exception.hpp> #include <boost/exception/detail/error_info_impl.hpp> #include <boost/exception/detail/type_info.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost @@ -32,7 +32,7 @@ boost get( exception const & x ) { if( exception_detail::error_info_container * c=x.data_.get() ) - if( shared_ptr<exception_detail::error_info_base> eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) ) + if( std::shared_ptr<exception_detail::error_info_base> eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) ) { #ifndef BOOST_NO_RTTI BOOST_ASSERT( 0!=dynamic_cast<ErrorInfo *>(eib.get()) ); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/info.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/info.hpp index 7b56076d..bae6ffcf 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/info.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/info.hpp @@ -15,7 +15,7 @@ #include <boost/exception/exception.hpp> #include <boost/exception/to_string_stub.hpp> #include <boost/exception/detail/error_info_impl.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/config.hpp> #include <map> @@ -82,26 +82,26 @@ boost } void - set( shared_ptr<error_info_base> const & x, type_info_ const & typeid_ ) + set( std::shared_ptr<error_info_base> const & x, type_info_ const & typeid_ ) { BOOST_ASSERT(x); info_[typeid_] = x; diagnostic_info_str_.clear(); } - shared_ptr<error_info_base> + std::shared_ptr<error_info_base> get( type_info_ const & ti ) const { error_info_map::const_iterator i=info_.find(ti); if( info_.end()!=i ) { - shared_ptr<error_info_base> const & p = i->second; + std::shared_ptr<error_info_base> const & p = i->second; #ifndef BOOST_NO_RTTI BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ ); #endif return p; } - return shared_ptr<error_info_base>(); + return std::shared_ptr<error_info_base>(); } char const * @@ -125,7 +125,7 @@ boost friend class boost::exception; - typedef std::map< type_info_, shared_ptr<error_info_base> > error_info_map; + typedef std::map< type_info_, std::shared_ptr<error_info_base> > error_info_map; error_info_map info_; mutable std::string diagnostic_info_str_; mutable int count_; @@ -168,7 +168,7 @@ boost set_info( E const & x, error_info<Tag,T> const & v ) { typedef error_info<Tag,T> error_info_tag_t; - shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) ); + std::shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) ); exception_detail::error_info_container * c=x.data_.get(); if( !c ) x.data_.adopt(c=new exception_detail::error_info_container_impl); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/operations.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/operations.hpp index dc01b7d8..43749ff9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/operations.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/operations.hpp @@ -2,9 +2,9 @@ // Copyright Beman Dawes 2002-2009 // Copyright Jan Langer 2002 -// Copyright Dietmar Kuehl 2001 +// Copyright Dietmar Kuehl 2001 // Copyright Vladimir Prus 2002 - + // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt @@ -28,7 +28,7 @@ #include <boost/detail/bitmask.hpp> #include <boost/system/error_code.hpp> #include <boost/system/system_error.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/utility/enable_if.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/iterator.hpp> @@ -59,7 +59,7 @@ namespace boost //--------------------------------------------------------------------------------------// enum file_type - { + { status_error, # ifndef BOOST_FILESYSTEM_NO_DEPRECATED status_unknown = status_error, @@ -92,7 +92,7 @@ namespace boost // Values are from POSIX and are given in octal per the POSIX standard. // permission bits - + owner_read = 0400, // S_IRUSR, Read permission, owner owner_write = 0200, // S_IWUSR, Write permission, owner owner_exe = 0100, // S_IXUSR, Execute/search permission, owner @@ -115,8 +115,8 @@ namespace boost set_uid_on_exe = 04000, // S_ISUID, Set-user-ID on execution set_gid_on_exe = 02000, // S_ISGID, Set-group-ID on execution sticky_bit = 01000, // S_ISVTX, - // (POSIX XSI) On directories, restricted deletion flag - // (V7) 'sticky bit': save swapped text even after use + // (POSIX XSI) On directories, restricted deletion flag + // (V7) 'sticky bit': save swapped text even after use // (SunOS) On non-directories: don't cache this file // (SVID-v4.2) On directories: restricted deletion flag // Also see http://en.wikipedia.org/wiki/Sticky_bit @@ -151,13 +151,13 @@ namespace boost // observers file_type type() const { return m_value; } - perms permissions() const { return m_perms; } + perms permissions() const { return m_perms; } // modifiers void type(file_type v) { m_value = v; } void permissions(perms prms) { m_perms = prms; } - bool operator==(const file_status& rhs) const { return type() == rhs.type() && + bool operator==(const file_status& rhs) const { return type() == rhs.type() && permissions() == rhs.permissions(); } bool operator!=(const file_status& rhs) const { return !(*this == rhs); } @@ -260,7 +260,7 @@ namespace boost BOOST_FILESYSTEM_DECL void resize_file(const path& p, uintmax_t size, system::error_code* ec=0); BOOST_FILESYSTEM_DECL - space_info space(const path& p, system::error_code* ec=0); + space_info space(const path& p, system::error_code* ec=0); BOOST_FILESYSTEM_DECL path system_complete(const path& p, system::error_code* ec=0); BOOST_FILESYSTEM_DECL @@ -277,37 +277,37 @@ namespace boost inline file_status status(const path& p) {return detail::status(p);} - inline + inline file_status status(const path& p, system::error_code& ec) {return detail::status(p, &ec);} - inline + inline file_status symlink_status(const path& p) {return detail::symlink_status(p);} inline file_status symlink_status(const path& p, system::error_code& ec) {return detail::symlink_status(p, &ec);} - inline + inline bool exists(const path& p) {return exists(detail::status(p));} - inline + inline bool exists(const path& p, system::error_code& ec) {return exists(detail::status(p, &ec));} - inline + inline bool is_directory(const path& p) {return is_directory(detail::status(p));} - inline + inline bool is_directory(const path& p, system::error_code& ec) {return is_directory(detail::status(p, &ec));} - inline + inline bool is_regular_file(const path& p) {return is_regular_file(detail::status(p));} - inline + inline bool is_regular_file(const path& p, system::error_code& ec) {return is_regular_file(detail::status(p, &ec));} - inline + inline bool is_other(const path& p) {return is_other(detail::status(p));} - inline + inline bool is_other(const path& p, system::error_code& ec) {return is_other(detail::status(p, &ec));} inline bool is_symlink(const path& p) {return is_symlink(detail::symlink_status(p));} - inline + inline bool is_symlink(const path& p, system::error_code& ec) {return is_symlink(detail::symlink_status(p, &ec));} # ifndef BOOST_FILESYSTEM_NO_DEPRECATED @@ -330,7 +330,7 @@ namespace boost // in alphabetical order, unless otherwise noted // // // //--------------------------------------------------------------------------------------// - + // forward declarations path current_path(); // fwd declaration path initial_path(); @@ -367,7 +367,7 @@ namespace boost void copy(const path& from, const path& to) {detail::copy(from, to);} inline - void copy(const path& from, const path& to, system::error_code& ec) + void copy(const path& from, const path& to, system::error_code& ec) {detail::copy(from, to, &ec);} inline void copy_directory(const path& from, const path& to) @@ -500,7 +500,7 @@ namespace boost inline boost::uintmax_t remove_all(const path& p) {return detail::remove_all(p);} - + inline boost::uintmax_t remove_all(const path& p, system::error_code& ec) {return detail::remove_all(p, &ec);} @@ -517,10 +517,10 @@ namespace boost void resize_file(const path& p, uintmax_t size, system::error_code& ec) {detail::resize_file(p, size, &ec);} inline - space_info space(const path& p) {return detail::space(p);} + space_info space(const path& p) {return detail::space(p);} inline - space_info space(const path& p, system::error_code& ec) {return detail::space(p, &ec);} + space_info space(const path& p, system::error_code& ec) {return detail::space(p, &ec);} # ifndef BOOST_FILESYSTEM_NO_DEPRECATED inline bool symbolic_link_exists(const path& p) @@ -537,7 +537,7 @@ namespace boost path temp_directory_path() {return detail::temp_directory_path();} inline - path temp_directory_path(system::error_code& ec) + path temp_directory_path(system::error_code& ec) {return detail::temp_directory_path(&ec);} inline path unique_path(const path& p="%%%%-%%%%-%%%%-%%%%") @@ -552,7 +552,7 @@ namespace boost // // //--------------------------------------------------------------------------------------// -// GCC has a problem with a member function named path within a namespace or +// GCC has a problem with a member function named path within a namespace or // sub-namespace that also has a class named path. The workaround is to always // fully qualify the name path when it refers to the class name. @@ -593,12 +593,12 @@ public: file_status symlink_status() const {return m_get_symlink_status();} file_status symlink_status(system::error_code& ec) const {return m_get_symlink_status(&ec);} - bool operator==(const directory_entry& rhs) {return m_path == rhs.m_path;} - bool operator!=(const directory_entry& rhs) {return m_path != rhs.m_path;} - bool operator< (const directory_entry& rhs) {return m_path < rhs.m_path;} - bool operator<=(const directory_entry& rhs) {return m_path <= rhs.m_path;} - bool operator> (const directory_entry& rhs) {return m_path > rhs.m_path;} - bool operator>=(const directory_entry& rhs) {return m_path >= rhs.m_path;} + bool operator==(const directory_entry& rhs) {return m_path == rhs.m_path;} + bool operator!=(const directory_entry& rhs) {return m_path != rhs.m_path;} + bool operator< (const directory_entry& rhs) {return m_path < rhs.m_path;} + bool operator<=(const directory_entry& rhs) {return m_path <= rhs.m_path;} + bool operator> (const directory_entry& rhs) {return m_path > rhs.m_path;} + bool operator>=(const directory_entry& rhs) {return m_path >= rhs.m_path;} private: boost::filesystem::path m_path; @@ -625,7 +625,7 @@ namespace detail # if defined(BOOST_POSIX_API) , void *& buffer # endif - ); + ); struct dir_itr_imp { @@ -688,7 +688,7 @@ namespace detail ~directory_iterator() {} // never throws directory_iterator& increment(system::error_code& ec) - { + { detail::directory_iterator_increment(*this, &ec); return *this; } @@ -700,16 +700,16 @@ namespace detail friend BOOST_FILESYSTEM_DECL void detail::directory_iterator_increment(directory_iterator& it, system::error_code* ec); - // shared_ptr provides shallow-copy semantics required for InputIterators. + // std::shared_ptr provides shallow-copy semantics required for InputIterators. // m_imp.get()==0 indicates the end iterator. - boost::shared_ptr< detail::dir_itr_imp > m_imp; + boost::std::shared_ptr< detail::dir_itr_imp > m_imp; friend class boost::iterator_core_access; boost::iterator_facade< directory_iterator, directory_entry, - boost::single_pass_traversal_tag >::reference dereference() const + boost::single_pass_traversal_tag >::reference dereference() const { BOOST_ASSERT_MSG(m_imp.get(), "attempt to dereference end iterator"); return m_imp->dir_entry; @@ -884,7 +884,7 @@ namespace detail } int level() const - { + { BOOST_ASSERT_MSG(m_imp.get(), "level() on end recursive_directory_iterator"); return m_imp->m_level; @@ -903,7 +903,7 @@ namespace detail # endif void pop() - { + { BOOST_ASSERT_MSG(m_imp.get(), "pop() on end recursive_directory_iterator"); m_imp->pop(); @@ -936,17 +936,17 @@ namespace detail private: - // shared_ptr provides shallow-copy semantics required for InputIterators. + // std::shared_ptr provides shallow-copy semantics required for InputIterators. // m_imp.get()==0 indicates the end iterator. - boost::shared_ptr< detail::recur_dir_itr_imp > m_imp; + boost::std::shared_ptr< detail::recur_dir_itr_imp > m_imp; friend class boost::iterator_core_access; - boost::iterator_facade< + boost::iterator_facade< recursive_directory_iterator, directory_entry, boost::single_pass_traversal_tag >::reference - dereference() const + dereference() const { BOOST_ASSERT_MSG(m_imp.get(), "dereference of end recursive_directory_iterator"); @@ -954,7 +954,7 @@ namespace detail } void increment() - { + { BOOST_ASSERT_MSG(m_imp.get(), "increment of end recursive_directory_iterator"); m_imp->increment(0); @@ -976,7 +976,7 @@ namespace detail // class filesystem_error // // // //--------------------------------------------------------------------------------------// - + class BOOST_SYMBOL_VISIBLE filesystem_error : public system::system_error { // see http://www.boost.org/more/error_handling.html for design rationale @@ -1009,7 +1009,7 @@ namespace detail } catch (...) { m_imp_ptr.reset(); } } - + filesystem_error( const std::string & what_arg, const path& path1_arg, const path& path2_arg, system::error_code ec) @@ -1075,7 +1075,7 @@ namespace detail path m_path2; // may be empty() std::string m_what; // not built until needed }; - boost::shared_ptr<m_imp> m_imp_ptr; + boost::std::shared_ptr<m_imp> m_imp_ptr; }; // test helper -----------------------------------------------------------------------// diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/path.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/path.hpp index 2dd1b00e..90aff04b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/path.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/path.hpp @@ -26,7 +26,7 @@ #include <boost/system/error_code.hpp> #include <boost/system/system_error.hpp> #include <boost/iterator/iterator_facade.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/io/detail/quoted_manip.hpp> #include <boost/static_assert.hpp> #include <boost/functional/hash_fwd.hpp> @@ -62,11 +62,11 @@ namespace filesystem # ifdef BOOST_WINDOWS_API typedef wchar_t value_type; BOOST_STATIC_CONSTEXPR value_type preferred_separator = L'\\'; -# else +# else typedef char value_type; BOOST_STATIC_CONSTEXPR value_type preferred_separator = '/'; # endif - typedef std::basic_string<value_type> string_type; + typedef std::basic_string<value_type> string_type; typedef std::codecvt<wchar_t, char, std::mbstate_t> codecvt_type; @@ -89,7 +89,7 @@ namespace filesystem // // The path locale, which is global to the thread, can be changed by the // imbue() function. It is initialized to an implementation defined locale. - // + // // For Windows, wchar_t strings do not undergo conversion. char strings // are converted using the "ANSI" or "OEM" code pages, as determined by // the AreFileApisANSI() function, or, if a conversion argument is given, @@ -98,7 +98,7 @@ namespace filesystem // See m_pathname comments for further important rationale. // TODO: rules needed for operating systems that use / or . - // differently, or format directory paths differently from file paths. + // differently, or format directory paths differently from file paths. // // ********************************************************************************** // @@ -127,7 +127,7 @@ namespace filesystem // ----- constructors ----- - path(){} + path(){} path(const path& p) : m_pathname(p.m_pathname) {} @@ -159,7 +159,7 @@ namespace filesystem template <class InputIterator> path(InputIterator begin, InputIterator end) - { + { if (begin != end) { std::basic_string<typename std::iterator_traits<InputIterator>::value_type> @@ -170,7 +170,7 @@ namespace filesystem template <class InputIterator> path(InputIterator begin, InputIterator end, const codecvt_type& cvt) - { + { if (begin != end) { std::basic_string<typename std::iterator_traits<InputIterator>::value_type> @@ -225,7 +225,7 @@ namespace filesystem template <class InputIterator> path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt) - { + { m_pathname.clear(); if (begin != end) { @@ -270,13 +270,13 @@ namespace filesystem template <class InputIterator> path& concat(InputIterator begin, InputIterator end) - { + { return concat(begin, end, codecvt()); } template <class InputIterator> path& concat(InputIterator begin, InputIterator end, const codecvt_type& cvt) - { + { if (begin == end) return *this; std::basic_string<typename std::iterator_traits<InputIterator>::value_type> @@ -313,7 +313,7 @@ namespace filesystem template <class InputIterator> path& append(InputIterator begin, InputIterator end) - { + { return append(begin, end, codecvt()); } @@ -334,7 +334,7 @@ namespace filesystem void swap(path& rhs) { m_pathname.swap(rhs.m_pathname); } // ----- observers ----- - + // For operating systems that format file paths differently than directory // paths, return values from observers are formatted as file names unless there // is a trailing separator, in which case returns are formatted as directory @@ -364,16 +364,16 @@ namespace filesystem String string(const codecvt_type& cvt) const; # ifdef BOOST_WINDOWS_API - const std::string string() const { return string(codecvt()); } + const std::string string() const { return string(codecvt()); } const std::string string(const codecvt_type& cvt) const - { + { std::string tmp; if (!m_pathname.empty()) path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), tmp, cvt); return tmp; } - + // string_type is std::wstring, so there is no conversion const std::wstring& wstring() const { return m_pathname; } const std::wstring& wstring(const codecvt_type&) const { return m_pathname; } @@ -385,7 +385,7 @@ namespace filesystem const std::wstring wstring() const { return wstring(codecvt()); } const std::wstring wstring(const codecvt_type& cvt) const - { + { std::wstring tmp; if (!m_pathname.empty()) path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), @@ -404,8 +404,8 @@ namespace filesystem String generic_string(const codecvt_type& cvt) const; # ifdef BOOST_WINDOWS_API - const std::string generic_string() const { return generic_string(codecvt()); } - const std::string generic_string(const codecvt_type& cvt) const; + const std::string generic_string() const { return generic_string(codecvt()); } + const std::string generic_string(const codecvt_type& cvt) const; const std::wstring generic_wstring() const; const std::wstring generic_wstring(const codecvt_type&) const { return generic_wstring(); }; @@ -426,7 +426,7 @@ namespace filesystem // ----- decomposition ----- - path root_path() const; + path root_path() const; path root_name() const; // returns 0 or 1 element path // even on POSIX, root_name() is non-empty() for network paths path root_directory() const; // returns 0 or 1 element path @@ -455,7 +455,7 @@ namespace filesystem return has_root_directory(); # endif } - bool is_relative() const { return !is_absolute(); } + bool is_relative() const { return !is_absolute(); } // ----- iterators ----- @@ -489,7 +489,7 @@ namespace filesystem # if defined(BOOST_FILESYSTEM_DEPRECATED) // deprecated functions with enough signature or semantic changes that they are - // not supplied by default + // not supplied by default const std::string file_string() const { return string(); } const std::string directory_string() const { return string(); } const std::string native_file_string() const { return string(); } @@ -502,7 +502,7 @@ namespace filesystem //basic_path(const string_type& str, name_check) { operator/=(str); } //basic_path(const typename string_type::value_type* s, name_check) // { operator/=(s);} - //static bool default_name_check_writable() { return false; } + //static bool default_name_check_writable() { return false; } //static void default_name_check(name_check) {} //static name_check default_name_check() { return 0; } //basic_path& canonize(); @@ -529,7 +529,7 @@ namespace filesystem // slashes NOT converted to backslashes # if defined(_MSC_VER) # pragma warning(pop) // restore warning settings. -# endif +# endif string_type::size_type m_append_separator_if_needed(); // Returns: If separator is to be appended, m_pathname.size() before append. Otherwise 0. @@ -541,7 +541,7 @@ namespace filesystem path& m_normalize(); // Was qualified; como433beta8 reports: - // warning #427-D: qualified name is not allowed in member declaration + // warning #427-D: qualified name is not allowed in member declaration friend class iterator; friend bool operator<(const path& lhs, const path& rhs); @@ -565,7 +565,7 @@ namespace filesystem //------------------------------------------------------------------------------------// // class path::iterator // //------------------------------------------------------------------------------------// - + class path::iterator : public boost::iterator_facade< path::iterator, @@ -596,7 +596,7 @@ namespace filesystem // m_path_ptr->m_pathname. // if m_element is implicit dot, m_pos is the // position of the last separator in the path. - // end() iterator is indicated by + // end() iterator is indicated by // m_pos == m_path_ptr->m_pathname.size() }; // path::iterator @@ -611,15 +611,15 @@ namespace filesystem inline bool lexicographical_compare(path::iterator first1, path::iterator last1, path::iterator first2, path::iterator last2) { return detail::lex_compare(first1, last1, first2, last2) < 0; } - + inline bool operator==(const path& lhs, const path& rhs) {return lhs.compare(rhs) == 0;} - inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;} + inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;} inline bool operator==(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) == 0;} inline bool operator==(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) == 0;} inline bool operator==(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) == 0;} - + inline bool operator!=(const path& lhs, const path& rhs) {return lhs.compare(rhs) != 0;} - inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;} + inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;} inline bool operator!=(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) != 0;} inline bool operator!=(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) != 0;} inline bool operator!=(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) != 0;} @@ -658,7 +658,7 @@ namespace filesystem return os << boost::io::quoted(p.template string<std::basic_string<Char> >(), static_cast<Char>('&')); } - + template <class Char, class Traits> inline std::basic_istream<Char, Traits>& operator>>(std::basic_istream<Char, Traits>& is, path& p) @@ -668,7 +668,7 @@ namespace filesystem p = str; return is; } - + // name_checks // These functions are holdovers from version 1. It isn't clear they have much @@ -680,14 +680,14 @@ namespace filesystem BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name); BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name); BOOST_FILESYSTEM_DECL bool native(const std::string & name); - + //--------------------------------------------------------------------------------------// // class path member template implementation // //--------------------------------------------------------------------------------------// template <class InputIterator> path& path::append(InputIterator begin, InputIterator end, const codecvt_type& cvt) - { + { if (begin == end) return *this; string_type::size_type sep_pos(m_append_separator_if_needed()); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/format/alt_sstream.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/format/alt_sstream.hpp index e236be35..d513d243 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/format/alt_sstream.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/format/alt_sstream.hpp @@ -1,5 +1,5 @@ // ---------------------------------------------------------------------------- -// alt_sstream.hpp : alternative stringstream +// alt_sstream.hpp : alternative stringstream // ---------------------------------------------------------------------------- // Copyright Samuel Krempp 2003. Use, modification, and distribution are @@ -18,23 +18,23 @@ #include <string> #include <boost/format/detail/compat_workarounds.hpp> #include <boost/utility/base_from_member.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/assert.hpp> namespace boost { namespace io { - template<class Ch, class Tr=::std::char_traits<Ch>, + template<class Ch, class Tr=::std::char_traits<Ch>, class Alloc=::std::allocator<Ch> > class basic_altstringbuf; - template<class Ch, class Tr =::std::char_traits<Ch>, + template<class Ch, class Tr =::std::char_traits<Ch>, class Alloc=::std::allocator<Ch> > class basic_oaltstringstream; template<class Ch, class Tr, class Alloc> - class basic_altstringbuf + class basic_altstringbuf : public ::std::basic_streambuf<Ch, Tr> { typedef ::std::basic_streambuf<Ch, Tr> streambuf_t; @@ -55,14 +55,14 @@ namespace boost { explicit basic_altstringbuf(std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) + : putend_(NULL), is_allocated_(false), mode_(mode) {} explicit basic_altstringbuf(const string_type& s, ::std::ios_base::openmode mode = ::std::ios_base::in | ::std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) + : putend_(NULL), is_allocated_(false), mode_(mode) { dealloc(); str(s); } - virtual ~basic_altstringbuf() + virtual ~basic_altstringbuf() { dealloc(); } using streambuf_t::pbase; using streambuf_t::pptr; @@ -70,36 +70,36 @@ namespace boost { using streambuf_t::eback; using streambuf_t::gptr; using streambuf_t::egptr; - + void clear_buffer(); void str(const string_type& s); // 0-copy access : - Ch * begin() const; + Ch * begin() const; size_type size() const; size_type cur_size() const; // stop at current pointer Ch * pend() const // the highest position reached by pptr() since creation { return ((putend_ < pptr()) ? pptr() : putend_); } - size_type pcount() const + size_type pcount() const { return static_cast<size_type>( pptr() - pbase()) ;} // copy buffer to string : - string_type str() const + string_type str() const { return string_type(begin(), size()); } - string_type cur_str() const + string_type cur_str() const { return string_type(begin(), cur_size()); } protected: explicit basic_altstringbuf (basic_altstringbuf * s, - ::std::ios_base::openmode mode + ::std::ios_base::openmode mode = ::std::ios_base::in | ::std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) + : putend_(NULL), is_allocated_(false), mode_(mode) { dealloc(); str(s); } - virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, - ::std::ios_base::openmode which + virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, + ::std::ios_base::openmode which = ::std::ios_base::in | ::std::ios_base::out); - virtual pos_type seekpos (pos_type pos, - ::std::ios_base::openmode which + virtual pos_type seekpos (pos_type pos, + ::std::ios_base::openmode which = ::std::ios_base::in | ::std::ios_base::out); virtual int_type underflow(); virtual int_type pbackfail(int_type meta = compat_traits_type::eof()); @@ -117,53 +117,53 @@ namespace boost { // --- class basic_oaltstringstream ---------------------------------------- template <class Ch, class Tr, class Alloc> - class basic_oaltstringstream - : private base_from_member< shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, + class basic_oaltstringstream + : private base_from_member< std::shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, public ::std::basic_ostream<Ch, Tr> { - class No_Op { + class No_Op { // used as no-op deleter for (not-owner) shared_pointers - public: + public: template<class T> const T & operator()(const T & arg) { return arg; } }; typedef ::std::basic_ostream<Ch, Tr> stream_t; - typedef boost::base_from_member<boost::shared_ptr< - basic_altstringbuf<Ch,Tr, Alloc> > > + typedef boost::base_from_member<boost::std::shared_ptr< + basic_altstringbuf<Ch,Tr, Alloc> > > pbase_type; typedef ::std::basic_string<Ch, Tr, Alloc> string_type; typedef typename string_type::size_type size_type; typedef basic_altstringbuf<Ch, Tr, Alloc> stringbuf_t; public: typedef Alloc allocator_type; - basic_oaltstringstream() - : pbase_type(new stringbuf_t), stream_t(rdbuf()) + basic_oaltstringstream() + : pbase_type(new stringbuf_t), stream_t(rdbuf()) { } - basic_oaltstringstream(::boost::shared_ptr<stringbuf_t> buf) - : pbase_type(buf), stream_t(rdbuf()) + basic_oaltstringstream(::boost::std::shared_ptr<stringbuf_t> buf) + : pbase_type(buf), stream_t(rdbuf()) { } - basic_oaltstringstream(stringbuf_t * buf) - : pbase_type(buf, No_Op() ), stream_t(rdbuf()) + basic_oaltstringstream(stringbuf_t * buf) + : pbase_type(buf, No_Op() ), stream_t(rdbuf()) { } - stringbuf_t * rdbuf() const + stringbuf_t * rdbuf() const { return pbase_type::member.get(); } - void clear_buffer() + void clear_buffer() { rdbuf()->clear_buffer(); } // 0-copy access : - Ch * begin() const + Ch * begin() const { return rdbuf()->begin(); } - size_type size() const + size_type size() const { return rdbuf()->size(); } size_type cur_size() const // stops at current position { return rdbuf()->cur_size(); } // copy buffer to string : string_type str() const // [pbase, epptr[ - { return rdbuf()->str(); } + { return rdbuf()->str(); } string_type cur_str() const // [pbase, pptr[ { return rdbuf()->cur_str(); } - void str(const string_type& s) + void str(const string_type& s) { rdbuf()->str(s); } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/functional/hash/extensions.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/functional/hash/extensions.hpp index 998c08e4..2144e057 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/functional/hash/extensions.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/functional/hash/extensions.hpp @@ -5,7 +5,7 @@ // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf -// issue 6.18. +// issue 6.18. // This implements the extensions to the standard. // It's undocumented, so you shouldn't use it.... @@ -358,12 +358,12 @@ namespace boost } }; }; - + template <class T> struct hash_impl_msvc2 : public hash_impl_msvc<boost::is_const<T>::value> ::BOOST_NESTED_TEMPLATE inner<T> {}; - + template <> struct hash_impl<false> { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/get_pointer.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/get_pointer.hpp index b27b98a6..7399d199 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/get_pointer.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/get_pointer.hpp @@ -9,11 +9,11 @@ // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of <memory> doesn't try to -// pull in the TR1 headers: that's why we use this header +// pull in the TR1 headers: that's why we use this header // rather than including <memory> directly: #include <boost/config/no_tr1/memory.hpp> // std::auto_ptr -namespace boost { +namespace boost { // get_pointer(p) extracts a ->* capable pointer from p @@ -22,7 +22,7 @@ template<class T> T * get_pointer(T * p) return p; } -// get_pointer(shared_ptr<T> const & p) has been moved to shared_ptr.hpp +// get_pointer(std::shared_ptr<T> const & p) has been moved to std::shared_ptr.hpp template<class T> T * get_pointer(std::auto_ptr<T> const& p) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/io_error.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/io_error.hpp index 5ea79c58..e74ca47a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/io_error.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/io_error.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -20,7 +20,7 @@ #include <ios> #include "../../gil_config.hpp" -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { namespace gil { @@ -30,7 +30,7 @@ inline void io_error_if(bool expr, const char* descr="") { if (expr) io_error(de namespace detail { class file_mgr { protected: - shared_ptr<FILE> _fp; + std::shared_ptr<FILE> _fp; struct null_deleter { void operator()(void const*) const {} }; file_mgr(FILE* file) : _fp(file, null_deleter()) {} @@ -38,7 +38,7 @@ namespace detail { file_mgr(const char* filename, const char* flags) { FILE* fp; io_error_if((fp=fopen(filename,flags))==NULL, "file_mgr: failed to open file"); - _fp=shared_ptr<FILE>(fp,fclose); + _fp=std::shared_ptr<FILE>(fp,fclose); } public: diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_dynamic_io.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_dynamic_io.hpp index b1108fe8..3140e728 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_dynamic_io.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_dynamic_io.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -24,7 +24,7 @@ #include <stdio.h> #include <string> #include <boost/mpl/bool.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include "../dynamic_image/dynamic_image_all.hpp" #include "io_error.hpp" @@ -43,7 +43,7 @@ struct jpeg_write_is_supported { class jpeg_writer_dynamic : public jpeg_writer { int _quality; -public: +public: jpeg_writer_dynamic(FILE* file, int quality=100) : jpeg_writer(file) , _quality(quality) {} jpeg_writer_dynamic(const char* filename, int quality=100) : jpeg_writer(filename), _quality(quality) {} @@ -74,7 +74,7 @@ class jpeg_reader_dynamic : public jpeg_reader { public: jpeg_reader_dynamic(FILE* file) : jpeg_reader(file) {} jpeg_reader_dynamic(const char* filename) : jpeg_reader(filename){} - + template <typename Images> void read_image(any_image<Images>& im) { if (!construct_matched(im,detail::jpeg_type_format_checker(_cinfo.out_color_space))) { @@ -110,7 +110,7 @@ inline void jpeg_read_image(const std::string& filename,any_image<Images>& im) { /// \ingroup JPEG_IO /// \brief Saves the currently instantiated view to a jpeg file specified by the given jpeg image file name. -/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension +/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension /// or if it fails to create the file. template <typename Views> inline void jpeg_write_view(const char* filename,const any_image_view<Views>& runtime_view) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_io.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_io.hpp index b9adc023..bdeb56d5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_io.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_io.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -24,7 +24,7 @@ #include <algorithm> #include <string> #include <boost/static_assert.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> extern "C" { #include <jpeglib.h> } @@ -64,7 +64,7 @@ inline point2<std::ptrdiff_t> jpeg_read_dimensions(const std::string& filename) /// \ingroup JPEG_IO /// \brief Loads the image specified by the given jpeg image file name into the given view. /// Triggers a compile assert if the view color space and channel depth are not supported by the JPEG library or by the I/O extension. -/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not +/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not /// compatible with the ones specified by View, or if its dimensions don't match the ones of the view. template <typename View> inline void jpeg_read_view(const char* filename,const View& view) { @@ -84,7 +84,7 @@ inline void jpeg_read_view(const std::string& filename,const View& view) { /// \ingroup JPEG_IO /// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, and loads the pixels into it. /// Triggers a compile assert if the image color space or channel depth are not supported by the JPEG library or by the I/O extension. -/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not +/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not /// compatible with the ones specified by Image template <typename Image> inline void jpeg_read_image(const char* filename,Image& im) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/png_dynamic_io.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/png_dynamic_io.hpp index a3a25a97..616e2029 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/png_dynamic_io.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/png_dynamic_io.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -31,7 +31,7 @@ #include <string> #include <stdio.h> #include <boost/mpl/bool.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include "../dynamic_image/dynamic_image_all.hpp" #include "io_error.hpp" #include "png_io.hpp" @@ -81,7 +81,7 @@ class png_reader_dynamic : public png_reader { public: png_reader_dynamic(FILE* file) : png_reader(file) {} png_reader_dynamic(const char* filename) : png_reader(filename){} - + template <typename Images> void read_image(any_image<Images>& im) { png_uint_32 width, height; @@ -99,7 +99,7 @@ public: } }; -} // namespace detail +} // namespace detail /// \ingroup PNG_IO /// \brief reads a PNG image into a run-time instantiated image @@ -121,7 +121,7 @@ inline void png_read_image(const std::string& filename,any_image<Images>& im) { /// \ingroup PNG_IO /// \brief Saves the currently instantiated view to a png file specified by the given png image file name. -/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension +/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension /// or if it fails to create the file. template <typename Views> inline void png_write_view(const char* filename,const any_image_view<Views>& runtime_view) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/detail/self_avoiding_walk.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/detail/self_avoiding_walk.hpp index c171897f..bd02797f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/detail/self_avoiding_walk.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/detail/self_avoiding_walk.hpp @@ -10,19 +10,19 @@ #define BOOST_SELF_AVOIDING_WALK_HPP /* - This file defines necessary components for SAW. + This file defines necessary components for SAW. mesh language: (defined by myself to clearify what is what) A triangle in mesh is called an triangle. - An edge in mesh is called an line. + An edge in mesh is called an line. A vertex in mesh is called a point. A triangular mesh corresponds to a graph in which a vertex is a - triangle and an edge(u, v) stands for triangle u and triangle v + triangle and an edge(u, v) stands for triangle u and triangle v share an line. After this point, a vertex always refers to vertex in graph, - therefore it is a traingle in mesh. + therefore it is a traingle in mesh. */ @@ -43,7 +43,7 @@ namespace boost { triple(const T1& a, const T2& b, const T3& c) : first(a), second(b), third(c) {} triple() : first(SAW_SENTINAL), second(SAW_SENTINAL), third(SAW_SENTINAL) {} }; - + typedef triple<int, int, int> Triple; /* Define a vertex property which has a triangle inside. Triangle is @@ -70,14 +70,14 @@ namespace boost { if ( a.second == b.second || a.second == b.third ) l.second = a.second; else if ( a.third == b.second || a.third == b.third ) - l.second = a.third; + l.second = a.third; } else if ( a.first == b.second ) { l.first = a.first; if ( a.second == b.third ) l.second = a.second; else if ( a.third == b.third ) - l.second = a.third; + l.second = a.third; } else if ( a.first == b.third ) { l.first = a.first; @@ -90,17 +90,17 @@ namespace boost { } else if ( a.second == b.second ) { l.first = a.second; - if ( a.third == b.third ) + if ( a.third == b.third ) l.second = a.third; } else if ( a.second == b.third ) { l.first = a.second; - } else if ( a.third == b.first - || a.third == b.second + } else if ( a.third == b.first + || a.third == b.second || a.third == b.third ) - l.first = a.third; + l.first = a.third; /*Make it in order*/ if ( l.first > l.second ) { @@ -132,7 +132,7 @@ namespace boost { } TriangleDecorator td; }; - + /* HList has to be a handle of data holder so that pass-by-value is * in right logic. * @@ -146,7 +146,7 @@ namespace boost { : public bfs_visitor<>, public dfs_visitor<> { typedef typename boost::property_traits<IteratorD>::value_type iter; - /*use boost shared_ptr*/ + /*use boost std::shared_ptr*/ typedef typename HList::element_type::value_type::second_type Line; public: @@ -176,12 +176,12 @@ namespace boost { using std::make_pair; typedef typename boost::graph_traits<Graph>::vertex_descriptor Vertex; Vertex tau = target(e, G); - Vertex i = source(e, G); + Vertex i = source(e, G); get_vertex_sharing<TriangleDecorator, Vertex, Line> get_sharing_line(td); - + Line tau_i = get_sharing_line(tau, i); - + iter w_end = hlist->end(); iter w_i = iter_d[i]; @@ -197,7 +197,7 @@ namespace boost { *b w(i) |- w(i+1) w(i) ~> w(i+1) or no w(i+1) yet *---------------------------------------------------------- */ - + bool a = false, b = false; --w_i_m_1; @@ -206,13 +206,13 @@ namespace boost { if ( w_i_m_1 != w_end ) { a = ( w_i_m_1->second.first != SAW_SENTINAL ); - } - + } + if ( a ) { - + if ( b ) { - /*Case 1: - + /*Case 1: + w(i-1) |- w(i) |- w(i+1) */ Line l1 = get_sharing_line(*w_i_m_1, tau); @@ -221,7 +221,7 @@ namespace boost { --w_i_m_2; bool c = true; - + if ( w_i_m_2 != w_end ) { c = w_i_m_2->second != l1; } @@ -230,11 +230,11 @@ namespace boost { /*extension: w(i-1) -> tau |- w(i) */ w_i_m_1->second = l1; /*insert(pos, const T&) is to insert before pos*/ - iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); - + iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); + } else { /* w(i-1) ^ tau == w(i-2) ^ w(i-1) */ /*must be w(i-2) ~> w(i-1) */ - + bool d = true; //need to handle the case when w_i_p_1 is null Line l3 = get_sharing_line(*w_i_p_1, tau); @@ -261,15 +261,15 @@ namespace boost { ; } } - + } - } else { + } else { /*Case 2: - + w(i-1) |- w(i) ~> w(1+1) */ - - if ( w_i->second.second == tau_i.first + + if ( w_i->second.second == tau_i.first || w_i->second.second == tau_i.second ) { /*w(i) ^ w(i+1) < w(i) ^ tau*/ /*extension: w(i) |- tau -> w(i+1) */ w_i->second = tau_i; @@ -296,23 +296,23 @@ namespace boost { iter_d[w_i_m_1->first] = hlist->insert(w_i_p_1, *w_i_m_1); hlist->erase(w_i_m_1); } - - } - + + } + } - + } else { - + if ( b ) { /*Case 3: - + w(i-1) ~> w(i) |- w(i+1) */ bool c = false; if ( w_i_m_1 != w_end ) c = ( w_i_m_1->second.second == tau_i.first) || ( w_i_m_1->second.second == tau_i.second); - + if ( c ) { /*w(i-1) ^ w(i) < w(i) ^ tau*/ /* extension: w(i-1) -> tau |- w(i) */ if ( w_i_m_1 != w_end ) @@ -336,7 +336,7 @@ namespace boost { /*extension: w(i-1) -> w(i+1) |- w(i) |- tau -> w(i+2) */ iter w_i_p_2 = w_i_p_1; ++w_i_p_2; - + w_i_p_1->second = w_i->second; iter_d[i] = hlist->insert(w_i_p_2, make_pair(i, tau_i)); hlist->erase(w_i); @@ -344,16 +344,16 @@ namespace boost { iter_d[tau] = hlist->insert(w_i_p_2, make_pair(tau, l2)); } } - + } else { /*Case 4: - + w(i-1) ~> w(i) ~> w(i+1) - + */ bool c = false; if ( w_i_m_1 != w_end ) { - c = (w_i_m_1->second.second == tau_i.first) + c = (w_i_m_1->second.second == tau_i.first) || (w_i_m_1->second.second == tau_i.second); } if ( c ) { /*w(i-1) ^ w(i) < w(i) ^ tau */ @@ -361,48 +361,48 @@ namespace boost { if ( w_i_m_1 != w_end ) w_i_m_1->second = get_sharing_line(*w_i_m_1, tau); iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); - } else { + } else { /*extension: w(i) |- tau -> w(i+1) */ w_i->second = tau_i; Line l1; l1.first = SAW_SENTINAL; l1.second = SAW_SENTINAL; - if ( w_i_p_1 != w_end ) + if ( w_i_p_1 != w_end ) l1 = get_sharing_line(*w_i_p_1, tau); iter_d[tau] = hlist->insert(w_i_p_1, make_pair(tau, l1)); } } - + } return true; } - + protected: TriangleDecorator td; /*a decorator for vertex*/ HList hlist; /*This must be a handle of list to record the SAW The element type of the list is pair<Vertex, Line> */ - - IteratorD iter_d; + + IteratorD iter_d; /*Problem statement: Need a fast access to w for triangle i. - *Possible solution: mantain an array to record. - iter_d[i] will return an iterator + *Possible solution: mantain an array to record. + iter_d[i] will return an iterator which points to w(i), where i is a vertex representing triangle i. */ }; template <class Triangle, class HList, class Iterator> - inline + inline SAW_visitor<Triangle, HList, Iterator> visit_SAW(Triangle t, HList hl, Iterator i) { return SAW_visitor<Triangle, HList, Iterator>(t, hl, i); } template <class Tri, class HList, class Iter> - inline + inline SAW_visitor< random_access_iterator_property_map<Tri*,Tri,Tri&>, HList, random_access_iterator_property_map<Iter*,Iter,Iter&> > visit_SAW_ptr(Tri* t, HList hl, Iter* i) { @@ -412,7 +412,7 @@ namespace boost { } // should also have combo's of pointers, and also const :( - + } #endif /*BOOST_SAW_H*/ diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/detail/mpi_process_group.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/detail/mpi_process_group.ipp index a4d35462..75a02fe2 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/detail/mpi_process_group.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/detail/mpi_process_group.ipp @@ -40,7 +40,7 @@ namespace boost { namespace graph { namespace distributed { struct mpi_process_group::impl { - + typedef mpi_process_group::message_header message_header; typedef mpi_process_group::outgoing_messages outgoing_messages; @@ -71,7 +71,7 @@ struct mpi_process_group::impl std::size_t batch_header_number; std::size_t batch_buffer_size; std::size_t batch_message_size; - + /** * The actual MPI communicator used to transmit data. */ @@ -90,19 +90,19 @@ struct mpi_process_group::impl /// The numbers of processors that have entered a synchronization stage std::vector<int> processors_synchronizing_stage; - + /// The synchronization stage of a processor std::vector<int> synchronizing_stage; /// Number of processors still sending messages std::vector<int> synchronizing_unfinished; - + /// Number of batches sent since last synchronization stage std::vector<int> number_sent_batches; - + /// Number of batches received minus number of expected batches std::vector<int> number_received_batches; - + /// The context of the currently-executing trigger, or @c trc_none /// if no trigger is executing. @@ -124,7 +124,7 @@ struct mpi_process_group::impl /// The MPI requests for posted sends of oob messages std::vector<MPI_Request> requests; - + /// The MPI buffers for posted irecvs of oob messages std::map<int,buffer_type> buffers; @@ -144,14 +144,14 @@ struct mpi_process_group::impl std::stack<std::size_t> free_batches; void free_sent_batches(); - + // Tag allocator detail::tag_allocator allocated_tags; impl(std::size_t num_headers, std::size_t buffers_size, communicator_type parent_comm); ~impl(); - + private: void set_batch_size(std::size_t header_num, std::size_t buffer_sz); }; @@ -175,7 +175,7 @@ mpi_process_group::send_impl(int dest, int tag, const T& value, header.source = process_id(*this); header.tag = tag; header.offset = outgoing.buffer.size(); - + boost::mpi::packed_oarchive oa(impl_->comm, outgoing.buffer); oa << value; @@ -237,7 +237,7 @@ send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const T values[], std::size_t n) { pg.send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), - boost::serialization::make_array(values,n), + boost::serialization::make_array(values,n), boost::mpl::true_()); } @@ -279,7 +279,7 @@ typename disable_if<boost::mpi::is_mpi_datatype<T>, void>::type send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const T values[], std::size_t n) { - pg.array_send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), + pg.array_send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), values, n); } @@ -316,7 +316,7 @@ mpi_process_group::receive_impl(int source, int tag, T& value, // Unpack the data if (header->bytes > 0) { - boost::mpi::packed_iarchive ia(impl_->comm, incoming.buffer, + boost::mpi::packed_iarchive ia(impl_->comm, incoming.buffer, archive::no_header, header->offset); ia >> value; } @@ -364,7 +364,7 @@ mpi_process_group::receive_impl(int source, int tag, T& value, if (header == incoming.headers.end()) return false; // Deserialize the data - boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, + boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, archive::no_header, header->offset); in >> value; @@ -411,7 +411,7 @@ array_receive_impl(int source, int tag, T* values, std::size_t& n) const if (header == incoming.headers.end()) return false; // Deserialize the data - boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, + boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, archive::no_header, header->offset); std::size_t num_sent; in >> num_sent; @@ -455,7 +455,7 @@ template<typename Type, typename Handler> void mpi_process_group::trigger(int tag, const Handler& handler) { BOOST_ASSERT(block_num); - install_trigger(tag,my_block_number(),shared_ptr<trigger_base>( + install_trigger(tag,my_block_number(),std::shared_ptr<trigger_base>( new trigger_launcher<Type, Handler>(*this, tag, handler))); } @@ -463,28 +463,28 @@ template<typename Type, typename Handler> void mpi_process_group::trigger_with_reply(int tag, const Handler& handler) { BOOST_ASSERT(block_num); - install_trigger(tag,my_block_number(),shared_ptr<trigger_base>( + install_trigger(tag,my_block_number(),std::shared_ptr<trigger_base>( new reply_trigger_launcher<Type, Handler>(*this, tag, handler))); } template<typename Type, typename Handler> -void mpi_process_group::global_trigger(int tag, const Handler& handler, +void mpi_process_group::global_trigger(int tag, const Handler& handler, std::size_t sz) { if (sz==0) // normal trigger - install_trigger(tag,0,shared_ptr<trigger_base>( + install_trigger(tag,0,std::shared_ptr<trigger_base>( new global_trigger_launcher<Type, Handler>(*this, tag, handler))); else // trigger with irecv - install_trigger(tag,0,shared_ptr<trigger_base>( + install_trigger(tag,0,std::shared_ptr<trigger_base>( new global_irecv_trigger_launcher<Type, Handler>(*this, tag, handler,sz))); - + } namespace detail { template<typename Type> void do_oob_receive(mpi_process_group const& self, - int source, int tag, Type& data, mpl::true_ /*is_mpi_datatype*/) + int source, int tag, Type& data, mpl::true_ /*is_mpi_datatype*/) { using boost::mpi::get_mpi_datatype; @@ -495,7 +495,7 @@ void do_oob_receive(mpi_process_group const& self, template<typename Type> void do_oob_receive(mpi_process_group const& self, - int source, int tag, Type& data, mpl::false_ /*is_mpi_datatype*/) + int source, int tag, Type& data, mpl::false_ /*is_mpi_datatype*/) { // self.impl_->comm.recv(source,tag,data); // Receive the size of the data packet @@ -521,7 +521,7 @@ void do_oob_receive(mpi_process_group const& self, } template<typename Type> -void do_oob_receive(mpi_process_group const& self, int source, int tag, Type& data) +void do_oob_receive(mpi_process_group const& self, int source, int tag, Type& data) { do_oob_receive(self, source, tag, data, boost::mpi::is_mpi_datatype<Type>()); @@ -532,13 +532,13 @@ void do_oob_receive(mpi_process_group const& self, int source, int tag, Type& da template<typename Type, typename Handler> -void +void mpi_process_group::trigger_launcher<Type, Handler>:: -receive(mpi_process_group const&, int source, int tag, +receive(mpi_process_group const&, int source, int tag, trigger_receive_context context, int block) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << (out_of_band? "OOB trigger" : "Trigger") + std::cerr << (out_of_band? "OOB trigger" : "Trigger") << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif @@ -560,13 +560,13 @@ receive(mpi_process_group const&, int source, int tag, } template<typename Type, typename Handler> -void +void mpi_process_group::reply_trigger_launcher<Type, Handler>:: -receive(mpi_process_group const&, int source, int tag, +receive(mpi_process_group const&, int source, int tag, trigger_receive_context context, int block) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << (out_of_band? "OOB reply trigger" : "Reply trigger") + std::cerr << (out_of_band? "OOB reply trigger" : "Reply trigger") << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif @@ -581,18 +581,18 @@ receive(mpi_process_group const&, int source, int tag, // Pass the message off to the handler and send the result back to // the source. - send_oob(self, source, data.first, + send_oob(self, source, data.first, handler(source, tag, data.second, context), -2); } template<typename Type, typename Handler> -void +void mpi_process_group::global_trigger_launcher<Type, Handler>:: -receive(mpi_process_group const& self, int source, int tag, +receive(mpi_process_group const& self, int source, int tag, trigger_receive_context context, int block) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << (out_of_band? "OOB trigger" : "Trigger") + std::cerr << (out_of_band? "OOB trigger" : "Trigger") << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif @@ -615,13 +615,13 @@ receive(mpi_process_group const& self, int source, int tag, template<typename Type, typename Handler> -void +void mpi_process_group::global_irecv_trigger_launcher<Type, Handler>:: -receive(mpi_process_group const& self, int source, int tag, +receive(mpi_process_group const& self, int source, int tag, trigger_receive_context context, int block) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << (out_of_band? "OOB trigger" : "Trigger") + std::cerr << (out_of_band? "OOB trigger" : "Trigger") << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif @@ -644,12 +644,12 @@ receive(mpi_process_group const& self, int source, int tag, template<typename Type, typename Handler> -void +void mpi_process_group::global_irecv_trigger_launcher<Type, Handler>:: prepare_receive(mpi_process_group const& self, int tag, bool force) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << ("Posting Irecv for trigger") + std::cerr << ("Posting Irecv for trigger") << " receive with tag " << tag << std::endl; #endif if (self.impl_->buffers.find(tag) == self.impl_->buffers.end()) { @@ -657,7 +657,7 @@ prepare_receive(mpi_process_group const& self, int tag, bool force) const force = true; } BOOST_ASSERT(static_cast<int>(self.impl_->buffers[tag].size()) >= buffer_size); - + //BOOST_MPL_ASSERT(mpl::not_<is_mpi_datatype<Type> >); if (force) { self.impl_->requests.push_back(MPI_Request()); @@ -681,8 +681,8 @@ receive(const mpi_process_group& pg, int tag, T& value) } template<typename T> -typename - enable_if<boost::mpi::is_mpi_datatype<T>, +typename + enable_if<boost::mpi::is_mpi_datatype<T>, std::pair<mpi_process_group::process_id_type, std::size_t> >::type receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) { @@ -691,15 +691,15 @@ receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) pg.receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), boost::serialization::make_array(values,n), boost::mpl::true_()); - if (result) + if (result) return std::make_pair(source, n); } BOOST_ASSERT(false); } template<typename T> -typename - disable_if<boost::mpi::is_mpi_datatype<T>, +typename + disable_if<boost::mpi::is_mpi_datatype<T>, std::pair<mpi_process_group::process_id_type, std::size_t> >::type receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) { @@ -730,14 +730,14 @@ receive(const mpi_process_group& pg, } template<typename T> -typename - enable_if<boost::mpi::is_mpi_datatype<T>, +typename + enable_if<boost::mpi::is_mpi_datatype<T>, std::pair<mpi_process_group::process_id_type, std::size_t> >::type -receive(const mpi_process_group& pg, int source, int tag, T values[], +receive(const mpi_process_group& pg, int source, int tag, T values[], std::size_t n) { if (pg.receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), - boost::serialization::make_array(values,n), + boost::serialization::make_array(values,n), boost::mpl::true_())) return std::make_pair(source,n); else { @@ -751,10 +751,10 @@ receive(const mpi_process_group& pg, int source, int tag, T values[], } template<typename T> -typename - disable_if<boost::mpi::is_mpi_datatype<T>, +typename + disable_if<boost::mpi::is_mpi_datatype<T>, std::pair<mpi_process_group::process_id_type, std::size_t> >::type -receive(const mpi_process_group& pg, int source, int tag, T values[], +receive(const mpi_process_group& pg, int source, int tag, T values[], std::size_t n) { pg.array_receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), @@ -775,7 +775,7 @@ all_reduce(const mpi_process_group& pg, T* first, T* last, T* out, if (inplace) out = new T [last-first]; boost::mpi::all_reduce(boost::mpi::communicator(communicator(pg), - boost::mpi::comm_attach), + boost::mpi::comm_attach), first, last-first, out, bin_op); if (inplace) { @@ -789,10 +789,10 @@ all_reduce(const mpi_process_group& pg, T* first, T* last, T* out, template<typename T> void -broadcast(const mpi_process_group& pg, T& val, +broadcast(const mpi_process_group& pg, T& val, mpi_process_group::process_id_type root) { - // broadcast the seed + // broadcast the seed boost::mpi::communicator comm(communicator(pg),boost::mpi::comm_attach); boost::mpi::broadcast(comm,val,root); } @@ -914,7 +914,7 @@ Receiver* mpi_process_group::get_receiver() template<typename T> typename enable_if<boost::mpi::is_mpi_datatype<T> >::type -receive_oob(const mpi_process_group& pg, +receive_oob(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value, int block) { using boost::mpi::get_mpi_datatype; @@ -926,8 +926,8 @@ receive_oob(const mpi_process_group& pg, // Post a non-blocking receive that waits until we complete this request. MPI_Request request; - MPI_Irecv(&value, 1, get_mpi_datatype<T>(value), - source, actual.second, actual.first, &request); + MPI_Irecv(&value, 1, get_mpi_datatype<T>(value), + source, actual.second, actual.first, &request); int done = 0; do { @@ -939,7 +939,7 @@ receive_oob(const mpi_process_group& pg, template<typename T> typename disable_if<boost::mpi::is_mpi_datatype<T> >::type -receive_oob(const mpi_process_group& pg, +receive_oob(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value, int block) { // Determine the actual message we expect to receive, and which @@ -967,11 +967,11 @@ receive_oob(const mpi_process_group& pg, MPI_Get_count(&mpi_status, MPI_PACKED, &size); in.resize(size); #endif - + // Receive the message data MPI_Recv(in.address(), in.size(), MPI_PACKED, status->source(), status->tag(), actual.first, MPI_STATUS_IGNORE); - + // Unpack the message data in >> value; } @@ -979,7 +979,7 @@ receive_oob(const mpi_process_group& pg, template<typename SendT, typename ReplyT> typename enable_if<boost::mpi::is_mpi_datatype<ReplyT> >::type -send_oob_with_reply(const mpi_process_group& pg, +send_oob_with_reply(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const SendT& send_value, ReplyT& reply_value, int block) @@ -992,14 +992,14 @@ send_oob_with_reply(const mpi_process_group& pg, template<typename SendT, typename ReplyT> typename disable_if<boost::mpi::is_mpi_datatype<ReplyT> >::type -send_oob_with_reply(const mpi_process_group& pg, +send_oob_with_reply(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const SendT& send_value, ReplyT& reply_value, int block) { detail::tag_allocator::token reply_tag = pg.impl_->allocated_tags.get_tag(); - send_oob(pg, dest, tag, - boost::parallel::detail::make_untracked_pair((int)reply_tag, + send_oob(pg, dest, tag, + boost::parallel::detail::make_untracked_pair((int)reply_tag, send_value), block); receive_oob(pg, dest, reply_tag, reply_value); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/mpi_process_group.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/mpi_process_group.hpp index e0ee5790..57bbfbbc 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/mpi_process_group.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/mpi_process_group.hpp @@ -20,7 +20,7 @@ #define SEND_OOB_BSEND #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <utility> #include <memory> @@ -48,7 +48,7 @@ class mpi_process_group * The type of a "receive" handler, that will be provided with * (source, tag) pairs when a message is received. Users can provide a * receive handler for a distributed data structure, for example, to - * automatically pick up and respond to messages as needed. + * automatically pick up and respond to messages as needed. */ typedef function<void(int source, int tag)> receiver_type; @@ -75,7 +75,7 @@ class mpi_process_group /// Classification of the capabilities of this process group struct communication_category - : virtual parallel::bsp_process_group_tag, + : virtual parallel::bsp_process_group_tag, virtual mpi_process_group_tag { }; // TBD: We can eliminate the "source" field and possibly the @@ -92,7 +92,7 @@ class mpi_process_group /// The length of the message in the buffer, in bytes std::size_t bytes; - + template <class Archive> void serialize(Archive& ar, int) { @@ -113,14 +113,14 @@ class mpi_process_group std::vector<message_header> headers; buffer_type buffer; - + template <class Archive> void serialize(Archive& ar, int) { ar & headers & buffer; } - - void swap(outgoing_messages& x) + + void swap(outgoing_messages& x) { headers.swap(x.headers); buffer.swap(x.buffer); @@ -137,21 +137,21 @@ private: public: explicit trigger_base(int tag) : tag_(tag) { } - /// Retrieve the tag associated with this trigger + /// Retrieve the tag associated with this trigger int tag() const { return tag_; } virtual ~trigger_base() { } /** - * Invoked to receive a message that matches a particular trigger. + * Invoked to receive a message that matches a particular trigger. * * @param source the source of the message * @param tag the (local) tag of the message * @param context the context under which the trigger is being * invoked */ - virtual void - receive(mpi_process_group const& pg, int source, int tag, + virtual void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const = 0; protected: @@ -162,19 +162,19 @@ private: /** * Launches a specific handler in response to a trigger. This * function object wraps up the handler function object and a buffer - * for incoming data. + * for incoming data. */ template<typename Type, typename Handler> class trigger_launcher : public trigger_base { public: - explicit trigger_launcher(mpi_process_group& self, int tag, - const Handler& handler) - : trigger_base(tag), self(self), handler(handler) + explicit trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), self(self), handler(handler) {} - void - receive(mpi_process_group const& pg, int source, int tag, + void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const; private: @@ -191,13 +191,13 @@ private: class reply_trigger_launcher : public trigger_base { public: - explicit reply_trigger_launcher(mpi_process_group& self, int tag, - const Handler& handler) - : trigger_base(tag), self(self), handler(handler) + explicit reply_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), self(self), handler(handler) {} - void - receive(mpi_process_group const& pg, int source, int tag, + void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const; private: @@ -209,14 +209,14 @@ private: class global_trigger_launcher : public trigger_base { public: - explicit global_trigger_launcher(mpi_process_group& self, int tag, - const Handler& handler) - : trigger_base(tag), handler(handler) - { + explicit global_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), handler(handler) + { } - void - receive(mpi_process_group const& pg, int source, int tag, + void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const; private: @@ -229,15 +229,15 @@ private: class global_irecv_trigger_launcher : public trigger_base { public: - explicit global_irecv_trigger_launcher(mpi_process_group& self, int tag, - const Handler& handler, int sz) + explicit global_irecv_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler, int sz) : trigger_base(tag), handler(handler), buffer_size(sz) - { + { prepare_receive(self,tag); } - void - receive(mpi_process_group const& pg, int source, int tag, + void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const; private: @@ -249,32 +249,32 @@ private: }; public: - /** + /** * Construct a new BSP process group from an MPI communicator. The * MPI communicator will be duplicated to create a new communicator * for this process group to use. */ mpi_process_group(communicator_type parent_comm = communicator_type()); - /** + /** * Construct a new BSP process group from an MPI communicator. The * MPI communicator will be duplicated to create a new communicator * for this process group to use. This constructor allows to tune the * size of message batches. - * + * * @param num_headers The maximum number of headers in a message batch * * @param buffer_size The maximum size of the message buffer in a batch. * */ - mpi_process_group( std::size_t num_headers, std::size_t buffer_size, + mpi_process_group( std::size_t num_headers, std::size_t buffer_size, communicator_type parent_comm = communicator_type()); /** * Construct a copy of the BSP process group for a new distributed * data structure. This data structure will synchronize with all * other members of the process group's equivalence class (including - * @p other), but will have its own set of tags. + * @p other), but will have its own set of tags. * * @param other The process group that this new process group will * be based on, using a different set of tags within the same @@ -296,9 +296,9 @@ public: * Construct a copy of the BSP process group for a new distributed * data structure. This data structure will synchronize with all * other members of the process group's equivalence class (including - * @p other), but will have its own set of tags. + * @p other), but will have its own set of tags. */ - mpi_process_group(const mpi_process_group& other, + mpi_process_group(const mpi_process_group& other, attach_distributed_object, bool out_of_band_receive = false); @@ -335,7 +335,7 @@ public: void replace_on_synchronize_handler(const on_synchronize_event_type& handler = 0); - /** + /** * Return the block number of the current data structure. A value of * 0 indicates that this particular instance of the process group is * not associated with any distributed data structure. @@ -350,7 +350,7 @@ public: { return block_num * max_tags + tag; } /** - * Decode an encoded tag into a block number/tag pair. + * Decode an encoded tag into a block number/tag pair. */ std::pair<int, int> decode_tag(int encoded_tag) const { return std::make_pair(encoded_tag / max_tags, encoded_tag % max_tags); } @@ -366,13 +366,13 @@ public: */ int allocate_block(bool out_of_band_receive = false); - /** Potentially emit a receive event out of band. Returns true if an event - * was actually sent, false otherwise. + /** Potentially emit a receive event out of band. Returns true if an event + * was actually sent, false otherwise. */ bool maybe_emit_receive(int process, int encoded_tag) const; /** Emit a receive event. Returns true if an event was actually - * sent, false otherwise. + * sent, false otherwise. */ bool emit_receive(int process, int encoded_tag) const; @@ -450,7 +450,7 @@ public: void trigger_with_reply(int tag, const Handler& handler); template<typename Type, typename Handler> - void global_trigger(int tag, const Handler& handler, std::size_t buffer_size=0); + void global_trigger(int tag, const Handler& handler, std::size_t buffer_size=0); @@ -468,7 +468,7 @@ public: * @param synchronizing whether we are currently synchronizing the * process group */ - optional<std::pair<int, int> > + optional<std::pair<int, int> > poll(bool wait = false, int block = -1, bool synchronizing = false) const; /** @@ -489,11 +489,11 @@ public: /// /// Determine the actual communicator and tag will be used for a /// transmission with the given tag. - std::pair<boost::mpi::communicator, int> + std::pair<boost::mpi::communicator, int> actual_communicator_and_tag(int tag, int block) const; /// set the size of the message buffer used for buffered oob sends - + static void set_message_buffer_size(std::size_t s); /// get the size of the message buffer used for buffered oob sends @@ -503,12 +503,12 @@ public: static void* old_buffer; private: - void install_trigger(int tag, int block, - shared_ptr<trigger_base> const& launcher); + void install_trigger(int tag, int block, + std::shared_ptr<trigger_base> const& launcher); void poll_requests(int block=-1) const; - + // send a batch if the buffer is full now or would get full void maybe_send_batch(process_id_type dest) const; @@ -527,7 +527,7 @@ private: void receive_batch(boost::mpi::status& status) const; //void free_finished_sends() const; - + /// Status messages used internally by the process group enum status_messages { /// the first of the reserved message tags @@ -557,13 +557,13 @@ private: /// Handler for receive events receiver_type on_receive; - /// Handler executed at the start of synchronization + /// Handler executed at the start of synchronization on_synchronize_event_type on_synchronize; /// Individual message triggers. Note: at present, this vector is /// indexed by the (local) tag of the trigger. Any tags that /// don't have triggers will have NULL pointers in that spot. - std::vector<shared_ptr<trigger_base> > triggers; + std::vector<std::shared_ptr<trigger_base> > triggers; }; /** @@ -581,7 +581,7 @@ private: * @c block_num. */ struct deallocate_block; - + static std::vector<char> message_buffer; public: @@ -589,17 +589,17 @@ public: * Data associated with the process group and all of its attached * distributed data structures. */ - shared_ptr<impl> impl_; + std::shared_ptr<impl> impl_; /** * When non-null, indicates that this copy of the process group is * associated with a particular distributed data structure. The * integer value contains the block number (a value > 0) associated - * with that data structure. The deleter for this @c shared_ptr is a + * with that data structure. The deleter for this @c std::shared_ptr is a * @c deallocate_block object that will deallocate the associated * block in @c impl_->blocks. */ - shared_ptr<int> block_num; + std::shared_ptr<int> block_num; /** * Rank of this process, to avoid having to call rank() repeatedly. @@ -615,11 +615,11 @@ public: -inline mpi_process_group::process_id_type +inline mpi_process_group::process_id_type process_id(const mpi_process_group& pg) { return pg.rank; } -inline mpi_process_group::process_size_type +inline mpi_process_group::process_size_type num_processes(const mpi_process_group& pg) { return pg.size; } @@ -683,7 +683,7 @@ process_subgroup(const mpi_process_group& pg, template<typename T> void -broadcast(const mpi_process_group& pg, T& val, +broadcast(const mpi_process_group& pg, T& val, mpi_process_group::process_id_type root); @@ -705,15 +705,15 @@ send_oob(const mpi_process_group& pg, mpi_process_group::process_id_type dest, #ifdef SEND_OOB_BSEND if (mpi_process_group::message_buffer_size()) { - MPI_Bsend(const_cast<T*>(&value), 1, get_mpi_datatype<T>(value), dest, + MPI_Bsend(const_cast<T*>(&value), 1, get_mpi_datatype<T>(value), dest, actual.second, actual.first); return; } #endif MPI_Request request; - MPI_Isend(const_cast<T*>(&value), 1, get_mpi_datatype<T>(value), dest, + MPI_Isend(const_cast<T*>(&value), 1, get_mpi_datatype<T>(value), dest, actual.second, actual.first, &request); - + int done=0; do { pg.poll(); @@ -759,24 +759,24 @@ send_oob(const mpi_process_group& pg, mpi_process_group::process_id_type dest, template<typename T> typename enable_if<boost::mpi::is_mpi_datatype<T> >::type -receive_oob(const mpi_process_group& pg, +receive_oob(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value, int block=-1); template<typename T> typename disable_if<boost::mpi::is_mpi_datatype<T> >::type -receive_oob(const mpi_process_group& pg, +receive_oob(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value, int block=-1); template<typename SendT, typename ReplyT> typename enable_if<boost::mpi::is_mpi_datatype<ReplyT> >::type -send_oob_with_reply(const mpi_process_group& pg, +send_oob_with_reply(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const SendT& send_value, ReplyT& reply_value, int block = -1); template<typename SendT, typename ReplyT> typename disable_if<boost::mpi::is_mpi_datatype<ReplyT> >::type -send_oob_with_reply(const mpi_process_group& pg, +send_oob_with_reply(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const SendT& send_value, ReplyT& reply_value, int block = -1); @@ -791,7 +791,7 @@ namespace boost { namespace mpi { namespace std { /// optimized swap for outgoing messages -inline void +inline void swap(boost::graph::distributed::mpi_process_group::outgoing_messages& x, boost::graph::distributed::mpi_process_group::outgoing_messages& y) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/queue.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/queue.hpp index 7e84272a..e79c46ed 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/queue.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/queue.hpp @@ -15,7 +15,7 @@ #include <boost/graph/parallel/process_group.hpp> #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <vector> namespace boost { namespace graph { namespace distributed { @@ -213,12 +213,12 @@ class distributed_queue void setup_triggers(); // Message handlers - void - handle_push(int source, int tag, const value_type& value, + void + handle_push(int source, int tag, const value_type& value, trigger_receive_context); - void - handle_multipush(int source, int tag, const std::vector<value_type>& values, + void + handle_multipush(int source, int tag, const std::vector<value_type>& values, trigger_receive_context); mutable ProcessGroup process_group; @@ -229,7 +229,7 @@ class distributed_queue typedef std::vector<value_type> outgoing_buffer_t; typedef std::vector<outgoing_buffer_t> outgoing_buffers_t; - shared_ptr<outgoing_buffers_t> outgoing_buffers; + std::shared_ptr<outgoing_buffers_t> outgoing_buffers; }; /// Helper macro containing the normal names for the template diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/rmat_graph_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/rmat_graph_generator.hpp index dec8250d..261794d8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/rmat_graph_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/rmat_graph_generator.hpp @@ -25,7 +25,7 @@ namespace boost { // requires an MPI process group. Run-time is slightly worse than // the unique rmat generator. Edge list generated is sorted and // unique. - template<typename ProcessGroup, typename Distribution, + template<typename ProcessGroup, typename Distribution, typename RandomGenerator, typename Graph> class scalable_rmat_iterator { @@ -47,8 +47,8 @@ namespace boost { // Initialize for edge generation scalable_rmat_iterator(ProcessGroup pg, Distribution distrib, - RandomGenerator& gen, vertices_size_type n, - edges_size_type m, double a, double b, double c, + RandomGenerator& gen, vertices_size_type n, + edges_size_type m, double a, double b, double c, double d, bool permute_vertices = true) : gen(), done(false) { @@ -58,12 +58,12 @@ namespace boost { this->gen.reset(new uniform_01<RandomGenerator>(gen)); std::vector<vertices_size_type> vertexPermutation; - if (permute_vertices) + if (permute_vertices) generate_permutation_vector(gen, vertexPermutation, n); int SCALE = int(floor(log(double(n))/log(2.))); boost::uniform_01<RandomGenerator> prob(gen); - + std::map<value_type, bool> edge_map; edges_size_type generated = 0, local_edges = 0; @@ -121,13 +121,13 @@ namespace boost { reference operator*() const { return current; } pointer operator->() const { return ¤t; } - + scalable_rmat_iterator& operator++() { if (!values.empty()) { current = values.back(); values.pop_back(); - } else + } else done = true; return *this; @@ -151,7 +151,7 @@ namespace boost { private: // Parameters - shared_ptr<uniform_01<RandomGenerator> > gen; + std::shared_ptr<uniform_01<RandomGenerator> > gen; // Internal data structures std::vector<value_type> values; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/vertex_list_adaptor.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/vertex_list_adaptor.hpp index 8928479a..1d7f9502 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/vertex_list_adaptor.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/vertex_list_adaptor.hpp @@ -16,7 +16,7 @@ #include <boost/graph/graph_traits.hpp> #include <vector> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/property_map/property_map.hpp> #include <boost/graph/parallel/algorithm.hpp> #include <boost/graph/parallel/container_traits.hpp> @@ -25,9 +25,9 @@ namespace boost { namespace graph { // -------------------------------------------------------------------------- -// Global index map built from a distribution +// Global index map built from a distribution // -------------------------------------------------------------------------- -template<typename Distribution, typename OwnerPropertyMap, +template<typename Distribution, typename OwnerPropertyMap, typename LocalPropertyMap> class distribution_global_index_map { @@ -47,16 +47,16 @@ class distribution_global_index_map LocalPropertyMap local; }; -template<typename Distribution, typename OwnerPropertyMap, +template<typename Distribution, typename OwnerPropertyMap, typename LocalPropertyMap> -inline +inline typename distribution_global_index_map<Distribution, OwnerPropertyMap, LocalPropertyMap>::value_type get(const distribution_global_index_map<Distribution, OwnerPropertyMap, LocalPropertyMap>& p, typename distribution_global_index_map<Distribution, OwnerPropertyMap, LocalPropertyMap>::key_type x) -{ +{ using boost::get; return p.distribution_.global(get(p.owner, x), get(p.local, x)); } @@ -64,15 +64,15 @@ get(const distribution_global_index_map<Distribution, OwnerPropertyMap, template<typename Graph, typename Distribution> inline distribution_global_index_map< - Distribution, + Distribution, typename property_map<Graph, vertex_owner_t>::const_type, typename property_map<Graph, vertex_local_t>::const_type> make_distribution_global_index_map(const Graph& g, const Distribution& d) { typedef distribution_global_index_map< - Distribution, + Distribution, typename property_map<Graph, vertex_owner_t>::const_type, - typename property_map<Graph, vertex_local_t>::const_type> + typename property_map<Graph, vertex_local_t>::const_type> result_type; return result_type(d, get(vertex_owner, g), get(vertex_local, g)); } @@ -86,7 +86,7 @@ class stored_global_index_map : public IndexMap public: typedef readable_property_map_tag category; - stored_global_index_map(const IndexMap& index_map) : IndexMap(index_map) { + stored_global_index_map(const IndexMap& index_map) : IndexMap(index_map) { // When we have a global index, we need to always have the indices // of every key we've seen this->set_max_ghost_cells(0); @@ -98,13 +98,13 @@ class stored_global_index_map : public IndexMap // -------------------------------------------------------------------------- namespace detail { template<typename PropertyMap, typename ForwardIterator> - inline void - initialize_global_index_map(const PropertyMap&, - ForwardIterator, ForwardIterator) + inline void + initialize_global_index_map(const PropertyMap&, + ForwardIterator, ForwardIterator) { } template<typename IndexMap, typename ForwardIterator> - void + void initialize_global_index_map(stored_global_index_map<IndexMap>& p, ForwardIterator first, ForwardIterator last) { @@ -126,18 +126,18 @@ class vertex_list_adaptor : public graph_traits<Graph> typedef graph_traits<Graph> inherited; typedef typename inherited::traversal_category base_traversal_category; - + public: typedef typename inherited::vertex_descriptor vertex_descriptor; typedef typename std::vector<vertex_descriptor>::iterator vertex_iterator; typedef typename std::vector<vertex_descriptor>::size_type vertices_size_type; - struct traversal_category + struct traversal_category : public virtual base_traversal_category, public virtual vertex_list_graph_tag {}; - vertex_list_adaptor(const Graph& g, + vertex_list_adaptor(const Graph& g, const GlobalIndexMap& index_map = GlobalIndexMap()) : g(&g), index_map(index_map) { @@ -146,7 +146,7 @@ class vertex_list_adaptor : public graph_traits<Graph> all_vertices_.reset(new std::vector<vertex_descriptor>()); all_gather(process_group(), vertices(g).first, vertices(g).second, *all_vertices_); - detail::initialize_global_index_map(this->index_map, + detail::initialize_global_index_map(this->index_map, all_vertices_->begin(), all_vertices_->end()); } @@ -156,13 +156,13 @@ class vertex_list_adaptor : public graph_traits<Graph> // -------------------------------------------------------------------------- // Distributed Container // -------------------------------------------------------------------------- - typedef typename boost::graph::parallel::process_group_type<Graph>::type + typedef typename boost::graph::parallel::process_group_type<Graph>::type process_group_type; - process_group_type process_group() const - { + process_group_type process_group() const + { using boost::graph::parallel::process_group; - return process_group(*g); + return process_group(*g); } std::pair<vertex_iterator, vertex_iterator> vertices() const @@ -175,7 +175,7 @@ class vertex_list_adaptor : public graph_traits<Graph> private: const Graph* g; GlobalIndexMap index_map; - shared_ptr<std::vector<vertex_descriptor> > all_vertices_; + std::shared_ptr<std::vector<vertex_descriptor> > all_vertices_; }; template<typename Graph, typename GlobalIndexMap> @@ -197,18 +197,18 @@ namespace detail { } template<typename Graph> -inline -vertex_list_adaptor<Graph, +inline +vertex_list_adaptor<Graph, typename detail::default_global_index_map<Graph>::type> make_vertex_list_adaptor(const Graph& g) -{ - typedef typename detail::default_global_index_map<Graph>::type +{ + typedef typename detail::default_global_index_map<Graph>::type GlobalIndexMap; typedef typename detail::default_global_index_map<Graph>::distributed_map DistributedMap; typedef vertex_list_adaptor<Graph, GlobalIndexMap> result_type; - return result_type(g, - GlobalIndexMap(DistributedMap(num_vertices(g), + return result_type(g, + GlobalIndexMap(DistributedMap(num_vertices(g), get(vertex_index, g)))); } @@ -375,7 +375,7 @@ namespace boost { // Property Graph: vertex_index property // -------------------------------------------------------------------------- template<typename Graph, typename GlobalIndexMap> -class property_map<vertex_index_t, +class property_map<vertex_index_t, graph::vertex_list_adaptor<Graph, GlobalIndexMap> > { public: @@ -384,7 +384,7 @@ public: }; template<typename Graph, typename GlobalIndexMap> -class property_map<vertex_index_t, +class property_map<vertex_index_t, const graph::vertex_list_adaptor<Graph, GlobalIndexMap> > { public: diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/erdos_renyi_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/erdos_renyi_generator.hpp index 5be06d79..d90ba36a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/erdos_renyi_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/erdos_renyi_generator.hpp @@ -13,7 +13,7 @@ #include <boost/assert.hpp> #include <iterator> #include <utility> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/random/uniform_int.hpp> #include <boost/graph/graph_traits.hpp> #include <boost/random/geometric_distribution.hpp> @@ -31,7 +31,7 @@ namespace boost { std::pair<typename graph_traits<Graph>::vertices_size_type, typename graph_traits<Graph>::vertices_size_type>, std::input_iterator_tag, - const + const std::pair<typename graph_traits<Graph>::vertices_size_type, typename graph_traits<Graph>::vertices_size_type>&> { @@ -97,7 +97,7 @@ namespace boost { std::pair<typename graph_traits<Graph>::vertices_size_type, typename graph_traits<Graph>::vertices_size_type>, std::input_iterator_tag, - const + const std::pair<typename graph_traits<Graph>::vertices_size_type, typename graph_traits<Graph>::vertices_size_type>&> { @@ -181,7 +181,7 @@ namespace boost { if (src == n) src = (std::numeric_limits<vertices_size_type>::max)(); } - shared_ptr<uniform_01<RandomGenerator*> > gen; + std::shared_ptr<uniform_01<RandomGenerator*> > gen; geometric_distribution<vertices_size_type> rand_vertex; vertices_size_type n; bool allow_self_loops; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/gursoy_atun_layout.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/gursoy_atun_layout.hpp index 9269c4b0..62587f9e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/gursoy_atun_layout.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/gursoy_atun_layout.hpp @@ -26,13 +26,13 @@ #include <boost/graph/properties.hpp> #include <boost/random/uniform_01.hpp> #include <boost/random/linear_congruential.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/graph/breadth_first_search.hpp> #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/graph/named_function_params.hpp> #include <boost/graph/topology.hpp> -namespace boost { +namespace boost { namespace detail { @@ -62,12 +62,12 @@ struct update_position_visitor { double distance_limit, double learning_constant, double falloff_ratio): - position_map(position_map), node_distance(node_distance), + position_map(position_map), node_distance(node_distance), space(space), input_vector(input_vector), distance_limit(distance_limit), learning_constant(learning_constant), falloff_ratio(falloff_ratio) {} - void operator()(vertex_descriptor v, const Graph&) const + void operator()(vertex_descriptor v, const Graph&) const { #ifndef BOOST_NO_STDC_NAMESPACE using std::pow; @@ -77,7 +77,7 @@ struct update_position_visitor { BOOST_THROW_EXCEPTION(over_distance_limit()); Point old_position = get(position_map, v); double distance = get(node_distance, v); - double fraction = + double fraction = learning_constant * pow(falloff_ratio, distance * distance); put(position_map, v, space.move_position_toward(old_position, fraction, input_vector)); @@ -88,7 +88,7 @@ template<typename EdgeWeightMap> struct gursoy_shortest { template<typename Graph, typename NodeDistanceMap, typename UpdatePosition> - static inline void + static inline void run(const Graph& g, typename graph_traits<Graph>::vertex_descriptor s, NodeDistanceMap node_distance, UpdatePosition& update_position, EdgeWeightMap weight) @@ -104,7 +104,7 @@ template<> struct gursoy_shortest<dummy_property_map> { template<typename Graph, typename NodeDistanceMap, typename UpdatePosition> - static inline void + static inline void run(const Graph& g, typename graph_traits<Graph>::vertex_descriptor s, NodeDistanceMap node_distance, UpdatePosition& update_position, dummy_property_map) @@ -119,11 +119,11 @@ struct gursoy_shortest<dummy_property_map> } // namespace detail template <typename VertexListAndIncidenceGraph, typename Topology, - typename PositionMap, typename Diameter, typename VertexIndexMap, + typename PositionMap, typename Diameter, typename VertexIndexMap, typename EdgeWeightMap> -void +void gursoy_atun_step - (const VertexListAndIncidenceGraph& graph, + (const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, Diameter diameter, @@ -143,21 +143,21 @@ gursoy_atun_step typedef typename Topology::point_type point_type; vertex_iterator i, iend; std::vector<double> distance_from_input_vector(num_vertices(graph)); - typedef boost::iterator_property_map<std::vector<double>::iterator, + typedef boost::iterator_property_map<std::vector<double>::iterator, VertexIndexMap, double, double&> DistanceFromInputMap; DistanceFromInputMap distance_from_input(distance_from_input_vector.begin(), vertex_index_map); std::vector<double> node_distance_map_vector(num_vertices(graph)); - typedef boost::iterator_property_map<std::vector<double>::iterator, + typedef boost::iterator_property_map<std::vector<double>::iterator, VertexIndexMap, double, double&> NodeDistanceMap; NodeDistanceMap node_distance(node_distance_map_vector.begin(), vertex_index_map); point_type input_vector = space.random_point(); - vertex_descriptor min_distance_loc + vertex_descriptor min_distance_loc = graph_traits<VertexListAndIncidenceGraph>::null_vertex(); double min_distance = 0.0; bool min_distance_unset = true; @@ -173,24 +173,24 @@ gursoy_atun_step BOOST_ASSERT (!min_distance_unset); // Graph must have at least one vertex boost::detail::update_position_visitor< PositionMap, NodeDistanceMap, Topology, - VertexListAndIncidenceGraph> + VertexListAndIncidenceGraph> update_position(position, node_distance, space, - input_vector, diameter, learning_constant, + input_vector, diameter, learning_constant, exp(-1. / (2 * diameter * diameter))); std::fill(node_distance_map_vector.begin(), node_distance_map_vector.end(), 0); try { typedef detail::gursoy_shortest<EdgeWeightMap> shortest; shortest::run(graph, min_distance_loc, node_distance, update_position, - weight); - } catch (detail::over_distance_limit) { - /* Thrown to break out of BFS or Dijkstra early */ + weight); + } catch (detail::over_distance_limit) { + /* Thrown to break out of BFS or Dijkstra early */ } } template <typename VertexListAndIncidenceGraph, typename Topology, - typename PositionMap, typename VertexIndexMap, + typename PositionMap, typename VertexIndexMap, typename EdgeWeightMap> -void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps, @@ -199,7 +199,7 @@ void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, double learning_constant_initial, double learning_constant_final, VertexIndexMap vertex_index_map, - EdgeWeightMap weight) + EdgeWeightMap weight) { #ifndef BOOST_NO_STDC_NAMESPACE using std::pow; @@ -213,17 +213,17 @@ void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, typedef typename Topology::point_type point_type; vertex_iterator i, iend; double diameter_ratio = (double)diameter_final / diameter_initial; - double learning_constant_ratio = + double learning_constant_ratio = learning_constant_final / learning_constant_initial; std::vector<double> distance_from_input_vector(num_vertices(graph)); - typedef boost::iterator_property_map<std::vector<double>::iterator, + typedef boost::iterator_property_map<std::vector<double>::iterator, VertexIndexMap, double, double&> DistanceFromInputMap; DistanceFromInputMap distance_from_input(distance_from_input_vector.begin(), vertex_index_map); std::vector<int> node_distance_map_vector(num_vertices(graph)); - typedef boost::iterator_property_map<std::vector<int>::iterator, + typedef boost::iterator_property_map<std::vector<int>::iterator, VertexIndexMap, double, double&> NodeDistanceMap; NodeDistanceMap node_distance(node_distance_map_vector.begin(), @@ -231,17 +231,17 @@ void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, for (int round = 0; round < nsteps; ++round) { double part_done = (double)round / (nsteps - 1); int diameter = (int)(diameter_initial * pow(diameter_ratio, part_done)); - double learning_constant = + double learning_constant = learning_constant_initial * pow(learning_constant_ratio, part_done); - gursoy_atun_step(graph, space, position, diameter, learning_constant, + gursoy_atun_step(graph, space, position, diameter, learning_constant, vertex_index_map, weight); } } template <typename VertexListAndIncidenceGraph, typename Topology, - typename PositionMap, typename VertexIndexMap, + typename PositionMap, typename VertexIndexMap, typename EdgeWeightMap> -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps, @@ -260,14 +260,14 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, } gursoy_atun_refine(graph, space, position, nsteps, - diameter_initial, diameter_final, + diameter_initial, diameter_final, learning_constant_initial, learning_constant_final, vertex_index_map, weight); } template <typename VertexListAndIncidenceGraph, typename Topology, typename PositionMap, typename VertexIndexMap> -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps, @@ -277,15 +277,15 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, double learning_constant_final, VertexIndexMap vertex_index_map) { - gursoy_atun_layout(graph, space, position, nsteps, - diameter_initial, diameter_final, - learning_constant_initial, learning_constant_final, + gursoy_atun_layout(graph, space, position, nsteps, + diameter_initial, diameter_final, + learning_constant_initial, learning_constant_final, vertex_index_map, dummy_property_map()); } template <typename VertexListAndIncidenceGraph, typename Topology, typename PositionMap> -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps, @@ -293,15 +293,15 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, double diameter_final = 1.0, double learning_constant_initial = 0.8, double learning_constant_final = 0.2) -{ +{ gursoy_atun_layout(graph, space, position, nsteps, diameter_initial, diameter_final, learning_constant_initial, - learning_constant_final, get(vertex_index, graph)); + learning_constant_final, get(vertex_index, graph)); } template <typename VertexListAndIncidenceGraph, typename Topology, typename PositionMap> -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps) @@ -310,13 +310,13 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, using std::sqrt; #endif - gursoy_atun_layout(graph, space, position, nsteps, + gursoy_atun_layout(graph, space, position, nsteps, sqrt((double)num_vertices(graph))); } template <typename VertexListAndIncidenceGraph, typename Topology, typename PositionMap> -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position) { @@ -325,8 +325,8 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, template<typename VertexListAndIncidenceGraph, typename Topology, typename PositionMap, typename P, typename T, typename R> -void -gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void +gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, const bgl_named_params<P,T,R>& params) @@ -340,17 +340,17 @@ gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, gursoy_atun_layout(graph, space, position, choose_param(get_param(params, iterations_t()), num_vertices(graph)), - choose_param(get_param(params, diameter_range_t()), + choose_param(get_param(params, diameter_range_t()), diam).first, - choose_param(get_param(params, diameter_range_t()), + choose_param(get_param(params, diameter_range_t()), diam).second, - choose_param(get_param(params, learning_constant_range_t()), + choose_param(get_param(params, learning_constant_range_t()), learn).first, - choose_param(get_param(params, learning_constant_range_t()), + choose_param(get_param(params, learning_constant_range_t()), learn).second, choose_const_pmap(get_param(params, vertex_index), graph, vertex_index), - choose_param(get_param(params, edge_weight), + choose_param(get_param(params, edge_weight), dummy_property_map())); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/incremental_components.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/incremental_components.hpp index fff3a324..63a9b838 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/incremental_components.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/incremental_components.hpp @@ -46,11 +46,11 @@ namespace boost { // Algorithms", and the application to connected components is // similar to the algorithm described in Ch. 22 of "Intro to // Algorithms" by Cormen, et. all. - // + // // An implementation of disjoint sets can be found in // boost/pending/disjoint_sets.hpp - + template <class EdgeListGraph, class DisjointSets> void incremental_components(EdgeListGraph& g, DisjointSets& ds) { @@ -58,35 +58,35 @@ namespace boost { for (boost::tie(e,end) = edges(g); e != end; ++e) ds.union_set(source(*e,g),target(*e,g)); } - + template <class ParentIterator> void compress_components(ParentIterator first, ParentIterator last) { - for (ParentIterator current = first; current != last; ++current) + for (ParentIterator current = first; current != last; ++current) detail::find_representative_with_full_compression(first, current-first); } - + template <class ParentIterator> typename boost::detail::iterator_traits<ParentIterator>::difference_type component_count(ParentIterator first, ParentIterator last) { std::ptrdiff_t count = 0; - for (ParentIterator current = first; current != last; ++current) - if (*current == current - first) ++count; + for (ParentIterator current = first; current != last; ++current) + if (*current == current - first) ++count; return count; } - + // This algorithm can be applied to the result container of the // connected_components algorithm to normalize // the components. template <class ParentIterator> void normalize_components(ParentIterator first, ParentIterator last) { - for (ParentIterator current = first; current != last; ++current) + for (ParentIterator current = first; current != last; ++current) detail::normalize_node(first, current - first); } - - template <class VertexListGraph, class DisjointSets> + + template <class VertexListGraph, class DisjointSets> void initialize_incremental_components(VertexListGraph& G, DisjointSets& ds) { typename graph_traits<VertexListGraph> @@ -129,7 +129,7 @@ namespace boost { m_index_list(make_shared<IndexContainer>(m_num_elements)) { build_index_lists(parent_start, index_map); - + } // component_index template <typename ParentIterator> @@ -222,10 +222,10 @@ namespace boost { protected: IndexType m_num_elements; - shared_ptr<IndexContainer> m_components, m_index_list; + std::shared_ptr<IndexContainer> m_components, m_index_list; }; // class component_index - + } // namespace boost #endif // BOOST_INCREMENTAL_COMPONENTS_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/mcgregor_common_subgraphs.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/mcgregor_common_subgraphs.hpp index c46f7215..ed811172 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/mcgregor_common_subgraphs.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/mcgregor_common_subgraphs.hpp @@ -35,13 +35,13 @@ namespace boost { struct mcgregor_common_subgraph_traits { typedef typename graph_traits<GraphFirst>::vertex_descriptor vertex_first_type; typedef typename graph_traits<GraphSecond>::vertex_descriptor vertex_second_type; - + typedef shared_array_property_map<vertex_second_type, VertexIndexMapFirst> correspondence_map_first_to_second_type; - + typedef shared_array_property_map<vertex_first_type, VertexIndexMapSecond> correspondence_map_second_to_first_type; - }; + }; } // namespace detail @@ -52,7 +52,7 @@ namespace boost { template <typename PropertyMapFirst, typename PropertyMapSecond> struct property_map_equivalent { - + property_map_equivalent(const PropertyMapFirst property_map1, const PropertyMapSecond property_map2) : m_property_map1(property_map1), @@ -63,7 +63,7 @@ namespace boost { bool operator()(const ItemFirst item1, const ItemSecond item2) { return (get(m_property_map1, item1) == get(m_property_map2, item2)); } - + private: const PropertyMapFirst m_property_map1; const PropertyMapSecond m_property_map2; @@ -86,7 +86,7 @@ namespace boost { // Binary function object that always returns true. Used when // vertices or edges are always equivalent (i.e. have no labels). struct always_equivalent { - + template <typename ItemFirst, typename ItemSecond> bool operator()(const ItemFirst&, const ItemSecond&) { @@ -123,7 +123,7 @@ namespace boost { { typedef typename graph_traits<GraphFirst>::vertex_descriptor VertexFirst; typedef typename graph_traits<GraphSecond>::vertex_descriptor VertexSecond; - + typedef typename graph_traits<GraphFirst>::edge_descriptor EdgeFirst; typedef typename graph_traits<GraphSecond>::edge_descriptor EdgeSecond; @@ -153,7 +153,7 @@ namespace boost { // first matching edge is always chosen. EdgeFirst edge_to_new1, edge_from_new1; bool edge_to_new_exists1 = false, edge_from_new_exists1 = false; - + EdgeSecond edge_to_new2, edge_from_new2; bool edge_to_new_exists2 = false, edge_from_new_exists2 = false; @@ -179,7 +179,7 @@ namespace boost { if ((edge_to_new_exists1 != edge_to_new_exists2) || ((edge_to_new_exists1 && edge_to_new_exists2) && !edges_equivalent(edge_to_new1, edge_to_new2))) { - + return (false); } @@ -225,7 +225,7 @@ namespace boost { if ((edge_from_new_exists1 != edge_from_new_exists2) || ((edge_from_new_exists1 && edge_from_new_exists2) && !edges_equivalent(edge_from_new1, edge_from_new2))) { - + return (false); } @@ -244,7 +244,7 @@ namespace boost { } return (true); - } + } // Recursive method that does a depth-first search in the space of // potential subgraphs. At each level, every new vertex pair from @@ -284,14 +284,14 @@ namespace boost { // Get iterators for vertices from both graphs typename graph_traits<GraphFirst>::vertex_iterator vertex1_iter, vertex1_end; - + typename graph_traits<GraphSecond>::vertex_iterator vertex2_begin, vertex2_end, vertex2_iter; - + boost::tie(vertex1_iter, vertex1_end) = vertices(graph1); boost::tie(vertex2_begin, vertex2_end) = vertices(graph2); vertex2_iter = vertex2_begin; - + // Iterate until all vertices have been visited BGL_FORALL_VERTICES_T(new_vertex1, graph1, GraphFirst) { @@ -301,7 +301,7 @@ namespace boost { if (existing_vertex2 != graph_traits<GraphSecond>::null_vertex()) { continue; } - + BGL_FORALL_VERTICES_T(new_vertex2, graph2, GraphSecond) { VertexFirst existing_vertex1 = get(correspondence_map_2_to_1, new_vertex2); @@ -330,7 +330,7 @@ namespace boost { // Only output sub-graphs larger than a single vertex if (new_graph_size > 1) { - + // Returning false from the callback will cancel iteration if (!subgraph_callback(correspondence_map_1_to_2, correspondence_map_2_to_1, @@ -338,7 +338,7 @@ namespace boost { return (false); } } - + // Depth-first search into the state space of possible sub-graphs bool continue_iteration = mcgregor_common_subgraphs_internal @@ -352,10 +352,10 @@ namespace boost { if (!continue_iteration) { return (false); } - + // Restore previous state if (vertex_stack1.size() > old_graph_size) { - + VertexFirst stack_vertex1 = vertex_stack1.top(); VertexSecond stack_vertex2 = get(correspondence_map_1_to_2, stack_vertex1); @@ -363,10 +363,10 @@ namespace boost { // Contract subgraph put(correspondence_map_1_to_2, stack_vertex1, graph_traits<GraphSecond>::null_vertex()); - + put(correspondence_map_2_to_1, stack_vertex2, graph_traits<GraphFirst>::null_vertex()); - + vertex_stack1.pop(); } @@ -401,7 +401,7 @@ namespace boost { typedef mcgregor_common_subgraph_traits<GraphFirst, GraphSecond, VertexIndexMapFirst, VertexIndexMapSecond> SubGraphTraits; - + typename SubGraphTraits::correspondence_map_first_to_second_type correspondence_map_1_to_2(num_vertices(graph1), vindex_map1); @@ -409,7 +409,7 @@ namespace boost { put(correspondence_map_1_to_2, vertex1, graph_traits<GraphSecond>::null_vertex()); } - + typename SubGraphTraits::correspondence_map_second_to_first_type correspondence_map_2_to_1(num_vertices(graph2), vindex_map2); @@ -420,7 +420,7 @@ namespace boost { typedef typename graph_traits<GraphFirst>::vertex_descriptor VertexFirst; - + std::stack<VertexFirst> vertex_stack1; mcgregor_common_subgraphs_internal @@ -432,7 +432,7 @@ namespace boost { only_connected_subgraphs, subgraph_callback); } - + } // namespace detail // ========================================================================== @@ -457,7 +457,7 @@ namespace boost { bool only_connected_subgraphs, SubGraphCallback user_callback) { - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, vindex_map1, vindex_map2, @@ -465,7 +465,7 @@ namespace boost { only_connected_subgraphs, user_callback); } - + // Variant of mcgregor_common_subgraphs with all default parameters template <typename GraphFirst, typename GraphSecond, @@ -476,7 +476,7 @@ namespace boost { bool only_connected_subgraphs, SubGraphCallback user_callback) { - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, get(vertex_index, graph1), get(vertex_index, graph2), @@ -498,7 +498,7 @@ namespace boost { SubGraphCallback user_callback, const bgl_named_params<Param, Tag, Rest>& params) { - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, choose_const_pmap(get_param(params, vertex_index1), @@ -532,7 +532,7 @@ namespace boost { typedef mcgregor_common_subgraph_traits<GraphFirst, GraphSecond, VertexIndexMapFirst, VertexIndexMapSecond> SubGraphTraits; - + typedef typename SubGraphTraits::correspondence_map_first_to_second_type CachedCorrespondenceMapFirstToSecond; @@ -542,19 +542,19 @@ namespace boost { typedef std::pair<VertexSizeFirst, std::pair<CachedCorrespondenceMapFirstToSecond, CachedCorrespondenceMapSecondToFirst> > SubGraph; - + typedef std::vector<SubGraph> SubGraphList; unique_subgraph_interceptor(const GraphFirst& graph1, const GraphSecond& graph2, const VertexIndexMapFirst vindex_map1, const VertexIndexMapSecond vindex_map2, - SubGraphCallback user_callback) : + SubGraphCallback user_callback) : m_graph1(graph1), m_graph2(graph2), m_vindex_map1(vindex_map1), m_vindex_map2(vindex_map2), m_subgraphs(make_shared<SubGraphList>()), m_user_callback(user_callback) { } - + template <typename CorrespondenceMapFirstToSecond, typename CorrespondenceMapSecondToFirst> bool operator()(CorrespondenceMapFirstToSecond correspondence_map_1_to_2, @@ -572,16 +572,16 @@ namespace boost { if (subgraph_size != subgraph_cached.first) { continue; } - + if (!are_property_maps_different(correspondence_map_1_to_2, subgraph_cached.second.first, m_graph1)) { - + // New subgraph is a duplicate return (true); } } - + // Subgraph is unique, so make a cached copy CachedCorrespondenceMapFirstToSecond new_subgraph_1_to_2 = CachedCorrespondenceMapFirstToSecond @@ -602,21 +602,21 @@ namespace boost { m_subgraphs->push_back(std::make_pair(subgraph_size, std::make_pair(new_subgraph_1_to_2, new_subgraph_2_to_1))); - + return (m_user_callback(correspondence_map_1_to_2, correspondence_map_2_to_1, subgraph_size)); } - + private: const GraphFirst& m_graph1; const GraphFirst& m_graph2; const VertexIndexMapFirst m_vindex_map1; const VertexIndexMapSecond m_vindex_map2; - shared_ptr<SubGraphList> m_subgraphs; + std::shared_ptr<SubGraphList> m_subgraphs; SubGraphCallback m_user_callback; }; - + } // namespace detail // Enumerates all unique common subgraphs between graph1 and graph2. @@ -645,7 +645,7 @@ namespace boost { (graph1, graph2, vindex_map1, vindex_map2, user_callback); - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, vindex_map1, vindex_map2, @@ -717,7 +717,7 @@ namespace boost { typedef mcgregor_common_subgraph_traits<GraphFirst, GraphSecond, VertexIndexMapFirst, VertexIndexMapSecond> SubGraphTraits; - + typedef typename SubGraphTraits::correspondence_map_first_to_second_type CachedCorrespondenceMapFirstToSecond; @@ -753,7 +753,7 @@ namespace boost { } if (subgraph_size == *m_largest_size_so_far) { - + // Make a cached copy CachedCorrespondenceMapFirstToSecond new_subgraph_1_to_2 = CachedCorrespondenceMapFirstToSecond @@ -797,11 +797,11 @@ namespace boost { const GraphFirst& m_graph2; const VertexIndexMapFirst m_vindex_map1; const VertexIndexMapSecond m_vindex_map2; - shared_ptr<SubGraphList> m_subgraphs; - shared_ptr<VertexSizeFirst> m_largest_size_so_far; + std::shared_ptr<SubGraphList> m_subgraphs; + std::shared_ptr<VertexSizeFirst> m_largest_size_so_far; SubGraphCallback m_user_callback; }; - + } // namespace detail // Enumerates the largest common subgraphs found between graph1 @@ -828,7 +828,7 @@ namespace boost { VertexIndexMapFirst, VertexIndexMapSecond, SubGraphCallback> max_interceptor (graph1, graph2, vindex_map1, vindex_map2, user_callback); - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, vindex_map1, vindex_map2, @@ -903,7 +903,7 @@ namespace boost { typedef mcgregor_common_subgraph_traits<GraphFirst, GraphSecond, VertexIndexMapFirst, VertexIndexMapSecond> SubGraphTraits; - + typedef typename SubGraphTraits::correspondence_map_first_to_second_type CachedCorrespondenceMapFirstToSecond; @@ -920,13 +920,13 @@ namespace boost { const GraphSecond& graph2, const VertexIndexMapFirst vindex_map1, const VertexIndexMapSecond vindex_map2, - SubGraphCallback user_callback) : + SubGraphCallback user_callback) : m_graph1(graph1), m_graph2(graph2), m_vindex_map1(vindex_map1), m_vindex_map2(vindex_map2), m_subgraphs(make_shared<SubGraphList>()), m_largest_size_so_far(make_shared<VertexSizeFirst>(0)), - m_user_callback(user_callback) { } - + m_user_callback(user_callback) { } + template <typename CorrespondenceMapFirstToSecond, typename CorrespondenceMapSecondToFirst> bool operator()(CorrespondenceMapFirstToSecond correspondence_map_1_to_2, @@ -945,18 +945,18 @@ namespace boost { subgraph_iter = m_subgraphs->begin(); subgraph_iter != m_subgraphs->end(); ++subgraph_iter) { - + SubGraph subgraph_cached = *subgraph_iter; - + if (!are_property_maps_different(correspondence_map_1_to_2, subgraph_cached.second.first, m_graph1)) { - + // New subgraph is a duplicate return (true); } } - + // Subgraph is unique, so make a cached copy CachedCorrespondenceMapFirstToSecond new_subgraph_1_to_2 = CachedCorrespondenceMapFirstToSecond @@ -978,7 +978,7 @@ namespace boost { std::make_pair(new_subgraph_1_to_2, new_subgraph_2_to_1))); } - + return (true); } @@ -994,17 +994,17 @@ namespace boost { subgraph_cached.first); } } - + private: const GraphFirst& m_graph1; const GraphFirst& m_graph2; const VertexIndexMapFirst m_vindex_map1; const VertexIndexMapSecond m_vindex_map2; - shared_ptr<SubGraphList> m_subgraphs; - shared_ptr<VertexSizeFirst> m_largest_size_so_far; + std::shared_ptr<SubGraphList> m_subgraphs; + std::shared_ptr<VertexSizeFirst> m_largest_size_so_far; SubGraphCallback m_user_callback; }; - + } // namespace detail // Enumerates the largest, unique common subgraphs found between @@ -1031,7 +1031,7 @@ namespace boost { VertexIndexMapFirst, VertexIndexMapSecond, SubGraphCallback> unique_max_interceptor (graph1, graph2, vindex_map1, vindex_map2, user_callback); - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, vindex_map1, vindex_map2, @@ -1122,7 +1122,7 @@ namespace boost { // Returns a filtered sub-graph of graph whose edge and vertex // inclusion is dictated by membership_map. template <typename Graph, - typename MembershipMap> + typename MembershipMap> typename membership_filtered_graph_traits<Graph, MembershipMap>::graph_type make_membership_filtered_graph (const Graph& graph, @@ -1134,9 +1134,9 @@ namespace boost { typename MFGTraits::vertex_filter_type v_filter(membership_map); return (MembershipFilteredGraph(graph, keep_all(), v_filter)); - + } - + } // namespace boost #endif // BOOST_GRAPH_MCGREGOR_COMMON_SUBGRAPHS_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/metric_tsp_approx.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/metric_tsp_approx.hpp index dd0ff1d6..e3824666 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/metric_tsp_approx.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/metric_tsp_approx.hpp @@ -28,7 +28,7 @@ #include <vector> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/concept_check.hpp> #include <boost/graph/graph_traits.hpp> #include <boost/graph/graph_as_tree.hpp> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/parallel/distribution.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/parallel/distribution.hpp index 8256b197..51f820bd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/parallel/distribution.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/parallel/distribution.hpp @@ -21,7 +21,7 @@ #include <boost/assert.hpp> #include <boost/iterator/counting_iterator.hpp> #include <boost/random/uniform_int.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <typeinfo> namespace boost { namespace parallel { @@ -86,13 +86,13 @@ public: size_type block_size(process_id_type id, size_type n) const { return distribution_->block_size(id, n); } - + process_id_type operator()(size_type i) const { return distribution_->in_process(i); } - + size_type local(size_type i) const { return distribution_->local(i); } - + size_type global(size_type n) const { return distribution_->global(n); } @@ -122,13 +122,13 @@ public: } private: - shared_ptr<basic_distribution> distribution_; + std::shared_ptr<basic_distribution> distribution_; }; struct block { template<typename LinearProcessGroup> - explicit block(const LinearProcessGroup& pg, std::size_t n) + explicit block(const LinearProcessGroup& pg, std::size_t n) : id(process_id(pg)), p(num_processes(pg)), n(n) { } // If there are n elements in the distributed data structure, returns the number of elements stored locally. @@ -144,7 +144,7 @@ struct block // Returns the processor on which element with global index i is stored template<typename SizeType> SizeType operator()(SizeType i) const - { + { SizeType cutoff_processor = n % p; SizeType cutoff = cutoff_processor * (n / p + 1); @@ -165,7 +165,7 @@ struct block // Find the local index for the ith global element template<typename SizeType> SizeType local(SizeType i) const - { + { SizeType owner = (*this)(i); return i - start(owner); } @@ -192,9 +192,9 @@ struct uneven_block typedef std::vector<std::size_t> size_vector; template<typename LinearProcessGroup> - explicit uneven_block(const LinearProcessGroup& pg, const std::vector<std::size_t>& local_sizes) + explicit uneven_block(const LinearProcessGroup& pg, const std::vector<std::size_t>& local_sizes) : id(process_id(pg)), p(num_processes(pg)), local_sizes(local_sizes) - { + { BOOST_ASSERT(local_sizes.size() == p); local_starts.resize(p + 1); local_starts[0] = 0; @@ -204,7 +204,7 @@ struct uneven_block // To do maybe: enter local size in each process and gather in constructor (much handier) // template<typename LinearProcessGroup> - // explicit uneven_block(const LinearProcessGroup& pg, std::size_t my_local_size) + // explicit uneven_block(const LinearProcessGroup& pg, std::size_t my_local_size) // If there are n elements in the distributed data structure, returns the number of elements stored locally. template<typename SizeType> @@ -227,7 +227,7 @@ struct uneven_block // Find the starting index for processor with the given id template<typename ID> - std::size_t start(ID id) const + std::size_t start(ID id) const { return local_starts[id]; } @@ -235,7 +235,7 @@ struct uneven_block // Find the local index for the ith global element template<typename SizeType> SizeType local(SizeType i) const - { + { SizeType owner = (*this)(i); return i - start(owner); } @@ -264,10 +264,10 @@ struct oned_block_cyclic template<typename LinearProcessGroup> explicit oned_block_cyclic(const LinearProcessGroup& pg, std::size_t size) : id(process_id(pg)), p(num_processes(pg)), size(size) { } - + template<typename SizeType> SizeType block_size(SizeType n) const - { + { return block_size(id, n); } @@ -279,20 +279,20 @@ struct oned_block_cyclic SizeType everyone_gets = all_blocks / p; SizeType extra_blocks = all_blocks % p; SizeType my_blocks = everyone_gets + (p < extra_blocks? 1 : 0); - SizeType my_elements = my_blocks * size + SizeType my_elements = my_blocks * size + (p == extra_blocks? extra_elements : 0); return my_elements; } template<typename SizeType> SizeType operator()(SizeType i) const - { + { return (i / size) % p; } template<typename SizeType> SizeType local(SizeType i) const - { + { return ((i / size) / p) * size + i % size; } @@ -302,7 +302,7 @@ struct oned_block_cyclic template<typename ProcessID, typename SizeType> SizeType global(ProcessID id, SizeType i) const - { + { return ((i / size) * p + id) * size + i % size; } @@ -318,14 +318,14 @@ struct twod_block_cyclic explicit twod_block_cyclic(const LinearProcessGroup& pg, std::size_t block_rows, std::size_t block_columns, std::size_t data_columns_per_row) - : id(process_id(pg)), p(num_processes(pg)), - block_rows(block_rows), block_columns(block_columns), + : id(process_id(pg)), p(num_processes(pg)), + block_rows(block_rows), block_columns(block_columns), data_columns_per_row(data_columns_per_row) { } - + template<typename SizeType> SizeType block_size(SizeType n) const - { + { return block_size(id, n); } @@ -346,7 +346,7 @@ struct twod_block_cyclic template<typename SizeType> SizeType operator()(SizeType i) const - { + { SizeType result = get_block_num(i) % p; // std::cerr << "Item " << i << " goes on processor " << result << std::endl; return result; @@ -354,7 +354,7 @@ struct twod_block_cyclic template<typename SizeType> SizeType local(SizeType i) const - { + { // Compute the start of the block std::size_t block_num = get_block_num(i); // std::cerr << "Item " << i << " is in block #" << block_num << std::endl; @@ -362,11 +362,11 @@ struct twod_block_cyclic std::size_t local_block_num = block_num / p; std::size_t block_start = local_block_num * block_rows * block_columns; - // Compute the offset into the block + // Compute the offset into the block std::size_t data_row = i / data_columns_per_row; std::size_t data_col = i % data_columns_per_row; - std::size_t block_offset = (data_row % block_rows) * block_columns - + (data_col % block_columns); + std::size_t block_offset = (data_row % block_rows) * block_columns + + (data_col % block_columns); // std::cerr << "Item " << i << " maps to local index " << block_start+block_offset << std::endl; return block_start + block_offset; @@ -374,7 +374,7 @@ struct twod_block_cyclic template<typename SizeType> SizeType global(SizeType i) const - { + { // Compute the (global) block in which this element resides SizeType local_block_num = i / (block_rows * block_columns); SizeType block_offset = i % (block_rows * block_columns); @@ -401,7 +401,7 @@ struct twod_block_cyclic + row_in_block * block_rows + col_in_block; - std::cerr << "global(" << i << "@" << id << ") = " << result + std::cerr << "global(" << i << "@" << id << ") = " << result << " =? " << local(result) << std::endl; BOOST_ASSERT(i == local(result)); return result; @@ -444,7 +444,7 @@ class twod_random private: RandomNumberGen& gen; }; - + public: template<typename LinearProcessGroup, typename RandomNumberGen> explicit twod_random(const LinearProcessGroup& pg, @@ -452,11 +452,11 @@ class twod_random std::size_t data_columns_per_row, std::size_t n, RandomNumberGen& gen) - : id(process_id(pg)), p(num_processes(pg)), - block_rows(block_rows), block_columns(block_columns), + : id(process_id(pg)), p(num_processes(pg)), + block_rows(block_rows), block_columns(block_columns), data_columns_per_row(data_columns_per_row), global_to_local(n / (block_rows * block_columns)) - { + { std::copy(make_counting_iterator(std::size_t(0)), make_counting_iterator(global_to_local.size()), global_to_local.begin()); @@ -464,10 +464,10 @@ class twod_random random_int<RandomNumberGen> rand(gen); std::random_shuffle(global_to_local.begin(), global_to_local.end(), rand); } - + template<typename SizeType> SizeType block_size(SizeType n) const - { + { return block_size(id, n); } @@ -488,7 +488,7 @@ class twod_random template<typename SizeType> SizeType operator()(SizeType i) const - { + { SizeType result = get_block_num(i) % p; // std::cerr << "Item " << i << " goes on processor " << result << std::endl; return result; @@ -496,7 +496,7 @@ class twod_random template<typename SizeType> SizeType local(SizeType i) const - { + { // Compute the start of the block std::size_t block_num = get_block_num(i); // std::cerr << "Item " << i << " is in block #" << block_num << std::endl; @@ -504,11 +504,11 @@ class twod_random std::size_t local_block_num = block_num / p; std::size_t block_start = local_block_num * block_rows * block_columns; - // Compute the offset into the block + // Compute the offset into the block std::size_t data_row = i / data_columns_per_row; std::size_t data_col = i % data_columns_per_row; - std::size_t block_offset = (data_row % block_rows) * block_columns - + (data_col % block_columns); + std::size_t block_offset = (data_row % block_rows) * block_columns + + (data_col % block_columns); // std::cerr << "Item " << i << " maps to local index " << block_start+block_offset << std::endl; return block_start + block_offset; @@ -552,7 +552,7 @@ class random_distribution private: RandomNumberGen& gen; }; - + public: template<typename LinearProcessGroup, typename RandomNumberGen> random_distribution(const LinearProcessGroup& pg, RandomNumberGen& gen, @@ -565,7 +565,7 @@ class random_distribution random_int<RandomNumberGen> rand(gen); std::random_shuffle(local_to_global.begin(), local_to_global.end(), rand); - + for (std::vector<std::size_t>::size_type i = 0; i < n; ++i) global_to_local[local_to_global[i]] = i; @@ -587,19 +587,19 @@ class random_distribution template<typename SizeType> SizeType local(SizeType i) const - { + { return base.local(global_to_local[i]); } template<typename ProcessID, typename SizeType> SizeType global(ProcessID p, SizeType i) const - { + { return local_to_global[base.global(p, i)]; } template<typename SizeType> SizeType global(SizeType i) const - { + { return local_to_global[base.global(i)]; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/boyer_myrvold_impl.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/boyer_myrvold_impl.hpp index 41ba2bc5..0eb76e21 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/boyer_myrvold_impl.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/boyer_myrvold_impl.hpp @@ -12,7 +12,7 @@ #include <list> #include <boost/next_prior.hpp> #include <boost/config.hpp> //for std::min macros -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/tuple/tuple.hpp> #include <boost/property_map/property_map.hpp> #include <boost/graph/graph_traits.hpp> @@ -34,26 +34,26 @@ namespace boost typename DFSParentEdgeMap, typename SizeType> struct planar_dfs_visitor : public dfs_visitor<> { - planar_dfs_visitor(LowPointMap lpm, DFSParentMap dfs_p, + planar_dfs_visitor(LowPointMap lpm, DFSParentMap dfs_p, DFSNumberMap dfs_n, LeastAncestorMap lam, - DFSParentEdgeMap dfs_edge) + DFSParentEdgeMap dfs_edge) : low(lpm), parent(dfs_p), df_number(dfs_n), least_ancestor(lam), df_edge(dfs_edge), - count(0) + count(0) {} - - + + template <typename Vertex, typename Graph> void start_vertex(const Vertex& u, Graph&) { put(parent, u, u); put(least_ancestor, u, count); } - - + + template <typename Vertex, typename Graph> void discover_vertex(const Vertex& u, Graph&) { @@ -61,7 +61,7 @@ namespace boost put(df_number, u, count); ++count; } - + template <typename Edge, typename Graph> void tree_edge(const Edge& e, Graph& g) { @@ -73,13 +73,13 @@ namespace boost put(df_edge, t, e); put(least_ancestor, t, get(df_number, s)); } - + template <typename Edge, typename Graph> void back_edge(const Edge& e, Graph& g) { typedef typename graph_traits<Graph>::vertex_descriptor vertex_t; typedef typename graph_traits<Graph>::vertices_size_type v_size_t; - + vertex_t s(source(e,g)); vertex_t t(target(e,g)); BOOST_USING_STD_MIN(); @@ -89,20 +89,20 @@ namespace boost v_size_t t_df_number = get(df_number, t); v_size_t s_least_ancestor_df_number = get(least_ancestor, s); - put(low, s, + put(low, s, min BOOST_PREVENT_MACRO_SUBSTITUTION(s_low_df_number, t_df_number) ); - - put(least_ancestor, s, - min BOOST_PREVENT_MACRO_SUBSTITUTION(s_least_ancestor_df_number, + + put(least_ancestor, s, + min BOOST_PREVENT_MACRO_SUBSTITUTION(s_least_ancestor_df_number, t_df_number ) ); } } - + template <typename Vertex, typename Graph> void finish_vertex(const Vertex& u, Graph&) { @@ -115,21 +115,21 @@ namespace boost if (u_parent != u) { - put(low, u_parent, - min BOOST_PREVENT_MACRO_SUBSTITUTION(u_lowpoint, + put(low, u_parent, + min BOOST_PREVENT_MACRO_SUBSTITUTION(u_lowpoint, u_parent_lowpoint ) ); } } - + LowPointMap low; DFSParentMap parent; DFSNumberMap df_number; LeastAncestorMap least_ancestor; DFSParentEdgeMap df_edge; SizeType count; - + }; @@ -150,7 +150,7 @@ namespace boost typedef typename graph_traits<Graph>::edge_descriptor edge_t; typedef typename graph_traits<Graph>::vertex_iterator vertex_iterator_t; typedef typename graph_traits<Graph>::edge_iterator edge_iterator_t; - typedef typename graph_traits<Graph>::out_edge_iterator + typedef typename graph_traits<Graph>::out_edge_iterator out_edge_iterator_t; typedef graph::detail::face_handle <Graph, StoreOldHandlesPolicy, StoreEmbeddingPolicy> face_handle_t; @@ -158,8 +158,8 @@ namespace boost typedef std::vector<edge_t> edge_vector_t; typedef std::list<vertex_t> vertex_list_t; typedef std::list< face_handle_t > face_handle_list_t; - typedef boost::shared_ptr< face_handle_list_t > face_handle_list_ptr_t; - typedef boost::shared_ptr< vertex_list_t > vertex_list_ptr_t; + typedef boost::std::shared_ptr< face_handle_list_t > face_handle_list_ptr_t; + typedef boost::std::shared_ptr< vertex_list_t > vertex_list_ptr_t; typedef boost::tuple<vertex_t, bool, bool> merge_stack_frame_t; typedef std::vector<merge_stack_frame_t> merge_stack_t; @@ -173,16 +173,16 @@ namespace boost typedef typename map_vertex_to_<v_size_t>::type vertex_to_v_size_map_t; typedef typename map_vertex_to_<vertex_t>::type vertex_to_vertex_map_t; typedef typename map_vertex_to_<edge_t>::type vertex_to_edge_map_t; - typedef typename map_vertex_to_<vertex_list_ptr_t>::type + typedef typename map_vertex_to_<vertex_list_ptr_t>::type vertex_to_vertex_list_ptr_map_t; - typedef typename map_vertex_to_< edge_vector_t >::type + typedef typename map_vertex_to_< edge_vector_t >::type vertex_to_edge_vector_map_t; typedef typename map_vertex_to_<bool>::type vertex_to_bool_map_t; - typedef typename map_vertex_to_<face_handle_t>::type + typedef typename map_vertex_to_<face_handle_t>::type vertex_to_face_handle_map_t; - typedef typename map_vertex_to_<face_handle_list_ptr_t>::type + typedef typename map_vertex_to_<face_handle_list_ptr_t>::type vertex_to_face_handle_list_ptr_map_t; - typedef typename map_vertex_to_<typename vertex_list_t::iterator>::type + typedef typename map_vertex_to_<typename vertex_list_t::iterator>::type vertex_to_separated_node_map_t; template <typename BicompSideToTraverse = single_side, @@ -190,10 +190,10 @@ namespace boost typename Time = current_iteration> struct face_vertex_iterator { - typedef face_iterator<Graph, - vertex_to_face_handle_map_t, - vertex_t, - BicompSideToTraverse, + typedef face_iterator<Graph, + vertex_to_face_handle_map_t, + vertex_t, + BicompSideToTraverse, VisitorType, Time> type; @@ -216,7 +216,7 @@ namespace boost public: - + boyer_myrvold_impl(const Graph& arg_g, VertexIndexMap arg_vm): g(arg_g), @@ -237,7 +237,7 @@ namespace boost flipped_vector(num_vertices(g), false), backedges_vector(num_vertices(g)), dfs_parent_edge_vector(num_vertices(g)), - + vertices_by_dfs_num(num_vertices(g)), low_point(low_point_vector.begin(), vm), @@ -271,72 +271,72 @@ namespace boost // Sort vertices by their lowpoint - need this later in the constructor vertex_vector_t vertices_by_lowpoint(num_vertices(g)); - std::copy( vertices(g).first, vertices(g).second, + std::copy( vertices(g).first, vertices(g).second, vertices_by_lowpoint.begin() ); - bucket_sort(vertices_by_lowpoint.begin(), - vertices_by_lowpoint.end(), + bucket_sort(vertices_by_lowpoint.begin(), + vertices_by_lowpoint.end(), low_point, num_vertices(g) ); - // Sort vertices by their dfs number - need this to iterate by reverse + // Sort vertices by their dfs number - need this to iterate by reverse // DFS number in the main loop. - std::copy( vertices(g).first, vertices(g).second, + std::copy( vertices(g).first, vertices(g).second, vertices_by_dfs_num.begin() ); - bucket_sort(vertices_by_dfs_num.begin(), - vertices_by_dfs_num.end(), + bucket_sort(vertices_by_dfs_num.begin(), + vertices_by_dfs_num.end(), dfs_number, num_vertices(g) ); - // Initialize face handles. A face handle is an abstraction that serves - // two uses in our implementation - it allows us to efficiently move - // along the outer face of embedded bicomps in a partially embedded - // graph, and it provides storage for the planar embedding. Face - // handles are implemented by a sequence of edges and are associated - // with a particular vertex - the sequence of edges represents the - // current embedding of edges around that vertex, and the first and - // last edges in the sequence represent the pair of edges on the outer - // face that are adjacent to the associated vertex. This lets us embed - // edges in the graph by just pushing them on the front or back of the + // Initialize face handles. A face handle is an abstraction that serves + // two uses in our implementation - it allows us to efficiently move + // along the outer face of embedded bicomps in a partially embedded + // graph, and it provides storage for the planar embedding. Face + // handles are implemented by a sequence of edges and are associated + // with a particular vertex - the sequence of edges represents the + // current embedding of edges around that vertex, and the first and + // last edges in the sequence represent the pair of edges on the outer + // face that are adjacent to the associated vertex. This lets us embed + // edges in the graph by just pushing them on the front or back of the // sequence of edges held by the face handles. - // + // // Our algorithm starts with a DFS tree of edges (where every vertex is - // an articulation point and every edge is a singleton bicomp) and - // repeatedly merges bicomps by embedding additional edges. Note that - // any bicomp at any point in the algorithm can be associated with a + // an articulation point and every edge is a singleton bicomp) and + // repeatedly merges bicomps by embedding additional edges. Note that + // any bicomp at any point in the algorithm can be associated with a // unique edge connecting the vertex of that bicomp with the lowest DFS - // number (which we refer to as the "root" of the bicomp) with its DFS + // number (which we refer to as the "root" of the bicomp) with its DFS // child in the bicomp: the existence of two such edges would contradict - // the properties of a DFS tree. We refer to the DFS child of the root - // of a bicomp as the "canonical DFS child" of the bicomp. Note that a + // the properties of a DFS tree. We refer to the DFS child of the root + // of a bicomp as the "canonical DFS child" of the bicomp. Note that a // vertex can be the root of more than one bicomp. // - // We move around the external faces of a bicomp using a few property + // We move around the external faces of a bicomp using a few property // maps, which we'll initialize presently: // - // - face_handles: maps a vertex to a face handle that can be used to - // move "up" a bicomp. For a vertex that isn't an articulation point, - // this holds the face handles that can be used to move around that + // - face_handles: maps a vertex to a face handle that can be used to + // move "up" a bicomp. For a vertex that isn't an articulation point, + // this holds the face handles that can be used to move around that // vertex's unique bicomp. For a vertex that is an articulation point, - // this holds the face handles associated with the unique bicomp that - // the vertex is NOT the root of. These handles can therefore be used - // to move from any point on the outer face of the tree of bicomps + // this holds the face handles associated with the unique bicomp that + // the vertex is NOT the root of. These handles can therefore be used + // to move from any point on the outer face of the tree of bicomps // around the current outer face towards the root of the DFS tree. // - // - dfs_child_handles: these are used to hold face handles for + // - dfs_child_handles: these are used to hold face handles for // vertices that are articulation points - dfs_child_handles[v] holds // the face handles corresponding to vertex u in the bicomp with root // u and canonical DFS child v. // // - canonical_dfs_child: this property map allows one to determine the // canonical DFS child of a bicomp while traversing the outer face. - // This property map is only valid when applied to one of the two + // This property map is only valid when applied to one of the two // vertices adjacent to the root of the bicomp on the outer face. To // be more precise, if v is the canonical DFS child of a bicomp, - // canonical_dfs_child[dfs_child_handles[v].first_vertex()] == v and + // canonical_dfs_child[dfs_child_handles[v].first_vertex()] == v and // canonical_dfs_child[dfs_child_handles[v].second_vertex()] == v. // // - pertinent_roots: given a vertex v, pertinent_roots[v] contains a @@ -365,19 +365,19 @@ namespace boost } canonical_dfs_child[v] = v; - pertinent_roots[v] = face_handle_list_ptr_t(new face_handle_list_t); + pertinent_roots[v] = face_handle_list_ptr_t(new face_handle_list_t); separated_dfs_child_list[v] = vertex_list_ptr_t(new vertex_list_t); } // We need to create a list of not-yet-merged depth-first children for - // each vertex that will be updated as bicomps get merged. We sort each - // list by ascending lowpoint, which allows the externally_active - // function to run in constant time, and we keep a pointer to each - // vertex's representation in its parent's list, which allows merging + // each vertex that will be updated as bicomps get merged. We sort each + // list by ascending lowpoint, which allows the externally_active + // function to run in constant time, and we keep a pointer to each + // vertex's representation in its parent's list, which allows merging //in constant time. - for(typename vertex_vector_t::iterator itr = + for(typename vertex_vector_t::iterator itr = vertices_by_lowpoint.begin(); itr != vertices_by_lowpoint.end(); ++itr) { @@ -389,7 +389,7 @@ namespace boost separated_dfs_child_list[parent]->insert (separated_dfs_child_list[parent]->end(), v); } - } + } // The merge stack holds path information during a walkdown iteration merge_stack.reserve(num_vertices(g)); @@ -404,11 +404,11 @@ namespace boost bool is_planar() { - // This is the main algorithm: starting with a DFS tree of embedded - // edges (which, since it's a tree, is planar), iterate through all + // This is the main algorithm: starting with a DFS tree of embedded + // edges (which, since it's a tree, is planar), iterate through all // vertices by reverse DFS number, attempting to embed all backedges // connecting the current vertex to vertices with higher DFS numbers. - // + // // The walkup is a procedure that examines all such backedges and sets // up the required data structures so that they can be searched by the // walkdown in linear time. The walkdown does the actual work of @@ -434,7 +434,7 @@ namespace boost store_old_face_handles(StoreOldHandlesPolicy()); vertex_t v(*vi); - + walkup(v); if (!walkdown(v)) @@ -445,7 +445,7 @@ namespace boost clean_up_embedding(StoreEmbeddingPolicy()); return true; - + } @@ -462,14 +462,14 @@ namespace boost void walkup(vertex_t v) { - // The point of the walkup is to follow all backedges from v to + // The point of the walkup is to follow all backedges from v to // vertices with higher DFS numbers, and update pertinent_roots // for the bicomp roots on the path from backedge endpoints up // to v. This will set the stage for the walkdown to efficiently // traverse the graph of bicomps down from v. typedef typename face_vertex_iterator<both_sides>::type walkup_iterator_t; - + out_edge_iterator_t oi, oi_end; for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) { @@ -491,7 +491,7 @@ namespace boost backedges[w].push_back(e); - v_size_t timestamp = dfs_number[v]; + v_size_t timestamp = dfs_number[v]; backedge_flag[w] = timestamp; walkup_iterator_t walkup_itr(w, face_handles); @@ -500,11 +500,11 @@ namespace boost while (true) { - + // Move to the root of the current bicomp or the first visited // vertex on the bicomp by going up each side in parallel - - while(walkup_itr != walkup_end && + + while(walkup_itr != walkup_end && visited[*walkup_itr] != timestamp ) { @@ -515,20 +515,20 @@ namespace boost // If we've found the root of a bicomp through a path we haven't // seen before, update pertinent_roots with a handle to the - // current bicomp. Otherwise, we've just seen a path we've been + // current bicomp. Otherwise, we've just seen a path we've been // up before, so break out of the main while loop. - + if (walkup_itr == walkup_end) { vertex_t dfs_child = canonical_dfs_child[lead_vertex]; vertex_t parent = dfs_parent[dfs_child]; - visited[dfs_child_handles[dfs_child].first_vertex()] + visited[dfs_child_handles[dfs_child].first_vertex()] = timestamp; - visited[dfs_child_handles[dfs_child].second_vertex()] + visited[dfs_child_handles[dfs_child].second_vertex()] = timestamp; - if (low_point[dfs_child] < dfs_number[v] || + if (low_point[dfs_child] < dfs_number[v] || least_ancestor[dfs_child] < dfs_number[v] ) { @@ -553,10 +553,10 @@ namespace boost break; } - } - + } + } - + @@ -577,19 +577,19 @@ namespace boost while (!pertinent_roots[v]->empty()) { - + face_handle_t root_face_handle = pertinent_roots[v]->front(); face_handle_t curr_face_handle = root_face_handle; - pertinent_roots[v]->pop_front(); + pertinent_roots[v]->pop_front(); merge_stack.clear(); while(true) { - typename face_vertex_iterator<>::type + typename face_vertex_iterator<>::type first_face_itr, second_face_itr, face_end; - vertex_t first_side_vertex + vertex_t first_side_vertex = graph_traits<Graph>::null_vertex(); vertex_t second_side_vertex; vertex_t first_tail, second_tail; @@ -603,7 +603,7 @@ namespace boost for(; first_face_itr != face_end; ++first_face_itr) { vertex_t face_vertex(*first_face_itr); - if (pertinent(face_vertex, v) || + if (pertinent(face_vertex, v) || externally_active(face_vertex, v) ) { @@ -614,7 +614,7 @@ namespace boost first_tail = face_vertex; } - if (first_side_vertex == graph_traits<Graph>::null_vertex() || + if (first_side_vertex == graph_traits<Graph>::null_vertex() || first_side_vertex == curr_face_handle.get_anchor() ) break; @@ -622,7 +622,7 @@ namespace boost for(;second_face_itr != face_end; ++second_face_itr) { vertex_t face_vertex(*second_face_itr); - if (pertinent(face_vertex, v) || + if (pertinent(face_vertex, v) || externally_active(face_vertex, v) ) { @@ -654,14 +654,14 @@ namespace boost chosen = second_side_vertex; chose_first_upper_path = false; } - else + else { - // If there's a pertinent vertex on the lower face - // between the first_face_itr and the second_face_itr, + // If there's a pertinent vertex on the lower face + // between the first_face_itr and the second_face_itr, // this graph isn't planar. - for(; - *first_face_itr != second_side_vertex; + for(; + *first_face_itr != second_side_vertex; ++first_face_itr ) { @@ -675,85 +675,85 @@ namespace boost return false; } } - - // Otherwise, the fact that we didn't find a pertinent - // vertex on this face is fine - we should set the - // short-circuit edges and break out of this loop to + + // Otherwise, the fact that we didn't find a pertinent + // vertex on this face is fine - we should set the + // short-circuit edges and break out of this loop to // start looking at a different pertinent root. - + if (first_side_vertex == second_side_vertex) { if (first_tail != v) { - vertex_t first + vertex_t first = face_handles[first_tail].first_vertex(); - vertex_t second + vertex_t second = face_handles[first_tail].second_vertex(); - boost::tie(first_side_vertex, first_tail) - = make_tuple(first_tail, - first == first_side_vertex ? + boost::tie(first_side_vertex, first_tail) + = make_tuple(first_tail, + first == first_side_vertex ? second : first ); } else if (second_tail != v) { - vertex_t first + vertex_t first = face_handles[second_tail].first_vertex(); - vertex_t second + vertex_t second = face_handles[second_tail].second_vertex(); - boost::tie(second_side_vertex, second_tail) + boost::tie(second_side_vertex, second_tail) = make_tuple(second_tail, - first == second_side_vertex ? + first == second_side_vertex ? second : first); } else break; } - - canonical_dfs_child[first_side_vertex] + + canonical_dfs_child[first_side_vertex] = canonical_dfs_child[root_face_handle.first_vertex()]; - canonical_dfs_child[second_side_vertex] + canonical_dfs_child[second_side_vertex] = canonical_dfs_child[root_face_handle.second_vertex()]; root_face_handle.set_first_vertex(first_side_vertex); root_face_handle.set_second_vertex(second_side_vertex); - if (face_handles[first_side_vertex].first_vertex() == + if (face_handles[first_side_vertex].first_vertex() == first_tail ) face_handles[first_side_vertex].set_first_vertex(v); else face_handles[first_side_vertex].set_second_vertex(v); - if (face_handles[second_side_vertex].first_vertex() == + if (face_handles[second_side_vertex].first_vertex() == second_tail ) face_handles[second_side_vertex].set_first_vertex(v); else face_handles[second_side_vertex].set_second_vertex(v); - + break; - + } - // When we unwind the stack, we need to know which direction + // When we unwind the stack, we need to know which direction // we came down from on the top face handle - - bool chose_first_lower_path = - (chose_first_upper_path && - face_handles[chosen].first_vertex() == first_tail) + + bool chose_first_lower_path = + (chose_first_upper_path && + face_handles[chosen].first_vertex() == first_tail) || - (!chose_first_upper_path && + (!chose_first_upper_path && face_handles[chosen].first_vertex() == second_tail); //If there's a backedge at the chosen vertex, embed it now if (backedge_flag[chosen] == dfs_number[v]) { w = chosen; - + backedge_flag[chosen] = num_vertices(g) + 1; add_to_merge_points(chosen, StoreOldHandlesPolicy()); - + typename edge_vector_t::iterator ei, ei_end; ei_end = backedges[chosen].end(); for(ei = backedges[chosen].begin(); ei != ei_end; ++ei) @@ -778,7 +778,7 @@ namespace boost } //Unwind the merge stack to the root, merging all bicomps - + bool bottom_path_follows_first; bool top_path_follows_first; bool next_bottom_follows_first = chose_first_upper_path; @@ -790,8 +790,8 @@ namespace boost { bottom_path_follows_first = next_bottom_follows_first; - boost::tie(merge_point, - next_bottom_follows_first, + boost::tie(merge_point, + next_bottom_follows_first, top_path_follows_first ) = merge_stack.back(); merge_stack.pop_back(); @@ -799,7 +799,7 @@ namespace boost face_handle_t top_handle(face_handles[merge_point]); face_handle_t bottom_handle (*pertinent_roots[merge_point]->begin()); - + vertex_t bottom_dfs_child = canonical_dfs_child [pertinent_roots[merge_point]->begin()->first_vertex()]; @@ -810,23 +810,23 @@ namespace boost pertinent_roots[merge_point]->pop_front(); - add_to_merge_points(top_handle.get_anchor(), + add_to_merge_points(top_handle.get_anchor(), StoreOldHandlesPolicy() ); - + if (top_path_follows_first && bottom_path_follows_first) { bottom_handle.flip(); top_handle.glue_first_to_second(bottom_handle); - } - else if (!top_path_follows_first && + } + else if (!top_path_follows_first && bottom_path_follows_first ) { flipped[bottom_dfs_child] = true; top_handle.glue_second_to_first(bottom_handle); } - else if (top_path_follows_first && + else if (top_path_follows_first && !bottom_path_follows_first ) { @@ -842,17 +842,17 @@ namespace boost } //Finally, embed all edges (v,w) at their upper end points - canonical_dfs_child[w] + canonical_dfs_child[w] = canonical_dfs_child[root_face_handle.first_vertex()]; - - add_to_merge_points(root_face_handle.get_anchor(), + + add_to_merge_points(root_face_handle.get_anchor(), StoreOldHandlesPolicy() ); - + typename edge_vector_t::iterator ei, ei_end; ei_end = backedges[chosen].end(); for(ei = backedges[chosen].begin(); ei != ei_end; ++ei) - { + { if (next_bottom_follows_first) root_face_handle.push_first(*ei, g); else @@ -863,7 +863,7 @@ namespace boost curr_face_handle = root_face_handle; }//while(true) - + }//while(!pertinent_roots[v]->empty()) return true; @@ -879,14 +879,14 @@ namespace boost void store_old_face_handles(graph::detail::store_old_handles) { - for(typename std::vector<vertex_t>::iterator mp_itr + for(typename std::vector<vertex_t>::iterator mp_itr = current_merge_points.begin(); mp_itr != current_merge_points.end(); ++mp_itr) { face_handles[*mp_itr].store_old_face_handles(); } current_merge_points.clear(); - } + } void add_to_merge_points(vertex_t, graph::detail::no_old_handles) {} @@ -896,7 +896,7 @@ namespace boost current_merge_points.push_back(v); } - + void add_to_embedded_edges(edge_t, graph::detail::no_old_handles) {} void add_to_embedded_edges(edge_t e, graph::detail::store_old_handles) @@ -924,7 +924,7 @@ namespace boost { typename vertex_list_t::iterator yi, yi_end; yi_end = separated_dfs_child_list[*xi]->end(); - for(yi = separated_dfs_child_list[*xi]->begin(); + for(yi = separated_dfs_child_list[*xi]->begin(); yi != yi_end; ++yi ) { @@ -933,7 +933,7 @@ namespace boost (dfs_child_handles[*yi]); } } - } + } // Up until this point, we've flipped bicomps lazily by setting // flipped[v] to true if the bicomp rooted at v was flipped (the @@ -944,7 +944,7 @@ namespace boost typedef typename vertex_vector_t::iterator vertex_vector_itr_t; vertex_vector_itr_t vi_end = vertices_by_dfs_num.end(); - for(vertex_vector_itr_t vi = vertices_by_dfs_num.begin(); + for(vertex_vector_itr_t vi = vertices_by_dfs_num.begin(); vi != vi_end; ++vi ) { @@ -968,7 +968,7 @@ namespace boost // If there are any self-loops in the graph, they were flagged // during the walkup, and we should add them to the embedding now. - // Adding a self loop anywhere in the embedding could never + // Adding a self loop anywhere in the embedding could never // invalidate the embedding, but they would complicate the traversal // if they were added during the walkup/walkdown. @@ -979,13 +979,13 @@ namespace boost edge_t e(*ei); face_handles[source(e,g)].push_second(e,g); } - + } - + bool pertinent(vertex_t w, vertex_t v) { // w is pertinent with respect to v if there is a backedge (v,w) or if @@ -993,38 +993,38 @@ namespace boost return backedge_flag[w] == dfs_number[v] || !pertinent_roots[w]->empty(); } - + bool externally_active(vertex_t w, vertex_t v) { // Let a be any proper depth-first search ancestor of v. w is externally - // active with respect to v if there exists a backedge (a,w) or a + // active with respect to v if there exists a backedge (a,w) or a // backedge (a,w_0) for some w_0 in a descendent bicomp of w. v_size_t dfs_number_of_v = dfs_number[v]; return (least_ancestor[w] < dfs_number_of_v) || (!separated_dfs_child_list[w]->empty() && - low_point[separated_dfs_child_list[w]->front()] < dfs_number_of_v); + low_point[separated_dfs_child_list[w]->front()] < dfs_number_of_v); } - - + + bool internally_active(vertex_t w, vertex_t v) { return pertinent(w,v) && !externally_active(w,v); - } - + } + void remove_vertex_from_separated_dfs_child_list(vertex_t v) { - typename vertex_list_t::iterator to_delete + typename vertex_list_t::iterator to_delete = separated_node_in_parent_list[v]; - garbage.splice(garbage.end(), - *separated_dfs_child_list[dfs_parent[v]], - to_delete, + garbage.splice(garbage.end(), + *separated_dfs_child_list[dfs_parent[v]], + to_delete, boost::next(to_delete) ); } @@ -1032,9 +1032,9 @@ namespace boost - + // End of the implementation of the basic Boyer-Myrvold Algorithm. The rest - // of the code below implements the isolation of a Kuratowski subgraph in + // of the code below implements the isolation of a Kuratowski subgraph in // the case that the input graph is not planar. This is by far the most // complicated part of the implementation. @@ -1047,7 +1047,7 @@ namespace boost template <typename EdgeToBoolPropertyMap, typename EdgeContainer> - vertex_t kuratowski_walkup(vertex_t v, + vertex_t kuratowski_walkup(vertex_t v, EdgeToBoolPropertyMap forbidden_edge, EdgeToBoolPropertyMap goal_edge, EdgeToBoolPropertyMap is_embedded, @@ -1057,19 +1057,19 @@ namespace boost vertex_t current_endpoint; bool seen_goal_edge = false; out_edge_iterator_t oi, oi_end; - + for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) forbidden_edge[*oi] = true; - + for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) { path_edges.clear(); - + edge_t e(*oi); - current_endpoint = target(*oi,g) == v ? + current_endpoint = target(*oi,g) == v ? source(*oi,g) : target(*oi,g); - - if (dfs_number[current_endpoint] < dfs_number[v] || + + if (dfs_number[current_endpoint] < dfs_number[v] || is_embedded[e] || v == current_endpoint //self-loop ) @@ -1077,7 +1077,7 @@ namespace boost //Not a backedge continue; } - + path_edges.push_back(e); if (goal_edge[e]) { @@ -1085,30 +1085,30 @@ namespace boost } typedef typename face_edge_iterator<>::type walkup_itr_t; - - walkup_itr_t + + walkup_itr_t walkup_itr(current_endpoint, face_handles, first_side()); walkup_itr_t walkup_end; - + seen_goal_edge = false; - + while (true) - { - + { + if (walkup_itr != walkup_end && forbidden_edge[*walkup_itr]) break; - - while(walkup_itr != walkup_end && - !goal_edge[*walkup_itr] && + + while(walkup_itr != walkup_end && + !goal_edge[*walkup_itr] && !forbidden_edge[*walkup_itr] ) { edge_t f(*walkup_itr); forbidden_edge[f] = true; path_edges.push_back(f); - current_endpoint = - source(f, g) == current_endpoint ? - target(f, g) : + current_endpoint = + source(f, g) == current_endpoint ? + target(f, g) : source(f,g); ++walkup_itr; } @@ -1120,14 +1120,14 @@ namespace boost break; } - walkup_itr + walkup_itr = walkup_itr_t(current_endpoint, face_handles, first_side()); - + } - + if (seen_goal_edge) break; - + } if (seen_goal_edge) @@ -1157,9 +1157,9 @@ namespace boost // | there exists some bicomp containing three vertices // ----- x,y, and z as shown such that x and y are externally // | | active with respect to v (which means that there are - // x y two vertices x_0 and y_0 such that (1) both x_0 and - // | | y_0 are proper depth-first search ancestors of v and - // --z-- (2) there are two disjoint paths, one connecting x + // x y two vertices x_0 and y_0 such that (1) both x_0 and + // | | y_0 are proper depth-first search ancestors of v and + // --z-- (2) there are two disjoint paths, one connecting x // and x_0 and one connecting y and y_0, both consisting // fig. 1 entirely of unembedded edges). Furthermore, there // exists a vertex z_0 such that z is a depth-first @@ -1175,10 +1175,10 @@ namespace boost // properties of the Boyer-Myrvold algorithm to show the existence of an // "x-y path" connecting some vertex on the "left side" of the x,y,z // bicomp with some vertex on the "right side" of the bicomp (where the - // left and right are split by a line drawn through v and z.If either of - // the endpoints of the x-y path is above x or y on the bicomp, a K_3_3 - // can be isolated - this is a case C. Otherwise, both endpoints are at - // or below x and y on the bicomp. If there is a vertex alpha on the x-y + // left and right are split by a line drawn through v and z.If either of + // the endpoints of the x-y path is above x or y on the bicomp, a K_3_3 + // can be isolated - this is a case C. Otherwise, both endpoints are at + // or below x and y on the bicomp. If there is a vertex alpha on the x-y // path such that alpha is not x or y and there's a path from alpha to v // that's disjoint from any of the edges on the bicomp and the x-y path, // a K_3_3 can be isolated - this is a case D. Otherwise, properties of @@ -1192,8 +1192,8 @@ namespace boost out_edge_iterator_t oei, oei_end; typename std::vector<edge_t>::iterator xi, xi_end; - // Clear the short-circuit edges - these are needed for the planar - // testing/embedding algorithm to run in linear time, but they'll + // Clear the short-circuit edges - these are needed for the planar + // testing/embedding algorithm to run in linear time, but they'll // complicate the kuratowski subgraph isolation for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) { @@ -1217,12 +1217,12 @@ namespace boost typename std::vector<edge_t>::iterator embedded_itr, embedded_end; embedded_end = embedded_edges.end(); - for(embedded_itr = embedded_edges.begin(); + for(embedded_itr = embedded_edges.begin(); embedded_itr != embedded_end; ++embedded_itr ) is_embedded[*embedded_itr] = true; - // upper_face_vertex is true for x,y, and all vertices above x and y in + // upper_face_vertex is true for x,y, and all vertices above x and y in // the bicomp std::vector<bool> upper_face_vertex_vector(num_vertices(g), false); vertex_to_bool_map_t upper_face_vertex @@ -1234,7 +1234,7 @@ namespace boost // These next few variable declarations are all things that we need // to find. - vertex_t z; + vertex_t z; vertex_t bicomp_root; vertex_t w = graph_traits<Graph>::null_vertex(); face_handle_t w_handle; @@ -1256,13 +1256,13 @@ namespace boost //backedge from V, then goes up until it hits either X or Y //(but doesn't find X or Y as the root of a bicomp) - typename face_vertex_iterator<>::type + typename face_vertex_iterator<>::type x_upper_itr(x, face_handles, first_side()); - typename face_vertex_iterator<>::type + typename face_vertex_iterator<>::type x_lower_itr(x, face_handles, second_side()); typename face_vertex_iterator<>::type face_itr, face_end; - // Don't know which path from x is the upper or lower path - + // Don't know which path from x is the upper or lower path - // we'll find out here for(face_itr = x_upper_itr; face_itr != face_end; ++face_itr) { @@ -1284,9 +1284,9 @@ namespace boost upper_face_vertex[current_vertex] = true; } - v_dfchild_handle + v_dfchild_handle = dfs_child_handles[canonical_dfs_child[previous_vertex]]; - + for(face_itr = x_lower_itr; *face_itr != y; ++face_itr) { vertex_t current_vertex(*face_itr); @@ -1297,7 +1297,7 @@ namespace boost if (w == graph_traits<Graph>::null_vertex()) //haven't found a w yet { roots_end = pertinent_roots[current_vertex]->end(); - for(roots_itr = pertinent_roots[current_vertex]->begin(); + for(roots_itr = pertinent_roots[current_vertex]->begin(); roots_itr != roots_end; ++roots_itr ) { @@ -1327,7 +1327,7 @@ namespace boost edge_to_bool_map_t outer_face_edge(outer_face_edge_vector.begin(), em); walkup_itr_t walkup_end; - for(walkup_itr_t walkup_itr(x, face_handles, first_side()); + for(walkup_itr_t walkup_itr(x, face_handles, first_side()); walkup_itr != walkup_end; ++walkup_itr ) { @@ -1335,7 +1335,7 @@ namespace boost is_in_subgraph[*walkup_itr] = true; } - for(walkup_itr_t walkup_itr(x, face_handles, second_side()); + for(walkup_itr_t walkup_itr(x, face_handles, second_side()); walkup_itr != walkup_end; ++walkup_itr ) { @@ -1355,53 +1355,53 @@ namespace boost for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { edge_t e(*ei); - goal_edge[e] + goal_edge[e] = !outer_face_edge[e] && (source(e,g) == x || target(e,g) == x); forbidden_edge[*ei] = outer_face_edge[*ei]; } vertex_t x_ancestor = v; vertex_t x_endpoint = graph_traits<Graph>::null_vertex(); - + while(x_endpoint == graph_traits<Graph>::null_vertex()) - { + { x_ancestor = dfs_parent[x_ancestor]; - x_endpoint = kuratowski_walkup(x_ancestor, - forbidden_edge, + x_endpoint = kuratowski_walkup(x_ancestor, + forbidden_edge, goal_edge, is_embedded, x_external_path ); - - } + + } for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { edge_t e(*ei); - goal_edge[e] + goal_edge[e] = !outer_face_edge[e] && (source(e,g) == y || target(e,g) == y); forbidden_edge[*ei] = outer_face_edge[*ei]; } vertex_t y_ancestor = v; vertex_t y_endpoint = graph_traits<Graph>::null_vertex(); - + while(y_endpoint == graph_traits<Graph>::null_vertex()) - { + { y_ancestor = dfs_parent[y_ancestor]; - y_endpoint = kuratowski_walkup(y_ancestor, - forbidden_edge, + y_endpoint = kuratowski_walkup(y_ancestor, + forbidden_edge, goal_edge, is_embedded, y_external_path ); - - } - + + } + vertex_t parent, child; - + //If v isn't on the same bicomp as x and y, it's a case A if (bicomp_root != v) { @@ -1412,13 +1412,13 @@ namespace boost for(boost::tie(oei,oei_end) = out_edges(*vi,g); oei != oei_end; ++oei) if(!outer_face_edge[*oei]) goal_edge[*oei] = true; - + for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) forbidden_edge[*ei] = outer_face_edge[*ei]; - + z = kuratowski_walkup (v, forbidden_edge, goal_edge, is_embedded, z_v_path); - + } else if (w != graph_traits<Graph>::null_vertex()) { @@ -1430,17 +1430,17 @@ namespace boost goal_edge[e] = false; forbidden_edge[e] = outer_face_edge[e]; } - + goal_edge[w_handle.first_edge()] = true; goal_edge[w_handle.second_edge()] = true; z = kuratowski_walkup(v, - forbidden_edge, + forbidden_edge, goal_edge, is_embedded, z_v_path ); - + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { @@ -1453,41 +1453,41 @@ namespace boost { goal_edge[*pi] = true; } - + w_ancestor = v; vertex_t w_endpoint = graph_traits<Graph>::null_vertex(); - + while(w_endpoint == graph_traits<Graph>::null_vertex()) - { + { w_ancestor = dfs_parent[w_ancestor]; - w_endpoint = kuratowski_walkup(w_ancestor, - forbidden_edge, + w_endpoint = kuratowski_walkup(w_ancestor, + forbidden_edge, goal_edge, is_embedded, w_path ); - - } - - // We really want both the w walkup and the z walkup to finish on - // exactly the same edge, but for convenience (since we don't have - // control over which side of a bicomp a walkup moves up) we've - // defined the walkup to either end at w_handle.first_edge() or - // w_handle.second_edge(). If both walkups ended at different edges, - // we'll do a little surgery on the w walkup path to make it follow + + } + + // We really want both the w walkup and the z walkup to finish on + // exactly the same edge, but for convenience (since we don't have + // control over which side of a bicomp a walkup moves up) we've + // defined the walkup to either end at w_handle.first_edge() or + // w_handle.second_edge(). If both walkups ended at different edges, + // we'll do a little surgery on the w walkup path to make it follow // the other side of the final bicomp. - if ((w_path.back() == w_handle.first_edge() && - z_v_path.back() == w_handle.second_edge()) + if ((w_path.back() == w_handle.first_edge() && + z_v_path.back() == w_handle.second_edge()) || - (w_path.back() == w_handle.second_edge() && + (w_path.back() == w_handle.second_edge() && z_v_path.back() == w_handle.first_edge()) ) { walkup_itr_t wi, wi_end; edge_t final_edge = w_path.back(); - vertex_t anchor - = source(final_edge, g) == w_handle.get_anchor() ? + vertex_t anchor + = source(final_edge, g) == w_handle.get_anchor() ? target(final_edge, g) : source(final_edge, g); if (face_handles[anchor].first_edge() == final_edge) wi = walkup_itr_t(anchor, face_handles, second_side()); @@ -1506,9 +1506,9 @@ namespace boost } } - + } - else + else { //We need to find a valid z, since the x-y path re-defines the lower @@ -1519,7 +1519,7 @@ namespace boost // The z we've used so far is just an externally active vertex on the // lower face path, but may not be the z we need for a case C, D, or - // E subgraph. the z we need now is any externally active vertex on + // E subgraph. the z we need now is any externally active vertex on // the lower face path with both old_face_handles edges on the outer // face. Since we know an x-y path exists, such a z must also exist. @@ -1530,7 +1530,7 @@ namespace boost for(face_itr = x_lower_itr; *face_itr != y; ++face_itr) { vertex_t possible_z(*face_itr); - if (pertinent(possible_z,v) && + if (pertinent(possible_z,v) && outer_face_edge[face_handles[possible_z].old_first_edge()] && outer_face_edge[face_handles[possible_z].old_second_edge()] ) @@ -1544,14 +1544,14 @@ namespace boost if (externally_active(z,v)) w = z; - + typedef typename face_edge_iterator - <single_side, previous_iteration>::type old_face_iterator_t; + <single_side, previous_iteration>::type old_face_iterator_t; - old_face_iterator_t + old_face_iterator_t first_old_face_itr(z, face_handles, first_side()); - old_face_iterator_t + old_face_iterator_t second_old_face_itr(z, face_handles, second_side()); old_face_iterator_t old_face_itr, old_face_end; @@ -1563,10 +1563,10 @@ namespace boost vertex_to_bool_map_t x_y_path_vertex (x_y_path_vertex_vector.begin(), vm); - typename std::vector<old_face_iterator_t>::iterator + typename std::vector<old_face_iterator_t>::iterator of_itr, of_itr_end; - of_itr_end = old_face_iterators.end(); - for(of_itr = old_face_iterators.begin(); + of_itr_end = old_face_iterators.end(); + for(of_itr = old_face_iterators.begin(); of_itr != of_itr_end; ++of_itr ) { @@ -1580,13 +1580,13 @@ namespace boost { edge_t e(*old_face_itr); previous_vertex = current_vertex; - current_vertex = source(e,g) == current_vertex ? + current_vertex = source(e,g) == current_vertex ? target(e,g) : source(e,g); - + if (current_vertex == x || current_vertex == y) seen_x_or_y = true; - if (w == graph_traits<Graph>::null_vertex() && + if (w == graph_traits<Graph>::null_vertex() && externally_active(current_vertex,v) && outer_face_edge[e] && outer_face_edge[*boost::next(old_face_itr)] && @@ -1595,10 +1595,10 @@ namespace boost { w = current_vertex; } - + if (!outer_face_edge[e]) { - if (!upper_face_vertex[current_vertex] && + if (!upper_face_vertex[current_vertex] && !lower_face_vertex[current_vertex] ) { @@ -1606,22 +1606,22 @@ namespace boost } is_in_subgraph[e] = true; - if (upper_face_vertex[source(e,g)] || + if (upper_face_vertex[source(e,g)] || lower_face_vertex[source(e,g)] ) { - if (first_x_y_path_endpoint == + if (first_x_y_path_endpoint == graph_traits<Graph>::null_vertex() ) first_x_y_path_endpoint = source(e,g); else second_x_y_path_endpoint = source(e,g); } - if (upper_face_vertex[target(e,g)] || + if (upper_face_vertex[target(e,g)] || lower_face_vertex[target(e,g)] ) { - if (first_x_y_path_endpoint == + if (first_x_y_path_endpoint == graph_traits<Graph>::null_vertex() ) first_x_y_path_endpoint = target(e,g); @@ -1635,35 +1635,35 @@ namespace boost { chosen_case = detail::BM_CASE_C; } - + } } - // Look for a case D - one of v's embedded edges will connect to the + // Look for a case D - one of v's embedded edges will connect to the // x-y path along an inner face path. //First, get a list of all of v's embedded child edges out_edge_iterator_t v_edge_itr, v_edge_end; - for(boost::tie(v_edge_itr,v_edge_end) = out_edges(v,g); + for(boost::tie(v_edge_itr,v_edge_end) = out_edges(v,g); v_edge_itr != v_edge_end; ++v_edge_itr ) { edge_t embedded_edge(*v_edge_itr); - - if (!is_embedded[embedded_edge] || + + if (!is_embedded[embedded_edge] || embedded_edge == dfs_parent_edge[v] ) continue; case_d_edges.push_back(embedded_edge); - vertex_t current_vertex - = source(embedded_edge,g) == v ? + vertex_t current_vertex + = source(embedded_edge,g) == v ? target(embedded_edge,g) : source(embedded_edge,g); - typename face_edge_iterator<>::type + typename face_edge_iterator<>::type internal_face_itr, internal_face_end; if (face_handles[current_vertex].first_vertex() == v) { @@ -1677,13 +1677,13 @@ namespace boost } while(internal_face_itr != internal_face_end && - !outer_face_edge[*internal_face_itr] && + !outer_face_edge[*internal_face_itr] && !x_y_path_vertex[current_vertex] ) { edge_t e(*internal_face_itr); case_d_edges.push_back(e); - current_vertex = + current_vertex = source(e,g) == current_vertex ? target(e,g) : source(e,g); ++internal_face_itr; } @@ -1699,7 +1699,7 @@ namespace boost } } - + } @@ -1714,25 +1714,25 @@ namespace boost for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { edge_t e(*ei); - goal_edge[e] = !outer_face_edge[e] && + goal_edge[e] = !outer_face_edge[e] && (source(e,g) == z || target(e,g) == z); forbidden_edge[e] = outer_face_edge[e]; } kuratowski_walkup(v, - forbidden_edge, + forbidden_edge, goal_edge, is_embedded, z_v_path ); - + if (chosen_case == detail::BM_CASE_E) { for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { forbidden_edge[*ei] = outer_face_edge[*ei]; - goal_edge[*ei] = !outer_face_edge[*ei] && + goal_edge[*ei] = !outer_face_edge[*ei] && (source(*ei,g) == w || target(*ei,g) == w); } @@ -1748,22 +1748,22 @@ namespace boost { goal_edge[*pi] = true; } - + w_ancestor = v; vertex_t w_endpoint = graph_traits<Graph>::null_vertex(); - + while(w_endpoint == graph_traits<Graph>::null_vertex()) - { + { w_ancestor = dfs_parent[w_ancestor]; - w_endpoint = kuratowski_walkup(w_ancestor, - forbidden_edge, + w_endpoint = kuratowski_walkup(w_ancestor, + forbidden_edge, goal_edge, is_embedded, w_path ); - - } - + + } + } @@ -1794,7 +1794,7 @@ namespace boost xi_end = w_path.end(); for(xi = w_path.begin(); xi != xi_end; ++xi) is_in_subgraph[*xi] = true; - + child = bicomp_root; parent = dfs_parent[child]; while(child != parent) @@ -1806,10 +1806,10 @@ namespace boost - // At this point, we've already isolated the Kuratowski subgraph and - // collected all of the edges that compose it in the is_in_subgraph - // property map. But we want the verification of such a subgraph to be - // a deterministic process, and we can simplify the function + // At this point, we've already isolated the Kuratowski subgraph and + // collected all of the edges that compose it in the is_in_subgraph + // property map. But we want the verification of such a subgraph to be + // a deterministic process, and we can simplify the function // is_kuratowski_subgraph by cleaning up some edges here. if (chosen_case == detail::BM_CASE_B) @@ -1821,13 +1821,13 @@ namespace boost // In a case C subgraph, at least one of the x-y path endpoints // (call it alpha) is above either x or y on the outer face. The // other endpoint may be attached at x or y OR above OR below. In - // any of these three cases, we can form a K_3_3 by removing the - // edge attached to v on the outer face that is NOT on the path to + // any of these three cases, we can form a K_3_3 by removing the + // edge attached to v on the outer face that is NOT on the path to // alpha. - typename face_vertex_iterator<single_side, follow_visitor>::type + typename face_vertex_iterator<single_side, follow_visitor>::type face_itr, face_end; - if (face_handles[v_dfchild_handle.first_vertex()].first_edge() == + if (face_handles[v_dfchild_handle.first_vertex()].first_edge() == v_dfchild_handle.first_edge() ) { @@ -1857,13 +1857,13 @@ namespace boost break; } } - + } else if (chosen_case == detail::BM_CASE_D) { // Need to remove both of the edges adjacent to v on the outer face. // remove the connecting edges from v to bicomp, then - // is_kuratowski_subgraph will shrink vertices of degree 1 + // is_kuratowski_subgraph will shrink vertices of degree 1 // automatically... is_in_subgraph[v_dfchild_handle.first_edge()] = false; @@ -1872,8 +1872,8 @@ namespace boost } else if (chosen_case == detail::BM_CASE_E) { - // Similarly to case C, if the endpoints of the x-y path are both - // below x and y, we should remove an edge to allow the subgraph to + // Similarly to case C, if the endpoints of the x-y path are both + // below x and y, we should remove an edge to allow the subgraph to // contract to a K_3_3. @@ -1881,7 +1881,7 @@ namespace boost (second_x_y_path_endpoint != x && second_x_y_path_endpoint != y) ) { - is_in_subgraph[dfs_parent_edge[v]] = false; + is_in_subgraph[dfs_parent_edge[v]] = false; vertex_t deletion_endpoint, other_endpoint; if (lower_face_vertex[first_x_y_path_endpoint]) @@ -1890,13 +1890,13 @@ namespace boost other_endpoint = first_x_y_path_endpoint; } else - { + { deletion_endpoint = first_x_y_path_endpoint; other_endpoint = second_x_y_path_endpoint; } typename face_edge_iterator<>::type face_itr, face_end; - + bool found_other_endpoint = false; for(face_itr = typename face_edge_iterator<>::type (deletion_endpoint, face_handles, first_side()); @@ -1904,7 +1904,7 @@ namespace boost ) { edge_t e(*face_itr); - if (source(e,g) == other_endpoint || + if (source(e,g) == other_endpoint || target(e,g) == other_endpoint ) { @@ -1915,7 +1915,7 @@ namespace boost if (found_other_endpoint) { - is_in_subgraph[face_handles[deletion_endpoint].first_edge()] + is_in_subgraph[face_handles[deletion_endpoint].first_edge()] = false; } else @@ -1924,14 +1924,14 @@ namespace boost = false; } } - + } for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) if (is_in_subgraph[*ei]) *o_itr = *ei; - + } @@ -1957,14 +1957,14 @@ namespace boost vertex_t kuratowski_v; vertex_t kuratowski_x; vertex_t kuratowski_y; - - vertex_list_t garbage; // we delete items from linked lists by + + vertex_list_t garbage; // we delete items from linked lists by // splicing them into garbage //only need these two for kuratowski subgraph isolation std::vector<vertex_t> current_merge_points; std::vector<edge_t> embedded_edges; - + //property map storage std::vector<v_size_t> low_point_vector; std::vector<vertex_t> dfs_parent_vector; @@ -1976,7 +1976,7 @@ namespace boost std::vector< face_handle_t > face_handles_vector; std::vector< face_handle_t > dfs_child_handles_vector; std::vector< vertex_list_ptr_t > separated_dfs_child_list_vector; - std::vector< typename vertex_list_t::iterator > + std::vector< typename vertex_list_t::iterator > separated_node_in_parent_list_vector; std::vector<vertex_t> canonical_dfs_child_vector; std::vector<bool> flipped_vector; @@ -1993,20 +1993,20 @@ namespace boost vertex_to_face_handle_list_ptr_map_t pertinent_roots; vertex_to_v_size_map_t backedge_flag; vertex_to_v_size_map_t visited; - vertex_to_face_handle_map_t face_handles; + vertex_to_face_handle_map_t face_handles; vertex_to_face_handle_map_t dfs_child_handles; vertex_to_vertex_list_ptr_map_t separated_dfs_child_list; vertex_to_separated_node_map_t separated_node_in_parent_list; - vertex_to_vertex_map_t canonical_dfs_child; + vertex_to_vertex_map_t canonical_dfs_child; vertex_to_bool_map_t flipped; vertex_to_edge_vector_map_t backedges; vertex_to_edge_map_t dfs_parent_edge; //only need for kuratowski merge_stack_t merge_stack; - + }; - - + + } //namespace boost #endif //__BOYER_MYRVOLD_IMPL_HPP__ diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/face_handles.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/face_handles.hpp index 4e28d4af..99b4eec3 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/face_handles.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/face_handles.hpp @@ -12,7 +12,7 @@ #include <list> #include <boost/graph/graph_traits.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> // A "face handle" is an optimization meant to serve two purposes in @@ -26,7 +26,7 @@ // sequence of edges. The functions first_vertex/second_vertex and // first_edge/second_edge allow fast access to the beginning and end of the // stored sequence, which allows one to traverse the outer face of the partial -// planar embedding as it's being created. +// planar embedding as it's being created. // // There are some policies below that define the contents of the face handles: // in the case no embedding is needed (for example, if one just wants to use @@ -48,7 +48,7 @@ namespace boost { namespace graph { namespace detail { //face handle policies - + //EmbeddingStorage policy struct store_embedding {}; struct recursive_lazy_list : public store_embedding {}; @@ -65,14 +65,14 @@ namespace boost { namespace graph { namespace detail { template<typename DataType> struct lazy_list_node { - typedef shared_ptr< lazy_list_node<DataType> > ptr_t; + typedef std::shared_ptr< lazy_list_node<DataType> > ptr_t; lazy_list_node(const DataType& data) : m_reversed(false), m_data(data), m_has_data(true) {} - + lazy_list_node(ptr_t left_child, ptr_t right_child) : m_reversed(false), m_has_data(false), @@ -83,10 +83,10 @@ namespace boost { namespace graph { namespace detail { bool m_reversed; DataType m_data; bool m_has_data; - shared_ptr<lazy_list_node> m_left_child; - shared_ptr<lazy_list_node> m_right_child; + std::shared_ptr<lazy_list_node> m_left_child; + std::shared_ptr<lazy_list_node> m_right_child; }; - + template <typename StoreOldHandlesPolicy, typename Vertex, typename Edge> @@ -139,7 +139,7 @@ namespace boost { namespace graph { namespace detail { struct edge_list_storage<recursive_lazy_list, Edge> { typedef lazy_list_node<Edge> node_type; - typedef shared_ptr< node_type > type; + typedef std::shared_ptr< node_type > type; type value; void push_back(Edge e) @@ -178,17 +178,17 @@ namespace boost { namespace graph { namespace detail { private: template <typename OutputIterator> - void get_list_helper(OutputIterator o_itr, + void get_list_helper(OutputIterator o_itr, type root, bool flipped = false ) { if (!root) return; - + if (root->m_has_data) *o_itr = root->m_data; - + if ((flipped && !root->m_reversed) || (!flipped && root->m_reversed) ) @@ -201,9 +201,9 @@ namespace boost { namespace graph { namespace detail { get_list_helper(o_itr, root->m_left_child, false); get_list_helper(o_itr, root->m_right_child, false); } - + } - + }; @@ -254,20 +254,20 @@ namespace boost { namespace graph { namespace detail { - - template<typename Graph, - typename StoreOldHandlesPolicy, - typename StoreEmbeddingPolicy + + template<typename Graph, + typename StoreOldHandlesPolicy, + typename StoreEmbeddingPolicy > struct face_handle_impl { typedef typename graph_traits<Graph>::vertex_descriptor vertex_t; typedef typename graph_traits<Graph>::edge_descriptor edge_t; - typedef typename edge_list_storage<StoreEmbeddingPolicy, edge_t>::type + typedef typename edge_list_storage<StoreEmbeddingPolicy, edge_t>::type edge_list_storage_t; - face_handle_impl() : + face_handle_impl() : cached_first_vertex(graph_traits<Graph>::null_vertex()), cached_second_vertex(graph_traits<Graph>::null_vertex()), true_first_vertex(graph_traits<Graph>::null_vertex()), @@ -308,11 +308,11 @@ namespace boost { namespace graph { namespace detail { - template <typename Graph, - typename StoreOldHandlesPolicy = store_old_handles, + template <typename Graph, + typename StoreOldHandlesPolicy = store_old_handles, typename StoreEmbeddingPolicy = recursive_lazy_list > - class face_handle + class face_handle { public: typedef typename graph_traits<Graph>::vertex_descriptor vertex_t; @@ -347,19 +347,19 @@ namespace boost { namespace graph { namespace detail { } //default copy construction, assignment okay. - - void push_first(edge_t e, const Graph& g) - { + + void push_first(edge_t e, const Graph& g) + { pimpl->edge_list.push_front(e); - pimpl->cached_first_vertex = pimpl->true_first_vertex = + pimpl->cached_first_vertex = pimpl->true_first_vertex = source(e, g) == pimpl->anchor ? target(e,g) : source(e,g); pimpl->cached_first_edge = e; } - - void push_second(edge_t e, const Graph& g) - { + + void push_second(edge_t e, const Graph& g) + { pimpl->edge_list.push_back(e); - pimpl->cached_second_vertex = pimpl->true_second_vertex = + pimpl->cached_second_vertex = pimpl->true_second_vertex = source(e, g) == pimpl->anchor ? target(e,g) : source(e,g); pimpl->cached_second_edge = e; } @@ -370,22 +370,22 @@ namespace boost { namespace graph { namespace detail { } inline vertex_t first_vertex() const - { + { return pimpl->cached_first_vertex; } - - inline vertex_t second_vertex() const - { + + inline vertex_t second_vertex() const + { return pimpl->cached_second_vertex; } - inline vertex_t true_first_vertex() const - { + inline vertex_t true_first_vertex() const + { return pimpl->true_first_vertex; } - inline vertex_t true_second_vertex() const - { + inline vertex_t true_second_vertex() const + { return pimpl->true_second_vertex; } @@ -413,17 +413,17 @@ namespace boost { namespace graph { namespace detail { { return pimpl->cached_first_edge; } - + inline edge_t second_edge() const { return pimpl->cached_second_edge; } - + inline vertex_t get_anchor() const { return pimpl->anchor; } - + void glue_first_to_second (face_handle<Graph,StoreOldHandlesPolicy,StoreEmbeddingPolicy>& bottom) { @@ -432,7 +432,7 @@ namespace boost { namespace graph { namespace detail { pimpl->cached_first_vertex = bottom.pimpl->cached_first_vertex; pimpl->cached_first_edge = bottom.pimpl->cached_first_edge; } - + void glue_second_to_first (face_handle<Graph,StoreOldHandlesPolicy,StoreEmbeddingPolicy>& bottom) { @@ -441,7 +441,7 @@ namespace boost { namespace graph { namespace detail { pimpl->cached_second_vertex = bottom.pimpl->cached_second_vertex; pimpl->cached_second_edge = bottom.pimpl->cached_second_edge; } - + void flip() { pimpl->edge_list.reverse(); @@ -449,7 +449,7 @@ namespace boost { namespace graph { namespace detail { std::swap(pimpl->cached_first_vertex, pimpl->cached_second_vertex); std::swap(pimpl->cached_first_edge, pimpl->cached_second_edge); } - + template <typename OutputIterator> void get_list(OutputIterator o_itr) { @@ -481,12 +481,12 @@ namespace boost { namespace graph { namespace detail { pimpl->old_handles.first_edge = pimpl->cached_first_edge; pimpl->old_handles.second_edge = pimpl->cached_second_edge; } - + void store_old_face_handles_dispatch(no_old_handles) {} - boost::shared_ptr<impl_t> pimpl; + boost::std::shared_ptr<impl_t> pimpl; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/plod_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/plod_generator.hpp index 4e557cf0..d0684d88 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/plod_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/plod_generator.hpp @@ -12,7 +12,7 @@ #include <iterator> #include <utility> #include <boost/random/uniform_int.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/graph/graph_traits.hpp> #include <vector> #include <map> @@ -21,7 +21,7 @@ namespace boost { template<typename RandomGenerator> - class out_directed_plod_iterator + class out_directed_plod_iterator { public: typedef std::forward_iterator_tag iterator_category; @@ -32,10 +32,10 @@ namespace boost { out_directed_plod_iterator() : gen(0), at_end(true) { } - out_directed_plod_iterator(RandomGenerator& gen, std::size_t n, - double alpha, double beta, + out_directed_plod_iterator(RandomGenerator& gen, std::size_t n, + double alpha, double beta, bool allow_self_loops) - : gen(&gen), n(n), alpha(alpha), beta(beta), + : gen(&gen), n(n), alpha(alpha), beta(beta), allow_self_loops(allow_self_loops), at_end(false), degree(0), current(0, 0) { @@ -50,7 +50,7 @@ namespace boost { pointer operator->() const { return ¤t; } out_directed_plod_iterator& operator++() - { + { using std::pow; uniform_int<std::size_t> x(0, n-1); @@ -66,7 +66,7 @@ namespace boost { } std::size_t xv = x(*gen); - degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); + degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); } do { @@ -85,16 +85,16 @@ namespace boost { } bool operator==(const out_directed_plod_iterator& other) const - { - return at_end == other.at_end; + { + return at_end == other.at_end; } bool operator!=(const out_directed_plod_iterator& other) const - { - return !(*this == other); + { + return !(*this == other); } - private: + private: RandomGenerator* gen; std::size_t n; double alpha; @@ -106,7 +106,7 @@ namespace boost { }; template<typename RandomGenerator> - class undirected_plod_iterator + class undirected_plod_iterator { typedef std::vector<std::pair<std::size_t, std::size_t> > out_degrees_t; @@ -117,11 +117,11 @@ namespace boost { typedef const value_type* pointer; typedef std::ptrdiff_t difference_type; - undirected_plod_iterator() + undirected_plod_iterator() : gen(0), out_degrees(), degrees_left(0), allow_self_loops(false) { } - undirected_plod_iterator(RandomGenerator& gen, std::size_t n, - double alpha, double beta, + undirected_plod_iterator(RandomGenerator& gen, std::size_t n, + double alpha, double beta, bool allow_self_loops = false) : gen(&gen), n(n), out_degrees(new out_degrees_t), degrees_left(0), allow_self_loops(allow_self_loops) @@ -145,7 +145,7 @@ namespace boost { pointer operator->() const { return ¤t; } undirected_plod_iterator& operator++() - { + { next(); return *this; } @@ -158,8 +158,8 @@ namespace boost { } bool operator==(const undirected_plod_iterator& other) const - { - return degrees_left == other.degrees_left; + { + return degrees_left == other.degrees_left; } bool operator!=(const undirected_plod_iterator& other) const @@ -192,7 +192,7 @@ namespace boost { (*out_degrees)[source] = out_degrees->back(); out_degrees->pop_back(); continue; - } + } // Select target vertex target = x(*gen); @@ -200,7 +200,7 @@ namespace boost { (*out_degrees)[target] = out_degrees->back(); out_degrees->pop_back(); continue; - } else if (source != target + } else if (source != target || (allow_self_loops && (*out_degrees)[source].second > 2)) { break; } @@ -217,7 +217,7 @@ namespace boost { RandomGenerator* gen; std::size_t n; - shared_ptr<out_degrees_t> out_degrees; + std::shared_ptr<out_degrees_t> out_degrees; std::size_t degrees_left; bool allow_self_loops; value_type current; @@ -243,7 +243,7 @@ namespace boost { public: plod_iterator() : inherited() { } - plod_iterator(RandomGenerator& gen, std::size_t n, + plod_iterator(RandomGenerator& gen, std::size_t n, double alpha, double beta, bool allow_self_loops = false) : inherited(gen, n, alpha, beta, allow_self_loops) { } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/rmat_graph_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/rmat_graph_generator.hpp index 4256d7a8..f51e9e27 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/rmat_graph_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/rmat_graph_generator.hpp @@ -15,7 +15,7 @@ #include <vector> #include <queue> #include <map> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/assert.hpp> #include <boost/random/uniform_int.hpp> #include <boost/random/uniform_01.hpp> @@ -24,7 +24,7 @@ #include <boost/type_traits/is_same.hpp> #include <boost/test/floating_point_comparison.hpp> -using boost::shared_ptr; +using boost::std::shared_ptr; using boost::uniform_01; // Returns floor(log_2(n)), and -1 when n is 0 @@ -76,7 +76,7 @@ generate_permutation_vector(RandomGenerator& gen, std::vector<T>& vertexPermutat template <typename RandomGenerator, typename T> std::pair<T,T> -generate_edge(shared_ptr<uniform_01<RandomGenerator> > prob, T n, +generate_edge(std::shared_ptr<uniform_01<RandomGenerator> > prob, T n, unsigned int SCALE, double a, double b, double c, double d) { T u = 0, v = 0; @@ -213,7 +213,7 @@ namespace boost { private: // Parameters - shared_ptr<uniform_01<RandomGenerator> > gen; + std::shared_ptr<uniform_01<RandomGenerator> > gen; vertices_size_type n; double a, b, c, d; int edge; @@ -328,7 +328,7 @@ namespace boost { private: // Parameters - shared_ptr<uniform_01<RandomGenerator> > gen; + std::shared_ptr<uniform_01<RandomGenerator> > gen; bool permute_vertices; // Internal data structures @@ -442,7 +442,7 @@ namespace boost { private: // Parameters - shared_ptr<uniform_01<RandomGenerator> > gen; + std::shared_ptr<uniform_01<RandomGenerator> > gen; // Internal data structures std::vector<value_type> values; @@ -576,7 +576,7 @@ namespace boost { private: // Parameters - shared_ptr<uniform_01<RandomGenerator> > gen; + std::shared_ptr<uniform_01<RandomGenerator> > gen; bool bidirectional; // Internal data structures diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/topology.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/topology.hpp index ada36d19..8e64d090 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/topology.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/topology.hpp @@ -29,10 +29,10 @@ namespace boost { * Topologies * ***********************************************************/ template<std::size_t Dims> -class convex_topology +class convex_topology { public: // For VisualAge C++ - struct point + struct point { BOOST_STATIC_CONSTANT(std::size_t, dimensions = Dims); point() { } @@ -129,7 +129,7 @@ class convex_topology typedef point point_type; typedef point_difference point_difference_type; - double distance(point a, point b) const + double distance(point a, point b) const { double dist = 0.; for (std::size_t i = 0; i < Dims; ++i) { @@ -142,7 +142,7 @@ class convex_topology return dist; } - point move_position_toward(point a, double fraction, point b) const + point move_position_toward(point a, double fraction, point b) const { point result; for (std::size_t i = 0; i < Dims; ++i) @@ -206,15 +206,15 @@ class hypercube_topology : public convex_topology<Dims> typedef typename convex_topology<Dims>::point_type point_type; typedef typename convex_topology<Dims>::point_difference_type point_difference_type; - explicit hypercube_topology(double scaling = 1.0) - : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), - scaling(scaling) + explicit hypercube_topology(double scaling = 1.0) + : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), + scaling(scaling) { } - hypercube_topology(RandomNumberGenerator& gen, double scaling = 1.0) + hypercube_topology(RandomNumberGenerator& gen, double scaling = 1.0) : gen_ptr(), rand(new rand_t(gen)), scaling(scaling) { } - - point_type random_point() const + + point_type random_point() const { point_type p; for (std::size_t i = 0; i < Dims; ++i) @@ -268,8 +268,8 @@ class hypercube_topology : public convex_topology<Dims> } private: - shared_ptr<RandomNumberGenerator> gen_ptr; - shared_ptr<rand_t> rand; + std::shared_ptr<RandomNumberGenerator> gen_ptr; + std::shared_ptr<rand_t> rand; double scaling; }; @@ -280,8 +280,8 @@ class square_topology : public hypercube_topology<2, RandomNumberGenerator> public: explicit square_topology(double scaling = 1.0) : inherited(scaling) { } - - square_topology(RandomNumberGenerator& gen, double scaling = 1.0) + + square_topology(RandomNumberGenerator& gen, double scaling = 1.0) : inherited(gen, scaling) { } }; @@ -308,7 +308,7 @@ class rectangle_topology : public convex_topology<2> typedef typename convex_topology<2>::point_type point_type; typedef typename convex_topology<2>::point_difference_type point_difference_type; - point_type random_point() const + point_type random_point() const { point_type p; p[0] = (*rand)() * (right - left) + left; @@ -362,8 +362,8 @@ class rectangle_topology : public convex_topology<2> } private: - shared_ptr<RandomNumberGenerator> gen_ptr; - shared_ptr<rand_t> rand; + std::shared_ptr<RandomNumberGenerator> gen_ptr; + std::shared_ptr<rand_t> rand; double left, top, right, bottom; }; @@ -374,8 +374,8 @@ class cube_topology : public hypercube_topology<3, RandomNumberGenerator> public: explicit cube_topology(double scaling = 1.0) : inherited(scaling) { } - - cube_topology(RandomNumberGenerator& gen, double scaling = 1.0) + + cube_topology(RandomNumberGenerator& gen, double scaling = 1.0) : inherited(gen, scaling) { } }; @@ -389,15 +389,15 @@ class ball_topology : public convex_topology<Dims> typedef typename convex_topology<Dims>::point_type point_type; typedef typename convex_topology<Dims>::point_difference_type point_difference_type; - explicit ball_topology(double radius = 1.0) - : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), - radius(radius) + explicit ball_topology(double radius = 1.0) + : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), + radius(radius) { } - ball_topology(RandomNumberGenerator& gen, double radius = 1.0) + ball_topology(RandomNumberGenerator& gen, double radius = 1.0) : gen_ptr(), rand(new rand_t(gen)), radius(radius) { } - - point_type random_point() const + + point_type random_point() const { point_type p; double dist_sum; @@ -457,8 +457,8 @@ class ball_topology : public convex_topology<Dims> } private: - shared_ptr<RandomNumberGenerator> gen_ptr; - shared_ptr<rand_t> rand; + std::shared_ptr<RandomNumberGenerator> gen_ptr; + std::shared_ptr<rand_t> rand; double radius; }; @@ -469,8 +469,8 @@ class circle_topology : public ball_topology<2, RandomNumberGenerator> public: explicit circle_topology(double radius = 1.0) : inherited(radius) { } - - circle_topology(RandomNumberGenerator& gen, double radius = 1.0) + + circle_topology(RandomNumberGenerator& gen, double radius = 1.0) : inherited(gen, radius) { } }; @@ -481,13 +481,13 @@ class sphere_topology : public ball_topology<3, RandomNumberGenerator> public: explicit sphere_topology(double radius = 1.0) : inherited(radius) { } - - sphere_topology(RandomNumberGenerator& gen, double radius = 1.0) + + sphere_topology(RandomNumberGenerator& gen, double radius = 1.0) : inherited(gen, radius) { } }; template<typename RandomNumberGenerator = minstd_rand> -class heart_topology +class heart_topology { // Heart is defined as the union of three shapes: // Square w/ corners (+-1000, -1000), (0, 0), (0, -2000) @@ -495,7 +495,7 @@ class heart_topology // Circle centered at (500, -500) radius 500*sqrt(2) // Bounding box (-1000, -2000) - (1000, 500*(sqrt(2) - 1)) - struct point + struct point { point() { values[0] = 0.0; values[1] = 0.0; } point(double x, double y) { values[0] = x; values[1] = y; } @@ -507,7 +507,7 @@ class heart_topology double values[2]; }; - bool in_heart(point p) const + bool in_heart(point p) const { #ifndef BOOST_NO_STDC_NAMESPACE using std::abs; @@ -522,7 +522,7 @@ class heart_topology return false; } - bool segment_within_heart(point p1, point p2) const + bool segment_within_heart(point p1, point p2) const { // Assumes that p1 and p2 are within the heart if ((p1[0] < 0) == (p2[0] < 0)) return true; // Same side of symmetry line @@ -538,13 +538,13 @@ class heart_topology public: typedef point point_type; - heart_topology() + heart_topology() : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)) { } - heart_topology(RandomNumberGenerator& gen) + heart_topology(RandomNumberGenerator& gen) : gen_ptr(), rand(new rand_t(gen)) { } - point random_point() const + point random_point() const { point result; do { @@ -556,7 +556,7 @@ class heart_topology // Not going to provide clipping to bounding region or distance from boundary - double distance(point a, point b) const + double distance(point a, point b) const { if (segment_within_heart(a, b)) { // Straight line @@ -567,7 +567,7 @@ class heart_topology } } - point move_position_toward(point a, double fraction, point b) const + point move_position_toward(point a, double fraction, point b) const { if (segment_within_heart(a, b)) { // Straight line @@ -576,10 +576,10 @@ class heart_topology } else { double distance_to_point_a = boost::math::hypot(a[0], a[1]); double distance_to_point_b = boost::math::hypot(b[0], b[1]); - double location_of_point = distance_to_point_a / + double location_of_point = distance_to_point_a / (distance_to_point_a + distance_to_point_b); if (fraction < location_of_point) - return point(a[0] * (1 - fraction / location_of_point), + return point(a[0] * (1 - fraction / location_of_point), a[1] * (1 - fraction / location_of_point)); else return point( @@ -589,8 +589,8 @@ class heart_topology } private: - shared_ptr<RandomNumberGenerator> gen_ptr; - shared_ptr<rand_t> rand; + std::shared_ptr<RandomNumberGenerator> gen_ptr; + std::shared_ptr<rand_t> rand; }; } // namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/interprocess_fwd.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/interprocess_fwd.hpp index 42f170a6..0309d6b6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/interprocess_fwd.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/interprocess_fwd.hpp @@ -393,7 +393,7 @@ template<class T, class VoidPointer> class intrusive_ptr; template<class T, class VoidAllocator, class Deleter> -class shared_ptr; +class std::shared_ptr; template<class T, class VoidAllocator, class Deleter> class weak_ptr; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/enable_shared_from_this.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/enable_shared_from_this.hpp index d9f16aec..98c48c5d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/enable_shared_from_this.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/enable_shared_from_this.hpp @@ -19,7 +19,7 @@ #include <boost/assert.hpp> #include <boost/interprocess/smart_ptr/weak_ptr.hpp> -#include <boost/interprocess/smart_ptr/shared_ptr.hpp> +#include <boost/interprocess/smart_ptr/std::shared_ptr.hpp> //!\file //!Describes an utility to form a shared pointer from this @@ -27,10 +27,10 @@ namespace boost{ namespace interprocess{ -//!This class is used as a base class that allows a shared_ptr to the current +//!This class is used as a base class that allows a std::shared_ptr to the current //!object to be obtained from within a member function. //!enable_shared_from_this defines two member functions called shared_from_this -//!that return a shared_ptr<T> and shared_ptr<T const>, depending on constness, to this. +//!that return a std::shared_ptr<T> and std::shared_ptr<T const>, depending on constness, to this. template<class T, class A, class D> class enable_shared_from_this { @@ -50,16 +50,16 @@ class enable_shared_from_this /// @endcond public: - shared_ptr<T, A, D> shared_from_this() + std::shared_ptr<T, A, D> shared_from_this() { - shared_ptr<T, A, D> p(_internal_weak_this); + std::shared_ptr<T, A, D> p(_internal_weak_this); BOOST_ASSERT(ipcdetail::to_raw_pointer(p.get()) == this); return p; } - shared_ptr<T const, A, D> shared_from_this() const + std::shared_ptr<T const, A, D> shared_from_this() const { - shared_ptr<T const, A, D> p(_internal_weak_this); + std::shared_ptr<T const, A, D> p(_internal_weak_this); BOOST_ASSERT(ipcdetail::to_raw_pointer(p.get()) == this); return p; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp index 302eb149..29844a97 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// This file is the adaptation for Interprocess of boost/shared_ptr.hpp +// This file is the adaptation for Interprocess of boost/std::shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // (C) Copyright Peter Dimov 2001, 2002, 2003 @@ -37,7 +37,7 @@ #include <iosfwd> // for std::basic_ostream //!\file -//!Describes the smart pointer shared_ptr +//!Describes the smart pointer std::shared_ptr namespace boost{ namespace interprocess{ @@ -66,11 +66,11 @@ inline void sp_enable_shared_from_this(shared_count<T, VoidAllocator, Deleter> c } // namespace ipcdetail -//!shared_ptr stores a pointer to a dynamically allocated object. -//!The object pointed to is guaranteed to be deleted when the last shared_ptr pointing to +//!std::shared_ptr stores a pointer to a dynamically allocated object. +//!The object pointed to is guaranteed to be deleted when the last std::shared_ptr pointing to //!it is destroyed or reset. //! -//!shared_ptr is parameterized on +//!std::shared_ptr is parameterized on //!T (the type of the object pointed to), VoidAllocator (the void allocator to be used //!to allocate the auxiliary data) and Deleter (the deleter whose //!operator() will be used to delete the object. @@ -79,18 +79,18 @@ inline void sp_enable_shared_from_this(shared_count<T, VoidAllocator, Deleter> c //!VoidAllocator::pointer type (that is, if typename VoidAllocator::pointer is //!offset_ptr<void>, the internal pointer will be offset_ptr<T>). //! -//!Because the implementation uses reference counting, cycles of shared_ptr +//!Because the implementation uses reference counting, cycles of std::shared_ptr //!instances will not be reclaimed. For example, if main() holds a -//!shared_ptr to A, which directly or indirectly holds a shared_ptr back -//!to A, A's use count will be 2. Destruction of the original shared_ptr +//!std::shared_ptr to A, which directly or indirectly holds a std::shared_ptr back +//!to A, A's use count will be 2. Destruction of the original std::shared_ptr //!will leave A dangling with a use count of 1. //!Use weak_ptr to "break cycles." template<class T, class VoidAllocator, class Deleter> -class shared_ptr +class std::shared_ptr { /// @cond private: - typedef shared_ptr<T, VoidAllocator, Deleter> this_type; + typedef std::shared_ptr<T, VoidAllocator, Deleter> this_type; /// @endcond public: @@ -111,19 +111,19 @@ class shared_ptr pointer_traits<typename VoidAllocator::pointer>::template rebind_pointer<const VoidAllocator>::type const_allocator_pointer; - BOOST_COPYABLE_AND_MOVABLE(shared_ptr) + BOOST_COPYABLE_AND_MOVABLE(std::shared_ptr) public: - //!Constructs an empty shared_ptr. + //!Constructs an empty std::shared_ptr. //!Use_count() == 0 && get()== 0. - shared_ptr() + std::shared_ptr() : m_pn() // never throws {} - //!Constructs a shared_ptr that owns the pointer p. Auxiliary data will be allocated + //!Constructs a std::shared_ptr that owns the pointer p. Auxiliary data will be allocated //!with a copy of a and the object will be deleted with a copy of d. //!Requirements: Deleter and A's copy constructor must not throw. - explicit shared_ptr(const pointer&p, const VoidAllocator &a = VoidAllocator(), const Deleter &d = Deleter()) + explicit std::shared_ptr(const pointer&p, const VoidAllocator &a = VoidAllocator(), const Deleter &d = Deleter()) : m_pn(p, a, d) { //Check that the pointer passed is of the same type that @@ -137,55 +137,55 @@ class shared_ptr ipcdetail::sp_enable_shared_from_this<T, VoidAllocator, Deleter>( m_pn, ipcdetail::to_raw_pointer(p), ipcdetail::to_raw_pointer(p) ); } - //!Copy constructs a shared_ptr. If r is empty, constructs an empty shared_ptr. Otherwise, constructs - //!a shared_ptr that shares ownership with r. Never throws. - shared_ptr(const shared_ptr &r) + //!Copy constructs a std::shared_ptr. If r is empty, constructs an empty std::shared_ptr. Otherwise, constructs + //!a std::shared_ptr that shares ownership with r. Never throws. + std::shared_ptr(const std::shared_ptr &r) : m_pn(r.m_pn) // never throws {} - //!Constructs a shared_ptr that shares ownership with other and stores p. + //!Constructs a std::shared_ptr that shares ownership with other and stores p. //!Postconditions: get() == p && use_count() == r.use_count(). //!Throws: nothing. - shared_ptr(const shared_ptr &other, const pointer &p) + std::shared_ptr(const std::shared_ptr &other, const pointer &p) : m_pn(other.m_pn, p) {} - //!If r is empty, constructs an empty shared_ptr. Otherwise, constructs - //!a shared_ptr that shares ownership with r. Never throws. + //!If r is empty, constructs an empty std::shared_ptr. Otherwise, constructs + //!a std::shared_ptr that shares ownership with r. Never throws. template<class Y> - shared_ptr(shared_ptr<Y, VoidAllocator, Deleter> const & r) + std::shared_ptr(std::shared_ptr<Y, VoidAllocator, Deleter> const & r) : m_pn(r.m_pn) // never throws {} - //!Constructs a shared_ptr that shares ownership with r and stores + //!Constructs a std::shared_ptr that shares ownership with r and stores //!a copy of the pointer stored in r. template<class Y> - explicit shared_ptr(weak_ptr<Y, VoidAllocator, Deleter> const & r) + explicit std::shared_ptr(weak_ptr<Y, VoidAllocator, Deleter> const & r) : m_pn(r.m_pn) // may throw {} - //!Move-Constructs a shared_ptr that takes ownership of other resource and + //!Move-Constructs a std::shared_ptr that takes ownership of other resource and //!other is put in default-constructed state. //!Throws: nothing. - explicit shared_ptr(BOOST_RV_REF(shared_ptr) other) + explicit std::shared_ptr(BOOST_RV_REF(std::shared_ptr) other) : m_pn() { this->swap(other); } /// @cond template<class Y> - shared_ptr(shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::static_cast_tag) + std::shared_ptr(std::shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::static_cast_tag) : m_pn( pointer(static_cast<T*>(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer()))) , r.m_pn) {} template<class Y> - shared_ptr(shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::const_cast_tag) + std::shared_ptr(std::shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::const_cast_tag) : m_pn( pointer(const_cast<T*>(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer()))) , r.m_pn) {} template<class Y> - shared_ptr(shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::dynamic_cast_tag) + std::shared_ptr(std::shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::dynamic_cast_tag) : m_pn( pointer(dynamic_cast<T*>(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer()))) , r.m_pn) { @@ -195,26 +195,26 @@ class shared_ptr } /// @endcond - //!Equivalent to shared_ptr(r).swap(*this). + //!Equivalent to std::shared_ptr(r).swap(*this). //!Never throws template<class Y> - shared_ptr & operator=(shared_ptr<Y, VoidAllocator, Deleter> const & r) + std::shared_ptr & operator=(std::shared_ptr<Y, VoidAllocator, Deleter> const & r) { m_pn = r.m_pn; // shared_count::op= doesn't throw return *this; } - //!Equivalent to shared_ptr(r).swap(*this). + //!Equivalent to std::shared_ptr(r).swap(*this). //!Never throws - shared_ptr & operator=(BOOST_COPY_ASSIGN_REF(shared_ptr) r) + std::shared_ptr & operator=(BOOST_COPY_ASSIGN_REF(std::shared_ptr) r) { m_pn = r.m_pn; // shared_count::op= doesn't throw return *this; } - //!Move-assignment. Equivalent to shared_ptr(other).swap(*this). + //!Move-assignment. Equivalent to std::shared_ptr(other).swap(*this). //!Never throws - shared_ptr & operator=(BOOST_RV_REF(shared_ptr) other) // never throws + std::shared_ptr & operator=(BOOST_RV_REF(std::shared_ptr) other) // never throws { this_type(other).swap(*this); return *this; @@ -243,7 +243,7 @@ class shared_ptr } template<class Y> - void reset(shared_ptr<Y, VoidAllocator, Deleter> const & r, const pointer &p) + void reset(std::shared_ptr<Y, VoidAllocator, Deleter> const & r, const pointer &p) { this_type(r, p).swap(*this); } @@ -282,7 +282,7 @@ class shared_ptr bool unique() const // never throws { return m_pn.unique(); } - //!Returns the number of shared_ptr objects, *this included, + //!Returns the number of std::shared_ptr objects, *this included, //!that share ownership with *this, or an unspecified nonnegative //!value when *this is empty. //!use_count() is not necessarily efficient. Use only for @@ -292,13 +292,13 @@ class shared_ptr //!Exchanges the contents of the two //!smart pointers. - void swap(shared_ptr<T, VoidAllocator, Deleter> & other) // never throws + void swap(std::shared_ptr<T, VoidAllocator, Deleter> & other) // never throws { m_pn.swap(other.m_pn); } /// @cond template<class T2, class A2, class Deleter2> - bool _internal_less(shared_ptr<T2, A2, Deleter2> const & rhs) const + bool _internal_less(std::shared_ptr<T2, A2, Deleter2> const & rhs) const { return m_pn < rhs.m_pn; } const_deleter_pointer get_deleter() const @@ -309,50 +309,50 @@ class shared_ptr private: - template<class T2, class A2, class Deleter2> friend class shared_ptr; + template<class T2, class A2, class Deleter2> friend class std::shared_ptr; template<class T2, class A2, class Deleter2> friend class weak_ptr; ipcdetail::shared_count<T, VoidAllocator, Deleter> m_pn; // reference counter /// @endcond -}; // shared_ptr +}; // std::shared_ptr template<class T, class VoidAllocator, class Deleter, class U, class VoidAllocator2, class Deleter2> inline -bool operator==(shared_ptr<T, VoidAllocator, Deleter> const & a, shared_ptr<U, VoidAllocator2, Deleter2> const & b) +bool operator==(std::shared_ptr<T, VoidAllocator, Deleter> const & a, std::shared_ptr<U, VoidAllocator2, Deleter2> const & b) { return a.get() == b.get(); } template<class T, class VoidAllocator, class Deleter, class U, class VoidAllocator2, class Deleter2> inline -bool operator!=(shared_ptr<T, VoidAllocator, Deleter> const & a, shared_ptr<U, VoidAllocator2, Deleter2> const & b) +bool operator!=(std::shared_ptr<T, VoidAllocator, Deleter> const & a, std::shared_ptr<U, VoidAllocator2, Deleter2> const & b) { return a.get() != b.get(); } template<class T, class VoidAllocator, class Deleter, class U, class VoidAllocator2, class Deleter2> inline -bool operator<(shared_ptr<T, VoidAllocator, Deleter> const & a, shared_ptr<U, VoidAllocator2, Deleter2> const & b) +bool operator<(std::shared_ptr<T, VoidAllocator, Deleter> const & a, std::shared_ptr<U, VoidAllocator2, Deleter2> const & b) { return a._internal_less(b); } template<class T, class VoidAllocator, class Deleter> inline -void swap(shared_ptr<T, VoidAllocator, Deleter> & a, shared_ptr<T, VoidAllocator, Deleter> & b) +void swap(std::shared_ptr<T, VoidAllocator, Deleter> & a, std::shared_ptr<T, VoidAllocator, Deleter> & b) { a.swap(b); } template<class T, class VoidAllocator, class Deleter, class U> inline -shared_ptr<T, VoidAllocator, Deleter> static_pointer_cast(shared_ptr<U, VoidAllocator, Deleter> const & r) -{ return shared_ptr<T, VoidAllocator, Deleter>(r, ipcdetail::static_cast_tag()); } +std::shared_ptr<T, VoidAllocator, Deleter> static_pointer_cast(std::shared_ptr<U, VoidAllocator, Deleter> const & r) +{ return std::shared_ptr<T, VoidAllocator, Deleter>(r, ipcdetail::static_cast_tag()); } template<class T, class VoidAllocator, class Deleter, class U> inline -shared_ptr<T, VoidAllocator, Deleter> const_pointer_cast(shared_ptr<U, VoidAllocator, Deleter> const & r) -{ return shared_ptr<T, VoidAllocator, Deleter>(r, ipcdetail::const_cast_tag()); } +std::shared_ptr<T, VoidAllocator, Deleter> const_pointer_cast(std::shared_ptr<U, VoidAllocator, Deleter> const & r) +{ return std::shared_ptr<T, VoidAllocator, Deleter>(r, ipcdetail::const_cast_tag()); } template<class T, class VoidAllocator, class Deleter, class U> inline -shared_ptr<T, VoidAllocator, Deleter> dynamic_pointer_cast(shared_ptr<U, VoidAllocator, Deleter> const & r) -{ return shared_ptr<T, VoidAllocator, Deleter>(r, ipcdetail::dynamic_cast_tag()); } +std::shared_ptr<T, VoidAllocator, Deleter> dynamic_pointer_cast(std::shared_ptr<U, VoidAllocator, Deleter> const & r) +{ return std::shared_ptr<T, VoidAllocator, Deleter>(r, ipcdetail::dynamic_cast_tag()); } -// to_raw_pointer() enables boost::mem_fn to recognize shared_ptr +// to_raw_pointer() enables boost::mem_fn to recognize std::shared_ptr template<class T, class VoidAllocator, class Deleter> inline -T * to_raw_pointer(shared_ptr<T, VoidAllocator, Deleter> const & p) +T * to_raw_pointer(std::shared_ptr<T, VoidAllocator, Deleter> const & p) { return p.get(); } // operator<< template<class E, class T, class Y, class VoidAllocator, class Deleter> inline std::basic_ostream<E, T> & operator<< - (std::basic_ostream<E, T> & os, shared_ptr<Y, VoidAllocator, Deleter> const & p) + (std::basic_ostream<E, T> & os, std::shared_ptr<Y, VoidAllocator, Deleter> const & p) { os << p.get(); return os; } //!Returns the type of a shared pointer @@ -364,7 +364,7 @@ struct managed_shared_ptr { typedef typename ManagedMemory::template allocator<void>::type void_allocator; typedef typename ManagedMemory::template deleter<T>::type deleter; - typedef shared_ptr< T, void_allocator, deleter> type; + typedef std::shared_ptr< T, void_allocator, deleter> type; }; //!Returns an instance of a shared pointer constructed @@ -407,9 +407,9 @@ inline typename managed_shared_ptr<T, ManagedMemory>::type /// @cond #if defined(_MSC_VER) && (_MSC_VER < 1400) -// to_raw_pointer() enables boost::mem_fn to recognize shared_ptr +// to_raw_pointer() enables boost::mem_fn to recognize std::shared_ptr template<class T, class VoidAllocator, class Deleter> inline -T * to_raw_pointer(boost::interprocess::shared_ptr<T, VoidAllocator, Deleter> const & p) +T * to_raw_pointer(boost::interprocess::std::shared_ptr<T, VoidAllocator, Deleter> const & p) { return p.get(); } #endif diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/weak_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/weak_ptr.hpp index 99c8a631..6b91cf87 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/weak_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/weak_ptr.hpp @@ -18,7 +18,7 @@ #include <boost/interprocess/detail/config_begin.hpp> #include <boost/interprocess/detail/workaround.hpp> -#include <boost/interprocess/smart_ptr/shared_ptr.hpp> +#include <boost/interprocess/smart_ptr/std::shared_ptr.hpp> #include <boost/detail/no_exceptions_support.hpp> #include <boost/interprocess/allocators/allocator.hpp> #include <boost/interprocess/smart_ptr/deleter.hpp> @@ -31,13 +31,13 @@ namespace boost{ namespace interprocess{ //!The weak_ptr class template stores a "weak reference" to an object -//!that's already managed by a shared_ptr. To access the object, a weak_ptr -//!can be converted to a shared_ptr using the shared_ptr constructor or the -//!member function lock. When the last shared_ptr to the object goes away -//!and the object is deleted, the attempt to obtain a shared_ptr from the +//!that's already managed by a std::shared_ptr. To access the object, a weak_ptr +//!can be converted to a std::shared_ptr using the std::shared_ptr constructor or the +//!member function lock. When the last std::shared_ptr to the object goes away +//!and the object is deleted, the attempt to obtain a std::shared_ptr from the //!weak_ptr instances that refer to the deleted object will fail: the constructor //!will throw an exception of type bad_weak_ptr, and weak_ptr::lock will -//!return an empty shared_ptr. +//!return an empty std::shared_ptr. //! //!Every weak_ptr meets the CopyConstructible and Assignable requirements //!of the C++ Standard Library, and so can be used in standard library containers. @@ -100,9 +100,9 @@ class weak_ptr weak_ptr(weak_ptr<Y, A, D> const & r) : m_pn(r.m_pn) // never throws { - //Construct a temporary shared_ptr so that nobody + //Construct a temporary std::shared_ptr so that nobody //can destroy the value while constructing this - const shared_ptr<T, A, D> &ref = r.lock(); + const std::shared_ptr<T, A, D> &ref = r.lock(); m_pn.set_pointer(ref.get()); } @@ -114,7 +114,7 @@ class weak_ptr //! //!Throws: nothing. template<class Y> - weak_ptr(shared_ptr<Y, A, D> const & r) + weak_ptr(std::shared_ptr<Y, A, D> const & r) : m_pn(r.m_pn) // never throws {} @@ -127,9 +127,9 @@ class weak_ptr template<class Y> weak_ptr & operator=(weak_ptr<Y, A, D> const & r) // never throws { - //Construct a temporary shared_ptr so that nobody + //Construct a temporary std::shared_ptr so that nobody //can destroy the value while constructing this - const shared_ptr<T, A, D> &ref = r.lock(); + const std::shared_ptr<T, A, D> &ref = r.lock(); m_pn = r.m_pn; m_pn.set_pointer(ref.get()); return *this; @@ -142,30 +142,30 @@ class weak_ptr //!Notes: The implementation is free to meet the effects (and the //!implied guarantees) via different means, without creating a temporary. template<class Y> - weak_ptr & operator=(shared_ptr<Y, A, D> const & r) // never throws + weak_ptr & operator=(std::shared_ptr<Y, A, D> const & r) // never throws { m_pn = r.m_pn; return *this; } - //!Returns: expired()? shared_ptr<T>(): shared_ptr<T>(*this). + //!Returns: expired()? std::shared_ptr<T>(): std::shared_ptr<T>(*this). //! //!Throws: nothing. - shared_ptr<T, A, D> lock() const // never throws + std::shared_ptr<T, A, D> lock() const // never throws { // optimization: avoid throw overhead if(expired()){ - return shared_ptr<element_type, A, D>(); + return std::shared_ptr<element_type, A, D>(); } BOOST_TRY{ - return shared_ptr<element_type, A, D>(*this); + return std::shared_ptr<element_type, A, D>(*this); } BOOST_CATCH(bad_weak_ptr const &){ // Q: how can we get here? // A: another thread may have invalidated r after the use_count test above. - return shared_ptr<element_type, A, D>(); + return std::shared_ptr<element_type, A, D>(); } BOOST_CATCH_END } - //!Returns: 0 if *this is empty; otherwise, the number of shared_ptr objects + //!Returns: 0 if *this is empty; otherwise, the number of std::shared_ptr objects //!that share ownership with *this. //! //!Throws: nothing. @@ -209,7 +209,7 @@ class weak_ptr private: - template<class T2, class A2, class D2> friend class shared_ptr; + template<class T2, class A2, class D2> friend class std::shared_ptr; template<class T2, class A2, class D2> friend class weak_ptr; ipcdetail::weak_count<T, A, D> m_pn; // reference counter diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/chain.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/chain.hpp index 4af8cc98..4b046508 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/chain.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/chain.hpp @@ -22,7 +22,7 @@ #include <stdexcept> // logic_error, out_of_range. #include <boost/checked_delete.hpp> #include <boost/config.hpp> // BOOST_MSVC, template friends, -#include <boost/detail/workaround.hpp> // BOOST_NESTED_TEMPLATE +#include <boost/detail/workaround.hpp> // BOOST_NESTED_TEMPLATE #include <boost/iostreams/constants.hpp> #include <boost/iostreams/detail/access_control.hpp> #include <boost/iostreams/detail/char_traits.hpp> @@ -34,7 +34,7 @@ #include <boost/iostreams/traits.hpp> // is_filter. #include <boost/iostreams/stream_buffer.hpp> #include <boost/next_prior.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/static_assert.hpp> #include <boost/throw_exception.hpp> #include <boost/type_traits/is_convertible.hpp> @@ -141,7 +141,7 @@ protected: chain_base(const chain_base& rhs): pimpl_(rhs.pimpl_) { } public: - // dual_use is a pseudo-mode to facilitate filter writing, + // dual_use is a pseudo-mode to facilitate filter writing, // not a genuine mode. BOOST_STATIC_ASSERT((!is_convertible<mode, dual_use>::value)); @@ -150,19 +150,19 @@ public: // Sets the size of the buffer created for the devices to be added to this // chain. Does not affect the size of the buffer for devices already // added. - void set_device_buffer_size(std::streamsize n) + void set_device_buffer_size(std::streamsize n) { pimpl_->device_buffer_size_ = n; } // Sets the size of the buffer created for the filters to be added // to this chain. Does not affect the size of the buffer for filters already // added. - void set_filter_buffer_size(std::streamsize n) + void set_filter_buffer_size(std::streamsize n) { pimpl_->filter_buffer_size_ = n; } // Sets the size of the putback buffer for filters and devices to be added // to this chain. Does not affect the size of the buffer for filters or // devices already added. - void set_pback_size(std::streamsize n) + void set_pback_size(std::streamsize n) { pimpl_->pback_size_ = n; } //----------Device interface----------------------------------------------// @@ -189,7 +189,7 @@ public: T* component(int n) const { return component(n, boost::type<T>()); } // Deprecated. - template<int N, typename T> + template<int N, typename T> T* component() const { return component<T>(N); } #endif @@ -230,7 +230,7 @@ public: bool strict_sync(); private: template<typename T> - void push_impl(const T& t, std::streamsize buffer_size = -1, + void push_impl(const T& t, std::streamsize buffer_size = -1, std::streamsize pback_size = -1) { typedef typename iostreams::category_of<T>::type category; @@ -331,20 +331,20 @@ private: links_.front()->BOOST_IOSTREAMS_PUBSYNC(); try { boost::iostreams::detail::execute_foreach( - links_.rbegin(), links_.rend(), + links_.rbegin(), links_.rend(), closer(BOOST_IOS::in) ); } catch (...) { try { boost::iostreams::detail::execute_foreach( - links_.begin(), links_.end(), + links_.begin(), links_.end(), closer(BOOST_IOS::out) ); } catch (...) { } throw; } boost::iostreams::detail::execute_foreach( - links_.begin(), links_.end(), + links_.begin(), links_.end(), closer(BOOST_IOS::out) ); } @@ -382,7 +382,7 @@ private: //----------Member data---------------------------------------------------// private: - shared_ptr<chain_impl> pimpl_; + std::shared_ptr<chain_impl> pimpl_; }; } // End namespace detail. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/code_converter.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/code_converter.hpp index 280a5d09..8ff85a18 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/code_converter.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/code_converter.hpp @@ -24,7 +24,7 @@ #include <algorithm> // max. #include <cstring> // memcpy. #include <exception> -#include <boost/config.hpp> // DEDUCED_TYPENAME, +#include <boost/config.hpp> // DEDUCED_TYPENAME, #include <boost/iostreams/char_traits.hpp> #include <boost/iostreams/constants.hpp> // default_filter_buffer_size. #include <boost/iostreams/detail/adapter/concept_adapter.hpp> @@ -42,7 +42,7 @@ #include <boost/iostreams/detail/select.hpp> #include <boost/iostreams/traits.hpp> #include <boost/iostreams/operations.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/static_assert.hpp> #include <boost/throw_exception.hpp> #include <boost/type_traits/is_convertible.hpp> @@ -54,7 +54,7 @@ namespace boost { namespace iostreams { struct code_conversion_error : BOOST_IOSTREAMS_FAILURE { - code_conversion_error() + code_conversion_error() : BOOST_IOSTREAMS_FAILURE("code conversion error") { } }; @@ -91,28 +91,28 @@ Tgt* strncpy_if_same(Tgt* tgt, const Src* src, std::streamsize n) // Buffer and conversion state for reading. template<typename Codecvt, typename Alloc> -class conversion_buffer +class conversion_buffer : public buffer< BOOST_DEDUCED_TYPENAME detail::codecvt_extern<Codecvt>::type, Alloc - > + > { public: typedef typename Codecvt::state_type state_type; - conversion_buffer() + conversion_buffer() : buffer< BOOST_DEDUCED_TYPENAME detail::codecvt_extern<Codecvt>::type, Alloc - >(0) - { - reset(); + >(0) + { + reset(); } state_type& state() { return state_; } - void reset() - { - if (this->size()) + void reset() + { + if (this->size()) this->set(0, 0); - state_ = state_type(); + state_ = state_type(); } private: state_type state_; @@ -128,12 +128,12 @@ struct code_converter_impl { typedef is_convertible<device_category, input> can_read; typedef is_convertible<device_category, output> can_write; typedef is_convertible<device_category, bidirectional> is_bidir; - typedef typename + typedef typename iostreams::select< // Disambiguation for Tru64. is_bidir, bidirectional, can_read, input, can_write, output - >::type mode; + >::type mode; typedef typename mpl::if_< is_direct<Device>, @@ -147,10 +147,10 @@ struct code_converter_impl { code_converter_impl() : cvt_(), flags_(0) { } ~code_converter_impl() - { - try { - if (flags_ & f_open) close(); - } catch (...) { /* */ } + { + try { + if (flags_ & f_open) close(); + } catch (...) { /* */ } } template <class T> @@ -213,7 +213,7 @@ struct code_converter_impl { codecvt_holder<Codecvt> cvt_; storage_type dev_; double_object< - buffer_type, + buffer_type, is_double > buf_; int flags_; @@ -232,13 +232,13 @@ struct code_converter_base { Device, Codecvt, Alloc > impl_type; code_converter_base() : pimpl_(new impl_type) { } - shared_ptr<impl_type> pimpl_; + std::shared_ptr<impl_type> pimpl_; }; -template< typename Device, - typename Codecvt = detail::default_codecvt, +template< typename Device, + typename Codecvt = detail::default_codecvt, typename Alloc = std::allocator<char> > -class code_converter +class code_converter : protected code_converter_base<Device, Codecvt, Alloc> { private: @@ -252,28 +252,28 @@ private: typedef typename detail::codecvt_extern<Codecvt>::type extern_type; typedef typename detail::codecvt_state<Codecvt>::type state_type; public: - typedef intern_type char_type; - struct category + typedef intern_type char_type; + struct category : impl_type::mode, device_tag, closable_tag, localizable_tag { }; BOOST_STATIC_ASSERT(( is_same< - extern_type, + extern_type, BOOST_DEDUCED_TYPENAME char_type_of<Device>::type >::value )); public: code_converter() { } #if BOOST_WORKAROUND(__GNUC__, < 3) - code_converter(code_converter& rhs) + code_converter(code_converter& rhs) : code_converter_base<Device, Codecvt, Alloc>(rhs) { } - code_converter(const code_converter& rhs) + code_converter(const code_converter& rhs) : code_converter_base<Device, Codecvt, Alloc>(rhs) { } #endif BOOST_IOSTREAMS_FORWARD( code_converter, open_impl, Device, - BOOST_IOSTREAMS_CONVERTER_PARAMS, + BOOST_IOSTREAMS_CONVERTER_PARAMS, BOOST_IOSTREAMS_CONVERTER_ARGS ) // fstream-like interface. @@ -294,9 +294,9 @@ public: Device* operator->() { return &detail::unwrap_direct(dev()); } private: template<typename T> // Used for forwarding. - void open_impl(const T& t BOOST_IOSTREAMS_CONVERTER_PARAMS()) - { - impl().open(t BOOST_IOSTREAMS_CONVERTER_ARGS()); + void open_impl(const T& t BOOST_IOSTREAMS_CONVERTER_PARAMS()) + { + impl().open(t BOOST_IOSTREAMS_CONVERTER_ARGS()); } const codecvt_type& cvt() { return impl().cvt_.get(); } @@ -347,7 +347,7 @@ std::streamsize code_converter<Device, Codevt, Alloc>::read break; case std::codecvt_base::noconv: { - std::streamsize amt = + std::streamsize amt = std::min<std::streamsize>(next - buf.ptr(), n - total); detail::strncpy_if_same(s + total, buf.ptr(), amt); total += amt; @@ -382,7 +382,7 @@ std::streamsize code_converter<Device, Codevt, Alloc>::write break; partial = false; } - + // Convert. std::codecvt_base::result result = cvt().out( buf.state(), @@ -399,8 +399,8 @@ std::streamsize code_converter<Device, Codevt, Alloc>::write break; case std::codecvt_base::noconv: { - std::streamsize amt = - std::min<std::streamsize>( nint - total - s, + std::streamsize amt = + std::min<std::streamsize>( nint - total - s, buf.end() - buf.eptr() ); detail::strncpy_if_same(buf.eptr(), s + total, amt); total += amt; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file.hpp index f701c9d6..c04b2536 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file.hpp @@ -21,7 +21,7 @@ #include <boost/iostreams/detail/ios.hpp> // openmode, seekdir, int types. #include <boost/iostreams/detail/fstream.hpp> #include <boost/iostreams/operations.hpp> // seek. -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> // Must come last. #include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC. @@ -46,8 +46,8 @@ public: std::streamsize read(char_type* s, std::streamsize n); bool putback(char_type c); std::streamsize write(const char_type* s, std::streamsize n); - std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, - BOOST_IOS::openmode which = + std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out ); void open( const std::string& path, BOOST_IOS::openmode mode = @@ -67,7 +67,7 @@ private: ~impl() { if (file_.is_open()) file_.close(); } BOOST_IOSTREAMS_BASIC_FILEBUF(Ch) file_; }; - shared_ptr<impl> pimpl_; + std::shared_ptr<impl> pimpl_; }; typedef basic_file<char> file; @@ -87,7 +87,7 @@ struct basic_file_source : private basic_file<Ch> { using basic_file<Ch>::is_open; using basic_file<Ch>::close; basic_file_source( const std::string& path, - BOOST_IOS::openmode mode = + BOOST_IOS::openmode mode = BOOST_IOS::in ) : basic_file<Ch>(path, mode & ~BOOST_IOS::out, BOOST_IOS::in) { } @@ -128,29 +128,29 @@ struct basic_file_sink : private basic_file<Ch> { typedef basic_file_sink<char> file_sink; typedef basic_file_sink<wchar_t> wfile_sink; - + //------------------Implementation of basic_file------------------------------// template<typename Ch> basic_file<Ch>::basic_file - ( const std::string& path, BOOST_IOS::openmode mode, + ( const std::string& path, BOOST_IOS::openmode mode, BOOST_IOS::openmode base_mode ) -{ +{ open(path, mode, base_mode); } template<typename Ch> inline std::streamsize basic_file<Ch>::read (char_type* s, std::streamsize n) -{ - std::streamsize result = pimpl_->file_.sgetn(s, n); +{ + std::streamsize result = pimpl_->file_.sgetn(s, n); return result != 0 ? result : -1; } template<typename Ch> inline bool basic_file<Ch>::putback(char_type c) -{ - return !!pimpl_->file_.sputbackc(c); +{ + return !!pimpl_->file_.sputbackc(c); } template<typename Ch> @@ -160,15 +160,15 @@ inline std::streamsize basic_file<Ch>::write template<typename Ch> std::streampos basic_file<Ch>::seek - ( stream_offset off, BOOST_IOS::seekdir way, + ( stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode ) { return iostreams::seek(pimpl_->file_, off, way); } template<typename Ch> void basic_file<Ch>::open - ( const std::string& path, BOOST_IOS::openmode mode, + ( const std::string& path, BOOST_IOS::openmode mode, BOOST_IOS::openmode base_mode ) -{ +{ pimpl_.reset(new impl(path, mode | base_mode)); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file_descriptor.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file_descriptor.hpp index bb470589..1237ea8a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file_descriptor.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file_descriptor.hpp @@ -25,7 +25,7 @@ #include <boost/iostreams/detail/ios.hpp> // openmode, seekdir, int types. #include <boost/iostreams/detail/path.hpp> #include <boost/iostreams/positioning.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> // Must come last. #include <boost/config/abi_prefix.hpp> @@ -86,9 +86,9 @@ public: explicit file_descriptor( const Path& path, BOOST_IOS::openmode mode = BOOST_IOS::in | BOOST_IOS::out ) - { + { init(); - open(detail::path(path), mode); + open(detail::path(path), mode); } // Copy constructor @@ -135,12 +135,12 @@ private: void init(); // open overload taking a detail::path - void open( const detail::path& path, - BOOST_IOS::openmode, + void open( const detail::path& path, + BOOST_IOS::openmode, BOOST_IOS::openmode = BOOST_IOS::openmode(0) ); typedef detail::file_descriptor_impl impl_type; - shared_ptr<impl_type> pimpl_; + std::shared_ptr<impl_type> pimpl_; }; class BOOST_IOSTREAMS_DECL file_descriptor_source : private file_descriptor { @@ -293,16 +293,16 @@ public: #endif // open overload taking a std::string - void open( const std::string& path, + void open( const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::out ); // open overload taking C-style string - void open( const char* path, + void open( const char* path, BOOST_IOS::openmode mode = BOOST_IOS::out ); // open overload taking a Boost.Filesystem path template<typename Path> - void open( const Path& path, + void open( const Path& path, BOOST_IOS::openmode mode = BOOST_IOS::out ) { open(detail::path(path), mode); } private: diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/mapped_file.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/mapped_file.hpp index 8493b177..11c0e2c1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/mapped_file.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/mapped_file.hpp @@ -26,7 +26,7 @@ #include <boost/iostreams/detail/path.hpp> #include <boost/iostreams/operations_fwd.hpp> #include <boost/iostreams/positioning.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/static_assert.hpp> #include <boost/throw_exception.hpp> #include <boost/type_traits/is_same.hpp> @@ -54,25 +54,25 @@ public: }; // Bitmask operations for mapped_file_base::mapmode -mapped_file_base::mapmode +mapped_file_base::mapmode operator|(mapped_file_base::mapmode a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator&(mapped_file_base::mapmode a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator^(mapped_file_base::mapmode a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator~(mapped_file_base::mapmode a); -mapped_file_base::mapmode +mapped_file_base::mapmode operator|=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator&=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator^=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); //------------------Definition of mapped_file_params--------------------------// @@ -81,8 +81,8 @@ namespace detail { struct mapped_file_params_base { mapped_file_params_base() - : flags(static_cast<mapped_file_base::mapmode>(0)), - mode(), offset(0), length(static_cast<std::size_t>(-1)), + : flags(static_cast<mapped_file_base::mapmode>(0)), + mode(), offset(0), length(static_cast<std::size_t>(-1)), new_file_size(0), hint(0) { } private: @@ -102,16 +102,16 @@ public: // This template allows Boost.Filesystem paths to be specified when creating or // reopening a memory mapped file, without creating a dependence on // Boost.Filesystem. Possible values of Path include std::string, -// boost::filesystem::path, boost::filesystem::wpath, +// boost::filesystem::path, boost::filesystem::wpath, // and boost::iostreams::detail::path (used to store either a std::string or a // std::wstring). template<typename Path> -struct basic_mapped_file_params - : detail::mapped_file_params_base +struct basic_mapped_file_params + : detail::mapped_file_params_base { typedef detail::mapped_file_params_base base_type; - // For wide paths, instantiate basic_mapped_file_params + // For wide paths, instantiate basic_mapped_file_params // with boost::filesystem::wpath #ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS BOOST_STATIC_ASSERT((!is_same<Path, std::wstring>::value)); @@ -215,7 +215,7 @@ private: void init(); void open_impl(const param_type& p); - boost::shared_ptr<impl_type> pimpl_; + boost::std::shared_ptr<impl_type> pimpl_; }; //------------------Definition of mapped_file---------------------------------// @@ -253,7 +253,7 @@ public: size_type length = max_length, stream_offset offset = 0 ); - // Constructor taking a list of parameters, including a + // Constructor taking a list of parameters, including a // std::ios_base::openmode (deprecated) template<typename Path> explicit mapped_file( const Path& path, @@ -283,7 +283,7 @@ public: size_type length = max_length, stream_offset offset = 0 ); - // open overload taking a list of parameters, including a + // open overload taking a list of parameters, including a // std::ios_base::openmode (deprecated) template<typename Path> void open( const Path& path, @@ -387,7 +387,7 @@ mapped_file_source::mapped_file_source(const basic_mapped_file_params<Path>& p) { init(); open(p); } template<typename Path> -mapped_file_source::mapped_file_source( +mapped_file_source::mapped_file_source( const Path& path, size_type length, boost::intmax_t offset) { init(); open(path, length, offset); } @@ -423,14 +423,14 @@ mapped_file::mapped_file(const basic_mapped_file_params<Path>& p) { open(p); } template<typename Path> -mapped_file::mapped_file( - const Path& path, mapmode flags, +mapped_file::mapped_file( + const Path& path, mapmode flags, size_type length, stream_offset offset ) { open(path, flags, length, offset); } template<typename Path> -mapped_file::mapped_file( - const Path& path, BOOST_IOS::openmode mode, +mapped_file::mapped_file( + const Path& path, BOOST_IOS::openmode mode, size_type length, stream_offset offset ) { open(path, mode, length, offset); } @@ -439,8 +439,8 @@ void mapped_file::open(const basic_mapped_file_params<Path>& p) { delegate_.open_impl(p); } template<typename Path> -void mapped_file::open( - const Path& path, mapmode flags, +void mapped_file::open( + const Path& path, mapmode flags, size_type length, stream_offset offset ) { param_type p(path); @@ -451,8 +451,8 @@ void mapped_file::open( } template<typename Path> -void mapped_file::open( - const Path& path, BOOST_IOS::openmode mode, +void mapped_file::open( + const Path& path, BOOST_IOS::openmode mode, size_type length, stream_offset offset ) { param_type p(path); @@ -462,7 +462,7 @@ void mapped_file::open( open(p); } -inline char* mapped_file::data() const +inline char* mapped_file::data() const { return (flags() != readonly) ? const_cast<char*>(delegate_.data()) : 0; } //------------------Implementation of mapped_file_sink------------------------// @@ -524,13 +524,13 @@ struct operations<mapped_file> { static std::pair<char*, char*> input_sequence(mapped_file& file) - { - return std::make_pair(file.begin(), file.end()); + { + return std::make_pair(file.begin(), file.end()); } static std::pair<char*, char*> output_sequence(mapped_file& file) - { - return std::make_pair(file.begin(), file.end()); + { + return std::make_pair(file.begin(), file.end()); } }; @@ -540,28 +540,28 @@ struct operations<mapped_file_sink> { static std::pair<char*, char*> output_sequence(mapped_file_sink& sink) - { - return std::make_pair(sink.begin(), sink.end()); + { + return std::make_pair(sink.begin(), sink.end()); } }; - + //------------------Definition of mapmode operators---------------------------// -inline mapped_file::mapmode +inline mapped_file::mapmode operator|(mapped_file::mapmode a, mapped_file::mapmode b) { return static_cast<mapped_file::mapmode> (static_cast<int>(a) | static_cast<int>(b)); } -inline mapped_file::mapmode +inline mapped_file::mapmode operator&(mapped_file::mapmode a, mapped_file::mapmode b) { return static_cast<mapped_file::mapmode> (static_cast<int>(a) & static_cast<int>(b)); } -inline mapped_file::mapmode +inline mapped_file::mapmode operator^(mapped_file::mapmode a, mapped_file::mapmode b) { return static_cast<mapped_file::mapmode> @@ -574,19 +574,19 @@ operator~(mapped_file::mapmode a) return static_cast<mapped_file::mapmode>(~static_cast<int>(a)); } -inline mapped_file::mapmode +inline mapped_file::mapmode operator|=(mapped_file::mapmode& a, mapped_file::mapmode b) { return a = a | b; } -inline mapped_file::mapmode +inline mapped_file::mapmode operator&=(mapped_file::mapmode& a, mapped_file::mapmode b) { return a = a & b; } -inline mapped_file::mapmode +inline mapped_file::mapmode operator^=(mapped_file::mapmode& a, mapped_file::mapmode b) { return a = a ^ b; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/filter/symmetric.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/filter/symmetric.hpp index cc92b0cf..1feff246 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/filter/symmetric.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/filter/symmetric.hpp @@ -20,12 +20,12 @@ // // Consume as many characters as possible from the interval // // [begin_in, end_in), without exhausting the output range // // [begin_out, end_out). If flush is true, write as mush output -// // as possible. -// // A return value of true indicates that filter should be called -// // again. More precisely, if flush is false, a return value of +// // as possible. +// // A return value of true indicates that filter should be called +// // again. More precisely, if flush is false, a return value of // // false indicates that the natural end of stream has been reached // // and that all filtered data has been forwarded; if flush is -// // true, a return value of false indicates that all filtered data +// // true, a return value of false indicates that all filtered data // // has been forwarded. // } // void close() { /* Reset filter's state. */ } @@ -57,7 +57,7 @@ #include <boost/preprocessor/punctuation/comma_if.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> // Must come last. #include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC. @@ -188,7 +188,7 @@ public: string_type unconsumed_input() const; // Give impl access to buffer_type on Tru64 -#if !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) +#if !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) private: #endif typedef detail::buffer<char_type, Alloc> buffer_type; @@ -266,7 +266,7 @@ private: int state_; }; - shared_ptr<impl> pimpl_; + std::shared_ptr<impl> pimpl_; }; BOOST_IOSTREAMS_PIPABLE(symmetric_filter, 2) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/invert.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/invert.hpp index 82e6a4b4..2348a2fe 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/invert.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/invert.hpp @@ -10,11 +10,11 @@ #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once -#endif +#endif -#include <algorithm> // copy, min. +#include <algorithm> // copy, min. #include <boost/assert.hpp> -#include <boost/config.hpp> // BOOST_DEDUCED_TYPENAME. +#include <boost/config.hpp> // BOOST_DEDUCED_TYPENAME. #include <boost/detail/workaround.hpp> // default_filter_buffer_size. #include <boost/iostreams/char_traits.hpp> #include <boost/iostreams/compose.hpp> @@ -26,7 +26,7 @@ #include <boost/iostreams/detail/functional.hpp> // clear_flags, call_reset #include <boost/mpl/if.hpp> #include <boost/ref.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/type_traits/is_convertible.hpp> // Must come last. @@ -51,7 +51,7 @@ public: typedef typename char_type_of<Filter>::type char_type; typedef typename int_type_of<Filter>::type int_type; typedef char_traits<char_type> traits_type; - typedef typename + typedef typename mpl::if_< is_convertible< base_category, @@ -60,15 +60,15 @@ public: output, input >::type mode; - struct category - : mode, - filter_tag, - multichar_tag, - closable_tag + struct category + : mode, + filter_tag, + multichar_tag, + closable_tag { }; - explicit inverse( const Filter& filter, - std::streamsize buffer_size = - default_filter_buffer_size) + explicit inverse( const Filter& filter, + std::streamsize buffer_size = + default_filter_buffer_size) : pimpl_(new impl(filter, buffer_size)) { } @@ -93,10 +93,10 @@ public: buf().flush(snk); } return snk.second().count() == 0 && - status == traits_type::eof() - ? + status == traits_type::eof() + ? -1 - : + : snk.second().count(); } @@ -111,7 +111,7 @@ public: flags() = f_write; buf().set(0, 0); } - + filtered_array_source src(filter(), array_source(s, n)); for (bool good = true; src.second().count() < n && good; ) { buf().fill(src); @@ -133,20 +133,20 @@ private: filter_ref filter() { return boost::ref(pimpl_->filter_); } detail::buffer<char_type>& buf() { return pimpl_->buf_; } int& flags() { return pimpl_->flags_; } - + enum flags_ { f_read = 1, f_write = 2 }; struct impl { - impl(const Filter& filter, std::streamsize n) + impl(const Filter& filter, std::streamsize n) : filter_(filter), buf_(n), flags_(0) { buf_.set(0, 0); } Filter filter_; detail::buffer<char_type> buf_; int flags_; }; - shared_ptr<impl> pimpl_; + std::shared_ptr<impl> pimpl_; }; // @@ -157,7 +157,7 @@ private: // template<typename Filter> inverse<Filter> invert(const Filter& f) { return inverse<Filter>(f); } - + //----------------------------------------------------------------------------// } } // End namespaces iostreams, boost. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iterator/indirect_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iterator/indirect_iterator.hpp index abff7e76..00fdedff 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iterator/indirect_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iterator/indirect_iterator.hpp @@ -26,11 +26,11 @@ #include <boost/mpl/has_xxx.hpp> #ifdef BOOST_MPL_CFG_NO_HAS_XXX -# include <boost/shared_ptr.hpp> +# include <boost/std::shared_ptr.hpp> # include <boost/scoped_ptr.hpp> # include <boost/mpl/bool.hpp> # include <memory> -#endif +#endif #include <boost/iterator/detail/config_def.hpp> // must be last #include @@ -45,7 +45,7 @@ namespace boost struct indirect_base { typedef typename iterator_traits<Iter>::value_type dereferenceable; - + typedef iterator_adaptor< indirect_iterator<Iter, Value, Category, Reference, Difference> , Iter @@ -69,7 +69,7 @@ namespace boost struct indirect_base<int, int, int, int, int> {}; } // namespace detail - + template < class Iterator , class Value = use_default @@ -107,14 +107,14 @@ namespace boost : super_t(y.base()) {} - private: + private: typename super_t::reference dereference() const { # if BOOST_WORKAROUND(__BORLANDC__, < 0x5A0 ) return const_cast<super_t::reference>(**this->base()); # else return **this->base(); -# endif +# endif } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/boundary/index.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/boundary/index.hpp index 5948dcca..81adff7e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/boundary/index.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/boundary/index.hpp @@ -15,7 +15,7 @@ #include <boost/locale/boundary/boundary_point.hpp> #include <boost/iterator/iterator_facade.hpp> #include <boost/type_traits/is_same.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/cstdint.hpp> #include <boost/assert.hpp> #ifdef BOOST_MSVC @@ -34,7 +34,7 @@ namespace boost { namespace locale { - + namespace boundary { /// /// \defgroup boundary Boundary Analysis @@ -88,7 +88,7 @@ namespace boost { // // C++0x requires that string is continious in memory and all known // string implementations - // do this because of c_str() support. + // do this because of c_str() support. // if(linear_iterator_traits<char_type,IteratorType>::is_linear && b!=e) @@ -117,8 +117,8 @@ namespace boost { mapping(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc) - : + std::locale const &loc) + : index_(new index_type()), begin_(begin), end_(end) @@ -147,12 +147,12 @@ namespace boost { } private: - boost::shared_ptr<index_type> index_; + boost::std::shared_ptr<index_type> index_; base_iterator begin_,end_; }; template<typename BaseIterator> - class segment_index_iterator : + class segment_index_iterator : public boost::iterator_facade< segment_index_iterator<BaseIterator>, segment<BaseIterator>, @@ -164,7 +164,7 @@ namespace boost { typedef BaseIterator base_iterator; typedef mapping<base_iterator> mapping_type; typedef segment<base_iterator> segment_type; - + segment_index_iterator() : current_(0,0),map_(0) { } @@ -267,13 +267,13 @@ namespace boost { { size_t dist=std::distance(map_->begin(),p); index_type::const_iterator b=map_->index().begin(),e=map_->index().end(); - index_type::const_iterator + index_type::const_iterator boundary_point=std::upper_bound(b,e,break_info(dist)); while(boundary_point != e && (boundary_point->rule & mask_)==0) boundary_point++; current_.first = current_.second = boundary_point - b; - + if(full_select_) { while(current_.first > 0) { current_.first --; @@ -318,31 +318,31 @@ namespace boost { bool valid_offset(size_t offset) const { - return offset == 0 + return offset == 0 || offset == size() // make sure we not acess index[size] || (index()[offset].rule & mask_)!=0; } - + size_t size() const { return index().size(); } - + index_type const &index() const { return map_->index(); } - - + + segment_type value_; std::pair<size_t,size_t> current_; mapping_type const *map_; rule_type mask_; bool full_select_; }; - + template<typename BaseIterator> - class boundary_point_index_iterator : + class boundary_point_index_iterator : public boost::iterator_facade< boundary_point_index_iterator<BaseIterator>, boundary_point<BaseIterator>, @@ -354,7 +354,7 @@ namespace boost { typedef BaseIterator base_iterator; typedef mapping<base_iterator> mapping_type; typedef boundary_point<base_iterator> boundary_point_type; - + boundary_point_index_iterator() : current_(0),map_(0) { } @@ -466,22 +466,22 @@ namespace boost { bool valid_offset(size_t offset) const { - return offset == 0 + return offset == 0 || offset + 1 >= size() // last and first are always valid regardless of mark || (index()[offset].rule & mask_)!=0; } - + size_t size() const { return index().size(); } - + index_type const &index() const { return map_->index(); } - - + + boundary_point_type value_; size_t current_; mapping_type const *map_; @@ -498,10 +498,10 @@ namespace boost { template<typename BaseIterator> class boundary_point_index; - + /// - /// \brief This class holds an index of segments in the text range and allows to iterate over them + /// \brief This class holds an index of segments in the text range and allows to iterate over them /// /// This class is provides \ref begin() and \ref end() member functions that return bidirectional iterators /// to the \ref segment objects. @@ -512,7 +512,7 @@ namespace boost { /// various masks %as \ref word_any. /// \n /// The default is to select any types of boundaries. - /// \n + /// \n /// For example: using word %boundary analysis, when the provided mask is \ref word_kana then the iterators /// would iterate only over the words containing Kana letters and \ref word_any would select all types of /// words excluding ranges that consist of white space and punctuation marks. So iterating over the text @@ -533,7 +533,7 @@ namespace boost { /// terminator "!" or "?". But changing \ref full_select() to true, the selected segment would include /// all the text up to previous valid %boundary point and would return two expected sentences: /// "Hello!" and "How\nare you?". - /// + /// /// This class allows to find a segment according to the given iterator in range using \ref find() member /// function. /// @@ -555,7 +555,7 @@ namespace boost { template<typename BaseIterator> class segment_index { public: - + /// /// The type of the iterator used to iterate over the original text /// @@ -591,7 +591,7 @@ namespace boost { typedef segment<base_iterator> value_type; /// - /// Default constructor. + /// Default constructor. /// /// \note /// @@ -610,7 +610,7 @@ namespace boost { base_iterator begin, base_iterator end, rule_type mask, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(mask), @@ -624,7 +624,7 @@ namespace boost { segment_index(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(0xFFFFFFFFu), @@ -655,7 +655,7 @@ namespace boost { /// segment_index const &operator = (boundary_point_index<base_iterator> const &); - + /// /// Create a new index for %boundary analysis \ref boundary_type "type" of the text /// in range [begin,end) for locale \a loc. @@ -694,7 +694,7 @@ namespace boost { } /// - /// Find a first valid segment following a position \a p. + /// Find a first valid segment following a position \a p. /// /// If \a p is inside a valid segment this segment is selected: /// @@ -704,7 +704,7 @@ namespace boost { /// - "t|o be or ", would point to "to", /// - "to be or| ", would point to end. /// - /// + /// /// Preconditions: the segment_index should have a mapping and \a p should be valid iterator /// to the text in the mapped range. /// @@ -714,17 +714,17 @@ namespace boost { { return iterator(p,&map_,mask_,full_select_); } - + /// /// Get the mask of rules that are used - /// + /// rule_type rule() const { return mask_; } /// /// Set the mask of rules that are used - /// + /// void rule(rule_type v) { mask_ = v; @@ -743,7 +743,7 @@ namespace boost { /// following part "are you?" /// - bool full_select() const + bool full_select() const { return full_select_; } @@ -761,11 +761,11 @@ namespace boost { /// following part "are you?" /// - void full_select(bool v) + void full_select(bool v) { full_select_ = v; } - + private: friend class boundary_point_index<base_iterator>; typedef details::mapping<base_iterator> mapping_type; @@ -793,14 +793,14 @@ namespace boost { /// - "Hello! How\n|are you?" /// - "Hello! How\nare you?|" /// - /// However if \ref rule() is set to \ref sentence_term then the selected %boundary points would be: + /// However if \ref rule() is set to \ref sentence_term then the selected %boundary points would be: /// /// - "|Hello! How\nare you?" /// - "Hello! |How\nare you?" /// - "Hello! How\nare you?|" - /// + /// /// Such that a %boundary point defined by a line feed character would be ignored. - /// + /// /// This class allows to find a boundary_point according to the given iterator in range using \ref find() member /// function. /// @@ -858,9 +858,9 @@ namespace boost { /// an object that represents the selected \ref boundary_point "boundary point". /// typedef boundary_point<base_iterator> value_type; - + /// - /// Default constructor. + /// Default constructor. /// /// \note /// @@ -871,7 +871,7 @@ namespace boost { boundary_point_index() : mask_(0xFFFFFFFFu) { } - + /// /// Create a segment_index for %boundary analysis \ref boundary_type "type" of the text /// in range [begin,end) using a rule \a mask for locale \a loc. @@ -880,7 +880,7 @@ namespace boost { base_iterator begin, base_iterator end, rule_type mask, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(mask) @@ -893,7 +893,7 @@ namespace boost { boundary_point_index(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(0xFFFFFFFFu) @@ -969,7 +969,7 @@ namespace boost { /// /// - "|to be", would return %boundary point at "|to be", /// - "t|o be", would point to "to| be" - /// + /// /// Preconditions: the boundary_point_index should have a mapping and \a p should be valid iterator /// to the text in the mapped range. /// @@ -979,17 +979,17 @@ namespace boost { { return iterator(p,&map_,mask_); } - + /// /// Get the mask of rules that are used - /// + /// rule_type rule() const { return mask_; } /// /// Set the mask of rules that are used - /// + /// void rule(rule_type v) { mask_ = v; @@ -1002,8 +1002,8 @@ namespace boost { mapping_type map_; rule_type mask_; }; - - /// \cond INTERNAL + + /// \cond INTERNAL template<typename BaseIterator> segment_index<BaseIterator>::segment_index(boundary_point_index<BaseIterator> const &other) : map_(other.map_), @@ -1011,7 +1011,7 @@ namespace boost { full_select_(false) { } - + template<typename BaseIterator> boundary_point_index<BaseIterator>::boundary_point_index(segment_index<BaseIterator> const &other) : map_(other.map_), @@ -1025,7 +1025,7 @@ namespace boost { map_ = other.map_; return *this; } - + template<typename BaseIterator> boundary_point_index<BaseIterator> const &boundary_point_index<BaseIterator>::operator=(segment_index<BaseIterator> const &other) { @@ -1033,7 +1033,7 @@ namespace boost { return *this; } /// \endcond - + typedef segment_index<std::string::const_iterator> ssegment_index; ///< convenience typedef typedef segment_index<std::wstring::const_iterator> wssegment_index; ///< convenience typedef #ifdef BOOST_HAS_CHAR16_T @@ -1042,7 +1042,7 @@ namespace boost { #ifdef BOOST_HAS_CHAR32_T typedef segment_index<std::u32string::const_iterator> u32ssegment_index;///< convenience typedef #endif - + typedef segment_index<char const *> csegment_index; ///< convenience typedef typedef segment_index<wchar_t const *> wcsegment_index; ///< convenience typedef #ifdef BOOST_HAS_CHAR16_T @@ -1060,7 +1060,7 @@ namespace boost { #ifdef BOOST_HAS_CHAR32_T typedef boundary_point_index<std::u32string::const_iterator> u32sboundary_point_index;///< convenience typedef #endif - + typedef boundary_point_index<char const *> cboundary_point_index; ///< convenience typedef typedef boundary_point_index<wchar_t const *> wcboundary_point_index; ///< convenience typedef #ifdef BOOST_HAS_CHAR16_T diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/generator.hpp index cd34a6fc..e586b32c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/generator.hpp @@ -20,10 +20,10 @@ namespace boost { template<typename Type> - class shared_ptr; + class std::shared_ptr; /// - /// \brief This is the main namespace that encloses all localization classes + /// \brief This is the main namespace that encloses all localization classes /// namespace locale { @@ -39,7 +39,7 @@ namespace boost { static const uint32_t character_first_facet = char_facet; ///< First facet specific for character type static const uint32_t character_last_facet = char32_t_facet; ///< Last facet specific for character type static const uint32_t all_characters = 0xFFFF; ///< Special mask -- generate all - + typedef uint32_t character_facet_type; ///<type that specifies the character type that locales can be generated for static const uint32_t convert_facet = 1 << 0; ///< Generate conversion facets @@ -49,19 +49,19 @@ namespace boost { static const uint32_t message_facet = 1 << 4; ///< Generate message facets static const uint32_t codepage_facet = 1 << 5; ///< Generate character set conversion facets (derived from std::codecvt) static const uint32_t boundary_facet = 1 << 6; ///< Generate boundary analysis facet - + static const uint32_t per_character_facet_first = convert_facet; ///< First facet specific for character static const uint32_t per_character_facet_last = boundary_facet; ///< Last facet specific for character static const uint32_t calendar_facet = 1 << 16; ///< Generate boundary analysis facet static const uint32_t information_facet = 1 << 17; ///< Generate general locale information facet - static const uint32_t non_character_facet_first = calendar_facet; ///< First character independent facet - static const uint32_t non_character_facet_last = information_facet;///< Last character independent facet + static const uint32_t non_character_facet_first = calendar_facet; ///< First character independent facet + static const uint32_t non_character_facet_last = information_facet;///< Last character independent facet + - static const uint32_t all_categories = 0xFFFFFFFFu; ///< Generate all of them - + typedef uint32_t locale_category_type; ///< a type used for more fine grained generation of facets /// @@ -75,11 +75,11 @@ namespace boost { public: /// - /// Create new generator using global localization_backend_manager + /// Create new generator using global localization_backend_manager /// generator(); /// - /// Create new generator using specific localization_backend_manager + /// Create new generator using specific localization_backend_manager /// generator(localization_backend_manager const &); @@ -93,7 +93,7 @@ namespace boost { /// Get types of facets that should be generated, default all /// locale_category_type categories() const; - + /// /// Set the characters type for which the facets should be generated, default all supported /// @@ -142,13 +142,13 @@ namespace boost { /// /// - Under the Windows platform the path is treated as a path in the locale's encoding so /// if you create locale "en_US.windows-1251" then path would be treated as cp1255, - /// and if it is en_US.UTF-8 it is treated as UTF-8. File name is always opened with + /// and if it is en_US.UTF-8 it is treated as UTF-8. File name is always opened with /// a wide file name as wide file names are the native file name on Windows. /// /// - Under POSIX platforms all paths passed as-is regardless of encoding as narrow /// encodings are the native encodings for POSIX platforms. - /// - /// + /// + /// void add_messages_path(std::string const &path); /// @@ -201,7 +201,7 @@ namespace boost { { return generate(id); } - + /// /// Set backend specific option /// @@ -214,7 +214,7 @@ namespace boost { private: - void set_all_options(shared_ptr<localization_backend> backend,std::string const &id) const; + void set_all_options(std::shared_ptr<localization_backend> backend,std::string const &id) const; generator(generator const &); void operator=(generator const &); @@ -231,5 +231,5 @@ namespace boost { #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/communicator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/communicator.hpp index e450e2a5..68b7afea 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/communicator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/communicator.hpp @@ -16,7 +16,7 @@ #include <boost/mpi/config.hpp> #include <boost/mpi/exception.hpp> #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/mpi/datatype.hpp> #include <utility> #include <iterator> @@ -89,7 +89,7 @@ enum comm_create_kind { comm_duplicate, comm_take_ownership, comm_attach }; /** * INTERNAL ONLY - * + * * Forward declaration of @c group needed for the @c group * constructor and accessor. */ @@ -436,7 +436,7 @@ class BOOST_MPI_DECL communicator * @brief Receive an array of values from a remote process. * * This routine blocks until it receives an array of values from the - * process @p source with the given @p tag. If the type @c T is + * process @p source with the given @p tag. If the type @c T is * * @param source The process that will be sending data. This will * either be a process rank within the communicator or the @@ -518,7 +518,7 @@ class BOOST_MPI_DECL communicator * @c skeleton_proxy objects except that @c isend will not block * while waiting for the data to be transmitted. Instead, a request * object will be immediately returned, allowing one to query the - * status of the communication or wait until it has completed. + * status of the communication or wait until it has completed. * * The semantics of this routine are equivalent to a non-blocking * send of a @c packed_skeleton_oarchive storing the skeleton of @@ -628,7 +628,7 @@ class BOOST_MPI_DECL communicator * @brief Initiate receipt of an array of values from a remote process. * * This routine initiates a receive operation for an array of values - * transmitted by process @p source with the given @p tag. + * transmitted by process @p source with the given @p tag. * * @param source The process that will be sending data. This will * either be a process rank within the communicator or the @@ -824,9 +824,9 @@ class BOOST_MPI_DECL communicator #if 0 template<typename Extents> - communicator - with_cartesian_topology(const Extents& extents, - bool periodic = false, + communicator + with_cartesian_topology(const Extents& extents, + bool periodic = false, bool reorder = false) const; template<typename DimInputIterator, typename PeriodicInputIterator> @@ -863,7 +863,7 @@ class BOOST_MPI_DECL communicator * * Function object that frees an MPI communicator and deletes the * memory associated with it. Intended to be used as a deleter with - * shared_ptr. + * std::shared_ptr. */ struct comm_free { @@ -877,7 +877,7 @@ class BOOST_MPI_DECL communicator } }; - + /** * INTERNAL ONLY * @@ -904,7 +904,7 @@ class BOOST_MPI_DECL communicator * datatype, so we map directly to that datatype. */ template<typename T> - void + void array_send_impl(int dest, int tag, const T* values, int n, mpl::true_) const; /** @@ -915,8 +915,8 @@ class BOOST_MPI_DECL communicator * data, to be deserialized on the receiver side. */ template<typename T> - void - array_send_impl(int dest, int tag, const T* values, int n, + void + array_send_impl(int dest, int tag, const T* values, int n, mpl::false_) const; /** @@ -945,8 +945,8 @@ class BOOST_MPI_DECL communicator * datatype, so we map directly to that datatype. */ template<typename T> - request - array_isend_impl(int dest, int tag, const T* values, int n, + request + array_isend_impl(int dest, int tag, const T* values, int n, mpl::true_) const; /** @@ -957,8 +957,8 @@ class BOOST_MPI_DECL communicator * data, to be deserialized on the receiver side. */ template<typename T> - request - array_isend_impl(int dest, int tag, const T* values, int n, + request + array_isend_impl(int dest, int tag, const T* values, int n, mpl::false_) const; /** @@ -987,7 +987,7 @@ class BOOST_MPI_DECL communicator * datatype, so we map directly to that datatype. */ template<typename T> - status + status array_recv_impl(int source, int tag, T* values, int n, mpl::true_) const; /** @@ -998,7 +998,7 @@ class BOOST_MPI_DECL communicator * MPI_PACKED. We'll receive it and then deserialize. */ template<typename T> - status + status array_recv_impl(int source, int tag, T* values, int n, mpl::false_) const; /** @@ -1027,7 +1027,7 @@ class BOOST_MPI_DECL communicator * map directly to that datatype. */ template<typename T> - request + request array_irecv_impl(int source, int tag, T* values, int n, mpl::true_) const; /** @@ -1038,10 +1038,10 @@ class BOOST_MPI_DECL communicator * MPI_PACKED. We'll receive it and then deserialize. */ template<typename T> - request + request array_irecv_impl(int source, int tag, T* values, int n, mpl::false_) const; - shared_ptr<MPI_Comm> comm_ptr; + std::shared_ptr<MPI_Comm> comm_ptr; }; /** @@ -1070,13 +1070,13 @@ inline bool operator!=(const communicator& comm1, const communicator& comm2) * Implementation details * ************************************************************************/ // Count elements in a message -template<typename T> +template<typename T> inline optional<int> status::count() const { return count_impl<T>(is_mpi_datatype<T>()); } -template<typename T> +template<typename T> optional<int> status::count_impl(mpl::true_) const { if (m_count != -1) @@ -1092,7 +1092,7 @@ optional<int> status::count_impl(mpl::true_) const return m_count = return_value; } -template<typename T> +template<typename T> inline optional<int> status::count_impl(mpl::false_) const { if (m_count == -1) @@ -1140,7 +1140,7 @@ communicator::array_send_impl(int dest, int tag, const T* values, int n, mpl::true_) const { BOOST_MPI_CHECK_RESULT(MPI_Send, - (const_cast<T*>(values), n, + (const_cast<T*>(values), n, get_mpi_datatype<T>(*values), dest, tag, MPI_Comm(*this))); } @@ -1173,7 +1173,7 @@ status communicator::recv_impl(int source, int tag, T& value, mpl::true_) const status stat; BOOST_MPI_CHECK_RESULT(MPI_Recv, - (const_cast<T*>(&value), 1, + (const_cast<T*>(&value), 1, get_mpi_datatype<T>(value), source, tag, MPI_Comm(*this), &stat.m_status)); return stat; @@ -1202,13 +1202,13 @@ status communicator::recv(int source, int tag, T& value) const } template<typename T> -status -communicator::array_recv_impl(int source, int tag, T* values, int n, +status +communicator::array_recv_impl(int source, int tag, T* values, int n, mpl::true_) const { status stat; BOOST_MPI_CHECK_RESULT(MPI_Recv, - (const_cast<T*>(values), n, + (const_cast<T*>(values), n, get_mpi_datatype<T>(*values), source, tag, MPI_Comm(*this), &stat.m_status)); return stat; @@ -1216,7 +1216,7 @@ communicator::array_recv_impl(int source, int tag, T* values, int n, template<typename T> status -communicator::array_recv_impl(int source, int tag, T* values, int n, +communicator::array_recv_impl(int source, int tag, T* values, int n, mpl::false_) const { // Receive the message @@ -1255,7 +1255,7 @@ communicator::isend_impl(int dest, int tag, const T& value, mpl::true_) const { request req; BOOST_MPI_CHECK_RESULT(MPI_Isend, - (const_cast<T*>(&value), 1, + (const_cast<T*>(&value), 1, get_mpi_datatype<T>(value), dest, tag, MPI_Comm(*this), &req.m_requests[0])); return req; @@ -1268,7 +1268,7 @@ template<typename T> request communicator::isend_impl(int dest, int tag, const T& value, mpl::false_) const { - shared_ptr<packed_oarchive> archive(new packed_oarchive(*this)); + std::shared_ptr<packed_oarchive> archive(new packed_oarchive(*this)); *archive << value; request result = isend(dest, tag, *archive); result.m_data = archive; @@ -1290,7 +1290,7 @@ communicator::array_isend_impl(int dest, int tag, const T* values, int n, { request req; BOOST_MPI_CHECK_RESULT(MPI_Isend, - (const_cast<T*>(values), n, + (const_cast<T*>(values), n, get_mpi_datatype<T>(*values), dest, tag, MPI_Comm(*this), &req.m_requests[0])); return req; @@ -1298,10 +1298,10 @@ communicator::array_isend_impl(int dest, int tag, const T* values, int n, template<typename T> request -communicator::array_isend_impl(int dest, int tag, const T* values, int n, +communicator::array_isend_impl(int dest, int tag, const T* values, int n, mpl::false_) const { - shared_ptr<packed_oarchive> archive(new packed_oarchive(*this)); + std::shared_ptr<packed_oarchive> archive(new packed_oarchive(*this)); *archive << n << boost::serialization::make_array(values, n); request result = isend(dest, tag, *archive); result.m_data = archive; @@ -1324,15 +1324,15 @@ namespace detail { template<typename T> struct serialized_irecv_data { - serialized_irecv_data(const communicator& comm, int source, int tag, + serialized_irecv_data(const communicator& comm, int source, int tag, T& value) - : comm(comm), source(source), tag(tag), ia(comm), value(value) - { + : comm(comm), source(source), tag(tag), ia(comm), value(value) + { } - void deserialize(status& stat) - { - ia >> value; + void deserialize(status& stat) + { + ia >> value; stat.m_count = 1; } @@ -1347,7 +1347,7 @@ namespace detail { template<> struct serialized_irecv_data<packed_iarchive> { - serialized_irecv_data(const communicator& comm, int source, int tag, + serialized_irecv_data(const communicator& comm, int source, int tag, packed_iarchive& ia) : comm(comm), source(source), tag(tag), ia(ia) { } @@ -1367,10 +1367,10 @@ namespace detail { template<typename T> struct serialized_array_irecv_data { - serialized_array_irecv_data(const communicator& comm, int source, int tag, + serialized_array_irecv_data(const communicator& comm, int source, int tag, T* values, int n) : comm(comm), source(source), tag(tag), ia(comm), values(values), n(n) - { + { } void deserialize(status& stat); @@ -1390,26 +1390,26 @@ namespace detail { // Determine how much data we are going to receive int count; ia >> count; - + // Deserialize the data in the message boost::serialization::array<T> arr(values, count > n? n : count); ia >> arr; - + if (count > n) { boost::throw_exception( std::range_error("communicator::recv: message receive overflow")); } - + stat.m_count = count; } } template<typename T> -optional<status> +optional<status> request::handle_serialized_irecv(request* self, request_action action) { typedef detail::serialized_irecv_data<T> data_t; - shared_ptr<data_t> data = static_pointer_cast<data_t>(self->m_data); + std::shared_ptr<data_t> data = static_pointer_cast<data_t>(self->m_data); if (action == ra_wait) { status stat; @@ -1421,7 +1421,7 @@ request::handle_serialized_irecv(request* self, request_action action) data->ia.resize(data->count); BOOST_MPI_CHECK_RESULT(MPI_Irecv, (data->ia.address(), data->ia.size(), MPI_PACKED, - stat.source(), stat.tag(), + stat.source(), stat.tag(), MPI_Comm(data->comm), self->m_requests + 1)); } @@ -1444,11 +1444,11 @@ request::handle_serialized_irecv(request* self, request_action action) data->ia.resize(data->count); BOOST_MPI_CHECK_RESULT(MPI_Irecv, (data->ia.address(), data->ia.size(),MPI_PACKED, - stat.source(), stat.tag(), + stat.source(), stat.tag(), MPI_Comm(data->comm), self->m_requests + 1)); } else return optional<status>(); // We have not finished yet - } + } // Check if we have received the message data BOOST_MPI_CHECK_RESULT(MPI_Test, @@ -1456,7 +1456,7 @@ request::handle_serialized_irecv(request* self, request_action action) if (flag) { data->deserialize(stat); return stat; - } else + } else return optional<status>(); } else { return optional<status>(); @@ -1464,11 +1464,11 @@ request::handle_serialized_irecv(request* self, request_action action) } template<typename T> -optional<status> +optional<status> request::handle_serialized_array_irecv(request* self, request_action action) { typedef detail::serialized_array_irecv_data<T> data_t; - shared_ptr<data_t> data = static_pointer_cast<data_t>(self->m_data); + std::shared_ptr<data_t> data = static_pointer_cast<data_t>(self->m_data); if (action == ra_wait) { status stat; @@ -1480,7 +1480,7 @@ request::handle_serialized_array_irecv(request* self, request_action action) data->ia.resize(data->count); BOOST_MPI_CHECK_RESULT(MPI_Irecv, (data->ia.address(), data->ia.size(), MPI_PACKED, - stat.source(), stat.tag(), + stat.source(), stat.tag(), MPI_Comm(data->comm), self->m_requests + 1)); } @@ -1503,11 +1503,11 @@ request::handle_serialized_array_irecv(request* self, request_action action) data->ia.resize(data->count); BOOST_MPI_CHECK_RESULT(MPI_Irecv, (data->ia.address(), data->ia.size(),MPI_PACKED, - stat.source(), stat.tag(), + stat.source(), stat.tag(), MPI_Comm(data->comm), self->m_requests + 1)); } else return optional<status>(); // We have not finished yet - } + } // Check if we have received the message data BOOST_MPI_CHECK_RESULT(MPI_Test, @@ -1515,7 +1515,7 @@ request::handle_serialized_array_irecv(request* self, request_action action) if (flag) { data->deserialize(stat); return stat; - } else + } else return optional<status>(); } else { return optional<status>(); @@ -1525,12 +1525,12 @@ request::handle_serialized_array_irecv(request* self, request_action action) // We're receiving a type that has an associated MPI datatype, so we // map directly to that datatype. template<typename T> -request +request communicator::irecv_impl(int source, int tag, T& value, mpl::true_) const { request req; BOOST_MPI_CHECK_RESULT(MPI_Irecv, - (const_cast<T*>(&value), 1, + (const_cast<T*>(&value), 1, get_mpi_datatype<T>(value), source, tag, MPI_Comm(*this), &req.m_requests[0])); return req; @@ -1541,34 +1541,34 @@ request communicator::irecv_impl(int source, int tag, T& value, mpl::false_) const { typedef detail::serialized_irecv_data<T> data_t; - shared_ptr<data_t> data(new data_t(*this, source, tag, value)); + std::shared_ptr<data_t> data(new data_t(*this, source, tag, value)); request req; req.m_data = data; req.m_handler = request::handle_serialized_irecv<T>; BOOST_MPI_CHECK_RESULT(MPI_Irecv, - (&data->count, 1, + (&data->count, 1, get_mpi_datatype<std::size_t>(data->count), source, tag, MPI_Comm(*this), &req.m_requests[0])); - + return req; } template<typename T> -request +request communicator::irecv(int source, int tag, T& value) const { return this->irecv_impl(source, tag, value, is_mpi_datatype<T>()); } template<typename T> -request -communicator::array_irecv_impl(int source, int tag, T* values, int n, +request +communicator::array_irecv_impl(int source, int tag, T* values, int n, mpl::true_) const { request req; BOOST_MPI_CHECK_RESULT(MPI_Irecv, - (const_cast<T*>(values), n, + (const_cast<T*>(values), n, get_mpi_datatype<T>(*values), source, tag, MPI_Comm(*this), &req.m_requests[0])); return req; @@ -1576,17 +1576,17 @@ communicator::array_irecv_impl(int source, int tag, T* values, int n, template<typename T> request -communicator::array_irecv_impl(int source, int tag, T* values, int n, +communicator::array_irecv_impl(int source, int tag, T* values, int n, mpl::false_) const { typedef detail::serialized_array_irecv_data<T> data_t; - shared_ptr<data_t> data(new data_t(*this, source, tag, values, n)); + std::shared_ptr<data_t> data(new data_t(*this, source, tag, values, n)); request req; req.m_data = data; req.m_handler = request::handle_serialized_array_irecv<T>; BOOST_MPI_CHECK_RESULT(MPI_Irecv, - (&data->count, 1, + (&data->count, 1, get_mpi_datatype<std::size_t>(data->count), source, tag, MPI_Comm(*this), &req.m_requests[0])); @@ -1657,7 +1657,7 @@ communicator::recv<content>(int source, int tag, content& c) const { return recv<const content>(source,tag,c); -} +} /** * INTERNAL ONLY diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/detail/communicator_sc.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/detail/communicator_sc.hpp index 1dfcc3c5..1102675f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/detail/communicator_sc.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/detail/communicator_sc.hpp @@ -45,7 +45,7 @@ template<typename T> request communicator::isend(int dest, int tag, const skeleton_proxy<T>& proxy) const { - shared_ptr<packed_skeleton_oarchive> + std::shared_ptr<packed_skeleton_oarchive> archive(new packed_skeleton_oarchive(*this)); *archive << proxy.object; @@ -58,13 +58,13 @@ namespace detail { template<typename T> struct serialized_irecv_data<const skeleton_proxy<T> > { - serialized_irecv_data(const communicator& comm, int source, int tag, + serialized_irecv_data(const communicator& comm, int source, int tag, skeleton_proxy<T> proxy) - : comm(comm), source(source), tag(tag), isa(comm), + : comm(comm), source(source), tag(tag), isa(comm), ia(isa.get_skeleton()), proxy(proxy) { } - void deserialize(status& stat) - { + void deserialize(status& stat) + { isa >> proxy.object; stat.m_count = 1; } @@ -84,7 +84,7 @@ namespace detail { { typedef serialized_irecv_data<const skeleton_proxy<T> > inherited; - serialized_irecv_data(const communicator& comm, int source, int tag, + serialized_irecv_data(const communicator& comm, int source, int tag, const skeleton_proxy<T>& proxy) : inherited(comm, source, tag, proxy) { } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/graph_communicator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/graph_communicator.hpp index 6cafb1fe..f9747c77 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/graph_communicator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/graph_communicator.hpp @@ -59,7 +59,7 @@ class BOOST_MPI_DECL graph_communicator : public communicator * underlying MPI_Comm. This operation is used for "casting" from a * communicator to a graph communicator. */ - explicit graph_communicator(const shared_ptr<MPI_Comm>& comm_ptr) + explicit graph_communicator(const std::shared_ptr<MPI_Comm>& comm_ptr) { #ifndef BOOST_DISABLE_ASSERTS int status; @@ -99,7 +99,7 @@ public: */ graph_communicator(const MPI_Comm& comm, comm_create_kind kind) : communicator(comm, kind) - { + { #ifndef BOOST_DISABLE_ASSERTS int status; BOOST_MPI_CHECK_RESULT(MPI_Topo_test, ((MPI_Comm)*this, &status)); @@ -116,8 +116,8 @@ public: * resulting communicator will be a NULL communicator. * * @param comm The communicator that the new, graph communicator - * will be based on. - * + * will be based on. + * * @param graph Any type that meets the requirements of the * Incidence Graph and Vertex List Graph concepts from the Boost Graph * Library. This structure of this graph will become the topology @@ -130,8 +130,8 @@ public: * within the original communicator. */ template<typename Graph> - explicit - graph_communicator(const communicator& comm, const Graph& graph, + explicit + graph_communicator(const communicator& comm, const Graph& graph, bool reorder = false); /** @@ -145,7 +145,7 @@ public: * @param comm The communicator that the new, graph communicator * will be based on. The ranks in @c rank refer to the processes in * this communicator. - * + * * @param graph Any type that meets the requirements of the * Incidence Graph and Vertex List Graph concepts from the Boost Graph * Library. This structure of this graph will become the topology @@ -164,8 +164,8 @@ public: * within the original communicator. */ template<typename Graph, typename RankMap> - explicit - graph_communicator(const communicator& comm, const Graph& graph, + explicit + graph_communicator(const communicator& comm, const Graph& graph, RankMap rank, bool reorder = false); protected: @@ -177,7 +177,7 @@ protected: */ template<typename Graph, typename RankMap> void - setup_graph(const communicator& comm, const Graph& graph, RankMap rank, + setup_graph(const communicator& comm, const Graph& graph, RankMap rank, bool reorder); }; @@ -186,16 +186,16 @@ protected: ****************************************************************************/ template<typename Graph> -graph_communicator::graph_communicator(const communicator& comm, - const Graph& graph, +graph_communicator::graph_communicator(const communicator& comm, + const Graph& graph, bool reorder) { this->setup_graph(comm, graph, get(vertex_index, graph), reorder); } template<typename Graph, typename RankMap> -graph_communicator::graph_communicator(const communicator& comm, - const Graph& graph, +graph_communicator::graph_communicator(const communicator& comm, + const Graph& graph, RankMap rank, bool reorder) { this->setup_graph(comm, graph, rank, reorder); @@ -204,7 +204,7 @@ graph_communicator::graph_communicator(const communicator& comm, template<typename Graph, typename RankMap> void -graph_communicator::setup_graph(const communicator& comm, const Graph& graph, +graph_communicator::setup_graph(const communicator& comm, const Graph& graph, RankMap rank, bool reorder) { typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor; @@ -234,7 +234,7 @@ graph_communicator::setup_graph(const communicator& comm, const Graph& graph, // Create the new communicator MPI_Comm newcomm; BOOST_MPI_CHECK_RESULT(MPI_Graph_create, - ((MPI_Comm)comm, + ((MPI_Comm)comm, nvertices, &indices[0], edges.empty()? (int*)0 : &edges[0], @@ -254,10 +254,10 @@ namespace detail { * communicator's graph topology. */ class comm_out_edge_iterator - : public iterator_facade<comm_out_edge_iterator, + : public iterator_facade<comm_out_edge_iterator, std::pair<int, int>, random_access_traversal_tag, - const std::pair<int, int>&, + const std::pair<int, int>&, int> { public: @@ -304,10 +304,10 @@ namespace detail { * communicator's graph topology. */ class comm_adj_iterator - : public iterator_facade<comm_adj_iterator, + : public iterator_facade<comm_adj_iterator, int, random_access_traversal_tag, - int, + int, int> { public: @@ -349,10 +349,10 @@ namespace detail { * topology. */ class comm_edge_iterator - : public iterator_facade<comm_edge_iterator, + : public iterator_facade<comm_edge_iterator, std::pair<int, int>, forward_traversal_tag, - const std::pair<int, int>&, + const std::pair<int, int>&, int> { public: @@ -381,9 +381,9 @@ namespace detail { return edge_index == other.edge_index; } - void increment() - { - ++edge_index; + void increment() + { + ++edge_index; } shared_array<int> indices; @@ -478,7 +478,7 @@ int num_edges(const graph_communicator& comm); /** * @brief Returns a property map that maps from vertices in a - * communicator's graph topology to their index values. + * communicator's graph topology to their index values. * * Since the vertices are ranks in the communicator, the returned * property map is the identity property map. @@ -522,16 +522,16 @@ struct graph_traits<mpi::graph_communicator> { typedef std::pair<int, int> edge_descriptor; typedef directed_tag directed_category; typedef disallow_parallel_edge_tag edge_parallel_category; - + /** * INTERNAL ONLY */ struct traversal_category - : incidence_graph_tag, - adjacency_graph_tag, - vertex_list_graph_tag, - edge_list_graph_tag - { + : incidence_graph_tag, + adjacency_graph_tag, + vertex_list_graph_tag, + edge_list_graph_tag + { }; /** diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp index 103b35a1..5fa5e4b5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp @@ -16,7 +16,7 @@ #define BOOST_MPI_GROUP_HPP #include <boost/mpi/exception.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/optional.hpp> #include <vector> @@ -62,7 +62,7 @@ public: /** * @brief Determine the rank of the calling process in the group. - * + * * This routine is equivalent to @c MPI_Group_rank. * * @returns The rank of the calling process in the group, which will @@ -167,11 +167,11 @@ public: * * @returns A new group containing all of the processes in the * current group except those processes with ranks @c [first, last) - * in the current group. + * in the current group. */ template<typename InputIterator> group exclude(InputIterator first, InputIterator last); - + protected: /** @@ -179,7 +179,7 @@ protected: * * Function object that frees an MPI group and deletes the * memory associated with it. Intended to be used as a deleter with - * shared_ptr. + * std::shared_ptr. */ struct group_free { @@ -199,7 +199,7 @@ protected: * @c group class. When there are no more such instances, the group * will be automatically freed. */ - shared_ptr<MPI_Group> group_ptr; + std::shared_ptr<MPI_Group> group_ptr; }; /** @@ -223,7 +223,7 @@ BOOST_MPI_DECL bool operator==(const group& g1, const group& g2); * processes in the same order. */ inline bool operator!=(const group& g1, const group& g2) -{ +{ return !(g1 == g2); } @@ -260,7 +260,7 @@ BOOST_MPI_DECL group operator-(const group& g1, const group& g2); * Implementation details * ************************************************************************/ template<typename InputIterator, typename OutputIterator> -OutputIterator +OutputIterator group::translate_ranks(InputIterator first, InputIterator last, const group& to_group, OutputIterator out) { @@ -283,11 +283,11 @@ group::translate_ranks(InputIterator first, InputIterator last, /** * INTERNAL ONLY - * + * * Specialization of translate_ranks that handles the one case where * we can avoid any memory allocation or copying. */ -template<> +template<> BOOST_MPI_DECL int* group::translate_ranks(int* first, int* last, const group& to_group, int* out); @@ -306,7 +306,7 @@ group group::include(InputIterator first, InputIterator last) /** * INTERNAL ONLY - * + * * Specialization of group::include that handles the one case where we * can avoid any memory allocation or copying before creating the * group. @@ -328,7 +328,7 @@ group group::exclude(InputIterator first, InputIterator last) /** * INTERNAL ONLY - * + * * Specialization of group::exclude that handles the one case where we * can avoid any memory allocation or copying before creating the * group. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/intercommunicator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/intercommunicator.hpp index ad246b59..d57c79e2 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/intercommunicator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/intercommunicator.hpp @@ -24,7 +24,7 @@ namespace boost { namespace mpi { * * Forward declaration of the MPI "group" representation, for use in * the description of the @c intercommunicator class. - */ + */ class group; /** @@ -45,8 +45,8 @@ class group; * intercommunicators occurs between the processes in the local group * and the processes in the remote group; communication within a group * must use a different (intra-)communicator. - * - */ + * + */ class BOOST_MPI_DECL intercommunicator : public communicator { private: @@ -59,7 +59,7 @@ private: * underlying MPI_Comm. This operation is used for "casting" from a * communicator to an intercommunicator. */ - explicit intercommunicator(const shared_ptr<MPI_Comm>& cp) + explicit intercommunicator(const std::shared_ptr<MPI_Comm>& cp) { this->comm_ptr = cp; } @@ -149,7 +149,7 @@ public: * Merge the local and remote groups in this intercommunicator into * a new intracommunicator containing the union of the processes in * both groups. This method is equivalent to @c MPI_Intercomm_merge. - * + * * @param high Whether the processes in this group should have the * higher rank numbers than the processes in the other group. Each * of the processes within a particular group shall have the same diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/request.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/request.hpp index cb36cc5a..e43f00a8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/request.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/request.hpp @@ -14,7 +14,7 @@ #include <boost/mpi/config.hpp> #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/mpi/packed_iarchive.hpp> namespace boost { namespace mpi { @@ -29,7 +29,7 @@ class communicator; * receive and will be returned from @c isend or @c irecv, * respectively. */ -class BOOST_MPI_DECL request +class BOOST_MPI_DECL request { public: /** @@ -62,7 +62,7 @@ class BOOST_MPI_DECL request private: enum request_action { ra_wait, ra_test, ra_cancel }; - typedef optional<status> (*handler_type)(request* self, + typedef optional<status> (*handler_type)(request* self, request_action action); /** @@ -71,7 +71,7 @@ class BOOST_MPI_DECL request * Handles the non-blocking receive of a serialized value. */ template<typename T> - static optional<status> + static optional<status> handle_serialized_irecv(request* self, request_action action); /** @@ -80,7 +80,7 @@ class BOOST_MPI_DECL request * Handles the non-blocking receive of an array of serialized values. */ template<typename T> - static optional<status> + static optional<status> handle_serialized_array_irecv(request* self, request_action action); public: // template friends are not portable @@ -92,7 +92,7 @@ class BOOST_MPI_DECL request handler_type m_handler; /// INTERNAL ONLY - shared_ptr<void> m_data; + std::shared_ptr<void> m_data; friend class communicator; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/skeleton_and_content.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/skeleton_and_content.hpp index dcd13bfe..78c5fb27 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/skeleton_and_content.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/skeleton_and_content.hpp @@ -31,7 +31,7 @@ #include <boost/mpi/detail/forward_skeleton_oarchive.hpp> #include <boost/mpi/detail/ignore_iprimitive.hpp> #include <boost/mpi/detail/ignore_oprimitive.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/archive/detail/register_archive.hpp> namespace boost { namespace mpi { @@ -197,7 +197,7 @@ public: } private: - boost::shared_ptr<detail::mpi_datatype_holder> holder; + boost::std::shared_ptr<detail::mpi_datatype_holder> holder; }; /** @brief Returns the content of an object, suitable for transmission diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp index 9794b8e7..d4d24f49 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp @@ -8,7 +8,7 @@ // // typename pointee<P>::type provides the pointee type of P. // -// For example, it is T for T* and X for shared_ptr<X>. +// For example, it is T for T* and X for std::shared_ptr<X>. // // http://www.boost.org/libs/iterator/doc/pointee.html // @@ -20,7 +20,7 @@ # include <boost/mpl/if.hpp> # include <boost/mpl/eval_if.hpp> -namespace boost { +namespace boost { namespace detail { @@ -34,25 +34,25 @@ namespace detail struct iterator_pointee { typedef typename iterator_traits<Iterator>::value_type value_type; - + struct impl { template <class T> static char test(T const&); - + static char (& test(value_type&) )[2]; - + static Iterator& x; }; - + BOOST_STATIC_CONSTANT(bool, is_constant = sizeof(impl::test(*impl::x)) == 1); - + typedef typename mpl::if_c< # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) ::boost::detail::iterator_pointee<Iterator>::is_constant # else is_constant -# endif +# endif , typename add_const<value_type>::type , value_type >::type type; @@ -68,7 +68,7 @@ struct pointee > { }; - + } // namespace boost #endif // POINTEE_DWA200415_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/detail/config_file.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/detail/config_file.hpp index 4c2c15b9..0aa83ba1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/detail/config_file.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/detail/config_file.hpp @@ -25,7 +25,7 @@ #include <boost/static_assert.hpp> #include <boost/type_traits/is_same.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> @@ -38,7 +38,7 @@ namespace boost { namespace program_options { namespace detail { for(; i !=e; ++i) { *i; } - + Syntax conventions: - config file can not contain positional options @@ -47,10 +47,10 @@ namespace boost { namespace program_options { namespace detail { - variable assignments are in the form name '=' value. spaces around '=' are trimmed. - - Section names are given in brackets. + - Section names are given in brackets. The actual option name is constructed by combining current section - name and specified option name, with dot between. If section_name + name and specified option name, with dot between. If section_name already contains dot at the end, new dot is not inserted. For example: @verbatim [gui.accessibility] @@ -61,8 +61,8 @@ namespace boost { namespace program_options { namespace detail { TODO: maybe, we should just accept a pointer to options_description class. - */ - class common_config_file_iterator + */ + class common_config_file_iterator : public eof_iterator<common_config_file_iterator, option> { public: @@ -74,9 +74,9 @@ namespace boost { namespace program_options { namespace detail { virtual ~common_config_file_iterator() {} public: // Method required by eof_iterator - + void get(); - + protected: // Stubs for derived classes // Obtains next line from the config file @@ -85,7 +85,7 @@ namespace boost { namespace program_options { namespace detail { // constructor of this class, but to avoid templating this class // we'd need polymorphic iterator, which does not exist yet. virtual bool getline(std::string&) { return false; } - + private: /** Adds another allowed option. If the 'name' ends with '*', then all options with the same prefix are @@ -94,7 +94,7 @@ namespace boost { namespace program_options { namespace detail { void add_option(const char* name); // Returns true if 's' is a registered option name. - bool allowed_option(const std::string& s) const; + bool allowed_option(const std::string& s) const; // That's probably too much data for iterator, since // it will be copied, but let's not bother for now. @@ -113,20 +113,20 @@ namespace boost { namespace program_options { namespace detail { found_eof(); } - /** Creates a config file parser for the specified stream. + /** Creates a config file parser for the specified stream. */ - basic_config_file_iterator(std::basic_istream<charT>& is, + basic_config_file_iterator(std::basic_istream<charT>& is, const std::set<std::string>& allowed_options, - bool allow_unregistered = false); + bool allow_unregistered = false); private: // base overrides bool getline(std::string&); private: // internal data - shared_ptr<std::basic_istream<charT> > is; + std::shared_ptr<std::basic_istream<charT> > is; }; - + typedef basic_config_file_iterator<char> config_file_iterator; typedef basic_config_file_iterator<wchar_t> wconfig_file_iterator; @@ -139,12 +139,12 @@ namespace boost { namespace program_options { namespace detail { template<class charT> basic_config_file_iterator<charT>:: - basic_config_file_iterator(std::basic_istream<charT>& is, + basic_config_file_iterator(std::basic_istream<charT>& is, const std::set<std::string>& allowed_options, bool allow_unregistered) : common_config_file_iterator(allowed_options, allow_unregistered) { - this->is.reset(&is, null_deleter()); + this->is.reset(&is, null_deleter()); get(); } @@ -173,7 +173,7 @@ namespace boost { namespace program_options { namespace detail { basic_config_file_iterator<wchar_t>::getline(std::string& s); #endif - + }}} diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/options_description.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/options_description.hpp index 62530b2d..2b5dee37 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/options_description.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/options_description.hpp @@ -13,7 +13,7 @@ #include <boost/program_options/value_semantic.hpp> #include <boost/function.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/detail/workaround.hpp> #include <boost/any.hpp> @@ -27,12 +27,12 @@ #if defined(BOOST_MSVC) # pragma warning (push) -# pragma warning (disable:4251) // class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'boost::program_options::option_description' +# pragma warning (disable:4251) // class 'boost::std::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'boost::program_options::option_description' #endif /** Boost namespace */ -namespace boost { +namespace boost { /** Namespace for the library. */ namespace program_options { @@ -67,7 +67,7 @@ namespace program_options { So, we have to use plain old pointers. Besides, users are not expected to use the constructor directly. - + The 'name' parameter is interpreted by the following rules: - if there's no "," character in 'name', it specifies long name - otherwise, the part before "," specifies long name and the part @@ -76,7 +76,7 @@ namespace program_options { option_description(const char* name, const value_semantic* s); - /** Initializes the class with the passed data. + /** Initializes the class with the passed data. */ option_description(const char* name, const value_semantic* s, @@ -118,9 +118,9 @@ namespace program_options { const std::string& description() const; /// Semantic of option's value - shared_ptr<const value_semantic> semantic() const; - - /// Returns the option name, formatted suitably for usage message. + std::shared_ptr<const value_semantic> semantic() const; + + /// Returns the option name, formatted suitably for usage message. std::string format_name() const; /** Returns the parameter name and properties, formatted suitably for @@ -128,19 +128,19 @@ namespace program_options { std::string format_parameter() const; private: - + option_description& set_name(const char* name); std::string m_short_name, m_long_name, m_description; - // shared_ptr is needed to simplify memory management in + // std::shared_ptr is needed to simplify memory management in // copy ctor and destructor. - shared_ptr<const value_semantic> m_value_semantic; + std::shared_ptr<const value_semantic> m_value_semantic; }; class options_description; - /** Class which provides convenient creation syntax to option_description. - */ + /** Class which provides convenient creation syntax to option_description. + */ class BOOST_PROGRAM_OPTIONS_DECL options_description_easy_init { public: options_description_easy_init(options_description* owner); @@ -152,12 +152,12 @@ namespace program_options { options_description_easy_init& operator()(const char* name, const value_semantic* s); - + options_description_easy_init& operator()(const char* name, const value_semantic* s, const char* description); - + private: options_description* owner; }; @@ -166,14 +166,14 @@ namespace program_options { /** A set of option descriptions. This provides convenient interface for adding new option (the add_options) method, and facilities to search for options by name. - + See @ref a_adding_options "here" for option adding interface discussion. @sa option_description */ class BOOST_PROGRAM_OPTIONS_DECL options_description { public: static const unsigned m_default_line_length; - + /** Creates the instance. */ options_description(unsigned line_length = m_default_line_length, unsigned min_description_length = m_default_line_length / 2); @@ -188,11 +188,11 @@ namespace program_options { unsigned line_length = m_default_line_length, unsigned min_description_length = m_default_line_length / 2); /** Adds new variable description. Throws duplicate_variable_error if - either short or long name matches that of already present one. + either short or long name matches that of already present one. */ - void add(shared_ptr<option_description> desc); + void add(std::shared_ptr<option_description> desc); /** Adds a group of option description. This has the same - effect as adding all option_descriptions in 'desc' + effect as adding all option_descriptions in 'desc' individually, except that output operator will show a separate group. Returns *this. @@ -202,29 +202,29 @@ namespace program_options { public: /** Returns an object of implementation-defined type suitable for adding options to options_description. The returned object will - have overloaded operator() with parameter type matching + have overloaded operator() with parameter type matching 'option_description' constructors. Calling the operator will create new option_description instance and add it. */ options_description_easy_init add_options(); - const option_description& find(const std::string& name, - bool approx, + const option_description& find(const std::string& name, + bool approx, bool long_ignore_case = false, bool short_ignore_case = false) const; - const option_description* find_nothrow(const std::string& name, + const option_description* find_nothrow(const std::string& name, bool approx, bool long_ignore_case = false, bool short_ignore_case = false) const; - const std::vector< shared_ptr<option_description> >& options() const; + const std::vector< std::shared_ptr<option_description> >& options() const; /** Produces a human readable output of 'desc', listing options, their descriptions and allowed parameters. Other options_description instances previously passed to add will be output separately. */ - friend BOOST_PROGRAM_OPTIONS_DECL std::ostream& operator<<(std::ostream& os, + friend BOOST_PROGRAM_OPTIONS_DECL std::ostream& operator<<(std::ostream& os, const options_description& desc); /** Outputs 'desc' to the specified stream, calling 'f' to output each @@ -233,7 +233,7 @@ namespace program_options { private: typedef std::map<std::string, int>::const_iterator name2index_iterator; - typedef std::pair<name2index_iterator, name2index_iterator> + typedef std::pair<name2index_iterator, name2index_iterator> approximation_range; //approximation_range find_approximation(const std::string& prefix) const; @@ -241,11 +241,11 @@ namespace program_options { std::string m_caption; const unsigned m_line_length; const unsigned m_min_description_length; - + // Data organization is chosen because: // - there could be two names for one option // - option_add_proxy needs to know the last added option - std::vector< shared_ptr<option_description> > m_options; + std::vector< std::shared_ptr<option_description> > m_options; // Whether the option comes from one of declared groups. #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(313)) @@ -256,7 +256,7 @@ namespace program_options { std::vector<bool> belong_to_group; #endif - std::vector< shared_ptr<options_description> > groups; + std::vector< std::shared_ptr<options_description> > groups; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/variables_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/variables_map.hpp index be0a4b64..47811f78 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/variables_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/variables_map.hpp @@ -10,7 +10,7 @@ #include <boost/program_options/config.hpp> #include <boost/any.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <string> #include <map> @@ -31,35 +31,35 @@ namespace boost { namespace program_options { // forward declaration - /** Stores in 'm' all options that are defined in 'options'. + /** Stores in 'm' all options that are defined in 'options'. If 'm' already has a non-defaulted value of an option, that value - is not changed, even if 'options' specify some value. + is not changed, even if 'options' specify some value. */ - BOOST_PROGRAM_OPTIONS_DECL + BOOST_PROGRAM_OPTIONS_DECL void store(const basic_parsed_options<char>& options, variables_map& m, bool utf8 = false); - /** Stores in 'm' all options that are defined in 'options'. + /** Stores in 'm' all options that are defined in 'options'. If 'm' already has a non-defaulted value of an option, that value - is not changed, even if 'options' specify some value. + is not changed, even if 'options' specify some value. This is wide character variant. */ - BOOST_PROGRAM_OPTIONS_DECL - void store(const basic_parsed_options<wchar_t>& options, + BOOST_PROGRAM_OPTIONS_DECL + void store(const basic_parsed_options<wchar_t>& options, variables_map& m); /** Runs all 'notify' function for options in 'm'. */ BOOST_PROGRAM_OPTIONS_DECL void notify(variables_map& m); - /** Class holding value of option. Contains details about how the + /** Class holding value of option. Contains details about how the value is set and allows to conveniently obtain the value. */ class BOOST_PROGRAM_OPTIONS_DECL variable_value { public: variable_value() : m_defaulted(false) {} - variable_value(const boost::any& xv, bool xdefaulted) - : v(xv), m_defaulted(xdefaulted) + variable_value(const boost::any& xv, bool xdefaulted) + : v(xv), m_defaulted(xdefaulted) {} /** If stored value if of type T, returns that value. Otherwise, @@ -92,10 +92,10 @@ namespace boost { namespace program_options { // they are known only after all sources are stored. By that // time options_description for the first source might not // be easily accessible, so we need to store semantic here. - shared_ptr<const value_semantic> m_value_semantic; + std::shared_ptr<const value_semantic> m_value_semantic; friend BOOST_PROGRAM_OPTIONS_DECL - void store(const basic_parsed_options<char>& options, + void store(const basic_parsed_options<char>& options, variables_map& m, bool); friend BOOST_PROGRAM_OPTIONS_DECL class variables_map; @@ -138,8 +138,8 @@ namespace boost { namespace program_options { const abstract_variables_map* m_next; }; - /** Concrete variables map which store variables in real map. - + /** Concrete variables map which store variables in real map. + This class is derived from std::map<std::string, variable_value>, so you can use all map operators to examine its content. */ @@ -155,8 +155,8 @@ namespace boost { namespace program_options { { return abstract_variables_map::operator[](name); } // Override to clear some extra fields. - void clear(); - + void clear(); + void notify(); private: @@ -169,10 +169,10 @@ namespace boost { namespace program_options { std::set<std::string> m_final; friend BOOST_PROGRAM_OPTIONS_DECL - void store(const basic_parsed_options<char>& options, + void store(const basic_parsed_options<char>& options, variables_map& xm, bool utf8); - + /** Names of required options, filled by parser which has access to options_description. The map values are the "canonical" names for each corresponding option. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/dynamic_property_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/dynamic_property_map.hpp index f5f4230e..e470ad0e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/dynamic_property_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/dynamic_property_map.hpp @@ -206,9 +206,9 @@ private: // struct dynamic_properties { - typedef std::multimap<std::string, boost::shared_ptr<dynamic_property_map> > + typedef std::multimap<std::string, boost::std::shared_ptr<dynamic_property_map> > property_maps_type; - typedef boost::function3<boost::shared_ptr<dynamic_property_map>, + typedef boost::function3<boost::std::shared_ptr<dynamic_property_map>, const std::string&, const boost::any&, const boost::any&> generate_fn_type; @@ -226,7 +226,7 @@ public: dynamic_properties& property(const std::string& name, PropertyMap property_map_) { - boost::shared_ptr<dynamic_property_map> pm( + boost::std::shared_ptr<dynamic_property_map> pm( boost::static_pointer_cast<dynamic_property_map>( boost::make_shared<detail::dynamic_property_map_adaptor<PropertyMap> >(property_map_))); property_maps.insert(property_maps_type::value_type(name, pm)); @@ -246,13 +246,13 @@ public: { return property_maps.lower_bound(name); } void - insert(const std::string& name, boost::shared_ptr<dynamic_property_map> pm) + insert(const std::string& name, boost::std::shared_ptr<dynamic_property_map> pm) { property_maps.insert(property_maps_type::value_type(name, pm)); } template<typename Key, typename Value> - boost::shared_ptr<dynamic_property_map> + boost::std::shared_ptr<dynamic_property_map> generate(const std::string& name, const Key& key, const Value& value) { if(!generate_fn) { @@ -280,7 +280,7 @@ put(const std::string& name, dynamic_properties& dp, const Key& key, } } - boost::shared_ptr<dynamic_property_map> new_map = dp.generate(name, key, value); + boost::std::shared_ptr<dynamic_property_map> new_map = dp.generate(name, key, value); if (new_map.get()) { new_map->put(key, value); dp.insert(name, new_map); @@ -290,7 +290,7 @@ put(const std::string& name, dynamic_properties& dp, const Key& key, } } -#ifndef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#ifndef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS template<typename Value, typename Key> Value get(const std::string& name, const dynamic_properties& dp, const Key& key) @@ -333,11 +333,11 @@ get(const std::string& name, const dynamic_properties& dp, const Key& key) // The easy way to ignore properties. inline -boost::shared_ptr<boost::dynamic_property_map> +boost::std::shared_ptr<boost::dynamic_property_map> ignore_other_properties(const std::string&, const boost::any&, const boost::any&) { - return boost::shared_ptr<boost::dynamic_property_map>(); + return boost::std::shared_ptr<boost::dynamic_property_map>(); } } // namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/distributed_property_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/distributed_property_map.hpp index c34e073e..b39202ed 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/distributed_property_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/distributed_property_map.hpp @@ -23,7 +23,7 @@ #include <boost/assert.hpp> #include <boost/type_traits/is_base_and_derived.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <boost/optional.hpp> #include <boost/graph/parallel/process_group.hpp> @@ -93,10 +93,10 @@ namespace detail { template<typename PropertyMap, typename Key, typename Value> static inline void do_put(PropertyMap pm, const Key& key, const Value& value) - { + { using boost::put; - put(pm, key, value); + put(pm, key, value); } }; @@ -240,7 +240,7 @@ class distributed_property_map property_map_put, /** A request to retrieve a particular value in a property - * map. The message contains a key. The owner of that key will + * map. The message contains a key. The owner of that key will * reply with a value. */ property_map_get, @@ -377,7 +377,7 @@ class distributed_property_map reference operator[](const key_type& key) const { owner_local_pair p = get(data->global, key); - + if (p.first == process_id(data->process_group)) { return data->storage[p.second]; } else { @@ -397,11 +397,11 @@ class distributed_property_map * \internal * */ - void + void request_put(process_id_type p, const key_type& k, const value_type& v) const - { - send(data->process_group, p, property_map_put, - boost::parallel::detail::make_untracked_pair(k, v)); + { + send(data->process_group, p, property_map_put, + boost::parallel::detail::make_untracked_pair(k, v)); } /** Access the ghost cell for the given key. @@ -419,11 +419,11 @@ class distributed_property_map struct data_t { - data_t(const ProcessGroup& pg, const GlobalMap& global, + data_t(const ProcessGroup& pg, const GlobalMap& global, const StorageMap& pm, const function1<value_type, key_type>& dv, bool has_default_resolver) - : process_group(pg), global(global), storage(pm), - ghost_cells(), max_ghost_cells(1000000), get_default_value(dv), + : process_group(pg), global(global), storage(pm), + ghost_cells(), max_ghost_cells(1000000), get_default_value(dv), has_default_resolver(has_default_resolver), model(cm_forward) { } /// The process group @@ -437,7 +437,7 @@ class distributed_property_map StorageMap storage; /// The ghost cells - shared_ptr<ghost_cells_type> ghost_cells; + std::shared_ptr<ghost_cells_type> ghost_cells; /// The maximum number of ghost cells we are permitted to hold. If /// zero, we are permitted to have an infinite number of ghost @@ -478,7 +478,7 @@ class distributed_property_map }; friend struct data_t; - shared_ptr<data_t> data; + std::shared_ptr<data_t> data; private: // Prunes the least recently used ghost cells until we have @c @@ -493,36 +493,36 @@ class distributed_property_map template<typename Reduce> struct handle_message { - explicit handle_message(const shared_ptr<data_t>& data, + explicit handle_message(const std::shared_ptr<data_t>& data, const Reduce& reduce = Reduce()) : data_ptr(data), reduce(reduce) { } void operator()(process_id_type source, int tag); /// Individual message handlers - void - handle_put(int source, int tag, - const boost::parallel::detail::untracked_pair<key_type, value_type>& data, + void + handle_put(int source, int tag, + const boost::parallel::detail::untracked_pair<key_type, value_type>& data, trigger_receive_context); value_type - handle_get(int source, int tag, const key_type& data, + handle_get(int source, int tag, const key_type& data, trigger_receive_context); void - handle_multiget(int source, int tag, + handle_multiget(int source, int tag, const std::vector<key_type>& data, trigger_receive_context); void handle_multiget_reply - (int source, int tag, + (int source, int tag, const std::vector<boost::parallel::detail::untracked_pair<key_type, value_type> >& msg, trigger_receive_context); void handle_multiput - (int source, int tag, + (int source, int tag, const std::vector<unsafe_pair<local_key_type, value_type> >& data, trigger_receive_context); @@ -537,7 +537,7 @@ class distributed_property_map bidirectional consistency. */ struct on_synchronize { - explicit on_synchronize(const shared_ptr<data_t>& data) : data_ptr(data) { } + explicit on_synchronize(const std::shared_ptr<data_t>& data) : data_ptr(data) { } void operator()(); @@ -581,7 +581,7 @@ get(const PBGL_DISTRIB_PMAP& pm, { using boost::get; - typename property_traits<GlobalMap>::value_type p = + typename property_traits<GlobalMap>::value_type p = get(pm.data->global, key); if (p.first == process_id(pm.data->process_group)) { @@ -609,13 +609,13 @@ put(const PBGL_DISTRIB_PMAP& pm, { using boost::put; - typename property_traits<GlobalMap>::value_type p = + typename property_traits<GlobalMap>::value_type p = get(pm.data->global, key); if (p.first == process_id(pm.data->process_group)) { put(pm.data->storage, p.second, value); } else { - if (pm.data->model & cm_forward) + if (pm.data->model & cm_forward) pm.request_put(p.first, key, value); pm.cell(key, false) = value; @@ -637,7 +637,7 @@ local_put(const PBGL_DISTRIB_PMAP& pm, { using boost::put; - typename property_traits<GlobalMap>::value_type p = + typename property_traits<GlobalMap>::value_type p = get(pm.data->global, key); if (p.first == process_id(pm.data->process_group)) @@ -669,7 +669,7 @@ synchronize(PBGL_DISTRIB_PMAP& pm) /// Create a distributed property map. template<typename ProcessGroup, typename GlobalMap, typename StorageMap> inline distributed_property_map<ProcessGroup, GlobalMap, StorageMap> -make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, +make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, StorageMap storage) { typedef distributed_property_map<ProcessGroup, GlobalMap, StorageMap> @@ -680,10 +680,10 @@ make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, /** * \overload */ -template<typename ProcessGroup, typename GlobalMap, typename StorageMap, +template<typename ProcessGroup, typename GlobalMap, typename StorageMap, typename Reduce> inline distributed_property_map<ProcessGroup, GlobalMap, StorageMap> -make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, +make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, StorageMap storage, Reduce reduce) { typedef distributed_property_map<ProcessGroup, GlobalMap, StorageMap> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/global_index_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/global_index_map.hpp index e40d27a0..eae5d112 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/global_index_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/global_index_map.hpp @@ -15,7 +15,7 @@ #include <boost/property_map/property_map.hpp> #include <vector> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { namespace parallel { @@ -29,7 +29,7 @@ public: typedef readable_property_map_tag category; template<typename ProcessGroup> - global_index_map(ProcessGroup pg, value_type num_local_indices, + global_index_map(ProcessGroup pg, value_type num_local_indices, IndexMap index_map, GlobalMap global) : index_map(index_map), global(global) { @@ -37,7 +37,7 @@ public: starting_index.reset(new std::vector<value_type>(num_processes(pg) + 1)); send(pg, 0, 0, num_local_indices); synchronize(pg); - + // Populate starting_index in all processes if (process_id(pg) == 0) { (*starting_index)[0] = 0; @@ -55,7 +55,7 @@ public: } } - friend inline value_type + friend inline value_type get(const global_index_map& gim, const key_type& x) { using boost::get; @@ -64,7 +64,7 @@ public: } private: - shared_ptr<std::vector<value_type> > starting_index; + std::shared_ptr<std::vector<value_type> > starting_index; IndexMap index_map; GlobalMap global; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/impl/distributed_property_map.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/impl/distributed_property_map.ipp index ef20817f..d47d6856 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/impl/distributed_property_map.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/impl/distributed_property_map.ipp @@ -41,7 +41,7 @@ PBGL_DISTRIB_PMAP::~distributed_property_map() { } template<typename ProcessGroup, typename GlobalMap, typename StorageMap> template<typename Reduce> -void +void PBGL_DISTRIB_PMAP::set_reduce(const Reduce& reduce) { typedef handle_message<Reduce> Handler; @@ -69,7 +69,7 @@ void PBGL_DISTRIB_PMAP::prune_ghost_cells() const // We need to flush values when we evict them. boost::parallel::detail::untracked_pair<key_type, value_type> const& victim = data->ghost_cells->back(); - send(data->process_group, get(data->global, victim.first).first, + send(data->process_group, get(data->global, victim.first).first, property_map_put, victim); } @@ -83,11 +83,11 @@ typename PBGL_DISTRIB_PMAP::value_type& PBGL_DISTRIB_PMAP::cell(const key_type& key, bool request_if_missing) const { // Index by key - ghost_cells_key_index_type const& key_index + ghost_cells_key_index_type const& key_index = data->ghost_cells->template get<1>(); // Search for the ghost cell by key, and project back to the sequence - iterator ghost_cell + iterator ghost_cell = data->ghost_cells->template project<0>(key_index.find(key)); if (ghost_cell == data->ghost_cells->end()) { value_type value; @@ -97,13 +97,13 @@ PBGL_DISTRIB_PMAP::cell(const key_type& key, bool request_if_missing) const value = data->get_default_value(key); else if (request_if_missing) // Request the actual value of this key from its owner - send_oob_with_reply(data->process_group, get(data->global, key).first, + send_oob_with_reply(data->process_group, get(data->global, key).first, property_map_get, key, value); else value = value_type(); // Create a ghost cell containing the new value - ghost_cell + ghost_cell = data->ghost_cells->push_front(std::make_pair(key, value)).first; // If we need to, prune the ghost cells @@ -129,12 +129,12 @@ template<typename ProcessGroup, typename GlobalMap, typename StorageMap> template<typename Reduce> void PBGL_DISTRIB_PMAP::handle_message<Reduce>:: -handle_put(int /*source*/, int /*tag*/, +handle_put(int /*source*/, int /*tag*/, const boost::parallel::detail::untracked_pair<key_type, value_type>& req, trigger_receive_context) { using boost::get; - shared_ptr<data_t> data(data_ptr); + std::shared_ptr<data_t> data(data_ptr); owner_local_pair p = get(data->global, req.first); BOOST_ASSERT(p.first == process_id(data->process_group)); @@ -149,12 +149,12 @@ template<typename ProcessGroup, typename GlobalMap, typename StorageMap> template<typename Reduce> typename PBGL_DISTRIB_PMAP::value_type PBGL_DISTRIB_PMAP::handle_message<Reduce>:: -handle_get(int source, int /*tag*/, const key_type& key, +handle_get(int source, int /*tag*/, const key_type& key, trigger_receive_context) { using boost::get; - shared_ptr<data_t> data(data_ptr); + std::shared_ptr<data_t> data(data_ptr); BOOST_ASSERT(data); owner_local_pair p = get(data->global, key); @@ -168,7 +168,7 @@ PBGL_DISTRIB_PMAP::handle_message<Reduce>:: handle_multiget(int source, int tag, const std::vector<key_type>& keys, trigger_receive_context) { - shared_ptr<data_t> data(data_ptr); + std::shared_ptr<data_t> data(data_ptr); BOOST_ASSERT(data); typedef boost::parallel::detail::untracked_pair<key_type, value_type> key_value; @@ -190,15 +190,15 @@ template<typename Reduce> void PBGL_DISTRIB_PMAP::handle_message<Reduce>:: handle_multiget_reply - (int source, int tag, + (int source, int tag, const std::vector<boost::parallel::detail::untracked_pair<key_type, value_type> >& msg, trigger_receive_context) { - shared_ptr<data_t> data(data_ptr); + std::shared_ptr<data_t> data(data_ptr); BOOST_ASSERT(data); // Index by key - ghost_cells_key_index_type const& key_index + ghost_cells_key_index_type const& key_index = data->ghost_cells->template get<1>(); std::size_t n = msg.size(); @@ -217,13 +217,13 @@ template<typename Reduce> void PBGL_DISTRIB_PMAP::handle_message<Reduce>:: handle_multiput - (int source, int tag, + (int source, int tag, const std::vector<unsafe_pair<local_key_type, value_type> >& values, trigger_receive_context) { using boost::get; - shared_ptr<data_t> data(data_ptr); + std::shared_ptr<data_t> data(data_ptr); BOOST_ASSERT(data); std::size_t n = values.size(); @@ -247,11 +247,11 @@ setup_triggers(process_group_type& pg) simple_trigger(pg, property_map_put, this, &handle_message::handle_put); simple_trigger(pg, property_map_get, this, &handle_message::handle_get); - simple_trigger(pg, property_map_multiget, this, + simple_trigger(pg, property_map_multiget, this, &handle_message::handle_multiget); - simple_trigger(pg, property_map_multiget_reply, this, + simple_trigger(pg, property_map_multiget_reply, this, &handle_message::handle_multiget_reply); - simple_trigger(pg, property_map_multiput, this, + simple_trigger(pg, property_map_multiput, this, &handle_message::handle_multiput); } @@ -261,7 +261,7 @@ PBGL_DISTRIB_PMAP ::on_synchronize::operator()() { int stage=0; // we only get called at the start now - shared_ptr<data_t> data(data_ptr); + std::shared_ptr<data_t> data(data_ptr); BOOST_ASSERT(data); // Determine in which stage backward consistency messages should be sent. @@ -371,7 +371,7 @@ void PBGL_DISTRIB_PMAP::data_t::refresh_ghost_cells() for (process_size_type p = (id + 1) % n ; p != id ; p = (p + 1) % n) { if (!keys[p].empty()) send(process_group, p, property_map_multiget, keys[p]); - } + } } template<typename ProcessGroup, typename GlobalMap, typename StorageMap> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/vector_property_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/vector_property_map.hpp index a97fb810..46d7924a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/vector_property_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/vector_property_map.hpp @@ -11,29 +11,29 @@ #define VECTOR_PROPERTY_MAP_HPP_VP_2003_03_04 #include <boost/property_map/property_map.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <vector> namespace boost { template<typename T, typename IndexMap = identity_property_map> class vector_property_map - : public boost::put_get_helper< - typename std::iterator_traits< + : public boost::put_get_helper< + typename std::iterator_traits< typename std::vector<T>::iterator >::reference, vector_property_map<T, IndexMap> > { public: typedef typename property_traits<IndexMap>::key_type key_type; typedef T value_type; - typedef typename std::iterator_traits< + typedef typename std::iterator_traits< typename std::vector<T>::iterator >::reference reference; typedef boost::lvalue_property_map_tag category; - + vector_property_map(const IndexMap& index = IndexMap()) : store(new std::vector<T>()), index(index) {} - vector_property_map(unsigned initial_size, + vector_property_map(unsigned initial_size, const IndexMap& index = IndexMap()) : store(new std::vector<T>(initial_size)), index(index) {} @@ -57,15 +57,15 @@ namespace boost { { return store->end(); } - + IndexMap& get_index_map() { return index; } const IndexMap& get_index_map() const { return index; } - + public: // Copy ctor absent, default semantics is OK. // Assignment operator absent, default semantics is OK. // CONSIDER: not sure that assignment to 'index' is correct. - + reference operator[](const key_type& v) const { typename property_traits<IndexMap>::value_type i = get(index, v); if (static_cast<unsigned>(i) >= store->size()) { @@ -74,16 +74,16 @@ namespace boost { return (*store)[i]; } private: - // Conceptually, we have a vector of infinite size. For practical + // Conceptually, we have a vector of infinite size. For practical // purposes, we start with an empty vector and grow it as needed. // Note that we cannot store pointer to vector here -- we cannot // store pointer to data, because if copy of property map resizes - // the vector, the pointer to data will be invalidated. + // the vector, the pointer to data will be invalidated. // I wonder if class 'pmap_ref' is simply needed. - shared_ptr< std::vector<T> > store; + std::shared_ptr< std::vector<T> > store; IndexMap index; }; - + template<typename T, typename IndexMap> vector_property_map<T, IndexMap> make_vector_property_map(IndexMap index) @@ -103,15 +103,15 @@ namespace boost { * This specialization of @ref vector_property_map builds a * distributed vector property map given the local index maps * generated by distributed graph types that automatically have index - * properties. + * properties. * * This specialization is useful when creating external distributed * property maps via the same syntax used to create external * sequential property maps. */ -template<typename T, typename ProcessGroup, typename GlobalMap, +template<typename T, typename ProcessGroup, typename GlobalMap, typename StorageMap> -class vector_property_map<T, +class vector_property_map<T, local_property_map<ProcessGroup, GlobalMap, StorageMap> > : public parallel::distributed_property_map< @@ -119,7 +119,7 @@ class vector_property_map<T, { typedef vector_property_map<T, StorageMap> local_iterator_map; - typedef parallel::distributed_property_map<ProcessGroup, GlobalMap, + typedef parallel::distributed_property_map<ProcessGroup, GlobalMap, local_iterator_map> inherited; typedef local_property_map<ProcessGroup, GlobalMap, StorageMap> index_map_type; @@ -129,7 +129,7 @@ public: : inherited(index.process_group(), index.global(), local_iterator_map(index.base())) { } - vector_property_map(unsigned inital_size, + vector_property_map(unsigned inital_size, const index_map_type& index = index_map_type()) : inherited(index.process_group(), index.global(), local_iterator_map(inital_size, index.base())) { } @@ -140,31 +140,31 @@ public: * This specialization of @ref vector_property_map builds a * distributed vector property map given the local index maps * generated by distributed graph types that automatically have index - * properties. + * properties. * * This specialization is useful when creating external distributed * property maps via the same syntax used to create external * sequential property maps. */ -template<typename T, typename ProcessGroup, typename GlobalMap, +template<typename T, typename ProcessGroup, typename GlobalMap, typename StorageMap> class vector_property_map< - T, + T, parallel::distributed_property_map< ProcessGroup, GlobalMap, StorageMap > - > + > : public parallel::distributed_property_map< ProcessGroup, GlobalMap, vector_property_map<T, StorageMap> > { typedef vector_property_map<T, StorageMap> local_iterator_map; - typedef parallel::distributed_property_map<ProcessGroup, GlobalMap, + typedef parallel::distributed_property_map<ProcessGroup, GlobalMap, local_iterator_map> inherited; - typedef parallel::distributed_property_map<ProcessGroup, GlobalMap, + typedef parallel::distributed_property_map<ProcessGroup, GlobalMap, StorageMap> index_map_type; @@ -173,7 +173,7 @@ public: : inherited(index.process_group(), index.global(), local_iterator_map(index.base())) { } - vector_property_map(unsigned inital_size, + vector_property_map(unsigned inital_size, const index_map_type& index = index_map_type()) : inherited(index.process_group(), index.global(), local_iterator_map(inital_size, index.base())) { } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/ptr_container/clone_allocator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/ptr_container/clone_allocator.hpp index 6d396e80..f0842884 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/ptr_container/clone_allocator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/ptr_container/clone_allocator.hpp @@ -19,9 +19,9 @@ namespace boost { ///////////////////////////////////////////////////////////////////////// - // Clonable concept + // Clonable concept ///////////////////////////////////////////////////////////////////////// - + template< class T > inline T* new_clone( const T& r ) { @@ -43,13 +43,13 @@ namespace boost return r ? new_clone( *r ) : 0; } - // + // // @remark: to make new_clone() work - // with scope_ptr/shared_ptr ect. + // with scope_ptr/std::shared_ptr ect. // simply overload for those types // in the appropriate namespace. - // - + // + template< class T > inline void delete_clone( const T* r ) { @@ -59,7 +59,7 @@ namespace boost ///////////////////////////////////////////////////////////////////////// // CloneAllocator concept ///////////////////////////////////////////////////////////////////////// - + struct heap_clone_allocator { template< class U > @@ -77,7 +77,7 @@ namespace boost }; - + struct view_clone_allocator { template< class U > diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registered.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registered.hpp index 2404cb0f..36816b1f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registered.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registered.hpp @@ -16,12 +16,12 @@ namespace boost { -// You'll see shared_ptr mentioned in this header because we need to +// You'll see std::shared_ptr mentioned in this header because we need to // note which types are shared_ptrs in their registrations, to -// implement special shared_ptr handling for rvalue conversions. -template <class T> class shared_ptr; +// implement special std::shared_ptr handling for rvalue conversions. +template <class T> class std::shared_ptr; -namespace python { namespace converter { +namespace python { namespace converter { struct registration; @@ -64,23 +64,23 @@ namespace detail register_shared_ptr0(...) { } - + template <class T> inline void - register_shared_ptr0(shared_ptr<T>*) + register_shared_ptr0(std::shared_ptr<T>*) { - registry::lookup_shared_ptr(type_id<shared_ptr<T> >()); + registry::lookup_shared_ptr(type_id<std::shared_ptr<T> >()); } - + template <class T> inline void register_shared_ptr1(T const volatile*) { detail::register_shared_ptr0((T*)0); } - + template <class T> - inline registration const& + inline registration const& registry_lookup2(T&(*)()) { detail::register_shared_ptr1((T*)0); @@ -88,13 +88,13 @@ namespace detail } template <class T> - inline registration const& + inline registration const& registry_lookup1(type<T>) { return registry_lookup2((T(*)())0); } - inline registration const& + inline registration const& registry_lookup1(type<const volatile void>) { detail::register_shared_ptr1((void*)0); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registrations.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registrations.hpp index 7ef74e8f..2c88b7ad 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registrations.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registrations.hpp @@ -15,7 +15,7 @@ # include <boost/detail/workaround.hpp> -namespace boost { namespace python { namespace converter { +namespace boost { namespace python { namespace converter { struct lvalue_from_python_chain { @@ -36,7 +36,7 @@ struct BOOST_PYTHON_DECL registration public: // member functions explicit registration(type_info target, bool is_shared_ptr = false); ~registration(); - + // Convert the appropriately-typed data to Python PyObject* to_python(void const volatile*) const; @@ -44,7 +44,7 @@ struct BOOST_PYTHON_DECL registration // exception if no class has been registered. PyTypeObject* get_class_object() const; - // Return common denominator of the python class objects, + // Return common denominator of the python class objects, // convertable to target. Inspects the m_class_object and the value_chains. PyTypeObject const* expected_from_python_type() const; PyTypeObject const* to_python_target_type() const; @@ -57,7 +57,7 @@ struct BOOST_PYTHON_DECL registration // The chain of eligible from_python converters when an rvalue is acceptable rvalue_from_python_chain* rvalue_chain; - + // The class object associated with this type PyTypeObject* m_class_object; @@ -66,14 +66,14 @@ struct BOOST_PYTHON_DECL registration PyTypeObject const* (*m_to_python_target_type)(); - // True iff this type is a shared_ptr. Needed for special rvalue + // True iff this type is a std::shared_ptr. Needed for special rvalue // from_python handling. const bool is_shared_ptr; # if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) private: void operator=(registration); // This is not defined, and just keeps MWCW happy. -# endif +# endif }; // diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registry.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registry.hpp index 368adcc6..f09356d6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registry.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registry.hpp @@ -21,12 +21,12 @@ namespace registry BOOST_PYTHON_DECL registration const& lookup(type_info); // Get the registration corresponding to the type, creating it if - // necessary. Use this first when the type is a shared_ptr. + // necessary. Use this first when the type is a std::shared_ptr. BOOST_PYTHON_DECL registration const& lookup_shared_ptr(type_info); // Return a pointer to the corresponding registration, if one exists BOOST_PYTHON_DECL registration const* query(type_info); - + BOOST_PYTHON_DECL void insert(to_python_function_t, type_info, PyTypeObject const* (*to_python_target_type)() = 0); // Insert an lvalue from_python converter @@ -39,7 +39,7 @@ namespace registry , type_info , PyTypeObject const* (*expected_pytype)() = 0 ); - + // Insert an rvalue from_python converter at the tail of the // chain. Used for implicit conversions BOOST_PYTHON_DECL void push_back( diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_from_python.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_from_python.hpp index c0910776..d7905d2c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_from_python.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_from_python.hpp @@ -13,16 +13,16 @@ #ifndef BOOST_PYTHON_NO_PY_SIGNATURES # include <boost/python/converter/pytype_function.hpp> #endif -# include <boost/shared_ptr.hpp> +# include <boost/std::shared_ptr.hpp> -namespace boost { namespace python { namespace converter { +namespace boost { namespace python { namespace converter { template <class T> struct shared_ptr_from_python { shared_ptr_from_python() { - converter::registry::insert(&convertible, &construct, type_id<shared_ptr<T> >() + converter::registry::insert(&convertible, &construct, type_id<std::shared_ptr<T> >() #ifndef BOOST_PYTHON_NO_PY_SIGNATURES , &converter::expected_from_python_type_direct<T>::get_pytype #endif @@ -34,26 +34,26 @@ struct shared_ptr_from_python { if (p == Py_None) return p; - + return converter::get_lvalue_from_python(p, registered<T>::converters); } - + static void construct(PyObject* source, rvalue_from_python_stage1_data* data) { - void* const storage = ((converter::rvalue_from_python_storage<shared_ptr<T> >*)data)->storage.bytes; + void* const storage = ((converter::rvalue_from_python_storage<std::shared_ptr<T> >*)data)->storage.bytes; // Deal with the "None" case. if (data->convertible == source) - new (storage) shared_ptr<T>(); + new (storage) std::shared_ptr<T>(); else { - boost::shared_ptr<void> hold_convertible_ref_count( + boost::std::shared_ptr<void> hold_convertible_ref_count( (void*)0, shared_ptr_deleter(handle<>(borrowed(source))) ); // use aliasing constructor - new (storage) shared_ptr<T>( + new (storage) std::shared_ptr<T>( hold_convertible_ref_count, static_cast<T*>(data->convertible)); } - + data->convertible = storage; } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_to_python.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_to_python.hpp index fe867ace..cba75647 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_to_python.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_to_python.hpp @@ -7,20 +7,20 @@ # include <boost/python/refcount.hpp> # include <boost/python/converter/shared_ptr_deleter.hpp> -# include <boost/shared_ptr.hpp> +# include <boost/std::shared_ptr.hpp> # include <boost/get_pointer.hpp> -namespace boost { namespace python { namespace converter { +namespace boost { namespace python { namespace converter { template <class T> -PyObject* shared_ptr_to_python(shared_ptr<T> const& x) +PyObject* shared_ptr_to_python(std::shared_ptr<T> const& x) { if (!x) return python::detail::none(); else if (shared_ptr_deleter* d = boost::get_deleter<shared_ptr_deleter>(x)) return incref( get_pointer( d->owner ) ); else - return converter::registered<shared_ptr<T> const&>::converters.to_python(&x); + return converter::registered<std::shared_ptr<T> const&>::converters.to_python(&x); } }}} // namespace boost::python::converter diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/is_shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/is_shared_ptr.hpp index 547af3f1..ae94c900 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/is_shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/is_shared_ptr.hpp @@ -6,12 +6,12 @@ # define IS_SHARED_PTR_DWA2003224_HPP # include <boost/python/detail/is_xxx.hpp> -# include <boost/shared_ptr.hpp> +# include <boost/std::shared_ptr.hpp> -namespace boost { namespace python { namespace detail { +namespace boost { namespace python { namespace detail { + +BOOST_PYTHON_IS_XXX_DEF(std::shared_ptr, std::shared_ptr, 1) -BOOST_PYTHON_IS_XXX_DEF(shared_ptr, shared_ptr, 1) - }}} // namespace boost::python::detail #endif // IS_SHARED_PTR_DWA2003224_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/value_is_shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/value_is_shared_ptr.hpp index 361c369b..f2952cbb 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/value_is_shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/value_is_shared_ptr.hpp @@ -6,12 +6,12 @@ # define VALUE_IS_SHARED_PTR_DWA2003224_HPP # include <boost/python/detail/value_is_xxx.hpp> -# include <boost/shared_ptr.hpp> +# include <boost/std::shared_ptr.hpp> -namespace boost { namespace python { namespace detail { +namespace boost { namespace python { namespace detail { + +BOOST_PYTHON_VALUE_IS_XXX_DEF(std::shared_ptr, std::shared_ptr, 1) -BOOST_PYTHON_VALUE_IS_XXX_DEF(shared_ptr, shared_ptr, 1) - }}} // namespace boost::python::detail #endif // VALUE_IS_SHARED_PTR_DWA2003224_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/instance_holder.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/instance_holder.hpp index 933f50d1..86d82964 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/instance_holder.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/instance_holder.hpp @@ -11,7 +11,7 @@ # include <boost/python/type_id.hpp> # include <cstddef> -namespace boost { namespace python { +namespace boost { namespace python { // Base class for all holders struct BOOST_PYTHON_DECL instance_holder : private noncopyable @@ -19,13 +19,13 @@ struct BOOST_PYTHON_DECL instance_holder : private noncopyable public: instance_holder(); virtual ~instance_holder(); - + // return the next holder in a chain instance_holder* next() const; // When the derived holder actually holds by [smart] pointer and // null_ptr_only is set, only report that the type is held when - // the pointer is null. This is needed for proper shared_ptr + // the pointer is null. This is needed for proper std::shared_ptr // support, to prevent holding shared_ptrs from being found when // converting from python so that we can use the conversion method // that always holds the Python object. @@ -34,7 +34,7 @@ struct BOOST_PYTHON_DECL instance_holder : private noncopyable void install(PyObject* inst) throw(); // These functions should probably be located elsewhere. - + // Allocate storage for an object of the given size at the given // offset in the Python instance<> object if bytes are available // there. Otherwise allocate size bytes of heap memory. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/find_instance.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/find_instance.hpp index 3202c1cd..76b57a0f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/find_instance.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/find_instance.hpp @@ -7,12 +7,12 @@ # include <boost/python/type_id.hpp> -namespace boost { namespace python { namespace objects { +namespace boost { namespace python { namespace objects { // Given a type_id, find the instance data which corresponds to it, or // return 0 in case no such type is held. If null_shared_ptr_only is -// true and the type being sought is a shared_ptr, only find an -// instance if it turns out to be NULL. Needed for shared_ptr rvalue +// true and the type being sought is a std::shared_ptr, only find an +// instance if it turns out to be NULL. Needed for std::shared_ptr rvalue // from_python support. BOOST_PYTHON_DECL void* find_instance_impl(PyObject*, type_info, bool null_shared_ptr_only = false); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/inheritance.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/inheritance.hpp index b49a0442..948baa42 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/inheritance.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/inheritance.hpp @@ -6,7 +6,7 @@ # define INHERITANCE_DWA200216_HPP # include <boost/python/type_id.hpp> -# include <boost/shared_ptr.hpp> +# include <boost/std::shared_ptr.hpp> # include <boost/mpl/if.hpp> # include <boost/type_traits/is_polymorphic.hpp> # include <boost/type_traits/is_base_and_derived.hpp> @@ -88,7 +88,7 @@ struct dynamic_cast_generator return dynamic_cast<Target*>( static_cast<Source*>(source)); } - + }; template <class Source, class Target> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_indirect.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_indirect.hpp index 23ad0263..df660a3a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_indirect.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_indirect.hpp @@ -23,9 +23,9 @@ # include <boost/mpl/bool.hpp> -# if defined(__ICL) && __ICL < 600 -# include <boost/shared_ptr.hpp> -# else +# if defined(__ICL) && __ICL < 600 +# include <boost/std::shared_ptr.hpp> +# else # include <memory> # endif @@ -57,7 +57,7 @@ struct to_python_indirect else return this->execute(*ptr, mpl::false_()); } - + template <class U> inline PyObject* execute(U const& x, mpl::false_) const { @@ -84,9 +84,9 @@ namespace detail // can't use auto_ptr with Intel 5 and VC6 Dinkum library // for some reason. We get link errors against the auto_ptr // copy constructor. -# if defined(__ICL) && __ICL < 600 - typedef boost::shared_ptr<T> smart_pointer; -# else +# if defined(__ICL) && __ICL < 600 + typedef boost::std::shared_ptr<T> smart_pointer; +# else typedef std::auto_ptr<T> smart_pointer; # endif typedef objects::pointer_holder<smart_pointer, T> holder_t; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_value.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_value.hpp index a48948d2..1628a93b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_value.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_value.hpp @@ -26,7 +26,7 @@ # include <boost/mpl/or.hpp> # include <boost/type_traits/is_const.hpp> -namespace boost { namespace python { +namespace boost { namespace python { namespace detail { @@ -58,7 +58,7 @@ struct object_manager_get_pytype<true> struct object_manager_to_python_value { typedef typename value_arg<T>::type argument_type; - + PyObject* operator()(argument_type) const; #ifndef BOOST_PYTHON_NO_PY_SIGNATURES typedef boost::mpl::bool_<is_handle<T>::value> is_t_handle; @@ -68,13 +68,13 @@ struct object_manager_get_pytype<true> } inline static PyTypeObject const* get_pytype_aux(mpl::true_*) {return converter::object_manager_traits<T>::get_pytype();} - - inline static PyTypeObject const* get_pytype_aux(mpl::false_* ) + + inline static PyTypeObject const* get_pytype_aux(mpl::false_* ) { return object_manager_get_pytype<is_t_const::value>::get((T(*)())0); } - -#endif + +#endif // This information helps make_getter() decide whether to try to // return an internal reference or not. I don't like it much, @@ -82,12 +82,12 @@ struct object_manager_get_pytype<true> BOOST_STATIC_CONSTANT(bool, uses_registry = false); }; - + template <class T> struct registry_to_python_value { typedef typename value_arg<T>::type argument_type; - + PyObject* operator()(argument_type) const; #ifndef BOOST_PYTHON_NO_PY_SIGNATURES PyTypeObject const* get_pytype() const {return converter::registered<T>::converters.to_python_target_type();} @@ -103,11 +103,11 @@ struct object_manager_get_pytype<true> struct shared_ptr_to_python_value { typedef typename value_arg<T>::type argument_type; - + PyObject* operator()(argument_type) const; #ifndef BOOST_PYTHON_NO_PY_SIGNATURES PyTypeObject const* get_pytype() const {return get_pytype((boost::type<argument_type>*)0);} -#endif +#endif // This information helps make_getter() decide whether to try to // return an internal reference or not. I don't like it much, // but it will have to serve for now. @@ -115,9 +115,9 @@ struct object_manager_get_pytype<true> private: #ifndef BOOST_PYTHON_NO_PY_SIGNATURES template <class U> - PyTypeObject const* get_pytype(boost::type<shared_ptr<U> &> *) const {return converter::registered<U>::converters.to_python_target_type();} + PyTypeObject const* get_pytype(boost::type<std::shared_ptr<U> &> *) const {return converter::registered<U>::converters.to_python_target_type();} template <class U> - PyTypeObject const* get_pytype(boost::type<const shared_ptr<U> &> *) const {return converter::registered<U>::converters.to_python_target_type();} + PyTypeObject const* get_pytype(boost::type<const std::shared_ptr<U> &> *) const {return converter::registered<U>::converters.to_python_target_type();} #endif }; } @@ -140,7 +140,7 @@ struct to_python_value }; // -// implementation +// implementation // namespace detail { @@ -151,7 +151,7 @@ namespace detail # if BOOST_WORKAROUND(__GNUC__, < 3) // suppresses an ICE, somehow (void)r::converters; -# endif +# endif return converter::registered<argument_type>::converters.to_python(&x); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp index 772806e9..a3d84b74 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2004 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -36,7 +36,7 @@ namespace boost{ namespace re_detail{ -// +// // Implementation details: // class BOOST_REGEX_DECL icu_regex_traits_implementation @@ -85,9 +85,9 @@ private: boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_primary_collator; // The primary collation object }; -inline boost::shared_ptr<icu_regex_traits_implementation> get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc) +inline boost::std::shared_ptr<icu_regex_traits_implementation> get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc) { - return boost::shared_ptr<icu_regex_traits_implementation>(new icu_regex_traits_implementation(loc)); + return boost::std::shared_ptr<icu_regex_traits_implementation>(new icu_regex_traits_implementation(loc)); } } @@ -208,7 +208,7 @@ private: static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2); - boost::shared_ptr< ::boost::re_detail::icu_regex_traits_implementation> m_pimpl; + boost::std::shared_ptr< ::boost::re_detail::icu_regex_traits_implementation> m_pimpl; }; } // namespace boost @@ -245,9 +245,9 @@ namespace re_detail{ #if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__) template <class InputIterator> -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<1>*) { typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type; @@ -255,9 +255,9 @@ inline u32regex do_make_u32regex(InputIterator i, } template <class InputIterator> -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<2>*) { typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type; @@ -265,18 +265,18 @@ inline u32regex do_make_u32regex(InputIterator i, } template <class InputIterator> -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<4>*) { return u32regex(i, j, opt); } #else template <class InputIterator> -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<1>*) { typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type; @@ -294,9 +294,9 @@ inline u32regex do_make_u32regex(InputIterator i, } template <class InputIterator> -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<2>*) { typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type; @@ -314,9 +314,9 @@ inline u32regex do_make_u32regex(InputIterator i, } template <class InputIterator> -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<4>*) { typedef std::vector<UChar32> vector_type; @@ -337,8 +337,8 @@ inline u32regex do_make_u32regex(InputIterator i, // Construction from an iterator pair: // template <class InputIterator> -inline u32regex make_u32regex(InputIterator i, - InputIterator j, +inline u32regex make_u32regex(InputIterator i, + InputIterator j, boost::regex_constants::syntax_option_type opt) { return re_detail::do_make_u32regex(i, j, opt, static_cast<boost::mpl::int_<sizeof(*i)> const*>(0)); @@ -406,18 +406,18 @@ void copy_results(MR1& out, MR2 const& in) } template <class BidiIterator, class Allocator> -inline bool do_regex_match(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +inline bool do_regex_match(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags, boost::mpl::int_<4> const*) { return ::boost::regex_match(first, last, m, e, flags); } template <class BidiIterator, class Allocator> -bool do_regex_match(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +bool do_regex_match(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags, boost::mpl::int_<2> const*) { @@ -431,9 +431,9 @@ bool do_regex_match(BidiIterator first, BidiIterator last, return result; } template <class BidiIterator, class Allocator> -bool do_regex_match(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +bool do_regex_match(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags, boost::mpl::int_<1> const*) { @@ -449,62 +449,62 @@ bool do_regex_match(BidiIterator first, BidiIterator last, } // namespace re_detail template <class BidiIterator, class Allocator> -inline bool u32regex_match(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +inline bool u32regex_match(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0)); } -inline bool u32regex_match(const UChar* p, - match_results<const UChar*>& m, - const u32regex& e, +inline bool u32regex_match(const UChar* p, + match_results<const UChar*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0)); } #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX) -inline bool u32regex_match(const wchar_t* p, - match_results<const wchar_t*>& m, - const u32regex& e, +inline bool u32regex_match(const wchar_t* p, + match_results<const wchar_t*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } #endif -inline bool u32regex_match(const char* p, - match_results<const char*>& m, - const u32regex& e, +inline bool u32regex_match(const char* p, + match_results<const char*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0)); } -inline bool u32regex_match(const unsigned char* p, - match_results<const unsigned char*>& m, - const u32regex& e, +inline bool u32regex_match(const unsigned char* p, + match_results<const unsigned char*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0)); } -inline bool u32regex_match(const std::string& s, - match_results<std::string::const_iterator>& m, - const u32regex& e, +inline bool u32regex_match(const std::string& s, + match_results<std::string::const_iterator>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0)); } #ifndef BOOST_NO_STD_WSTRING -inline bool u32regex_match(const std::wstring& s, - match_results<std::wstring::const_iterator>& m, - const u32regex& e, +inline bool u32regex_match(const std::wstring& s, + match_results<std::wstring::const_iterator>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } #endif -inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, - match_results<const UChar*>& m, - const u32regex& e, +inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, + match_results<const UChar*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); @@ -513,61 +513,61 @@ inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, // regex_match overloads that do not return what matched: // template <class BidiIterator> -inline bool u32regex_match(BidiIterator first, BidiIterator last, - const u32regex& e, +inline bool u32regex_match(BidiIterator first, BidiIterator last, + const u32regex& e, match_flag_type flags = match_default) { match_results<BidiIterator> m; return re_detail::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0)); } -inline bool u32regex_match(const UChar* p, - const u32regex& e, +inline bool u32regex_match(const UChar* p, + const u32regex& e, match_flag_type flags = match_default) { match_results<const UChar*> m; return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0)); } #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX) -inline bool u32regex_match(const wchar_t* p, - const u32regex& e, +inline bool u32regex_match(const wchar_t* p, + const u32regex& e, match_flag_type flags = match_default) { match_results<const wchar_t*> m; return re_detail::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } #endif -inline bool u32regex_match(const char* p, - const u32regex& e, +inline bool u32regex_match(const char* p, + const u32regex& e, match_flag_type flags = match_default) { match_results<const char*> m; return re_detail::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0)); } -inline bool u32regex_match(const unsigned char* p, - const u32regex& e, +inline bool u32regex_match(const unsigned char* p, + const u32regex& e, match_flag_type flags = match_default) { match_results<const unsigned char*> m; return re_detail::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0)); } -inline bool u32regex_match(const std::string& s, - const u32regex& e, +inline bool u32regex_match(const std::string& s, + const u32regex& e, match_flag_type flags = match_default) { match_results<std::string::const_iterator> m; return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0)); } #ifndef BOOST_NO_STD_WSTRING -inline bool u32regex_match(const std::wstring& s, - const u32regex& e, +inline bool u32regex_match(const std::wstring& s, + const u32regex& e, match_flag_type flags = match_default) { match_results<std::wstring::const_iterator> m; return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } #endif -inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, - const u32regex& e, +inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, + const u32regex& e, match_flag_type flags = match_default) { match_results<const UChar*> m; @@ -579,9 +579,9 @@ inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, // namespace re_detail{ template <class BidiIterator, class Allocator> -inline bool do_regex_search(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +inline bool do_regex_search(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags, BidiIterator base, boost::mpl::int_<4> const*) @@ -589,9 +589,9 @@ inline bool do_regex_search(BidiIterator first, BidiIterator last, return ::boost::regex_search(first, last, m, e, flags, base); } template <class BidiIterator, class Allocator> -bool do_regex_search(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +bool do_regex_search(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags, BidiIterator base, boost::mpl::int_<2> const*) @@ -606,9 +606,9 @@ bool do_regex_search(BidiIterator first, BidiIterator last, return result; } template <class BidiIterator, class Allocator> -bool do_regex_search(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +bool do_regex_search(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags, BidiIterator base, boost::mpl::int_<1> const*) @@ -625,131 +625,131 @@ bool do_regex_search(BidiIterator first, BidiIterator last, } template <class BidiIterator, class Allocator> -inline bool u32regex_search(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +inline bool u32regex_search(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(first, last, m, e, flags, first, static_cast<mpl::int_<sizeof(*first)> const*>(0)); } template <class BidiIterator, class Allocator> -inline bool u32regex_search(BidiIterator first, BidiIterator last, - match_results<BidiIterator, Allocator>& m, - const u32regex& e, +inline bool u32regex_search(BidiIterator first, BidiIterator last, + match_results<BidiIterator, Allocator>& m, + const u32regex& e, match_flag_type flags, BidiIterator base) { return re_detail::do_regex_search(first, last, m, e, flags, base, static_cast<mpl::int_<sizeof(*first)> const*>(0)); } -inline bool u32regex_search(const UChar* p, - match_results<const UChar*>& m, - const u32regex& e, +inline bool u32regex_search(const UChar* p, + match_results<const UChar*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0)); } #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX) -inline bool u32regex_search(const wchar_t* p, - match_results<const wchar_t*>& m, - const u32regex& e, +inline bool u32regex_search(const wchar_t* p, + match_results<const wchar_t*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } #endif -inline bool u32regex_search(const char* p, - match_results<const char*>& m, - const u32regex& e, +inline bool u32regex_search(const char* p, + match_results<const char*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0)); } -inline bool u32regex_search(const unsigned char* p, - match_results<const unsigned char*>& m, - const u32regex& e, +inline bool u32regex_search(const unsigned char* p, + match_results<const unsigned char*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0)); } -inline bool u32regex_search(const std::string& s, - match_results<std::string::const_iterator>& m, - const u32regex& e, +inline bool u32regex_search(const std::string& s, + match_results<std::string::const_iterator>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<1> const*>(0)); } #ifndef BOOST_NO_STD_WSTRING -inline bool u32regex_search(const std::wstring& s, - match_results<std::wstring::const_iterator>& m, - const u32regex& e, +inline bool u32regex_search(const std::wstring& s, + match_results<std::wstring::const_iterator>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } #endif -inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s, - match_results<const UChar*>& m, - const u32regex& e, +inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s, + match_results<const UChar*>& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, s.getBuffer(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } template <class BidiIterator> -inline bool u32regex_search(BidiIterator first, BidiIterator last, - const u32regex& e, +inline bool u32regex_search(BidiIterator first, BidiIterator last, + const u32regex& e, match_flag_type flags = match_default) { match_results<BidiIterator> m; return re_detail::do_regex_search(first, last, m, e, flags, first, static_cast<mpl::int_<sizeof(*first)> const*>(0)); } -inline bool u32regex_search(const UChar* p, - const u32regex& e, +inline bool u32regex_search(const UChar* p, + const u32regex& e, match_flag_type flags = match_default) { match_results<const UChar*> m; return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0)); } #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX) -inline bool u32regex_search(const wchar_t* p, - const u32regex& e, +inline bool u32regex_search(const wchar_t* p, + const u32regex& e, match_flag_type flags = match_default) { match_results<const wchar_t*> m; return re_detail::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } #endif -inline bool u32regex_search(const char* p, - const u32regex& e, +inline bool u32regex_search(const char* p, + const u32regex& e, match_flag_type flags = match_default) { match_results<const char*> m; return re_detail::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0)); } -inline bool u32regex_search(const unsigned char* p, - const u32regex& e, +inline bool u32regex_search(const unsigned char* p, + const u32regex& e, match_flag_type flags = match_default) { match_results<const unsigned char*> m; return re_detail::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0)); } -inline bool u32regex_search(const std::string& s, - const u32regex& e, +inline bool u32regex_search(const std::string& s, + const u32regex& e, match_flag_type flags = match_default) { match_results<std::string::const_iterator> m; return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<1> const*>(0)); } #ifndef BOOST_NO_STD_WSTRING -inline bool u32regex_search(const std::wstring& s, - const u32regex& e, +inline bool u32regex_search(const std::wstring& s, + const u32regex& e, match_flag_type flags = match_default) { match_results<std::wstring::const_iterator> m; return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0)); } #endif -inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s, - const u32regex& e, +inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s, + const u32regex& e, match_flag_type flags = match_default) { match_results<const UChar*> m; @@ -817,8 +817,8 @@ inline utf8_output_iterator<OutputIterator> make_utf32_out(OutputIterator o, mpl template <class OutputIterator, class I1, class I2> OutputIterator do_regex_replace(OutputIterator out, std::pair<I1, I1> const& in, - const u32regex& e, - const std::pair<I2, I2>& fmt, + const u32regex& e, + const std::pair<I2, I2>& fmt, match_flag_type flags ) { @@ -832,7 +832,7 @@ OutputIterator do_regex_replace(OutputIterator out, while(pos != fmt.second) f.push_back(*pos++); #endif - + regex_iterator<I1, UChar32, icu_regex_traits> i(in.first, in.second, e, flags); regex_iterator<I1, UChar32, icu_regex_traits> j; if(i == j) @@ -846,7 +846,7 @@ OutputIterator do_regex_replace(OutputIterator out, while(i != j) { if(!(flags & regex_constants::format_no_copy)) - out = re_detail::copy(i->prefix().first, i->prefix().second, out); + out = re_detail::copy(i->prefix().first, i->prefix().second, out); if(f.size()) out = ::boost::re_detail::regex_format_imp(out, *i, &*f.begin(), &*f.begin() + f.size(), flags, e.get_traits()); else @@ -882,8 +882,8 @@ template <class OutputIterator, class BidirectionalIterator, class charT> inline OutputIterator u32regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, - const u32regex& e, - const charT* fmt, + const u32regex& e, + const charT* fmt, match_flag_type flags = match_default) { return re_detail::extract_output_base @@ -904,7 +904,7 @@ template <class OutputIterator, class Iterator, class charT> inline OutputIterator u32regex_replace(OutputIterator out, Iterator first, Iterator last, - const u32regex& e, + const u32regex& e, const std::basic_string<charT>& fmt, match_flag_type flags = match_default) { @@ -926,7 +926,7 @@ template <class OutputIterator, class Iterator> inline OutputIterator u32regex_replace(OutputIterator out, Iterator first, Iterator last, - const u32regex& e, + const u32regex& e, const U_NAMESPACE_QUALIFIER UnicodeString& fmt, match_flag_type flags = match_default) { @@ -946,7 +946,7 @@ inline OutputIterator u32regex_replace(OutputIterator out, template <class charT> std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s, - const u32regex& e, + const u32regex& e, const charT* fmt, match_flag_type flags = match_default) { @@ -958,7 +958,7 @@ std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s, template <class charT> std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s, - const u32regex& e, + const u32regex& e, const std::basic_string<charT>& fmt, match_flag_type flags = match_default) { @@ -978,10 +978,10 @@ public: unicode_string_out_iterator& operator++() { return *this; } unicode_string_out_iterator& operator++(int) { return *this; } unicode_string_out_iterator& operator*() { return *this; } - unicode_string_out_iterator& operator=(UChar v) - { - *out += v; - return *this; + unicode_string_out_iterator& operator=(UChar v) + { + *out += v; + return *this; } typedef std::ptrdiff_t difference_type; typedef UChar value_type; @@ -993,7 +993,7 @@ public: } inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s, - const u32regex& e, + const u32regex& e, const UChar* fmt, match_flag_type flags = match_default) { @@ -1004,7 +1004,7 @@ inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QU } inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s, - const u32regex& e, + const u32regex& e, const U_NAMESPACE_QUALIFIER UnicodeString& fmt, match_flag_type flags = match_default) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/pending/object_cache.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/pending/object_cache.hpp index d47fbba9..8346166d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/pending/object_cache.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/pending/object_cache.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2004 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -24,7 +24,7 @@ #include <stdexcept> #include <string> #include <boost/config.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #ifdef BOOST_HAS_THREADS #include <boost/regex/pending/static_mutex.hpp> #endif @@ -35,16 +35,16 @@ template <class Key, class Object> class object_cache { public: - typedef std::pair< ::boost::shared_ptr<Object const>, Key const*> value_type; + typedef std::pair< ::boost::std::shared_ptr<Object const>, Key const*> value_type; typedef std::list<value_type> list_type; typedef typename list_type::iterator list_iterator; typedef std::map<Key, list_iterator> map_type; typedef typename map_type::iterator map_iterator; typedef typename list_type::size_type size_type; - static boost::shared_ptr<Object const> get(const Key& k, size_type l_max_cache_size); + static boost::std::shared_ptr<Object const> get(const Key& k, size_type l_max_cache_size); private: - static boost::shared_ptr<Object const> do_get(const Key& k, size_type l_max_cache_size); + static boost::std::shared_ptr<Object const> do_get(const Key& k, size_type l_max_cache_size); struct data { @@ -58,7 +58,7 @@ private: }; template <class Key, class Object> -boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, size_type l_max_cache_size) +boost::std::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, size_type l_max_cache_size) { #ifdef BOOST_HAS_THREADS static boost::static_mutex mut = BOOST_STATIC_MUTEX_INIT; @@ -74,7 +74,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, siz // ::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock")); #if defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION) || defined(BOOST_NO_EXCEPTIONS) - return boost::shared_ptr<Object>(); + return boost::std::shared_ptr<Object>(); #endif #else return do_get(k, l_max_cache_size); @@ -82,7 +82,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, siz } template <class Key, class Object> -boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, size_type l_max_cache_size) +boost::std::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, size_type l_max_cache_size) { typedef typename object_cache<Key, Object>::data object_data; typedef typename map_type::size_type map_size_type; @@ -95,7 +95,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, if(mpos != s_data.index.end()) { // - // Eureka! + // Eureka! // We have a cached item, bump it up the list and return it: // if(--(s_data.cont.end()) != mpos->second) @@ -117,7 +117,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, // if we get here then the item is not in the cache, // so create it: // - boost::shared_ptr<Object const> result(new Object(k)); + boost::std::shared_ptr<Object const> result(new Object(k)); // // Add it to the list, and index it: // @@ -143,11 +143,11 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, { list_iterator condemmed(pos); ++pos; - // now remove the items from our containers, + // now remove the items from our containers, // then order has to be as follows: BOOST_ASSERT(s_data.index.find(*(condemmed->second)) != s_data.index.end()); s_data.index.erase(*(condemmed->second)); - s_data.cont.erase(condemmed); + s_data.cont.erase(condemmed); --s; } else diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/basic_regex.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/basic_regex.hpp index 0b63e3aa..7d70105d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/basic_regex.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/basic_regex.hpp @@ -80,13 +80,13 @@ public: { template <class charT> name(const charT* i, const charT* j, int idx) - : index(idx) - { - hash = hash_value_from_capture_name(i, j); + : index(idx) + { + hash = hash_value_from_capture_name(i, j); } name(int h, int idx) : index(idx), hash(h) - { + { } int index; int hash; @@ -96,7 +96,7 @@ public: } bool operator == (const name& other)const { - return hash == other.hash; + return hash == other.hash; } void swap(name& other) { @@ -160,15 +160,15 @@ template <class charT, class traits> struct regex_data : public named_subexpressions { typedef regex_constants::syntax_option_type flag_type; - typedef std::size_t size_type; + typedef std::size_t size_type; - regex_data(const ::boost::shared_ptr< - ::boost::regex_traits_wrapper<traits> >& t) + regex_data(const ::boost::std::shared_ptr< + ::boost::regex_traits_wrapper<traits> >& t) : m_ptraits(t), m_expression(0), m_expression_len(0) {} - regex_data() + regex_data() : m_ptraits(new ::boost::regex_traits_wrapper<traits>()), m_expression(0), m_expression_len(0) {} - ::boost::shared_ptr< + ::boost::std::shared_ptr< ::boost::regex_traits_wrapper<traits> > m_ptraits; // traits class instance flag_type m_flags; // flags with which we were compiled @@ -198,12 +198,12 @@ class basic_regex_implementation public: typedef regex_constants::syntax_option_type flag_type; typedef std::ptrdiff_t difference_type; - typedef std::size_t size_type; + typedef std::size_t size_type; typedef typename traits::locale_type locale_type; typedef const charT* const_iterator; basic_regex_implementation(){} - basic_regex_implementation(const ::boost::shared_ptr< + basic_regex_implementation(const ::boost::std::shared_ptr< ::boost::regex_traits_wrapper<traits> >& t) : regex_data<charT, traits>(t) {} void assign(const charT* arg_first, @@ -216,12 +216,12 @@ public: } locale_type BOOST_REGEX_CALL imbue(locale_type l) - { - return this->m_ptraits->imbue(l); + { + return this->m_ptraits->imbue(l); } locale_type BOOST_REGEX_CALL getloc()const - { - return this->m_ptraits->getloc(); + { + return this->m_ptraits->getloc(); } std::basic_string<charT> BOOST_REGEX_CALL str()const { @@ -245,12 +245,12 @@ public: // // begin, end: const_iterator BOOST_REGEX_CALL begin()const - { - return (this->m_status ? 0 : this->m_expression); + { + return (this->m_status ? 0 : this->m_expression); } const_iterator BOOST_REGEX_CALL end()const - { - return (this->m_status ? 0 : this->m_expression + this->m_expression_len); + { + return (this->m_status ? 0 : this->m_expression + this->m_expression_len); } flag_type BOOST_REGEX_CALL flags()const { @@ -322,13 +322,13 @@ public: typedef const charT* const_iterator; typedef const_iterator iterator; typedef std::ptrdiff_t difference_type; - typedef std::size_t size_type; + typedef std::size_t size_type; typedef regex_constants::syntax_option_type flag_type; // locale_type // placeholder for actual locale type used by the // traits class to localise *this. typedef typename traits::locale_type locale_type; - + public: explicit basic_regex(){} explicit basic_regex(const charT* p, flag_type f = regex_constants::normal) @@ -358,9 +358,9 @@ public: // // assign: basic_regex& assign(const basic_regex& that) - { + { m_pimpl = that.m_pimpl; - return *this; + return *this; } basic_regex& assign(const charT* p, flag_type f = regex_constants::normal) { @@ -385,14 +385,14 @@ public: template <class ST, class SA> unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal) - { - return set_expression(p.data(), p.data() + p.size(), f); + { + return set_expression(p.data(), p.data() + p.size(), f); } template <class ST, class SA> explicit basic_regex(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal) - { - assign(p, f); + { + assign(p, f); } template <class InputIterator> @@ -437,13 +437,13 @@ public: } #else unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal) - { - return set_expression(p.data(), p.data() + p.size(), f); + { + return set_expression(p.data(), p.data() + p.size(), f); } basic_regex(const std::basic_string<charT>& p, flag_type f = regex_constants::normal) - { - assign(p, f); + { + assign(p, f); } basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p) @@ -464,19 +464,19 @@ public: // locale: locale_type BOOST_REGEX_CALL imbue(locale_type l); locale_type BOOST_REGEX_CALL getloc()const - { - return m_pimpl.get() ? m_pimpl->getloc() : locale_type(); + { + return m_pimpl.get() ? m_pimpl->getloc() : locale_type(); } // // getflags: // retained for backwards compatibility only, "flags" // is now the preferred name: flag_type BOOST_REGEX_CALL getflags()const - { + { return flags(); } flag_type BOOST_REGEX_CALL flags()const - { + { return m_pimpl.get() ? m_pimpl->flags() : 0; } // @@ -494,12 +494,12 @@ public: return m_pimpl->subexpression(n); } const_iterator BOOST_REGEX_CALL begin()const - { - return (m_pimpl.get() ? m_pimpl->begin() : 0); + { + return (m_pimpl.get() ? m_pimpl->begin() : 0); } const_iterator BOOST_REGEX_CALL end()const - { - return (m_pimpl.get() ? m_pimpl->end() : 0); + { + return (m_pimpl.get() ? m_pimpl->end() : 0); } // // swap: @@ -510,25 +510,25 @@ public: // // size: size_type BOOST_REGEX_CALL size()const - { - return (m_pimpl.get() ? m_pimpl->size() : 0); + { + return (m_pimpl.get() ? m_pimpl->size() : 0); } // // max_size: size_type BOOST_REGEX_CALL max_size()const - { - return UINT_MAX; + { + return UINT_MAX; } // // empty: bool BOOST_REGEX_CALL empty()const - { - return (m_pimpl.get() ? 0 != m_pimpl->status() : true); + { + return (m_pimpl.get() ? 0 != m_pimpl->status() : true); } - size_type BOOST_REGEX_CALL mark_count()const - { - return (m_pimpl.get() ? m_pimpl->mark_count() : 0); + size_type BOOST_REGEX_CALL mark_count()const + { + return (m_pimpl.get() ? m_pimpl->mark_count() : 0); } int status()const @@ -551,45 +551,45 @@ public: return str().compare(that.str()); } bool BOOST_REGEX_CALL operator==(const basic_regex& e)const - { - return compare(e) == 0; + { + return compare(e) == 0; } bool BOOST_REGEX_CALL operator != (const basic_regex& e)const - { - return compare(e) != 0; + { + return compare(e) != 0; } bool BOOST_REGEX_CALL operator<(const basic_regex& e)const - { - return compare(e) < 0; + { + return compare(e) < 0; } bool BOOST_REGEX_CALL operator>(const basic_regex& e)const - { - return compare(e) > 0; + { + return compare(e) > 0; } bool BOOST_REGEX_CALL operator<=(const basic_regex& e)const - { - return compare(e) <= 0; + { + return compare(e) <= 0; } bool BOOST_REGEX_CALL operator>=(const basic_regex& e)const - { - return compare(e) >= 0; + { + return compare(e) >= 0; } // // The following are deprecated as public interfaces // but are available for compatibility with earlier versions. - const charT* BOOST_REGEX_CALL expression()const - { - return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0); + const charT* BOOST_REGEX_CALL expression()const + { + return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0); } unsigned int BOOST_REGEX_CALL set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) { assign(p1, p2, f | regex_constants::no_except); return status(); } - unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal) - { - assign(p, f | regex_constants::no_except); + unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal) + { + assign(p, f | regex_constants::no_except); return status(); } unsigned int BOOST_REGEX_CALL error_code()const @@ -629,13 +629,13 @@ public: BOOST_ASSERT(0 != m_pimpl.get()); return m_pimpl->get_data(); } - boost::shared_ptr<re_detail::named_subexpressions > get_named_subs()const + boost::std::shared_ptr<re_detail::named_subexpressions > get_named_subs()const { return m_pimpl; } private: - shared_ptr<re_detail::basic_regex_implementation<charT, traits> > m_pimpl; + std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> > m_pimpl; }; // @@ -649,14 +649,14 @@ basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p const charT* p2, flag_type f) { - shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp; + std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp; if(!m_pimpl.get()) { - temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>()); + temp = std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>()); } else { - temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits)); + temp = std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits)); } temp->assign(p1, p2, f); temp.swap(m_pimpl); @@ -665,8 +665,8 @@ basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p template <class charT, class traits> typename basic_regex<charT, traits>::locale_type BOOST_REGEX_CALL basic_regex<charT, traits>::imbue(locale_type l) -{ - shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp(new re_detail::basic_regex_implementation<charT, traits>()); +{ + std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp(new re_detail::basic_regex_implementation<charT, traits>()); locale_type result = temp->imbue(l); temp.swap(m_pimpl); return result; @@ -683,8 +683,8 @@ void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2) #ifndef BOOST_NO_STD_LOCALE template <class charT, class traits, class traits2> -std::basic_ostream<charT, traits>& - operator << (std::basic_ostream<charT, traits>& os, +std::basic_ostream<charT, traits>& + operator << (std::basic_ostream<charT, traits>& os, const basic_regex<charT, traits2>& e) { return (os << e.str()); @@ -731,7 +731,7 @@ public: template <class ST, class SA> explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal) : basic_regex<charT, traits>(p, f) - { + { } template <class InputIterator> @@ -749,7 +749,7 @@ public: #else explicit reg_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal) : basic_regex<charT, traits>(p, f) - { + { } reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/cpp_regex_traits.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/cpp_regex_traits.hpp index d60942f0..17fe2b63 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/cpp_regex_traits.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/cpp_regex_traits.hpp @@ -3,12 +3,12 @@ * Copyright (c) 2004 John Maddock * Copyright 2011 Garmin Ltd. or its subsidiaries * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ - + /* * LOCATION: see http://www.boost.org for most recent version. * FILE cpp_regex_traits.hpp @@ -60,14 +60,14 @@ #pragma warning(disable:4786 4251) #endif -namespace boost{ +namespace boost{ // // forward declaration is needed by some compilers: // template <class charT> class cpp_regex_traits; - + namespace re_detail{ // @@ -201,9 +201,9 @@ struct cpp_regex_traits_base } bool operator==(const cpp_regex_traits_base& b)const { - return (m_pctype == b.m_pctype) + return (m_pctype == b.m_pctype) #ifndef BOOST_NO_STD_MESSAGES - && (m_pmessages == b.m_pmessages) + && (m_pmessages == b.m_pmessages) #endif && (m_pcollate == b.m_pcollate); } @@ -283,7 +283,7 @@ void cpp_regex_traits_char_layer<charT>::init() if(cat_name.size() && (this->m_pmessages != 0)) { cat = this->m_pmessages->open( - cat_name, + cat_name, this->m_locale); if((int)cat < 0) { @@ -337,7 +337,7 @@ void cpp_regex_traits_char_layer<charT>::init() } template <class charT> -typename cpp_regex_traits_char_layer<charT>::string_type +typename cpp_regex_traits_char_layer<charT>::string_type cpp_regex_traits_char_layer<charT>::get_default_message(regex_constants::syntax_type i) { const char* ptr = get_default_syntax(i); @@ -386,16 +386,16 @@ private: #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET enum { - char_class_space=1<<0, - char_class_print=1<<1, - char_class_cntrl=1<<2, - char_class_upper=1<<3, + char_class_space=1<<0, + char_class_print=1<<1, + char_class_cntrl=1<<2, + char_class_upper=1<<3, char_class_lower=1<<4, - char_class_alpha=1<<5, - char_class_digit=1<<6, - char_class_punct=1<<7, + char_class_alpha=1<<5, + char_class_digit=1<<6, + char_class_punct=1<<7, char_class_xdigit=1<<8, - char_class_alnum=char_class_alpha|char_class_digit, + char_class_alnum=char_class_alpha|char_class_digit, char_class_graph=char_class_alnum|char_class_punct, char_class_blank=1<<9, char_class_word=1<<10, @@ -495,14 +495,14 @@ typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex #endif template <class charT> -typename cpp_regex_traits_implementation<charT>::string_type +typename cpp_regex_traits_implementation<charT>::string_type cpp_regex_traits_implementation<charT>::transform_primary(const charT* p1, const charT* p2) const { // // PRECONDITIONS: // // A bug in gcc 3.2 (and maybe other versions as well) treats - // p1 as a null terminated string, for efficiency reasons + // p1 as a null terminated string, for efficiency reasons // we work around this elsewhere, but just assert here that // we adhere to gcc's (buggy) preconditions... // @@ -565,14 +565,14 @@ typename cpp_regex_traits_implementation<charT>::string_type } template <class charT> -typename cpp_regex_traits_implementation<charT>::string_type +typename cpp_regex_traits_implementation<charT>::string_type cpp_regex_traits_implementation<charT>::transform(const charT* p1, const charT* p2) const { // // PRECONDITIONS: // // A bug in gcc 3.2 (and maybe other versions as well) treats - // p1 as a null terminated string, for efficiency reasons + // p1 as a null terminated string, for efficiency reasons // we work around this elsewhere, but just assert here that // we adhere to gcc's (buggy) preconditions... // @@ -613,7 +613,7 @@ typename cpp_regex_traits_implementation<charT>::string_type template <class charT> -typename cpp_regex_traits_implementation<charT>::string_type +typename cpp_regex_traits_implementation<charT>::string_type cpp_regex_traits_implementation<charT>::lookup_collatename(const charT* p1, const charT* p2) const { typedef typename std::map<string_type, string_type>::const_iterator iter_type; @@ -669,7 +669,7 @@ void cpp_regex_traits_implementation<charT>::init() if(cat_name.size() && (this->m_pmessages != 0)) { cat = this->m_pmessages->open( - cat_name, + cat_name, this->m_locale); if((int)cat < 0) { @@ -686,8 +686,8 @@ void cpp_regex_traits_implementation<charT>::init() // // Error messages: // - for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0); - i <= boost::regex_constants::error_unknown; + for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0); + i <= boost::regex_constants::error_unknown; i = static_cast<boost::regex_constants::error_type>(i + 1)) { const char* p = get_default_error_string(i); @@ -709,7 +709,7 @@ void cpp_regex_traits_implementation<charT>::init() // Custom class names: // #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET - static const char_class_type masks[16] = + static const char_class_type masks[16] = { std::ctype<charT>::alnum, std::ctype<charT>::alpha, @@ -729,7 +729,7 @@ void cpp_regex_traits_implementation<charT>::init() cpp_regex_traits_implementation<charT>::mask_unicode, }; #else - static const char_class_type masks[16] = + static const char_class_type masks[16] = { ::boost::re_detail::char_class_alnum, ::boost::re_detail::char_class_alpha, @@ -765,14 +765,14 @@ void cpp_regex_traits_implementation<charT>::init() } template <class charT> -typename cpp_regex_traits_implementation<charT>::char_class_type +typename cpp_regex_traits_implementation<charT>::char_class_type cpp_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const { #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET - static const char_class_type masks[22] = + static const char_class_type masks[22] = { 0, - std::ctype<char>::alnum, + std::ctype<char>::alnum, std::ctype<char>::alpha, cpp_regex_traits_implementation<charT>::mask_blank, std::ctype<char>::cntrl, @@ -790,15 +790,15 @@ typename cpp_regex_traits_implementation<charT>::char_class_type cpp_regex_traits_implementation<charT>::mask_unicode, std::ctype<char>::upper, cpp_regex_traits_implementation<charT>::mask_vertical, - std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word, - std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word, + std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word, + std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word, std::ctype<char>::xdigit, }; #else - static const char_class_type masks[22] = + static const char_class_type masks[22] = { 0, - ::boost::re_detail::char_class_alnum, + ::boost::re_detail::char_class_alnum, ::boost::re_detail::char_class_alpha, ::boost::re_detail::char_class_blank, ::boost::re_detail::char_class_cntrl, @@ -816,8 +816,8 @@ typename cpp_regex_traits_implementation<charT>::char_class_type ::boost::re_detail::char_class_unicode, ::boost::re_detail::char_class_upper, ::boost::re_detail::char_class_vertical_space, - ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, - ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, + ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, + ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, ::boost::re_detail::char_class_xdigit, }; #endif @@ -857,7 +857,7 @@ bool cpp_regex_traits_implementation<charT>::isctype(const charT c, char_class_t template <class charT> -inline boost::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +inline boost::std::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) { cpp_regex_traits_base<charT> key(l); return ::boost::object_cache<cpp_regex_traits_base<charT>, cpp_regex_traits_implementation<charT> >::get(key, 5); @@ -935,9 +935,9 @@ public: #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET typedef typename std::ctype<charT>::mask ctype_mask; - static const ctype_mask mask_base = + static const ctype_mask mask_base = static_cast<ctype_mask>( - std::ctype<charT>::alnum + std::ctype<charT>::alnum | std::ctype<charT>::alpha | std::ctype<charT>::cntrl | std::ctype<charT>::digit @@ -949,7 +949,7 @@ public: | std::ctype<charT>::upper | std::ctype<charT>::xdigit); - if((f & mask_base) + if((f & mask_base) && (m_pimpl->m_pctype->is( static_cast<ctype_mask>(f & mask_base), c))) return true; @@ -957,14 +957,14 @@ public: return true; else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_word) && (c == '_')) return true; - else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_blank) + else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_blank) && m_pimpl->m_pctype->is(std::ctype<charT>::space, c) && !re_detail::is_separator(c)) return true; - else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_vertical) + else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v'))) return true; - else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_horizontal) + else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_horizontal) && this->isctype(c, std::ctype<charT>::space) && !this->isctype(c, re_detail::cpp_regex_traits_implementation<charT>::mask_vertical)) return true; return false; @@ -1001,7 +1001,7 @@ public: static std::string get_catalog_name(); private: - boost::shared_ptr<const re_detail::cpp_regex_traits_implementation<charT> > m_pimpl; + boost::std::shared_ptr<const re_detail::cpp_regex_traits_implementation<charT> > m_pimpl; // // catalog name handler: // diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/match_results.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/match_results.hpp index 63e51175..c5641a43 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/match_results.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/match_results.hpp @@ -3,8 +3,8 @@ * Copyright (c) 1998-2009 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -47,14 +47,14 @@ class named_subexpressions; template <class BidiIterator, class Allocator> class match_results -{ +{ private: #ifndef BOOST_NO_STD_ALLOCATOR typedef std::vector<sub_match<BidiIterator>, Allocator> vector_type; #else typedef std::vector<sub_match<BidiIterator> > vector_type; #endif -public: +public: typedef sub_match<BidiIterator> value_type; #if !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION)) typedef typename Allocator::const_reference const_reference; @@ -81,7 +81,7 @@ public: : m_subs(), m_base(), m_last_closed_paren(0), m_is_singular(true) { (void)a; } #endif match_results(const match_results& m) - : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular) + : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular) { if(!m_is_singular) { @@ -547,7 +547,7 @@ public: } void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m); - void BOOST_REGEX_CALL set_named_subs(boost::shared_ptr<named_sub_type> subs) + void BOOST_REGEX_CALL set_named_subs(boost::std::shared_ptr<named_sub_type> subs) { m_named_subs = subs; } @@ -566,7 +566,7 @@ private: vector_type m_subs; // subexpressions BidiIterator m_base; // where the search started from sub_match<BidiIterator> m_null; // a null match - boost::shared_ptr<named_sub_type> m_named_subs; // Shared copy of named subs in the regex object + boost::std::shared_ptr<named_sub_type> m_named_subs; // Shared copy of named subs in the regex object int m_last_closed_paren; // Last ) to be seen - used for formatting bool m_is_singular; // True if our stored iterators are singular }; @@ -586,7 +586,7 @@ void BOOST_REGEX_CALL match_results<BidiIterator, Allocator>::maybe_assign(const // Distances are measured from the start of *this* match, unless this isn't // a valid match in which case we use the start of the whole sequence. Note that // no subsequent match-candidate can ever be to the left of the first match found. - // This ensures that when we are using bidirectional iterators, that distances + // This ensures that when we are using bidirectional iterators, that distances // measured are as short as possible, and therefore as efficient as possible // to compute. Finally note that we don't use the "matched" data member to test // whether a sub-expression is a valid match, because partial matches set this diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_iterator.hpp index 09e75c69..c7a946d8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_iterator.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2003 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -19,7 +19,7 @@ #ifndef BOOST_REGEX_V4_REGEX_ITERATOR_HPP #define BOOST_REGEX_V4_REGEX_ITERATOR_HPP -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost{ @@ -34,10 +34,10 @@ namespace boost{ #pragma warning(pop) #endif -template <class BidirectionalIterator, +template <class BidirectionalIterator, class charT, class traits> -class regex_iterator_implementation +class regex_iterator_implementation { typedef basic_regex<charT, traits> regex_type; @@ -81,34 +81,34 @@ private: regex_iterator_implementation& operator=(const regex_iterator_implementation&); }; -template <class BidirectionalIterator, +template <class BidirectionalIterator, class charT = BOOST_DEDUCED_TYPENAME re_detail::regex_iterator_traits<BidirectionalIterator>::value_type, class traits = regex_traits<charT> > -class regex_iterator +class regex_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< - std::forward_iterator_tag, + std::forward_iterator_tag, match_results<BidirectionalIterator>, typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type, const match_results<BidirectionalIterator>*, - const match_results<BidirectionalIterator>& > + const match_results<BidirectionalIterator>& > #endif { private: typedef regex_iterator_implementation<BidirectionalIterator, charT, traits> impl; - typedef shared_ptr<impl> pimpl; + typedef std::shared_ptr<impl> pimpl; public: typedef basic_regex<charT, traits> regex_type; typedef match_results<BidirectionalIterator> value_type; - typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type + typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type difference_type; typedef const value_type* pointer; - typedef const value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + regex_iterator(){} - regex_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, + regex_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, match_flag_type m = match_default) : pdata(new impl(&re, b, m)) { @@ -125,10 +125,10 @@ public: return *this; } bool operator==(const regex_iterator& that)const - { + { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); - return pdata->compare(*(that.pdata.get())); + return pdata->compare(*(that.pdata.get())); } bool operator!=(const regex_iterator& that)const { return !(*this == that); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_token_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_token_iterator.hpp index 4e8bc36f..d7b8da65 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_token_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_token_iterator.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2003 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -19,7 +19,7 @@ #ifndef BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP #define BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/detail/workaround.hpp> #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ @@ -27,7 +27,7 @@ // // Borland C++ Builder 6, and Visual C++ 6, // can't cope with the array template constructor -// so we have a template member that will accept any type as +// so we have a template member that will accept any type as // argument, and then assert that is really is an array: // #include <boost/static_assert.hpp> @@ -54,7 +54,7 @@ namespace boost{ template <class BidirectionalIterator, class charT, class traits> -class regex_token_iterator_implementation +class regex_token_iterator_implementation { typedef basic_regex<charT, traits> regex_type; typedef sub_match<BidirectionalIterator> value_type; @@ -125,11 +125,11 @@ public: bool compare(const regex_token_iterator_implementation& that) { if(this == &that) return true; - return (&re.get_data() == &that.re.get_data()) - && (end == that.end) - && (flags == that.flags) - && (N == that.N) - && (what[0].first == that.what[0].first) + return (&re.get_data() == &that.re.get_data()) + && (end == that.end) + && (flags == that.flags) + && (N == that.N) + && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const value_type& get() @@ -167,40 +167,40 @@ private: regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&); }; -template <class BidirectionalIterator, +template <class BidirectionalIterator, class charT = BOOST_DEDUCED_TYPENAME re_detail::regex_iterator_traits<BidirectionalIterator>::value_type, class traits = regex_traits<charT> > -class regex_token_iterator +class regex_token_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< - std::forward_iterator_tag, + std::forward_iterator_tag, sub_match<BidirectionalIterator>, typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type, const sub_match<BidirectionalIterator>*, - const sub_match<BidirectionalIterator>& > + const sub_match<BidirectionalIterator>& > #endif { private: typedef regex_token_iterator_implementation<BidirectionalIterator, charT, traits> impl; - typedef shared_ptr<impl> pimpl; + typedef std::shared_ptr<impl> pimpl; public: typedef basic_regex<charT, traits> regex_type; typedef sub_match<BidirectionalIterator> value_type; - typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type + typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type difference_type; typedef const value_type* pointer; - typedef const value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + regex_token_iterator(){} - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, match_flag_type m = match_default) : pdata(new impl(&re, b, submatch, m)) { if(!pdata->init(a)) pdata.reset(); } - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const std::vector<int>& submatches, match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { @@ -239,10 +239,10 @@ public: return *this; } bool operator==(const regex_token_iterator& that)const - { + { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); - return pdata->compare(*(that.pdata.get())); + return pdata->compare(*(that.pdata.get())); } bool operator!=(const regex_token_iterator& that)const { return !(*this == that); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_workaround.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_workaround.hpp index 46a8a8d3..916a4787 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_workaround.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_workaround.hpp @@ -3,8 +3,8 @@ * Copyright (c) 1998-2005 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -40,7 +40,7 @@ #include <boost/throw_exception.hpp> #include <boost/scoped_ptr.hpp> #include <boost/scoped_array.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/mpl/bool_fwd.hpp> #ifndef BOOST_NO_STD_LOCALE # include <locale> @@ -128,13 +128,13 @@ namespace boost{ namespace re_detail{ // // MSVC 8 will either emit warnings or else refuse to compile // code that makes perfectly legitimate use of std::copy, when - // the OutputIterator type is a user-defined class (apparently all user + // the OutputIterator type is a user-defined class (apparently all user // defined iterators are "unsafe"). This code works around that: // template<class InputIterator, class OutputIterator> inline OutputIterator copy( - InputIterator first, - InputIterator last, + InputIterator first, + InputIterator last, OutputIterator dest ) { @@ -142,8 +142,8 @@ namespace boost{ namespace re_detail{ } template<class InputIterator1, class InputIterator2> inline bool equal( - InputIterator1 first, - InputIterator1 last, + InputIterator1 first, + InputIterator1 last, InputIterator2 with ) { @@ -153,15 +153,15 @@ namespace boost{ namespace re_detail{ // // MSVC 10 will either emit warnings or else refuse to compile // code that makes perfectly legitimate use of std::copy, when - // the OutputIterator type is a user-defined class (apparently all user + // the OutputIterator type is a user-defined class (apparently all user // defined iterators are "unsafe"). What's more Microsoft have removed their // non-standard "unchecked" versions, even though their still in the MS - // documentation!! Work around this as best we can: + // documentation!! Work around this as best we can: // template<class InputIterator, class OutputIterator> inline OutputIterator copy( - InputIterator first, - InputIterator last, + InputIterator first, + InputIterator last, OutputIterator dest ) { @@ -171,8 +171,8 @@ namespace boost{ namespace re_detail{ } template<class InputIterator1, class InputIterator2> inline bool equal( - InputIterator1 first, - InputIterator1 last, + InputIterator1 first, + InputIterator1 last, InputIterator2 with ) { @@ -180,11 +180,11 @@ namespace boost{ namespace re_detail{ if(*first++ != *with++) return false; return true; } -#else - using std::copy; - using std::equal; -#endif -#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ +#else + using std::copy; + using std::equal; +#endif +#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ // use safe versions of strcpy etc: using ::strcpy_s; @@ -193,7 +193,7 @@ namespace boost{ namespace re_detail{ inline std::size_t strcpy_s( char *strDestination, std::size_t sizeInBytes, - const char *strSource + const char *strSource ) { if(std::strlen(strSource)+1 > sizeInBytes) @@ -204,7 +204,7 @@ namespace boost{ namespace re_detail{ inline std::size_t strcat_s( char *strDestination, std::size_t sizeInBytes, - const char *strSource + const char *strSource ) { if(std::strlen(strSource) + std::strlen(strDestination) + 1 > sizeInBytes) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_iterator.hpp index 65ebd7f8..450069ce 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_iterator.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2003 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -26,7 +26,7 @@ namespace boost{ #endif template <class BidirectionalIterator> -class u32regex_iterator_implementation +class u32regex_iterator_implementation { typedef u32regex regex_type; @@ -71,31 +71,31 @@ private: }; template <class BidirectionalIterator> -class u32regex_iterator +class u32regex_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< - std::forward_iterator_tag, + std::forward_iterator_tag, match_results<BidirectionalIterator>, typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type, const match_results<BidirectionalIterator>*, - const match_results<BidirectionalIterator>& > + const match_results<BidirectionalIterator>& > #endif { private: typedef u32regex_iterator_implementation<BidirectionalIterator> impl; - typedef shared_ptr<impl> pimpl; + typedef std::shared_ptr<impl> pimpl; public: typedef u32regex regex_type; typedef match_results<BidirectionalIterator> value_type; - typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type + typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type difference_type; typedef const value_type* pointer; - typedef const value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + u32regex_iterator(){} - u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, + u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, match_flag_type m = match_default) : pdata(new impl(&re, b, m)) { @@ -112,10 +112,10 @@ public: return *this; } bool operator==(const u32regex_iterator& that)const - { + { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); - return pdata->compare(*(that.pdata.get())); + return pdata->compare(*(that.pdata.get())); } bool operator!=(const u32regex_iterator& that)const { return !(*this == that); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_token_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_token_iterator.hpp index de167716..3b12fec9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_token_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_token_iterator.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2003 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -25,7 +25,7 @@ // // Borland C++ Builder 6, and Visual C++ 6, // can't cope with the array template constructor -// so we have a template member that will accept any type as +// so we have a template member that will accept any type as // argument, and then assert that is really is an array: // #include <boost/static_assert.hpp> @@ -43,7 +43,7 @@ namespace boost{ #endif template <class BidirectionalIterator> -class u32regex_token_iterator_implementation +class u32regex_token_iterator_implementation { typedef u32regex regex_type; typedef sub_match<BidirectionalIterator> value_type; @@ -115,11 +115,11 @@ public: bool compare(const u32regex_token_iterator_implementation& that) { if(this == &that) return true; - return (&re.get_data() == &that.re.get_data()) - && (end == that.end) - && (flags == that.flags) - && (N == that.N) - && (what[0].first == that.what[0].first) + return (&re.get_data() == &that.re.get_data()) + && (end == that.end) + && (flags == that.flags) + && (N == that.N) + && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const value_type& get() @@ -158,37 +158,37 @@ private: }; template <class BidirectionalIterator> -class u32regex_token_iterator +class u32regex_token_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< - std::forward_iterator_tag, + std::forward_iterator_tag, sub_match<BidirectionalIterator>, typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type, const sub_match<BidirectionalIterator>*, - const sub_match<BidirectionalIterator>& > + const sub_match<BidirectionalIterator>& > #endif { private: typedef u32regex_token_iterator_implementation<BidirectionalIterator> impl; - typedef shared_ptr<impl> pimpl; + typedef std::shared_ptr<impl> pimpl; public: typedef u32regex regex_type; typedef sub_match<BidirectionalIterator> value_type; - typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type + typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type difference_type; typedef const value_type* pointer; - typedef const value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + u32regex_token_iterator(){} - u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, + u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, match_flag_type m = match_default) : pdata(new impl(&re, b, submatch, m)) { if(!pdata->init(a)) pdata.reset(); } - u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, + u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const std::vector<int>& submatches, match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { @@ -227,10 +227,10 @@ public: return *this; } bool operator==(const u32regex_token_iterator& that)const - { + { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); - return pdata->compare(*(that.pdata.get())); + return pdata->compare(*(that.pdata.get())); } bool operator!=(const u32regex_token_iterator& that)const { return !(*this == that); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/w32_regex_traits.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/w32_regex_traits.hpp index d5562072..2d727bc6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/w32_regex_traits.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/w32_regex_traits.hpp @@ -3,12 +3,12 @@ * Copyright (c) 2004 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ - + /* * LOCATION: see http://www.boost.org for most recent version. * FILE w32_regex_traits.hpp @@ -52,21 +52,21 @@ #pragma warning(disable:4800) #endif -namespace boost{ +namespace boost{ // // forward declaration is needed by some compilers: // template <class charT> class w32_regex_traits; - + namespace re_detail{ // // start by typedeffing the types we'll need: // typedef ::boost::uint32_t lcid_type; // placeholder for LCID. -typedef ::boost::shared_ptr<void> cat_type; // placeholder for dll HANDLE. +typedef ::boost::std::shared_ptr<void> cat_type; // placeholder for dll HANDLE. // // then add wrappers around the actual Win32 API's (ie implementation hiding): @@ -186,7 +186,7 @@ private: }; template <class charT> -w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::re_detail::lcid_type l) +w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::re_detail::lcid_type l) : w32_regex_traits_base<charT>(l) { // we need to start by initialising our syntax map so we know which @@ -232,7 +232,7 @@ w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::re_deta } template <class charT> -typename w32_regex_traits_char_layer<charT>::string_type +typename w32_regex_traits_char_layer<charT>::string_type w32_regex_traits_char_layer<charT>::get_default_message(regex_constants::syntax_type i) { const char* ptr = get_default_syntax(i); @@ -342,7 +342,7 @@ private: }; template <class charT> -typename w32_regex_traits_implementation<charT>::string_type +typename w32_regex_traits_implementation<charT>::string_type w32_regex_traits_implementation<charT>::transform_primary(const charT* p1, const charT* p2) const { string_type result; @@ -388,7 +388,7 @@ typename w32_regex_traits_implementation<charT>::string_type } template <class charT> -typename w32_regex_traits_implementation<charT>::string_type +typename w32_regex_traits_implementation<charT>::string_type w32_regex_traits_implementation<charT>::lookup_collatename(const charT* p1, const charT* p2) const { typedef typename std::map<string_type, string_type>::const_iterator iter_type; @@ -455,8 +455,8 @@ w32_regex_traits_implementation<charT>::w32_regex_traits_implementation(::boost: // // Error messages: // - for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0); - i <= boost::regex_constants::error_unknown; + for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0); + i <= boost::regex_constants::error_unknown; i = static_cast<boost::regex_constants::error_type>(i + 1)) { const char* p = get_default_error_string(i); @@ -477,7 +477,7 @@ w32_regex_traits_implementation<charT>::w32_regex_traits_implementation(::boost: // // Custom class names: // - static const char_class_type masks[14] = + static const char_class_type masks[14] = { 0x0104u, // C1_ALPHA | C1_DIGIT 0x0100u, // C1_ALPHA @@ -509,10 +509,10 @@ w32_regex_traits_implementation<charT>::w32_regex_traits_implementation(::boost: } template <class charT> -typename w32_regex_traits_implementation<charT>::char_class_type +typename w32_regex_traits_implementation<charT>::char_class_type w32_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const { - static const char_class_type masks[22] = + static const char_class_type masks[22] = { 0, 0x0104u, // C1_ALPHA | C1_DIGIT @@ -522,7 +522,7 @@ typename w32_regex_traits_implementation<charT>::char_class_type 0x0004u, // C1_DIGIT 0x0004u, // C1_DIGIT (~(0x0020u|0x0008u|0x0040) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE or C1_BLANK - w32_regex_traits_implementation<charT>::mask_horizontal, + w32_regex_traits_implementation<charT>::mask_horizontal, 0x0002u, // C1_LOWER 0x0002u, // C1_LOWER (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL @@ -532,9 +532,9 @@ typename w32_regex_traits_implementation<charT>::char_class_type 0x0001u, // C1_UPPER w32_regex_traits_implementation<charT>::mask_unicode, 0x0001u, // C1_UPPER - w32_regex_traits_implementation<charT>::mask_vertical, - 0x0104u | w32_regex_traits_implementation<charT>::mask_word, - 0x0104u | w32_regex_traits_implementation<charT>::mask_word, + w32_regex_traits_implementation<charT>::mask_vertical, + 0x0104u | w32_regex_traits_implementation<charT>::mask_word, + 0x0104u | w32_regex_traits_implementation<charT>::mask_word, 0x0080u, // C1_XDIGIT }; if(m_custom_class_names.size()) @@ -552,7 +552,7 @@ typename w32_regex_traits_implementation<charT>::char_class_type template <class charT> -boost::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +boost::std::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) { // TODO: create a cache for previously constructed objects. return boost::object_cache< ::boost::re_detail::lcid_type, w32_regex_traits_implementation<charT> >::get(l, 5); @@ -625,7 +625,7 @@ public: } bool isctype(charT c, char_class_type f) const { - if((f & re_detail::w32_regex_traits_implementation<charT>::mask_base) + if((f & re_detail::w32_regex_traits_implementation<charT>::mask_base) && (this->m_pimpl->isctype(f & re_detail::w32_regex_traits_implementation<charT>::mask_base, c))) return true; else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_unicode) && re_detail::is_extended(c)) @@ -635,7 +635,7 @@ public: else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v'))) return true; - else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_horizontal) + else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_horizontal) && this->isctype(c, 0x0008u) && !this->isctype(c, re_detail::w32_regex_traits_implementation<charT>::mask_vertical)) return true; return false; @@ -672,7 +672,7 @@ public: static std::string get_catalog_name(); private: - boost::shared_ptr<const re_detail::w32_regex_traits_implementation<charT> > m_pimpl; + boost::std::shared_ptr<const re_detail::w32_regex_traits_implementation<charT> > m_pimpl; // // catalog name handler: // diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_132.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_132.hpp index b5f2b215..897062f2 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_132.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_132.hpp @@ -2,7 +2,7 @@ #define BOOST_SHARED_PTR_132_HPP_INCLUDED // -// shared_ptr.hpp +// std::shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002, 2003 Peter Dimov @@ -11,7 +11,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. // #include <boost/config.hpp> // for broken compiler workarounds @@ -96,18 +96,18 @@ inline void sp_enable_shared_from_this( shared_count const & /*pn*/, ... ) // -// shared_ptr +// std::shared_ptr // // An enhanced relative of scoped_ptr with reference counted copy semantics. -// The object pointed to is deleted when the last shared_ptr pointing to it +// The object pointed to is deleted when the last std::shared_ptr pointing to it // is destroyed or reset. // -template<class T> class shared_ptr +template<class T> class std::shared_ptr { private: // Borland 5.5.1 specific workaround - typedef shared_ptr< T > this_type; + typedef std::shared_ptr< T > this_type; public: @@ -116,16 +116,16 @@ public: typedef T * pointer; typedef BOOST_DEDUCED_TYPENAME detail::shared_ptr_traits< T >::reference reference; - shared_ptr(): px(0), pn() // never throws in 1.30+ + std::shared_ptr(): px(0), pn() // never throws in 1.30+ { } #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) ) template<class Y> - explicit shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter<Y>()) // Y must be complete + explicit std::shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter<Y>()) // Y must be complete #else template<class Y> - explicit shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter<Y>()) // Y must be complete + explicit std::shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter<Y>()) // Y must be complete #endif { detail::sp_enable_shared_from_this( pn, p, p ); @@ -134,10 +134,10 @@ public: // // Requirements: D's copy constructor must not throw // - // shared_ptr will release p by calling d(p) + // std::shared_ptr will release p by calling d(p) // - template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d) + template<class Y, class D> std::shared_ptr(Y * p, D d): px(p), pn(p, d) { detail::sp_enable_shared_from_this( pn, p, p ); } @@ -147,7 +147,7 @@ public: // except that Borland C++ has a bug, and g++ with -Wsynth warns #if defined(__BORLANDC__) || defined(__GNUC__) - shared_ptr & operator=(shared_ptr const & r) // never throws + std::shared_ptr & operator=(std::shared_ptr const & r) // never throws { px = r.px; pn = r.pn; // shared_count::op= doesn't throw @@ -157,29 +157,29 @@ public: #endif template<class Y> - explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw + explicit std::shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw { // it is now safe to copy r.px, as pn(r.pn) did not throw px = r.px; } template<class Y> - shared_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws + std::shared_ptr(std::shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws { } template<class Y> - shared_ptr(shared_ptr<Y> const & r, detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn) + std::shared_ptr(std::shared_ptr<Y> const & r, detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn) { } template<class Y> - shared_ptr(shared_ptr<Y> const & r, detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn) + std::shared_ptr(std::shared_ptr<Y> const & r, detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn) { } template<class Y> - shared_ptr(shared_ptr<Y> const & r, detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn) + std::shared_ptr(std::shared_ptr<Y> const & r, detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn) { if(px == 0) // need to allocate new counter -- the cast failed { @@ -188,7 +188,7 @@ public: } template<class Y> - shared_ptr(shared_ptr<Y> const & r, detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn) + std::shared_ptr(std::shared_ptr<Y> const & r, detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn) { if(px == 0) { @@ -199,7 +199,7 @@ public: #ifndef BOOST_NO_AUTO_PTR template<class Y> - explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn() + explicit std::shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn() { Y * tmp = r.get(); pn = detail::shared_count(r); @@ -211,7 +211,7 @@ public: #if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200) template<class Y> - shared_ptr & operator=(shared_ptr<Y> const & r) // never throws + std::shared_ptr & operator=(std::shared_ptr<Y> const & r) // never throws { px = r.px; pn = r.pn; // shared_count::op= doesn't throw @@ -223,7 +223,7 @@ public: #ifndef BOOST_NO_AUTO_PTR template<class Y> - shared_ptr & operator=(std::auto_ptr<Y> & r) + std::shared_ptr & operator=(std::auto_ptr<Y> & r) { this_type(r).swap(*this); return *this; @@ -258,7 +258,7 @@ public: BOOST_ASSERT(px != 0); return px; } - + T * get() const // never throws { return px; @@ -275,13 +275,13 @@ public: #elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) typedef T * (this_type::*unspecified_bool_type)() const; - + operator unspecified_bool_type() const // never throws { return px == 0? 0: &this_type::get; } -#else +#else typedef T * this_type::*unspecified_bool_type; @@ -309,13 +309,13 @@ public: return pn.use_count(); } - void swap(shared_ptr< T > & other) // never throws + void swap(std::shared_ptr< T > & other) // never throws { std::swap(px, other.px); pn.swap(other.pn); } - template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const + template<class Y> bool _internal_less(std::shared_ptr<Y> const & rhs) const { return pn < rhs.pn; } @@ -332,7 +332,7 @@ public: private: - template<class Y> friend class shared_ptr; + template<class Y> friend class std::shared_ptr; template<class Y> friend class weak_ptr; @@ -341,14 +341,14 @@ public: // for serialization T * px; // contained pointer detail::shared_count pn; // reference counter -}; // shared_ptr +}; // std::shared_ptr -template<class T, class U> inline bool operator==(shared_ptr< T > const & a, shared_ptr<U> const & b) +template<class T, class U> inline bool operator==(std::shared_ptr< T > const & a, std::shared_ptr<U> const & b) { return a.get() == b.get(); } -template<class T, class U> inline bool operator!=(shared_ptr< T > const & a, shared_ptr<U> const & b) +template<class T, class U> inline bool operator!=(std::shared_ptr< T > const & a, std::shared_ptr<U> const & b) { return a.get() != b.get(); } @@ -357,64 +357,64 @@ template<class T, class U> inline bool operator!=(shared_ptr< T > const & a, sha // Resolve the ambiguity between our op!= and the one in rel_ops -template<class T> inline bool operator!=(shared_ptr< T > const & a, shared_ptr< T > const & b) +template<class T> inline bool operator!=(std::shared_ptr< T > const & a, std::shared_ptr< T > const & b) { return a.get() != b.get(); } #endif -template<class T, class U> inline bool operator<(shared_ptr< T > const & a, shared_ptr<U> const & b) +template<class T, class U> inline bool operator<(std::shared_ptr< T > const & a, std::shared_ptr<U> const & b) { return a._internal_less(b); } -template<class T> inline void swap(shared_ptr< T > & a, shared_ptr< T > & b) +template<class T> inline void swap(std::shared_ptr< T > & a, std::shared_ptr< T > & b) { a.swap(b); } -template<class T, class U> shared_ptr< T > static_pointer_cast(shared_ptr<U> const & r) +template<class T, class U> std::shared_ptr< T > static_pointer_cast(std::shared_ptr<U> const & r) { - return shared_ptr< T >(r, detail::static_cast_tag()); + return std::shared_ptr< T >(r, detail::static_cast_tag()); } -template<class T, class U> shared_ptr< T > const_pointer_cast(shared_ptr<U> const & r) +template<class T, class U> std::shared_ptr< T > const_pointer_cast(std::shared_ptr<U> const & r) { - return shared_ptr< T >(r, detail::const_cast_tag()); + return std::shared_ptr< T >(r, detail::const_cast_tag()); } -template<class T, class U> shared_ptr< T > dynamic_pointer_cast(shared_ptr<U> const & r) +template<class T, class U> std::shared_ptr< T > dynamic_pointer_cast(std::shared_ptr<U> const & r) { - return shared_ptr< T >(r, detail::dynamic_cast_tag()); + return std::shared_ptr< T >(r, detail::dynamic_cast_tag()); } // shared_*_cast names are deprecated. Use *_pointer_cast instead. -template<class T, class U> shared_ptr< T > shared_static_cast(shared_ptr<U> const & r) +template<class T, class U> std::shared_ptr< T > shared_static_cast(std::shared_ptr<U> const & r) { - return shared_ptr< T >(r, detail::static_cast_tag()); + return std::shared_ptr< T >(r, detail::static_cast_tag()); } -template<class T, class U> shared_ptr< T > shared_dynamic_cast(shared_ptr<U> const & r) +template<class T, class U> std::shared_ptr< T > shared_dynamic_cast(std::shared_ptr<U> const & r) { - return shared_ptr< T >(r, detail::dynamic_cast_tag()); + return std::shared_ptr< T >(r, detail::dynamic_cast_tag()); } -template<class T, class U> shared_ptr< T > shared_polymorphic_cast(shared_ptr<U> const & r) +template<class T, class U> std::shared_ptr< T > shared_polymorphic_cast(std::shared_ptr<U> const & r) { - return shared_ptr< T >(r, detail::polymorphic_cast_tag()); + return std::shared_ptr< T >(r, detail::polymorphic_cast_tag()); } -template<class T, class U> shared_ptr< T > shared_polymorphic_downcast(shared_ptr<U> const & r) +template<class T, class U> std::shared_ptr< T > shared_polymorphic_downcast(std::shared_ptr<U> const & r) { BOOST_ASSERT(dynamic_cast<T *>(r.get()) == r.get()); return shared_static_cast< T >(r); } -// get_pointer() enables boost::mem_fn to recognize shared_ptr +// get_pointer() enables boost::mem_fn to recognize std::shared_ptr -template<class T> inline T * get_pointer(shared_ptr< T > const & p) +template<class T> inline T * get_pointer(std::shared_ptr< T > const & p) { return p.get(); } @@ -423,7 +423,7 @@ template<class T> inline T * get_pointer(shared_ptr< T > const & p) #if defined(__GNUC__) && (__GNUC__ < 3) -template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p) +template<class Y> std::ostream & operator<< (std::ostream & os, std::shared_ptr<Y> const & p) { os << p.get(); return os; @@ -434,10 +434,10 @@ template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> co # if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT) // MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL using std::basic_ostream; -template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p) +template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, std::shared_ptr<Y> const & p) # else -template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p) -# endif +template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, std::shared_ptr<Y> const & p) +# endif { os << p.get(); return os; @@ -452,7 +452,7 @@ template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std:: // g++ 2.9x doesn't allow static_cast<X const *>(void *) // apparently EDG 2.38 also doesn't accept it -template<class D, class T> D * get_deleter(shared_ptr< T > const & p) +template<class D, class T> D * get_deleter(std::shared_ptr< T > const & p) { void const * q = p._internal_get_deleter(typeid(D)); return const_cast<D *>(static_cast<D const *>(q)); @@ -460,7 +460,7 @@ template<class D, class T> D * get_deleter(shared_ptr< T > const & p) #else -template<class D, class T> D * get_deleter(shared_ptr< T > const & p) +template<class D, class T> D * get_deleter(std::shared_ptr< T > const & p) { return static_cast<D *>(p._internal_get_deleter(typeid(D))); } @@ -471,7 +471,7 @@ template<class D, class T> D * get_deleter(shared_ptr< T > const & p) #ifdef BOOST_MSVC # pragma warning(pop) -#endif +#endif #endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_nmt_132.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_nmt_132.hpp index 490e7ddd..0f9c8282 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_nmt_132.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_nmt_132.hpp @@ -2,7 +2,7 @@ #define BOOST_DETAIL_SHARED_PTR_NMT_132_HPP_INCLUDED // -// detail/shared_ptr_nmt.hpp - shared_ptr.hpp without member templates +// detail/shared_ptr_nmt.hpp - std::shared_ptr.hpp without member templates // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov @@ -11,7 +11,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. // #include <boost/assert.hpp> @@ -30,7 +30,7 @@ namespace boost { -template<class T> class shared_ptr +template<class T> class std::shared_ptr { private: @@ -41,7 +41,7 @@ public: typedef T element_type; typedef T value_type; - explicit shared_ptr(T * p = 0): px(p) + explicit std::shared_ptr(T * p = 0): px(p) { #ifndef BOOST_NO_EXCEPTIONS @@ -68,7 +68,7 @@ public: #endif } - ~shared_ptr() + ~std::shared_ptr() { if(--*pn == 0) { @@ -77,29 +77,29 @@ public: } } - shared_ptr(shared_ptr const & r): px(r.px) // never throws + std::shared_ptr(std::shared_ptr const & r): px(r.px) // never throws { pn = r.pn; ++*pn; } - shared_ptr & operator=(shared_ptr const & r) + std::shared_ptr & operator=(std::shared_ptr const & r) { - shared_ptr(r).swap(*this); + std::shared_ptr(r).swap(*this); return *this; } #ifndef BOOST_NO_AUTO_PTR - explicit shared_ptr(std::auto_ptr< T > & r) - { + explicit std::shared_ptr(std::auto_ptr< T > & r) + { pn = new count_type(1); // may throw px = r.release(); // fix: moved here to stop leak if new throws - } + } - shared_ptr & operator=(std::auto_ptr< T > & r) + std::shared_ptr & operator=(std::auto_ptr< T > & r) { - shared_ptr(r).swap(*this); + std::shared_ptr(r).swap(*this); return *this; } @@ -108,7 +108,7 @@ public: void reset(T * p = 0) { BOOST_ASSERT(p == 0 || p != px); - shared_ptr(p).swap(*this); + std::shared_ptr(p).swap(*this); } T & operator*() const // never throws @@ -137,8 +137,8 @@ public: { return *pn == 1; } - - void swap(shared_ptr< T > & other) // never throws + + void swap(std::shared_ptr< T > & other) // never throws { std::swap(px, other.px); std::swap(pn, other.pn); @@ -150,29 +150,29 @@ private: count_type * pn; // ptr to reference counter }; -template<class T, class U> inline bool operator==(shared_ptr< T > const & a, shared_ptr<U> const & b) +template<class T, class U> inline bool operator==(std::shared_ptr< T > const & a, std::shared_ptr<U> const & b) { return a.get() == b.get(); } -template<class T, class U> inline bool operator!=(shared_ptr< T > const & a, shared_ptr<U> const & b) +template<class T, class U> inline bool operator!=(std::shared_ptr< T > const & a, std::shared_ptr<U> const & b) { return a.get() != b.get(); } -template<class T> inline bool operator<(shared_ptr< T > const & a, shared_ptr< T > const & b) +template<class T> inline bool operator<(std::shared_ptr< T > const & a, std::shared_ptr< T > const & b) { return std::less<T*>()(a.get(), b.get()); } -template<class T> void swap(shared_ptr< T > & a, shared_ptr< T > & b) +template<class T> void swap(std::shared_ptr< T > & a, std::shared_ptr< T > & b) { a.swap(b); } -// get_pointer() enables boost::mem_fn to recognize shared_ptr +// get_pointer() enables boost::mem_fn to recognize std::shared_ptr -template<class T> inline T * get_pointer(shared_ptr< T > const & p) +template<class T> inline T * get_pointer(std::shared_ptr< T > const & p) { return p.get(); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr.hpp index 37f95e35..63eab8c5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr.hpp @@ -7,7 +7,7 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// shared_ptr.hpp: serialization for boost shared pointer +// std::shared_ptr.hpp: serialization for boost shared pointer // (C) Copyright 2004 Robert Ramey and Martin Ecker // Use, modification and distribution is subject to the Boost Software @@ -23,7 +23,7 @@ #include <boost/mpl/integral_c_tag.hpp> #include <boost/detail/workaround.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/serialization/split_free.hpp> #include <boost/serialization/nvp.hpp> @@ -31,7 +31,7 @@ #include <boost/serialization/tracking.hpp> /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// shared_ptr serialization traits +// std::shared_ptr serialization traits // version 1 to distinguish from boost 1.32 version. Note: we can only do this // for a template when the compiler supports partial template specialization @@ -39,7 +39,7 @@ namespace boost { namespace serialization{ template<class T> - struct version< ::boost::shared_ptr< T > > { + struct version< ::boost::std::shared_ptr< T > > { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) typedef BOOST_DEDUCED_TYPENAME mpl::int_<1> type; @@ -54,7 +54,7 @@ }; // don't track shared pointers template<class T> - struct tracking_level< ::boost::shared_ptr< T > > { + struct tracking_level< ::boost::std::shared_ptr< T > > { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) typedef BOOST_DEDUCED_TYPENAME mpl::int_< ::boost::serialization::track_never> type; @@ -73,11 +73,11 @@ // define macro to let users of these compilers do this #define BOOST_SERIALIZATION_SHARED_PTR(T) \ BOOST_CLASS_VERSION( \ - ::boost::shared_ptr< T >, \ + ::boost::std::shared_ptr< T >, \ 1 \ ) \ BOOST_CLASS_TRACKING( \ - ::boost::shared_ptr< T >, \ + ::boost::std::shared_ptr< T >, \ ::boost::serialization::track_never \ ) \ /**/ @@ -91,16 +91,16 @@ struct null_deleter { }; /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// serialization for shared_ptr +// serialization for std::shared_ptr template<class Archive, class T> inline void save( Archive & ar, - const boost::shared_ptr< T > &t, + const boost::std::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // The most common cause of trapping here would be serializing - // something like shared_ptr<int>. This occurs because int + // something like std::shared_ptr<int>. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); const T * t_ptr = t.get(); @@ -111,11 +111,11 @@ inline void save( template<class Archive, class T> inline void load( Archive & ar, - boost::shared_ptr< T > &t, + boost::std::shared_ptr< T > &t, const unsigned int file_version ){ // The most common cause of trapping here would be serializing - // something like shared_ptr<int>. This occurs because int + // something like std::shared_ptr<int>. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; @@ -126,7 +126,7 @@ inline void load( ar.register_type(static_cast< boost_132::detail::sp_counted_base_impl<T *, null_deleter > * >(NULL)); - boost_132::shared_ptr< T > sp; + boost_132::std::shared_ptr< T > sp; ar >> boost::serialization::make_nvp("px", sp.px); ar >> boost::serialization::make_nvp("pn", sp.pn); // got to keep the sps around so the sp.pns don't disappear @@ -143,11 +143,11 @@ inline void load( template<class Archive, class T> inline void load( Archive & ar, - boost::shared_ptr< T > &t, + boost::std::shared_ptr< T > &t, const unsigned int /*file_version*/ ){ // The most common cause of trapping here would be serializing - // something like shared_ptr<int>. This occurs because int + // something like std::shared_ptr<int>. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; @@ -159,10 +159,10 @@ inline void load( template<class Archive, class T> inline void serialize( Archive & ar, - boost::shared_ptr< T > &t, + boost::std::shared_ptr< T > &t, const unsigned int file_version ){ - // correct shared_ptr serialization depends upon object tracking + // correct std::shared_ptr serialization depends upon object tracking // being used. BOOST_STATIC_ASSERT( boost::serialization::tracking_level< T >::value diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr_132.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr_132.hpp index 9bcefe09..cdc888b8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr_132.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr_132.hpp @@ -7,9 +7,9 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// shared_ptr.hpp: serialization for boost shared pointer +// std::shared_ptr.hpp: serialization for boost shared pointer -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -17,8 +17,8 @@ // See http://www.boost.org for updates, documentation, and revision history. // note: totally unadvised hack to gain access to private variables -// in shared_ptr and shared_count. Unfortunately its the only way to -// do this without changing shared_ptr and shared_count +// in std::shared_ptr and shared_count. Unfortunately its the only way to +// do this without changing std::shared_ptr and shared_count // the best we can do is to detect a conflict here #include <boost/config.hpp> @@ -38,7 +38,7 @@ // Maintain a couple of lists of loaded shared pointers of the old previous // version (1.32) -namespace boost_132 { +namespace boost_132 { namespace serialization { namespace detail { @@ -53,7 +53,7 @@ struct null_deleter { ///////////////////////////////////////////////////////////// // sp_counted_base_impl serialization -namespace boost { +namespace boost { namespace serialization { template<class Archive, class P, class D> @@ -66,7 +66,7 @@ inline void serialize( // its polymorphic base boost::serialization::void_cast_register< boost_132::detail::sp_counted_base_impl<P, D>, - boost_132::detail::sp_counted_base + boost_132::detail::sp_counted_base >( static_cast<boost_132::detail::sp_counted_base_impl<P, D> *>(NULL), static_cast<boost_132::detail::sp_counted_base *>(NULL) @@ -76,8 +76,8 @@ inline void serialize( template<class Archive, class P, class D> inline void save_construct_data( Archive & ar, - const - boost_132::detail::sp_counted_base_impl<P, D> *t, + const + boost_132::detail::sp_counted_base_impl<P, D> *t, const BOOST_PFTO unsigned int /* file_version */ ){ // variables used for construction @@ -87,25 +87,25 @@ inline void save_construct_data( template<class Archive, class P, class D> inline void load_construct_data( Archive & ar, - boost_132::detail::sp_counted_base_impl<P, D> * t, + boost_132::detail::sp_counted_base_impl<P, D> * t, const unsigned int /* file_version */ ){ P ptr_; ar >> boost::serialization::make_nvp("ptr", ptr_); - // ::new(t)boost_132::detail::sp_counted_base_impl<P, D>(ptr_, D()); + // ::new(t)boost_132::detail::sp_counted_base_impl<P, D>(ptr_, D()); // placement // note: the original ::new... above is replaced by the one here. This one // creates all new objects with a null_deleter so that after the archive // is finished loading and the shared_ptrs are destroyed - the underlying - // raw pointers are NOT deleted. This is necessary as they are used by the + // raw pointers are NOT deleted. This is necessary as they are used by the // new system as well. ::new(t)boost_132::detail::sp_counted_base_impl< - P, + P, boost_132::serialization::detail::null_deleter >( ptr_, boost_132::serialization::detail::null_deleter() ); // placement new - // compensate for that fact that a new shared count always is + // compensate for that fact that a new shared count always is // initialized with one. the add_ref_copy below will increment it // every time its serialized so without this adjustment // the use and weak counts will be off by one. @@ -118,7 +118,7 @@ inline void load_construct_data( ///////////////////////////////////////////////////////////// // shared_count serialization -namespace boost { +namespace boost { namespace serialization { template<class Archive> @@ -147,15 +147,15 @@ inline void load( BOOST_SERIALIZATION_SPLIT_FREE(boost_132::detail::shared_count) ///////////////////////////////////////////////////////////// -// implement serialization for shared_ptr< T > +// implement serialization for std::shared_ptr< T > -namespace boost { +namespace boost { namespace serialization { template<class Archive, class T> inline void save( Archive & ar, - const boost_132::shared_ptr< T > &t, + const boost_132::std::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // only the raw pointer has to be saved @@ -170,7 +170,7 @@ inline void save( template<class Archive, class T> inline void load( Archive & ar, - boost_132::shared_ptr< T > &t, + boost_132::std::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // only the raw pointer has to be saved @@ -185,10 +185,10 @@ inline void load( template<class Archive, class T> inline void serialize( Archive & ar, - boost_132::shared_ptr< T > &t, + boost_132::std::shared_ptr< T > &t, const unsigned int file_version ){ - // correct shared_ptr serialization depends upon object tracking + // correct std::shared_ptr serialization depends upon object tracking // being used. BOOST_STATIC_ASSERT( boost::serialization::tracking_level< T >::value @@ -200,7 +200,7 @@ inline void serialize( } // serialization } // namespace boost -// note: change below uses null_deleter +// note: change below uses null_deleter // This macro is used to export GUIDS for shared pointers to allow // the serialization system to export them properly. David Tonge #define BOOST_SHARED_POINTER_EXPORT_GUID(T, K) \ diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/weak_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/weak_ptr.hpp index 3fe8698d..a6add742 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/weak_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/weak_ptr.hpp @@ -7,7 +7,7 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// shared_ptr.hpp: serialization for boost shared pointer +// std::shared_ptr.hpp: serialization for boost shared pointer // (C) Copyright 2004 Robert Ramey and Martin Ecker // Use, modification and distribution is subject to the Boost Software @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <boost/weak_ptr.hpp> -#include <boost/serialization/shared_ptr.hpp> +#include <boost/serialization/std::shared_ptr.hpp> namespace boost { namespace serialization{ @@ -28,7 +28,7 @@ inline void save( const boost::weak_ptr< T > &t, const unsigned int /* file_version */ ){ - const boost::shared_ptr< T > sp = t.lock(); + const boost::std::shared_ptr< T > sp = t.lock(); ar << boost::serialization::make_nvp("weak_ptr", sp); } @@ -38,7 +38,7 @@ inline void load( boost::weak_ptr< T > &t, const unsigned int /* file_version */ ){ - boost::shared_ptr< T > sp; + boost::std::shared_ptr< T > sp; ar >> boost::serialization::make_nvp("weak_ptr", sp); t = sp; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_container_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_container_iterator.hpp index 7d8ecd3e..5a8f0af5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_container_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_container_iterator.hpp @@ -9,7 +9,7 @@ #define SHARED_CONTAINER_ITERATOR_RG08102002_HPP #include "boost/iterator_adaptors.hpp" -#include "boost/shared_ptr.hpp" +#include "boost/std::shared_ptr.hpp" #include <utility> namespace boost { @@ -24,7 +24,7 @@ class shared_container_iterator : public iterator_adaptor< typename Container::iterator> super_t; typedef typename Container::iterator iterator_t; - typedef boost::shared_ptr<Container> container_ref_t; + typedef boost::std::shared_ptr<Container> container_ref_t; container_ref_t container_ref; public: @@ -39,7 +39,7 @@ public: template <typename Container> shared_container_iterator<Container> make_shared_container_iterator(typename Container::iterator iter, - boost::shared_ptr<Container> const& container) { + boost::std::shared_ptr<Container> const& container) { typedef shared_container_iterator<Container> iterator; return iterator(iter,container); } @@ -50,7 +50,7 @@ template <typename Container> std::pair< shared_container_iterator<Container>, shared_container_iterator<Container> > -make_shared_container_range(boost::shared_ptr<Container> const& container) { +make_shared_container_range(boost::std::shared_ptr<Container> const& container) { return std::make_pair( make_shared_container_iterator(container->begin(),container), diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_ptr.hpp index d31978c9..bcc40bff 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_ptr.hpp @@ -2,7 +2,7 @@ #define BOOST_SHARED_PTR_HPP_INCLUDED // -// shared_ptr.hpp +// std::shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001-2008 Peter Dimov @@ -11,9 +11,9 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. // -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/smart_ptr/std::shared_ptr.hpp> #endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/connection.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/connection.hpp index 1ede6be7..8ef685b1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/connection.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/connection.hpp @@ -97,7 +97,7 @@ namespace boost { void set_controlling(bool control = true) { controlling_connection = control; } - shared_ptr<BOOST_SIGNALS_NAMESPACE::detail::basic_connection> + std::shared_ptr<BOOST_SIGNALS_NAMESPACE::detail::basic_connection> get_connection() const { return con; } @@ -115,7 +115,7 @@ namespace boost { friend class BOOST_SIGNALS_NAMESPACE::detail::bound_objects_visitor; // Pointer to the actual contents of the connection - shared_ptr<BOOST_SIGNALS_NAMESPACE::detail::basic_connection> con; + std::shared_ptr<BOOST_SIGNALS_NAMESPACE::detail::basic_connection> con; // True if the destruction of this connection object should disconnect bool controlling_connection; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/named_slot_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/named_slot_map.hpp index 88625fae..84a1e04c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/named_slot_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/named_slot_map.hpp @@ -14,7 +14,7 @@ #include <boost/signals/detail/signals_common.hpp> #include <boost/signals/connection.hpp> #include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/function/function2.hpp> #include <boost/iterator/iterator_facade.hpp> #include <map> @@ -45,7 +45,7 @@ class stored_group private: storage_kind kind; - shared_ptr<void> group; + std::shared_ptr<void> group; }; typedef function2<bool, stored_group, stored_group> compare_type; @@ -60,7 +60,7 @@ public: typedef const stored_group& first_argument_type; typedef const stored_group& second_argument_type; - group_bridge_compare(const Compare& c) : comp(c) + group_bridge_compare(const Compare& c) : comp(c) { } bool operator()(const stored_group& k1, const stored_group& k2) const @@ -93,15 +93,15 @@ class BOOST_SIGNALS_DECL named_slot_map_iterator : connection_slot_pair, forward_traversal_tag> inherited; public: - named_slot_map_iterator() : slot_assigned(false) + named_slot_map_iterator() : slot_assigned(false) { } - named_slot_map_iterator(const named_slot_map_iterator& other) + named_slot_map_iterator(const named_slot_map_iterator& other) : group(other.group), last_group(other.last_group), slot_assigned(other.slot_assigned) { if (slot_assigned) slot_ = other.slot_; } - named_slot_map_iterator& operator=(const named_slot_map_iterator& other) + named_slot_map_iterator& operator=(const named_slot_map_iterator& other) { slot_assigned = other.slot_assigned; group = other.group; @@ -109,11 +109,11 @@ public: if (slot_assigned) slot_ = other.slot_; return *this; } - connection_slot_pair& dereference() const + connection_slot_pair& dereference() const { return *slot_; } - void increment() + void increment() { ++slot_; if (slot_ == group->second.end()) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/signal_base.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/signal_base.hpp index 0438cf7b..d82100ce 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/signal_base.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/signal_base.hpp @@ -33,10 +33,10 @@ namespace boost { // manages call depth class BOOST_SIGNALS_DECL call_notification { public: - call_notification(const shared_ptr<signal_base_impl>&); + call_notification(const std::shared_ptr<signal_base_impl>&); ~call_notification(); - shared_ptr<signal_base_impl> impl; + std::shared_ptr<signal_base_impl> impl; }; // Implementation of base class for all signals. It handles the @@ -87,7 +87,7 @@ namespace boost { connection connect_slot(const any& slot, const stored_group& name, - shared_ptr<slot_base::data_t> data, + std::shared_ptr<slot_base::data_t> data, connect_position at); private: @@ -138,7 +138,7 @@ namespace boost { protected: connection connect_slot(const any& slot, const stored_group& name, - shared_ptr<slot_base::data_t> data, + std::shared_ptr<slot_base::data_t> data, connect_position at) { return impl->connect_slot(slot, name, data, at); @@ -146,7 +146,7 @@ namespace boost { typedef named_slot_map::iterator iterator; - shared_ptr<signal_base_impl> impl; + std::shared_ptr<signal_base_impl> impl; }; } // end namespace detail } // end namespace BOOST_SIGNALS_NAMESPACE diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/slot.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/slot.hpp index bbf18480..6d1533d2 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/slot.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/slot.hpp @@ -14,7 +14,7 @@ #include <boost/signals/connection.hpp> #include <boost/signals/trackable.hpp> #include <boost/visit_each.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <cassert> #ifdef BOOST_HAS_ABI_HEADERS @@ -33,7 +33,7 @@ namespace boost { std::vector<const trackable*> bound_objects; connection watch_bound_objects; }; - shared_ptr<data_t> get_data() const { return data; } + std::shared_ptr<data_t> get_data() const { return data; } // Get the set of bound objects std::vector<const trackable*>& get_bound_objects() const @@ -41,14 +41,14 @@ namespace boost { // Determine if this slot is still "active", i.e., all of the bound // objects still exist - bool is_active() const + bool is_active() const { return data->watch_bound_objects.connected(); } protected: // Create a connection for this slot void create_connection(); - shared_ptr<data_t> data; + std::shared_ptr<data_t> data; private: static void bound_object_destructed(void*, void*) {} @@ -116,9 +116,9 @@ namespace boost { // An exception thrown here will allow the basic_connection to be // destroyed when this goes out of scope, and no other connections // have been made. - BOOST_SIGNALS_NAMESPACE::detail::bound_objects_visitor + BOOST_SIGNALS_NAMESPACE::detail::bound_objects_visitor do_bind(this->data->bound_objects); - visit_each(do_bind, + visit_each(do_bind, BOOST_SIGNALS_NAMESPACE::get_inspectable_slot (f, BOOST_SIGNALS_NAMESPACE::tag_type(f))); create_connection(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/connection.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/connection.hpp index 0271a3c1..13136cc6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/connection.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/connection.hpp @@ -17,7 +17,7 @@ #include <boost/function.hpp> #include <boost/mpl/bool.hpp> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/signals2/detail/null_output_iterator.hpp> #include <boost/signals2/detail/unique_lock.hpp> #include <boost/signals2/slot.hpp> @@ -48,11 +48,11 @@ namespace boost _connected = false; } virtual bool connected() const = 0; - shared_ptr<void> get_blocker() + std::shared_ptr<void> get_blocker() { unique_lock<connection_body_base> local_lock(*this); - shared_ptr<void> blocker = _weak_blocker.lock(); - if(blocker == shared_ptr<void>()) + std::shared_ptr<void> blocker = _weak_blocker.lock(); + if(blocker == std::shared_ptr<void>()) { blocker.reset(this, &null_deleter); _weak_blocker = blocker; @@ -161,26 +161,26 @@ namespace boost ~connection() {} void disconnect() const { - boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); + boost::std::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); if(connectionBody == 0) return; connectionBody->disconnect(); } bool connected() const { - boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); + boost::std::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); if(connectionBody == 0) return false; return connectionBody->connected(); } bool blocked() const { - boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); + boost::std::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); if(connectionBody == 0) return true; return connectionBody->blocked(); } bool operator==(const connection& other) const { - boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); - boost::shared_ptr<detail::connection_body_base> otherConnectionBody(other._weak_connection_body.lock()); + boost::std::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); + boost::std::shared_ptr<detail::connection_body_base> otherConnectionBody(other._weak_connection_body.lock()); return connectionBody == otherConnectionBody; } bool operator!=(const connection& other) const @@ -189,8 +189,8 @@ namespace boost } bool operator<(const connection& other) const { - boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); - boost::shared_ptr<detail::connection_body_base> otherConnectionBody(other._weak_connection_body.lock()); + boost::std::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock()); + boost::std::shared_ptr<detail::connection_body_base> otherConnectionBody(other._weak_connection_body.lock()); return connectionBody < otherConnectionBody; } void swap(connection &other) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct.hpp index d3eca33c..d651fa31 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct.hpp @@ -3,8 +3,8 @@ // deconstruct.hpp // -// A factory function for creating a shared_ptr which creates -// an object and its owning shared_ptr with one allocation, similar +// A factory function for creating a std::shared_ptr which creates +// an object and its owning std::shared_ptr with one allocation, similar // to make_shared<T>(). It also supports postconstructors // and predestructors through unqualified calls of adl_postconstruct() and // adl_predestruct, relying on argument-dependent @@ -25,7 +25,7 @@ // for more information #include <boost/config.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/signals2/deconstruct_ptr.hpp> #include <boost/type_traits/alignment_of.hpp> #include <boost/type_traits/remove_const.hpp> @@ -50,11 +50,11 @@ template<typename T> class postconstructor_invoker { public: - operator const shared_ptr<T> & () const + operator const std::shared_ptr<T> & () const { return postconstruct(); } - const shared_ptr<T>& postconstruct() const + const std::shared_ptr<T>& postconstruct() const { if(!_postconstructed) { @@ -65,7 +65,7 @@ public: } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template<class... Args> - const shared_ptr<T>& postconstruct(Args && ... args) + const std::shared_ptr<T>& postconstruct(Args && ... args) { if(!_postconstructed) { @@ -77,7 +77,7 @@ public: } #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template<typename A1> - const shared_ptr<T>& postconstruct(const A1 &a1) const + const std::shared_ptr<T>& postconstruct(const A1 &a1) const { if(!_postconstructed) { @@ -88,7 +88,7 @@ public: return _sp; } template<typename A1, typename A2> - const shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2) const + const std::shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2) const { if(!_postconstructed) { @@ -99,7 +99,7 @@ public: return _sp; } template<typename A1, typename A2, typename A3> - const shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3) const + const std::shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3) const { if(!_postconstructed) { @@ -110,7 +110,7 @@ public: return _sp; } template<typename A1, typename A2, typename A3, typename A4> - const shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const + const std::shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const { if(!_postconstructed) { @@ -121,7 +121,7 @@ public: return _sp; } template<typename A1, typename A2, typename A3, typename A4, typename A5> - const shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) const + const std::shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) const { if(!_postconstructed) { @@ -133,7 +133,7 @@ public: } template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6> - const shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, + const std::shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6) const { if(!_postconstructed) @@ -146,7 +146,7 @@ public: } template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7> - const shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, + const std::shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7) const { if(!_postconstructed) @@ -159,7 +159,7 @@ public: } template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8> - const shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, + const std::shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const { if(!_postconstructed) @@ -172,7 +172,7 @@ public: } template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9> - const shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, + const std::shared_ptr<T>& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9) const { if(!_postconstructed) @@ -186,10 +186,10 @@ public: #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) private: friend class boost::signals2::deconstruct_access; - postconstructor_invoker(const shared_ptr<T> & sp): + postconstructor_invoker(const std::shared_ptr<T> & sp): _sp(sp), _postconstructed(false) {} - shared_ptr<T> _sp; + std::shared_ptr<T> _sp; mutable bool _postconstructed; }; @@ -269,7 +269,7 @@ public: template< class T > static postconstructor_invoker<T> deconstruct() { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -278,7 +278,7 @@ public: new( pv ) T(); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; @@ -291,7 +291,7 @@ public: template< class T, class... Args > static postconstructor_invoker<T> deconstruct( Args && ... args ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -300,7 +300,7 @@ public: new( pv ) T( std::forward<Args>( args )... ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -310,7 +310,7 @@ public: template< class T, class A1 > static postconstructor_invoker<T> deconstruct( A1 const & a1 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -319,7 +319,7 @@ public: new( pv ) T( a1 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -327,7 +327,7 @@ public: template< class T, class A1, class A2 > static postconstructor_invoker<T> deconstruct( A1 const & a1, A2 const & a2 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -336,7 +336,7 @@ public: new( pv ) T( a1, a2 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -344,7 +344,7 @@ public: template< class T, class A1, class A2, class A3 > static postconstructor_invoker<T> deconstruct( A1 const & a1, A2 const & a2, A3 const & a3 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -353,7 +353,7 @@ public: new( pv ) T( a1, a2, a3 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -361,7 +361,7 @@ public: template< class T, class A1, class A2, class A3, class A4 > static postconstructor_invoker<T> deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -370,7 +370,7 @@ public: new( pv ) T( a1, a2, a3, a4 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -378,7 +378,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5 > static postconstructor_invoker<T> deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -387,7 +387,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -395,7 +395,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > static postconstructor_invoker<T> deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -404,7 +404,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5, a6 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -412,7 +412,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > static postconstructor_invoker<T> deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -421,7 +421,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5, a6, a7 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -429,7 +429,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > static postconstructor_invoker<T> deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -438,7 +438,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -446,7 +446,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > static postconstructor_invoker<T> deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -455,7 +455,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); pd->set_initialized(); - boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct_ptr.hpp index 841b19b2..a376c197 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct_ptr.hpp @@ -1,7 +1,7 @@ // DEPRECATED in favor of adl_postconstruct and adl_predestruct with // deconstruct<T>(). -// A factory function for creating a shared_ptr that enhances the plain -// shared_ptr constructors by adding support for postconstructors +// A factory function for creating a std::shared_ptr that enhances the plain +// std::shared_ptr constructors by adding support for postconstructors // and predestructors through the boost::signals2::postconstructible and // boost::signals2::predestructible base classes. // @@ -19,7 +19,7 @@ #include <boost/checked_delete.hpp> #include <boost/signals2/postconstructible.hpp> #include <boost/signals2/predestructible.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { @@ -63,17 +63,17 @@ namespace boost }; template<typename T> - shared_ptr<T> deconstruct_ptr(T *ptr) + std::shared_ptr<T> deconstruct_ptr(T *ptr) { - if(ptr == 0) return shared_ptr<T>(ptr); - shared_ptr<T> shared(ptr, boost::signals2::predestructing_deleter<T>()); + if(ptr == 0) return std::shared_ptr<T>(ptr); + std::shared_ptr<T> shared(ptr, boost::signals2::predestructing_deleter<T>()); detail::do_postconstruct(ptr); return shared; } template<typename T, typename D> - shared_ptr<T> deconstruct_ptr(T *ptr, D deleter) + std::shared_ptr<T> deconstruct_ptr(T *ptr, D deleter) { - shared_ptr<T> shared(ptr, deleter); + std::shared_ptr<T> shared(ptr, deleter); if(ptr == 0) return shared; detail::do_postconstruct(ptr); return shared; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/foreign_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/foreign_ptr.hpp index 47c59962..a53bb6d4 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/foreign_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/foreign_ptr.hpp @@ -1,5 +1,5 @@ -// helper code for dealing with tracking non-boost shared_ptr/weak_ptr +// helper code for dealing with tracking non-boost std::shared_ptr/weak_ptr // Copyright Frank Mori Hess 2009. // Distributed under the Boost Software License, Version @@ -31,7 +31,7 @@ namespace boost { - template<typename T> class shared_ptr; + template<typename T> class std::shared_ptr; template<typename T> class weak_ptr; namespace signals2 @@ -40,7 +40,7 @@ namespace boost {}; template<typename T> struct weak_ptr_traits<boost::weak_ptr<T> > { - typedef boost::shared_ptr<T> shared_type; + typedef boost::std::shared_ptr<T> shared_type; }; #ifndef BOOST_SIGNALS2_NO_CXX11_SMART_PTR template<typename T> struct weak_ptr_traits<std::weak_ptr<T> > @@ -52,7 +52,7 @@ namespace boost template<typename SharedPtr> struct shared_ptr_traits {}; - template<typename T> struct shared_ptr_traits<boost::shared_ptr<T> > + template<typename T> struct shared_ptr_traits<boost::std::shared_ptr<T> > { typedef boost::weak_ptr<T> weak_type; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/signal_template.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/signal_template.hpp index 45e70316..8fef5f83 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/signal_template.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/signal_template.hpp @@ -112,7 +112,7 @@ namespace boost {} ExtendedSlotFunction _fun; - boost::shared_ptr<connection> _connection; + boost::std::shared_ptr<connection> _connection; }; template<BOOST_SIGNALS2_SIGNAL_TEMPLATE_DECL(BOOST_SIGNALS2_NUM_ARGS)> @@ -139,7 +139,7 @@ namespace boost #endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES typedef slot_call_iterator_cache<nonvoid_slot_result_type, slot_invoker> slot_call_iterator_cache_type; typedef typename group_key<Group>::type group_key_type; - typedef shared_ptr<connection_body<group_key_type, slot_type, Mutex> > connection_body_type; + typedef std::shared_ptr<connection_body<group_key_type, slot_type, Mutex> > connection_body_type; typedef grouped_list<Group, GroupCompare, connection_body_type> connection_list_type; typedef BOOST_SIGNALS2_BOUND_EXTENDED_SLOT_FUNCTION_N(BOOST_SIGNALS2_NUM_ARGS)<extended_slot_function_type> bound_extended_slot_function_type; @@ -191,7 +191,7 @@ namespace boost // disconnect slot(s) void disconnect_all_slots() { - shared_ptr<invocation_state> local_state = + std::shared_ptr<invocation_state> local_state = get_readable_state(); typename connection_list_type::iterator it; for(it = local_state->connection_bodies().begin(); @@ -202,7 +202,7 @@ namespace boost } void disconnect(const group_type &group) { - shared_ptr<invocation_state> local_state = + std::shared_ptr<invocation_state> local_state = get_readable_state(); group_key_type group_key(grouped_slots, group); typename connection_list_type::iterator it; @@ -223,7 +223,7 @@ namespace boost // emit signal result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) { - shared_ptr<invocation_state> local_state; + std::shared_ptr<invocation_state> local_state; typename connection_list_type::iterator it; { unique_lock<mutex_type> list_lock(_mutex); @@ -247,7 +247,7 @@ namespace boost } result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) const { - shared_ptr<invocation_state> local_state; + std::shared_ptr<invocation_state> local_state; typename connection_list_type::iterator it; { unique_lock<mutex_type> list_lock(_mutex); @@ -271,7 +271,7 @@ namespace boost } std::size_t num_slots() const { - shared_ptr<invocation_state> local_state = + std::shared_ptr<invocation_state> local_state = get_readable_state(); typename connection_list_type::iterator it; std::size_t count = 0; @@ -284,7 +284,7 @@ namespace boost } bool empty() const { - shared_ptr<invocation_state> local_state = + std::shared_ptr<invocation_state> local_state = get_readable_state(); typename connection_list_type::iterator it; for(it = local_state->connection_bodies().begin(); @@ -396,8 +396,8 @@ namespace boost private: invocation_state(const invocation_state &); - shared_ptr<connection_list_type> _connection_bodies; - shared_ptr<combiner_type> _combiner; + std::shared_ptr<connection_list_type> _connection_bodies; + std::shared_ptr<combiner_type> _combiner; }; // Destructor of invocation_janitor does some cleanup when a signal invocation completes. // Code can't be put directly in signal's operator() due to complications from void return types. @@ -500,7 +500,7 @@ namespace boost } nolock_cleanup_connections_from(false, _shared_state->connection_bodies().begin()); } - shared_ptr<invocation_state> get_readable_state() const + std::shared_ptr<invocation_state> get_readable_state() const { unique_lock<mutex_type> list_lock(_mutex); return _shared_state; @@ -517,7 +517,7 @@ namespace boost template<typename T> void do_disconnect(const T &slot, mpl::bool_<false> /* is_group */) { - shared_ptr<invocation_state> local_state = + std::shared_ptr<invocation_state> local_state = get_readable_state(); typename connection_list_type::iterator it; for(it = local_state->connection_bodies().begin(); @@ -576,7 +576,7 @@ namespace boost } // _shared_state is mutable so we can do force_cleanup_connections during a const invocation - mutable shared_ptr<invocation_state> _shared_state; + mutable std::shared_ptr<invocation_state> _shared_state; mutable typename connection_list_type::iterator _garbage_collector_it; // connection list mutex must never be locked when attempting a blocking lock on a slot, // or you could deadlock. @@ -715,12 +715,12 @@ namespace boost return (*_pimpl).set_combiner(combiner_arg); } protected: - virtual shared_ptr<void> lock_pimpl() const + virtual std::shared_ptr<void> lock_pimpl() const { return _pimpl; } private: - shared_ptr<impl_class> + std::shared_ptr<impl_class> _pimpl; }; @@ -747,7 +747,7 @@ namespace boost {} result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) { - shared_ptr<detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) + std::shared_ptr<detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) <BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> > shared_pimpl(_weak_pimpl.lock()); if(shared_pimpl == 0) boost::throw_exception(expired_slot()); @@ -755,7 +755,7 @@ namespace boost } result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) const { - shared_ptr<detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) + std::shared_ptr<detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) <BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> > shared_pimpl(_weak_pimpl.lock()); if(shared_pimpl == 0) boost::throw_exception(expired_slot()); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/postconstructible.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/postconstructible.hpp index faa14444..5ee1d82c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/postconstructible.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/postconstructible.hpp @@ -2,7 +2,7 @@ // A simple framework for creating objects with postconstructors. // The objects must inherit from boost::signals2::postconstructible, and // have their lifetimes managed by -// boost::shared_ptr created with the boost::signals2::deconstruct_ptr() +// boost::std::shared_ptr created with the boost::signals2::deconstruct_ptr() // function. // // Copyright Frank Mori Hess 2007-2008. @@ -17,7 +17,7 @@ namespace boost { - template<typename T> class shared_ptr; + template<typename T> class std::shared_ptr; namespace signals2 { @@ -37,7 +37,7 @@ namespace boost public: friend void detail::do_postconstruct(const postconstructible *ptr); template<typename T> - friend void adl_postconstruct(const shared_ptr<T> &sp, postconstructible *p) + friend void adl_postconstruct(const std::shared_ptr<T> &sp, postconstructible *p) { p->postconstruct(); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/predestructible.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/predestructible.hpp index 0f6806dc..bc7f574c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/predestructible.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/predestructible.hpp @@ -2,7 +2,7 @@ // A simple framework for creating objects with predestructors. // The objects must inherit from boost::signals2::predestructible, and // have their lifetimes managed by -// boost::shared_ptr created with the boost::signals2::deconstruct_ptr() +// boost::std::shared_ptr created with the boost::signals2::deconstruct_ptr() // function. // // Copyright Frank Mori Hess 2007-2008. @@ -29,7 +29,7 @@ namespace boost predestructible() {} public: template<typename T> - friend void adl_postconstruct(const shared_ptr<T> &, ...) + friend void adl_postconstruct(const std::shared_ptr<T> &, ...) {} friend void adl_predestruct(predestructible *p) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/shared_connection_block.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/shared_connection_block.hpp index c16bf9b9..aa11a90a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/shared_connection_block.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/shared_connection_block.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_SIGNALS2_SHARED_CONNECTION_BLOCK_HPP #define BOOST_SIGNALS2_SHARED_CONNECTION_BLOCK_HPP -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/signals2/connection.hpp> #include <boost/weak_ptr.hpp> @@ -31,7 +31,7 @@ namespace boost void block() { if(blocking()) return; - boost::shared_ptr<detail::connection_body_base> connection_body(_weak_connection_body.lock()); + boost::std::shared_ptr<detail::connection_body_base> connection_body(_weak_connection_body.lock()); if(connection_body == 0) { // Make _blocker non-empty so the blocking() method still returns the correct value @@ -47,7 +47,7 @@ namespace boost } bool blocking() const { - shared_ptr<void> empty; + std::shared_ptr<void> empty; return _blocker < empty || empty < _blocker; } signals2::connection connection() const @@ -56,7 +56,7 @@ namespace boost } private: boost::weak_ptr<detail::connection_body_base> _weak_connection_body; - shared_ptr<void> _blocker; + std::shared_ptr<void> _blocker; }; } } // end namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal.hpp index 4300eeea..f82d541b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal.hpp @@ -17,7 +17,7 @@ #include <boost/config.hpp> #include <boost/function.hpp> #include <boost/mpl/identity.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/signals2/connection.hpp> #include <boost/signals2/detail/unique_lock.hpp> #include <boost/signals2/detail/replace_slot_function.hpp> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal_base.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal_base.hpp index 05b6b5fd..31edf33d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal_base.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal_base.hpp @@ -12,7 +12,7 @@ #define BOOST_SIGNALS2_SIGNAL_BASE_HPP #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { namespace signals2 { @@ -25,7 +25,7 @@ namespace boost { virtual ~signal_base() {} protected: - virtual shared_ptr<void> lock_pimpl() const = 0; + virtual std::shared_ptr<void> lock_pimpl() const = 0; }; } // end namespace signals2 } // end namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/slot_base.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/slot_base.hpp index f7f6d39f..fabc1403 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/slot_base.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/slot_base.hpp @@ -13,7 +13,7 @@ #define BOOST_SIGNALS2_SLOT_BASE_HPP #include <boost/any.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <boost/signals2/detail/foreign_ptr.hpp> #include <boost/signals2/expired_slot.hpp> @@ -32,7 +32,7 @@ namespace boost class tracked_objects_visitor; typedef boost::variant<boost::weak_ptr<void>, detail::foreign_void_weak_ptr > void_weak_ptr_variant; - typedef boost::variant<boost::shared_ptr<void>, detail::foreign_void_shared_ptr > void_shared_ptr_variant; + typedef boost::variant<boost::std::shared_ptr<void>, detail::foreign_void_shared_ptr > void_shared_ptr_variant; class lock_weak_ptr_visitor { public: diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/trackable.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/trackable.hpp index d6a60149..1438a0c1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/trackable.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/trackable.hpp @@ -17,7 +17,7 @@ #define BOOST_SIGNALS2_TRACKABLE_HPP #include <boost/assert.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { namespace signals2 { @@ -36,12 +36,12 @@ namespace boost { ~trackable() {} private: friend class detail::tracked_objects_visitor; - const shared_ptr<void>& get_shared_ptr() const + const std::shared_ptr<void>& get_shared_ptr() const { return _tracked_ptr; } - shared_ptr<void> _tracked_ptr; + std::shared_ptr<void> _tracked_ptr; }; } // end namespace signals2 } // end namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp index b5e569d8..ec6d2813 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp @@ -18,7 +18,7 @@ #include <boost/scoped_ptr.hpp> #include <boost/scoped_array.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/shared_array.hpp> #if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/allocate_shared_array.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/allocate_shared_array.hpp index 3ee16552..d5be0454 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/allocate_shared_array.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/allocate_shared_array.hpp @@ -9,7 +9,7 @@ #ifndef BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/smart_ptr/std::shared_ptr.hpp> #include <boost/smart_ptr/detail/allocate_array_helper.hpp> #include <boost/smart_ptr/detail/array_deleter.hpp> #include <boost/smart_ptr/detail/array_traits.hpp> @@ -29,12 +29,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total<T1>::size; boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template<typename T, typename A, typename... Args> @@ -47,12 +47,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total<T1>::size; boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward<Args>(args)...); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T, typename A, typename... Args> inline typename boost::detail::sp_if_size_array<T>::type @@ -66,12 +66,12 @@ namespace boost { T2* p2 = 0; boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward<Args>(args)...); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) @@ -89,13 +89,13 @@ namespace boost { T3* p3 = 0; boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p3 = reinterpret_cast<T3*>(list); p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T, typename A> inline typename boost::detail::sp_if_array<T>::type @@ -113,13 +113,13 @@ namespace boost { std::size_t n1 = M * size; boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p3 = reinterpret_cast<T3*>(list); p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->template init_list<M>(p2, p3); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T, typename A> inline typename boost::detail::sp_if_size_array<T>::type @@ -137,13 +137,13 @@ namespace boost { T3* p3 = 0; boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p3 = reinterpret_cast<T3*>(list); p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->template init_list<M>(p2, p3); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template<typename T, typename A> @@ -159,13 +159,13 @@ namespace boost { std::size_t n1 = list.size() * boost::detail::array_total<T1>::size; boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p3 = reinterpret_cast<T3*>(list.begin()); p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -180,12 +180,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total<T1>::size; boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward<T2>(value)); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T, typename A> inline typename boost::detail::sp_if_size_array<T>::type @@ -200,12 +200,12 @@ namespace boost { T2* p2 = 0; boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward<T2>(value)); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #endif #endif @@ -219,12 +219,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total<T1>::size; boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->noinit(p2); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T, typename A> inline typename boost::detail::sp_if_size_array<T>::type @@ -238,12 +238,12 @@ namespace boost { T2* p2 = 0; boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->noinit(p2); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/shared_ptr_nmt.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/shared_ptr_nmt.hpp index afc1ec03..bb3d739c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/shared_ptr_nmt.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/shared_ptr_nmt.hpp @@ -2,7 +2,7 @@ #define BOOST_SMART_PTR_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED // -// detail/shared_ptr_nmt.hpp - shared_ptr.hpp without member templates +// detail/shared_ptr_nmt.hpp - std::shared_ptr.hpp without member templates // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov @@ -11,7 +11,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. // #include <boost/assert.hpp> @@ -30,7 +30,7 @@ namespace boost { -template<class T> class shared_ptr +template<class T> class std::shared_ptr { private: @@ -41,7 +41,7 @@ public: typedef T element_type; typedef T value_type; - explicit shared_ptr(T * p = 0): px(p) + explicit std::shared_ptr(T * p = 0): px(p) { #ifndef BOOST_NO_EXCEPTIONS @@ -68,7 +68,7 @@ public: #endif } - ~shared_ptr() + ~std::shared_ptr() { if(--*pn == 0) { @@ -77,29 +77,29 @@ public: } } - shared_ptr(shared_ptr const & r): px(r.px) // never throws + std::shared_ptr(std::shared_ptr const & r): px(r.px) // never throws { pn = r.pn; ++*pn; } - shared_ptr & operator=(shared_ptr const & r) + std::shared_ptr & operator=(std::shared_ptr const & r) { - shared_ptr(r).swap(*this); + std::shared_ptr(r).swap(*this); return *this; } #ifndef BOOST_NO_AUTO_PTR - explicit shared_ptr(std::auto_ptr<T> & r) - { + explicit std::shared_ptr(std::auto_ptr<T> & r) + { pn = new count_type(1); // may throw px = r.release(); // fix: moved here to stop leak if new throws - } + } - shared_ptr & operator=(std::auto_ptr<T> & r) + std::shared_ptr & operator=(std::auto_ptr<T> & r) { - shared_ptr(r).swap(*this); + std::shared_ptr(r).swap(*this); return *this; } @@ -108,7 +108,7 @@ public: void reset(T * p = 0) { BOOST_ASSERT(p == 0 || p != px); - shared_ptr(p).swap(*this); + std::shared_ptr(p).swap(*this); } T & operator*() const // never throws @@ -137,8 +137,8 @@ public: { return *pn == 1; } - - void swap(shared_ptr<T> & other) // never throws + + void swap(std::shared_ptr<T> & other) // never throws { std::swap(px, other.px); std::swap(pn, other.pn); @@ -150,29 +150,29 @@ private: count_type * pn; // ptr to reference counter }; -template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) +template<class T, class U> inline bool operator==(std::shared_ptr<T> const & a, std::shared_ptr<U> const & b) { return a.get() == b.get(); } -template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) +template<class T, class U> inline bool operator!=(std::shared_ptr<T> const & a, std::shared_ptr<U> const & b) { return a.get() != b.get(); } -template<class T> inline bool operator<(shared_ptr<T> const & a, shared_ptr<T> const & b) +template<class T> inline bool operator<(std::shared_ptr<T> const & a, std::shared_ptr<T> const & b) { return std::less<T*>()(a.get(), b.get()); } -template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b) +template<class T> void swap(std::shared_ptr<T> & a, std::shared_ptr<T> & b) { a.swap(b); } -// get_pointer() enables boost::mem_fn to recognize shared_ptr +// get_pointer() enables boost::mem_fn to recognize std::shared_ptr -template<class T> inline T * get_pointer(shared_ptr<T> const & p) +template<class T> inline T * get_pointer(std::shared_ptr<T> const & p) { return p.get(); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/sp_if_array.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/sp_if_array.hpp index 661e1785..a364cb55 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/sp_if_array.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/sp_if_array.hpp @@ -1,29 +1,29 @@ /* - * Copyright (c) 2012 Glen Joseph Fernandes + * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * - * Distributed under the Boost Software License, - * Version 1.0. (See accompanying file LICENSE_1_0.txt + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP #define BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/smart_ptr/std::shared_ptr.hpp> namespace boost { namespace detail { - template<typename T> + template<typename T> struct sp_if_array; template<typename T> struct sp_if_array<T[]> { - typedef boost::shared_ptr<T[]> type; + typedef boost::std::shared_ptr<T[]> type; }; template<typename T> struct sp_if_size_array; template<typename T, std::size_t N> struct sp_if_size_array<T[N]> { - typedef boost::shared_ptr<T[N]> type; + typedef boost::std::shared_ptr<T[N]> type; }; } } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/spinlock_pool.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/spinlock_pool.hpp index f09d5c64..5d3e9e6a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/spinlock_pool.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/spinlock_pool.hpp @@ -17,8 +17,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // // spinlock_pool<0> is reserved for atomic<>, when/if it arrives -// spinlock_pool<1> is reserved for shared_ptr reference counts -// spinlock_pool<2> is reserved for shared_ptr atomic access +// spinlock_pool<1> is reserved for std::shared_ptr reference counts +// spinlock_pool<2> is reserved for std::shared_ptr atomic access // #include <boost/config.hpp> @@ -41,11 +41,11 @@ public: static spinlock & spinlock_for( void const * pv ) { -#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 +#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 std::size_t i = reinterpret_cast< unsigned long long >( pv ) % 41; -#else +#else std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; -#endif +#endif return pool_[ i ]; } @@ -74,14 +74,14 @@ public: template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] = { - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_raw.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_raw.hpp index f659c046..2ebd0466 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_raw.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_raw.hpp @@ -13,19 +13,19 @@ // #include <boost/config.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <boost/assert.hpp> #include <boost/detail/workaround.hpp> namespace boost { -template<typename T> boost::shared_ptr<T> shared_from_raw(T *); +template<typename T> boost::std::shared_ptr<T> shared_from_raw(T *); template<typename T> boost::weak_ptr<T> weak_from_raw(T *); namespace detail { -template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); +template< class X, class Y > inline void sp_enable_shared_from_this( boost::std::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); } // namespace detail @@ -48,7 +48,7 @@ protected: ~enable_shared_from_raw() { - BOOST_ASSERT( shared_this_.use_count() <= 1 ); // make sure no dangling shared_ptr objects exist + BOOST_ASSERT( shared_this_.use_count() <= 1 ); // make sure no dangling std::shared_ptr objects exist } private: @@ -66,26 +66,26 @@ private: public: #else private: - template<class Y> friend class shared_ptr; - template<typename T> friend boost::shared_ptr<T> shared_from_raw(T *); + template<class Y> friend class std::shared_ptr; + template<typename T> friend boost::std::shared_ptr<T> shared_from_raw(T *); template<typename T> friend boost::weak_ptr<T> weak_from_raw(T *); - template< class X, class Y > friend inline void detail::sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); + template< class X, class Y > friend inline void detail::sp_enable_shared_from_this( boost::std::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); #endif - shared_ptr<void> shared_from_this() + std::shared_ptr<void> shared_from_this() { init_weak_once(); - return shared_ptr<void>( weak_this_ ); + return std::shared_ptr<void>( weak_this_ ); } - shared_ptr<const void> shared_from_this() const + std::shared_ptr<const void> shared_from_this() const { init_weak_once(); - return shared_ptr<const void>( weak_this_ ); + return std::shared_ptr<const void>( weak_this_ ); } - // Note: invoked automatically by shared_ptr; do not call - template<class X, class Y> void _internal_accept_owner( shared_ptr<X> * ppx, Y * py ) const + // Note: invoked automatically by std::shared_ptr; do not call + template<class X, class Y> void _internal_accept_owner( std::shared_ptr<X> * ppx, Y * py ) const { BOOST_ASSERT( ppx != 0 ); @@ -109,14 +109,14 @@ private: mutable weak_ptr<void> weak_this_; private: - mutable shared_ptr<void> shared_this_; + mutable std::shared_ptr<void> shared_this_; }; template<typename T> -boost::shared_ptr<T> shared_from_raw(T *p) +boost::std::shared_ptr<T> shared_from_raw(T *p) { BOOST_ASSERT(p != 0); - return boost::shared_ptr<T>(p->enable_shared_from_raw::shared_from_this(), p); + return boost::std::shared_ptr<T>(p->enable_shared_from_raw::shared_from_this(), p); } template<typename T> @@ -130,7 +130,7 @@ boost::weak_ptr<T> weak_from_raw(T *p) namespace detail { - template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ) + template< class X, class Y > inline void sp_enable_shared_from_this( boost::std::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ) { if( pe != 0 ) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_this.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_this.hpp index 3230f025..e0eddd0d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_this.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_this.hpp @@ -14,7 +14,7 @@ // #include <boost/smart_ptr/weak_ptr.hpp> -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/smart_ptr/std::shared_ptr.hpp> #include <boost/assert.hpp> #include <boost/config.hpp> @@ -44,28 +44,28 @@ protected: public: - shared_ptr<T> shared_from_this() + std::shared_ptr<T> shared_from_this() { - shared_ptr<T> p( weak_this_ ); + std::shared_ptr<T> p( weak_this_ ); BOOST_ASSERT( p.get() == this ); return p; } - shared_ptr<T const> shared_from_this() const + std::shared_ptr<T const> shared_from_this() const { - shared_ptr<T const> p( weak_this_ ); + std::shared_ptr<T const> p( weak_this_ ); BOOST_ASSERT( p.get() == this ); return p; } public: // actually private, but avoids compiler template friendship issues - // Note: invoked automatically by shared_ptr; do not call - template<class X, class Y> void _internal_accept_owner( shared_ptr<X> const * ppx, Y * py ) const + // Note: invoked automatically by std::shared_ptr; do not call + template<class X, class Y> void _internal_accept_owner( std::shared_ptr<X> const * ppx, Y * py ) const { if( weak_this_.expired() ) { - weak_this_ = shared_ptr<T>( *ppx, py ); + weak_this_ = std::shared_ptr<T>( *ppx, py ); } } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_array.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_array.hpp index eb0578d9..b8abaf55 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_array.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_array.hpp @@ -9,7 +9,7 @@ #ifndef BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/smart_ptr/std::shared_ptr.hpp> #include <boost/smart_ptr/detail/array_deleter.hpp> #include <boost/smart_ptr/detail/array_traits.hpp> #include <boost/smart_ptr/detail/make_array_helper.hpp> @@ -29,12 +29,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total<T1>::size; boost::detail::make_array_helper<T2[]> a1(n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template<typename T, typename... Args> @@ -47,12 +47,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total<T1>::size; boost::detail::make_array_helper<T2[]> a1(n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward<Args>(args)...); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T, typename... Args> inline typename boost::detail::sp_if_size_array<T>::type @@ -66,12 +66,12 @@ namespace boost { T2* p2 = 0; boost::detail::make_array_helper<T2[N]> a1(&p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward<Args>(args)...); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) @@ -89,13 +89,13 @@ namespace boost { T3* p3 = 0; boost::detail::make_array_helper<T2[N]> a1(&p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p3 = reinterpret_cast<T3*>(list); p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T> inline typename boost::detail::sp_if_array<T>::type @@ -113,13 +113,13 @@ namespace boost { std::size_t n1 = M * size; boost::detail::make_array_helper<T2[]> a1(n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p3 = reinterpret_cast<T3*>(list); p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->template init_list<M>(p2, p3); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T> inline typename boost::detail::sp_if_size_array<T>::type @@ -136,13 +136,13 @@ namespace boost { T3* p3 = 0; boost::detail::make_array_helper<T2[N]> a1(&p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p3 = reinterpret_cast<T3*>(list); p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->template init_list<M>(p2, p3); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template<typename T> @@ -157,13 +157,13 @@ namespace boost { std::size_t n1 = list.size() * boost::detail::array_total<T1>::size; boost::detail::make_array_helper<T2[]> a1(n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p3 = reinterpret_cast<T3*>(list.begin()); p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -178,12 +178,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total<T1>::size; boost::detail::make_array_helper<T2[]> a1(n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward<T2>(value)); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T> inline typename boost::detail::sp_if_size_array<T>::type @@ -197,12 +197,12 @@ namespace boost { T2* p2 = 0; boost::detail::make_array_helper<T2[N]> a1(&p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward<T2>(value)); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } #endif #endif @@ -216,12 +216,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total<T1>::size; boost::detail::make_array_helper<T2[]> a1(n1, &p2); boost::detail::array_deleter<T2[]> d1(n1); - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->noinit(p2); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } template<typename T> inline typename boost::detail::sp_if_size_array<T>::type @@ -235,12 +235,12 @@ namespace boost { T2* p2 = 0; boost::detail::make_array_helper<T2[N]> a1(&p2); boost::detail::array_deleter<T2[N]> d1; - boost::shared_ptr<T> s1(p1, d1, a1); + boost::std::shared_ptr<T> s1(p1, d1, a1); typedef boost::detail::array_deleter<T2[N]>* D2; p1 = reinterpret_cast<T1*>(p2); D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter()); d2->noinit(p2); - return boost::shared_ptr<T>(s1, p1); + return boost::std::shared_ptr<T>(s1, p1); } } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_object.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_object.hpp index 89a71168..3b4bb108 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_object.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_object.hpp @@ -13,7 +13,7 @@ // for documentation. #include <boost/config.hpp> -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/smart_ptr/std::shared_ptr.hpp> #include <boost/smart_ptr/detail/sp_forward.hpp> #include <boost/type_traits/type_with_alignment.hpp> #include <boost/type_traits/alignment_of.hpp> @@ -100,7 +100,7 @@ public: template< class T > struct sp_if_not_array { - typedef boost::shared_ptr< T > type; + typedef boost::std::shared_ptr< T > type; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) @@ -133,7 +133,7 @@ template< class T, std::size_t N > struct sp_if_not_array< T[N] > template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared() { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -145,12 +145,12 @@ template< class T > typename boost::detail::sp_if_not_array< T >::type make_shar T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared_noinit() { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -162,12 +162,12 @@ template< class T > typename boost::detail::sp_if_not_array< T >::type make_shar T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -179,12 +179,12 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared_noinit( A const & a ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -196,7 +196,7 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } #if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) @@ -205,7 +205,7 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type make_shared( Arg1 && arg1, Args && ... args ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -217,12 +217,12 @@ template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, Arg1 && arg1, Args && ... args ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -234,7 +234,7 @@ template< class T, class A, class Arg1, class... Args > typename boost::detail:: T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } #elif !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) @@ -244,7 +244,7 @@ template< class T, class A, class Arg1, class... Args > typename boost::detail:: template< class T, class A1 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -259,19 +259,19 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1 ) T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( + ::new( pv ) T( boost::detail::sp_forward<A1>( a1 ) ); @@ -280,20 +280,20 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A1>( a1 ), boost::detail::sp_forward<A2>( a2 ) ); @@ -302,20 +302,20 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), + ::new( pv ) T( + boost::detail::sp_forward<A1>( a1 ), boost::detail::sp_forward<A2>( a2 ) ); @@ -324,21 +324,21 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), boost::detail::sp_forward<A3>( a3 ) ); @@ -347,21 +347,21 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), + ::new( pv ) T( + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), boost::detail::sp_forward<A3>( a3 ) ); @@ -370,22 +370,22 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), boost::detail::sp_forward<A4>( a4 ) ); @@ -394,22 +394,22 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), + ::new( pv ) T( + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), boost::detail::sp_forward<A4>( a4 ) ); @@ -418,23 +418,23 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), boost::detail::sp_forward<A5>( a5 ) ); @@ -443,23 +443,23 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), + ::new( pv ) T( + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), boost::detail::sp_forward<A5>( a5 ) ); @@ -468,24 +468,24 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), - boost::detail::sp_forward<A5>( a5 ), + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A5>( a5 ), boost::detail::sp_forward<A6>( a6 ) ); @@ -494,24 +494,24 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), - boost::detail::sp_forward<A5>( a5 ), + ::new( pv ) T( + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A5>( a5 ), boost::detail::sp_forward<A6>( a6 ) ); @@ -520,25 +520,25 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), - boost::detail::sp_forward<A5>( a5 ), - boost::detail::sp_forward<A6>( a6 ), + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A5>( a5 ), + boost::detail::sp_forward<A6>( a6 ), boost::detail::sp_forward<A7>( a7 ) ); @@ -547,25 +547,25 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), - boost::detail::sp_forward<A5>( a5 ), - boost::detail::sp_forward<A6>( a6 ), + ::new( pv ) T( + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A5>( a5 ), + boost::detail::sp_forward<A6>( a6 ), boost::detail::sp_forward<A7>( a7 ) ); @@ -574,26 +574,26 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), - boost::detail::sp_forward<A5>( a5 ), - boost::detail::sp_forward<A6>( a6 ), - boost::detail::sp_forward<A7>( a7 ), + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A5>( a5 ), + boost::detail::sp_forward<A6>( a6 ), + boost::detail::sp_forward<A7>( a7 ), boost::detail::sp_forward<A8>( a8 ) ); @@ -602,26 +602,26 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), - boost::detail::sp_forward<A5>( a5 ), - boost::detail::sp_forward<A6>( a6 ), - boost::detail::sp_forward<A7>( a7 ), + ::new( pv ) T( + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A5>( a5 ), + boost::detail::sp_forward<A6>( a6 ), + boost::detail::sp_forward<A7>( a7 ), boost::detail::sp_forward<A8>( a8 ) ); @@ -630,27 +630,27 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), - boost::detail::sp_forward<A5>( a5 ), - boost::detail::sp_forward<A6>( a6 ), - boost::detail::sp_forward<A7>( a7 ), - boost::detail::sp_forward<A8>( a8 ), + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A5>( a5 ), + boost::detail::sp_forward<A6>( a6 ), + boost::detail::sp_forward<A7>( a7 ), + boost::detail::sp_forward<A8>( a8 ), boost::detail::sp_forward<A9>( a9 ) ); @@ -659,27 +659,27 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward<A1>( a1 ), - boost::detail::sp_forward<A2>( a2 ), - boost::detail::sp_forward<A3>( a3 ), - boost::detail::sp_forward<A4>( a4 ), - boost::detail::sp_forward<A5>( a5 ), - boost::detail::sp_forward<A6>( a6 ), - boost::detail::sp_forward<A7>( a7 ), - boost::detail::sp_forward<A8>( a8 ), + ::new( pv ) T( + boost::detail::sp_forward<A1>( a1 ), + boost::detail::sp_forward<A2>( a2 ), + boost::detail::sp_forward<A3>( a3 ), + boost::detail::sp_forward<A4>( a4 ), + boost::detail::sp_forward<A5>( a5 ), + boost::detail::sp_forward<A6>( a6 ), + boost::detail::sp_forward<A7>( a7 ), + boost::detail::sp_forward<A8>( a8 ), boost::detail::sp_forward<A9>( a9 ) ); @@ -688,7 +688,7 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } #else @@ -698,7 +698,7 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, template< class T, class A1 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -710,13 +710,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1 ) T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -728,13 +728,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -746,13 +746,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -764,13 +764,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -782,13 +782,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -800,13 +800,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -818,13 +818,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -836,13 +836,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -854,13 +854,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -872,13 +872,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -890,13 +890,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -908,13 +908,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -926,13 +926,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -944,13 +944,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -962,13 +962,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -980,13 +980,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -998,13 +998,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() ); @@ -1016,7 +1016,7 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::shared_ptr< T >( pt, pt2 ); + return boost::std::shared_ptr< T >( pt, pt2 ); } #endif diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/owner_less.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/owner_less.hpp index 6899325b..f621533d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/owner_less.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/owner_less.hpp @@ -17,7 +17,7 @@ namespace boost { - template<typename T> class shared_ptr; + template<typename T> class std::shared_ptr; template<typename T> class weak_ptr; namespace detail @@ -43,13 +43,13 @@ namespace boost template<typename T> struct owner_less; template<typename T> - struct owner_less<shared_ptr<T> >: - public detail::generic_owner_less<shared_ptr<T>, weak_ptr<T> > + struct owner_less<std::shared_ptr<T> >: + public detail::generic_owner_less<std::shared_ptr<T>, weak_ptr<T> > {}; template<typename T> struct owner_less<weak_ptr<T> >: - public detail::generic_owner_less<weak_ptr<T>, shared_ptr<T> > + public detail::generic_owner_less<weak_ptr<T>, std::shared_ptr<T> > {}; } // namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp index be6722d5..162395db 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp @@ -36,7 +36,7 @@ void sp_scalar_destructor_hook(void * p); // scoped_ptr mimics a built-in pointer except that it guarantees deletion // of the object pointed to, either on destruction of the scoped_ptr or via // an explicit reset(). scoped_ptr is a simple solution for simple needs; -// use shared_ptr or std::auto_ptr if your needs are more complex. +// use std::shared_ptr or std::auto_ptr if your needs are more complex. template<class T> class scoped_ptr // noncopyable { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_array.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_array.hpp index 73a07ae1..bf55aa65 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_array.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_array.hpp @@ -25,7 +25,7 @@ #include <boost/assert.hpp> #include <boost/checked_delete.hpp> -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/smart_ptr/std::shared_ptr.hpp> #include <boost/smart_ptr/detail/shared_count.hpp> #include <boost/smart_ptr/detail/sp_nullptr_t.hpp> #include <boost/detail/workaround.hpp> @@ -40,7 +40,7 @@ namespace boost // // shared_array // -// shared_array extends shared_ptr to arrays. +// shared_array extends std::shared_ptr to arrays. // The array pointed to is deleted when the last shared_array pointing to it // is destroyed or reset. // @@ -195,7 +195,7 @@ public: BOOST_ASSERT(i >= 0); return px[i]; } - + T * get() const BOOST_NOEXCEPT { return px; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp index 2f0ce7bc..ea010b16 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp @@ -2,7 +2,7 @@ #define BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED // -// shared_ptr.hpp +// std::shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001-2008 Peter Dimov @@ -11,7 +11,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. // #include <boost/config.hpp> // for broken compiler workarounds @@ -22,7 +22,7 @@ // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of <memory> doesn't try to -// pull in the TR1 headers: that's why we use this header +// pull in the TR1 headers: that's why we use this header // rather than including <memory> directly: #include <boost/config/no_tr1/memory.hpp> // std::auto_ptr @@ -55,7 +55,7 @@ namespace boost { -template<class T> class shared_ptr; +template<class T> class std::shared_ptr; template<class T> class weak_ptr; template<class T> class enable_shared_from_this; class enable_shared_from_raw; @@ -205,7 +205,7 @@ template< class T, std::size_t N > struct sp_extent< T[N] > // enable_shared_from_this support -template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::std::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) { if( pe != 0 ) { @@ -213,7 +213,7 @@ template< class X, class Y, class T > inline void sp_enable_shared_from_this( bo } } -template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); +template< class X, class Y > inline void sp_enable_shared_from_this( boost::std::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); #ifdef _MANAGED @@ -247,7 +247,7 @@ template< class T, class R > struct sp_enable_if_auto_ptr template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > { typedef R type; -}; +}; #endif @@ -271,7 +271,7 @@ template< class Y, class T > inline void sp_assert_convertible() // pointer constructor helper -template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) +template< class T, class Y > inline void sp_pointer_construct( boost::std::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) { boost::detail::shared_count( p ).swap( pn ); boost::detail::sp_enable_shared_from_this( ppx, p, p ); @@ -279,13 +279,13 @@ template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) -template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) +template< class T, class Y > inline void sp_pointer_construct( boost::std::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) { sp_assert_convertible< Y[], T[] >(); boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); } -template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) +template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::std::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) { sp_assert_convertible< Y[N], T[N] >(); boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); @@ -295,19 +295,19 @@ template< class T, std::size_t N, class Y > inline void sp_pointer_construct( bo // deleter constructor helper -template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) +template< class T, class Y > inline void sp_deleter_construct( boost::std::shared_ptr< T > * ppx, Y * p ) { boost::detail::sp_enable_shared_from_this( ppx, p, p ); } #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) -template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ ) +template< class T, class Y > inline void sp_deleter_construct( boost::std::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ ) { sp_assert_convertible< Y[], T[] >(); } -template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ ) +template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::std::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ ) { sp_assert_convertible< Y[N], T[N] >(); } @@ -318,38 +318,38 @@ template< class T, std::size_t N, class Y > inline void sp_deleter_construct( bo // -// shared_ptr +// std::shared_ptr // // An enhanced relative of scoped_ptr with reference counted copy semantics. -// The object pointed to is deleted when the last shared_ptr pointing to it +// The object pointed to is deleted when the last std::shared_ptr pointing to it // is destroyed or reset. // -template<class T> class shared_ptr +template<class T> class std::shared_ptr { private: // Borland 5.5.1 specific workaround - typedef shared_ptr<T> this_type; + typedef std::shared_ptr<T> this_type; public: typedef typename boost::detail::sp_element< T >::type element_type; - shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+ + std::shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+ { } #if !defined( BOOST_NO_CXX11_NULLPTR ) - shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws + std::shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws { } #endif template<class Y> - explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete + explicit std::shared_ptr( Y * p ): px( p ), pn() // Y must be complete { boost::detail::sp_pointer_construct( this, p, pn ); } @@ -357,17 +357,17 @@ public: // // Requirements: D's copy constructor must not throw // - // shared_ptr will release p by calling d(p) + // std::shared_ptr will release p by calling d(p) // - template<class Y, class D> shared_ptr( Y * p, D d ): px( p ), pn( p, d ) + template<class Y, class D> std::shared_ptr( Y * p, D d ): px( p ), pn( p, d ) { boost::detail::sp_deleter_construct( this, p ); } #if !defined( BOOST_NO_CXX11_NULLPTR ) - template<class D> shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) + template<class D> std::shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) { } @@ -375,14 +375,14 @@ public: // As above, but with allocator. A's copy constructor shall not throw. - template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) + template<class Y, class D, class A> std::shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) { boost::detail::sp_deleter_construct( this, p ); } #if !defined( BOOST_NO_CXX11_NULLPTR ) - template<class D, class A> shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) + template<class D, class A> std::shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) { } @@ -394,14 +394,14 @@ public: // ... except in C++0x, move disables the implicit copy - shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + std::shared_ptr( std::shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { } #endif template<class Y> - explicit shared_ptr( weak_ptr<Y> const & r ): pn( r.pn ) // may throw + explicit std::shared_ptr( weak_ptr<Y> const & r ): pn( r.pn ) // may throw { boost::detail::sp_assert_convertible< Y, T >(); @@ -410,7 +410,7 @@ public: } template<class Y> - shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag ) + std::shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag ) BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) { if( !pn.empty() ) @@ -422,11 +422,11 @@ public: template<class Y> #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) - shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() ) + std::shared_ptr( std::shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() ) #else - shared_ptr( shared_ptr<Y> const & r ) + std::shared_ptr( std::shared_ptr<Y> const & r ) #endif BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) @@ -436,14 +436,14 @@ public: // aliasing template< class Y > - shared_ptr( shared_ptr<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) + std::shared_ptr( std::shared_ptr<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) { } #ifndef BOOST_NO_AUTO_PTR template<class Y> - explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn() + explicit std::shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -456,7 +456,7 @@ public: #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template<class Y> - shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn() + std::shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -469,7 +469,7 @@ public: #elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template<class Ap> - explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn() + explicit std::shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn() { typedef typename Ap::element_type Y; @@ -488,7 +488,7 @@ public: #if !defined( BOOST_NO_CXX11_SMART_PTR ) template< class Y, class D > - shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() + std::shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -502,7 +502,7 @@ public: // assignment - shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT + std::shared_ptr & operator=( std::shared_ptr const & r ) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; @@ -511,7 +511,7 @@ public: #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) template<class Y> - shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_NOEXCEPT + std::shared_ptr & operator=(std::shared_ptr<Y> const & r) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; @@ -522,7 +522,7 @@ public: #ifndef BOOST_NO_AUTO_PTR template<class Y> - shared_ptr & operator=( std::auto_ptr<Y> & r ) + std::shared_ptr & operator=( std::auto_ptr<Y> & r ) { this_type( r ).swap( *this ); return *this; @@ -531,7 +531,7 @@ public: #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template<class Y> - shared_ptr & operator=( std::auto_ptr<Y> && r ) + std::shared_ptr & operator=( std::auto_ptr<Y> && r ) { this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this ); return *this; @@ -540,7 +540,7 @@ public: #elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template<class Ap> - typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) + typename boost::detail::sp_enable_if_auto_ptr< Ap, std::shared_ptr & >::type operator=( Ap r ) { this_type( r ).swap( *this ); return *this; @@ -553,7 +553,7 @@ public: #if !defined( BOOST_NO_CXX11_SMART_PTR ) template<class Y, class D> - shared_ptr & operator=( std::unique_ptr<Y, D> && r ) + std::shared_ptr & operator=( std::unique_ptr<Y, D> && r ) { this_type( static_cast< std::unique_ptr<Y, D> && >( r ) ).swap(*this); return *this; @@ -565,7 +565,7 @@ public: #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) - shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn() + std::shared_ptr( std::shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn() { pn.swap( r.pn ); r.px = 0; @@ -574,11 +574,11 @@ public: template<class Y> #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) - shared_ptr( shared_ptr<Y> && r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() ) + std::shared_ptr( std::shared_ptr<Y> && r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() ) #else - shared_ptr( shared_ptr<Y> && r ) + std::shared_ptr( std::shared_ptr<Y> && r ) #endif BOOST_NOEXCEPT : px( r.px ), pn() @@ -589,16 +589,16 @@ public: r.px = 0; } - shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT + std::shared_ptr & operator=( std::shared_ptr && r ) BOOST_NOEXCEPT { - this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); + this_type( static_cast< std::shared_ptr && >( r ) ).swap( *this ); return *this; } template<class Y> - shared_ptr & operator=( shared_ptr<Y> && r ) BOOST_NOEXCEPT + std::shared_ptr & operator=( std::shared_ptr<Y> && r ) BOOST_NOEXCEPT { - this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this ); + this_type( static_cast< std::shared_ptr<Y> && >( r ) ).swap( *this ); return *this; } @@ -606,7 +606,7 @@ public: #if !defined( BOOST_NO_CXX11_NULLPTR ) - shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws + std::shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws { this_type().swap(*this); return *this; @@ -635,25 +635,25 @@ public: this_type( p, d, a ).swap( *this ); } - template<class Y> void reset( shared_ptr<Y> const & r, element_type * p ) + template<class Y> void reset( std::shared_ptr<Y> const & r, element_type * p ) { this_type( r, p ).swap( *this ); } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_dereference< T >::type operator* () const { BOOST_ASSERT( px != 0 ); return *px; } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) - typename boost::detail::sp_member_access< T >::type operator-> () const + typename boost::detail::sp_member_access< T >::type operator-> () const { BOOST_ASSERT( px != 0 ); return px; } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const { @@ -681,13 +681,13 @@ public: return pn.use_count(); } - void swap( shared_ptr & other ) BOOST_NOEXCEPT + void swap( std::shared_ptr & other ) BOOST_NOEXCEPT { std::swap(px, other.px); pn.swap(other.pn); } - template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT + template<class Y> bool owner_before( std::shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } @@ -707,7 +707,7 @@ public: return pn.get_untyped_deleter(); } - bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT + bool _internal_equiv( std::shared_ptr const & r ) const BOOST_NOEXCEPT { return px == r.px && pn == r.pn; } @@ -719,7 +719,7 @@ public: private: - template<class Y> friend class shared_ptr; + template<class Y> friend class std::shared_ptr; template<class Y> friend class weak_ptr; @@ -728,14 +728,14 @@ private: element_type * px; // contained pointer boost::detail::shared_count pn; // reference counter -}; // shared_ptr +}; // std::shared_ptr -template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT +template<class T, class U> inline bool operator==(std::shared_ptr<T> const & a, std::shared_ptr<U> const & b) BOOST_NOEXCEPT { return a.get() == b.get(); } -template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT +template<class T, class U> inline bool operator!=(std::shared_ptr<T> const & a, std::shared_ptr<U> const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } @@ -744,7 +744,7 @@ template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, share // Resolve the ambiguity between our op!= and the one in rel_ops -template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b) BOOST_NOEXCEPT +template<class T> inline bool operator!=(std::shared_ptr<T> const & a, std::shared_ptr<T> const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } @@ -753,81 +753,81 @@ template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> #if !defined( BOOST_NO_CXX11_NULLPTR ) -template<class T> inline bool operator==( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +template<class T> inline bool operator==( std::shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() == 0; } -template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_NOEXCEPT +template<class T> inline bool operator==( boost::detail::sp_nullptr_t, std::shared_ptr<T> const & p ) BOOST_NOEXCEPT { return p.get() == 0; } -template<class T> inline bool operator!=( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +template<class T> inline bool operator!=( std::shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() != 0; } -template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_NOEXCEPT +template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, std::shared_ptr<T> const & p ) BOOST_NOEXCEPT { return p.get() != 0; } #endif -template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT +template<class T, class U> inline bool operator<(std::shared_ptr<T> const & a, std::shared_ptr<U> const & b) BOOST_NOEXCEPT { return a.owner_before( b ); } -template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_NOEXCEPT +template<class T> inline void swap(std::shared_ptr<T> & a, std::shared_ptr<T> & b) BOOST_NOEXCEPT { a.swap(b); } -template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT +template<class T, class U> std::shared_ptr<T> static_pointer_cast( std::shared_ptr<U> const & r ) BOOST_NOEXCEPT { (void) static_cast< T* >( static_cast< U* >( 0 ) ); - typedef typename shared_ptr<T>::element_type E; + typedef typename std::shared_ptr<T>::element_type E; E * p = static_cast< E* >( r.get() ); - return shared_ptr<T>( r, p ); + return std::shared_ptr<T>( r, p ); } -template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT +template<class T, class U> std::shared_ptr<T> const_pointer_cast( std::shared_ptr<U> const & r ) BOOST_NOEXCEPT { (void) const_cast< T* >( static_cast< U* >( 0 ) ); - typedef typename shared_ptr<T>::element_type E; + typedef typename std::shared_ptr<T>::element_type E; E * p = const_cast< E* >( r.get() ); - return shared_ptr<T>( r, p ); + return std::shared_ptr<T>( r, p ); } -template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT +template<class T, class U> std::shared_ptr<T> dynamic_pointer_cast( std::shared_ptr<U> const & r ) BOOST_NOEXCEPT { //(void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); // // MGH - TODO - FIX - removed this check, as it was breaking the PS3 compile, and I've no idea why :-s - typedef typename shared_ptr<T>::element_type E; + typedef typename std::shared_ptr<T>::element_type E; E * p = dynamic_cast< E* >( r.get() ); - return p? shared_ptr<T>( r, p ): shared_ptr<T>(); + return p? std::shared_ptr<T>( r, p ): std::shared_ptr<T>(); } -template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT +template<class T, class U> std::shared_ptr<T> reinterpret_pointer_cast( std::shared_ptr<U> const & r ) BOOST_NOEXCEPT { (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); - typedef typename shared_ptr<T>::element_type E; + typedef typename std::shared_ptr<T>::element_type E; E * p = reinterpret_cast< E* >( r.get() ); - return shared_ptr<T>( r, p ); + return std::shared_ptr<T>( r, p ); } -// get_pointer() enables boost::mem_fn to recognize shared_ptr +// get_pointer() enables boost::mem_fn to recognize std::shared_ptr -template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p) BOOST_NOEXCEPT +template<class T> inline typename std::shared_ptr<T>::element_type * get_pointer(std::shared_ptr<T> const & p) BOOST_NOEXCEPT { return p.get(); } @@ -838,7 +838,7 @@ template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shar #if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) ) -template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p) +template<class Y> std::ostream & operator<< (std::ostream & os, std::shared_ptr<Y> const & p) { os << p.get(); return os; @@ -852,9 +852,9 @@ template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> co # if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT) // MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL using std::basic_ostream; -template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p) +template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, std::shared_ptr<Y> const & p) # else -template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p) +template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, std::shared_ptr<Y> const & p) # endif { os << p.get(); @@ -879,7 +879,7 @@ namespace detail // g++ 2.9x doesn't allow static_cast<X const *>(void *) // apparently EDG 2.38 and HP aCC A.03.35 also don't accept it -template<class D, class T> D * basic_get_deleter(shared_ptr<T> const & p) +template<class D, class T> D * basic_get_deleter(std::shared_ptr<T> const & p) { void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D)); return const_cast<D *>(static_cast<D const *>(q)); @@ -887,7 +887,7 @@ template<class D, class T> D * basic_get_deleter(shared_ptr<T> const & p) #else -template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) BOOST_NOEXCEPT +template<class D, class T> D * basic_get_deleter( std::shared_ptr<T> const & p ) BOOST_NOEXCEPT { return static_cast<D *>( p._internal_get_deleter(BOOST_SP_TYPEID(D)) ); } @@ -898,7 +898,7 @@ class esft2_deleter_wrapper { private: - shared_ptr<void> deleter_; + std::shared_ptr<void> deleter_; public: @@ -906,7 +906,7 @@ public: { } - template< class T > void set_deleter( shared_ptr<T> const & deleter ) + template< class T > void set_deleter( std::shared_ptr<T> const & deleter ) { deleter_ = deleter; } @@ -925,7 +925,7 @@ public: } // namespace detail -template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_NOEXCEPT +template<class D, class T> D * get_deleter( std::shared_ptr<T> const & p ) BOOST_NOEXCEPT { D *del = boost::detail::basic_get_deleter<D>(p); @@ -944,34 +944,34 @@ template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_NOEX #if !defined(BOOST_SP_NO_ATOMIC_ACCESS) -template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ ) BOOST_NOEXCEPT +template<class T> inline bool atomic_is_lock_free( std::shared_ptr<T> const * /*p*/ ) BOOST_NOEXCEPT { return false; } -template<class T> shared_ptr<T> atomic_load( shared_ptr<T> const * p ) +template<class T> std::shared_ptr<T> atomic_load( std::shared_ptr<T> const * p ) { boost::detail::spinlock_pool<2>::scoped_lock lock( p ); return *p; } -template<class T> inline shared_ptr<T> atomic_load_explicit( shared_ptr<T> const * p, memory_order /*mo*/ ) +template<class T> inline std::shared_ptr<T> atomic_load_explicit( std::shared_ptr<T> const * p, memory_order /*mo*/ ) { return atomic_load( p ); } -template<class T> void atomic_store( shared_ptr<T> * p, shared_ptr<T> r ) +template<class T> void atomic_store( std::shared_ptr<T> * p, std::shared_ptr<T> r ) { boost::detail::spinlock_pool<2>::scoped_lock lock( p ); p->swap( r ); } -template<class T> inline void atomic_store_explicit( shared_ptr<T> * p, shared_ptr<T> r, memory_order /*mo*/ ) +template<class T> inline void atomic_store_explicit( std::shared_ptr<T> * p, std::shared_ptr<T> r, memory_order /*mo*/ ) { atomic_store( p, r ); // std::move( r ) } -template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T> r ) +template<class T> std::shared_ptr<T> atomic_exchange( std::shared_ptr<T> * p, std::shared_ptr<T> r ) { boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); @@ -982,12 +982,12 @@ template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T return r; // return std::move( r ) } -template<class T> shared_ptr<T> atomic_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> r, memory_order /*mo*/ ) +template<class T> std::shared_ptr<T> atomic_exchange_explicit( std::shared_ptr<T> * p, std::shared_ptr<T> r, memory_order /*mo*/ ) { return atomic_exchange( p, r ); // std::move( r ) } -template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w ) +template<class T> bool atomic_compare_exchange( std::shared_ptr<T> * p, std::shared_ptr<T> * v, std::shared_ptr<T> w ) { boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); @@ -1003,7 +1003,7 @@ template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> } else { - shared_ptr<T> tmp( *p ); + std::shared_ptr<T> tmp( *p ); sp.unlock(); @@ -1012,7 +1012,7 @@ template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> } } -template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w, memory_order /*success*/, memory_order /*failure*/ ) +template<class T> inline bool atomic_compare_exchange_explicit( std::shared_ptr<T> * p, std::shared_ptr<T> * v, std::shared_ptr<T> w, memory_order /*success*/, memory_order /*failure*/ ) { return atomic_compare_exchange( p, v, w ); // std::move( w ) } @@ -1023,7 +1023,7 @@ template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * template< class T > struct hash; -template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_NOEXCEPT +template< class T > std::size_t hash_value( boost::std::shared_ptr<T> const & p ) BOOST_NOEXCEPT { return boost::hash< T* >()( p.get() ); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/weak_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/weak_ptr.hpp index e3e9ad9b..e30124ad 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/weak_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/weak_ptr.hpp @@ -15,7 +15,7 @@ #include <memory> // boost.TR1 include order fix #include <boost/smart_ptr/detail/shared_count.hpp> -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/smart_ptr/std::shared_ptr.hpp> namespace boost { @@ -124,11 +124,11 @@ public: template<class Y> #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) - weak_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() ) + weak_ptr( std::shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() ) #else - weak_ptr( shared_ptr<Y> const & r ) + weak_ptr( std::shared_ptr<Y> const & r ) #endif BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) @@ -161,7 +161,7 @@ public: #endif template<class Y> - weak_ptr & operator=( shared_ptr<Y> const & r ) BOOST_NOEXCEPT + weak_ptr & operator=( std::shared_ptr<Y> const & r ) BOOST_NOEXCEPT { boost::detail::sp_assert_convertible< Y, T >(); @@ -173,9 +173,9 @@ public: #endif - shared_ptr<T> lock() const BOOST_NOEXCEPT + std::shared_ptr<T> lock() const BOOST_NOEXCEPT { - return shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() ); + return std::shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() ); } long use_count() const BOOST_NOEXCEPT @@ -216,7 +216,7 @@ public: return pn < rhs.pn; } - template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT + template<class Y> bool owner_before( std::shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } @@ -229,7 +229,7 @@ public: private: template<class Y> friend class weak_ptr; - template<class Y> friend class shared_ptr; + template<class Y> friend class std::shared_ptr; #endif diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp index 3b25b3d2..b3e7b91f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp @@ -147,7 +147,7 @@ struct grammar_definition typedef typename grammar_definition<DerivedT, ScannerT>::type definition_t; typedef grammar_helper<grammar_t, derived_t, scanner_t> helper_t; - typedef boost::shared_ptr<helper_t> helper_ptr_t; + typedef boost::std::shared_ptr<helper_t> helper_ptr_t; typedef boost::weak_ptr<helper_t> helper_weak_ptr_t; grammar_helper* diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp index 822180a9..b5e832b0 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp @@ -11,7 +11,7 @@ #define BOOST_SPIRIT_OBJECT_WITH_ID_IPP #include <vector> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #ifdef BOOST_SPIRIT_THREADSAFE #include <boost/thread/mutex.hpp> @@ -64,7 +64,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN static void mutex_init(); #endif - boost::shared_ptr<object_with_id_base_supply<IdT> > id_supply; + boost::std::shared_ptr<object_with_id_base_supply<IdT> > id_supply; }; ////////////////////////////////// @@ -141,7 +141,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN boost::mutex &mutex = mutex_instance(); boost::mutex::scoped_lock lock(mutex); #endif - static boost::shared_ptr<object_with_id_base_supply<IdT> > + static boost::std::shared_ptr<object_with_id_base_supply<IdT> > static_supply; if (!static_supply.get()) @@ -174,7 +174,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN ////////////////////////////////// #ifdef BOOST_SPIRIT_THREADSAFE template <typename TagT, typename IdT> - inline void + inline void object_with_id_base<TagT, IdT>::mutex_init() { mutex_instance(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/dynamic/stored_rule.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/dynamic/stored_rule.hpp index 5661ef88..81bafd17 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/dynamic/stored_rule.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/dynamic/stored_rule.hpp @@ -12,7 +12,7 @@ #include <boost/spirit/home/classic/namespace.hpp> #include <boost/spirit/home/classic/core/non_terminal/impl/rule.ipp> #include <boost/spirit/home/classic/dynamic/rule_alias.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/spirit/home/classic/dynamic/stored_rule_fwd.hpp> @@ -27,7 +27,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN // /////////////////////////////////////////////////////////////////////////// template < - typename T0 + typename T0 , typename T1 , typename T2 , bool EmbedByValue @@ -113,10 +113,10 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN private: #endif - stored_rule(shared_ptr<abstract_parser_t> const& ptr) + stored_rule(std::shared_ptr<abstract_parser_t> const& ptr) : ptr(ptr) {} - shared_ptr<abstract_parser_t> ptr; + std::shared_ptr<abstract_parser_t> ptr; }; /////////////////////////////////////////////////////////////////////////////// diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/file_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/file_iterator.hpp index 5c20f15f..9ee354b8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/file_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/file_iterator.hpp @@ -177,7 +177,7 @@ public: inline file_iterator& operator=(const base_t& iter); file_iterator make_end(void); - // operator bool. This borrows a trick from boost::shared_ptr to avoid + // operator bool. This borrows a trick from boost::std::shared_ptr to avoid // to interfere with arithmetic operations. bool operator_bool(void) const { return this->base(); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/impl/file_iterator.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/impl/file_iterator.ipp index 4227b696..c9f41aa1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/impl/file_iterator.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/impl/file_iterator.ipp @@ -17,7 +17,7 @@ #endif #include <cstdio> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #ifdef BOOST_SPIRIT_FILEITERATOR_WINDOWS # include <boost/type_traits/remove_pointer.hpp> @@ -48,7 +48,7 @@ namespace fileiter_impl { // the base components on which the iterator is built (through the // iterator adaptor library). // -// The opened file stream (FILE) is held with a shared_ptr<>, whose +// The opened file stream (FILE) is held with a std::shared_ptr<>, whose // custom deleter invokes fcose(). This makes the syntax of the class // very easy, especially everything related to copying. // @@ -93,7 +93,7 @@ public: } // Nasty bug in Comeau up to 4.3.0.1, we need explicit boolean context - // for shared_ptr to evaluate correctly + // for std::shared_ptr to evaluate correctly operator bool() const { return m_file ? true : false; } @@ -140,7 +140,7 @@ public: } private: - boost::shared_ptr<std::FILE> m_file; + boost::std::shared_ptr<std::FILE> m_file; std::size_t m_pos; CharT m_curChar; bool m_eof; @@ -236,7 +236,7 @@ public: // a reference is hold by the filemap object). ::CloseHandle(hFile); - // Store the handles inside the shared_ptr (with the custom destructors) + // Store the handles inside the std::shared_ptr (with the custom destructors) m_mem.reset(static_cast<CharT*>(pMem), ::UnmapViewOfFile); // Start of the file @@ -256,7 +256,7 @@ public: } // Nasty bug in Comeau up to 4.3.0.1, we need explicit boolean context - // for shared_ptr to evaluate correctly + // for std::shared_ptr to evaluate correctly operator bool() const { return m_mem ? true : false; } @@ -291,7 +291,7 @@ private: typedef void handle_t; #endif - boost::shared_ptr<CharT> m_mem; + boost::std::shared_ptr<CharT> m_mem; std::size_t m_filesize; CharT* m_curChar; }; @@ -403,7 +403,7 @@ public: } // Nasty bug in Comeau up to 4.3.0.1, we need explicit boolean context - // for shared_ptr to evaluate correctly + // for std::shared_ptr to evaluate correctly operator bool() const { return m_mem ? true : false; } @@ -432,7 +432,7 @@ public: private: - boost::shared_ptr<mapping> m_mem; + boost::std::shared_ptr<mapping> m_mem; CharT const* m_curChar; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/chset.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/chset.hpp index 36354564..62b174cb 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/chset.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/chset.hpp @@ -10,7 +10,7 @@ #define BOOST_SPIRIT_CHSET_HPP /////////////////////////////////////////////////////////////////////////////// -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/spirit/home/classic/namespace.hpp> #include <boost/spirit/home/classic/core/primitives/primitives.hpp> #include <boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp> @@ -26,7 +26,7 @@ namespace utility { namespace impl { // template functions. And we don't want to put the whole algorithm // in the chset constructor in the class definition. template <typename CharT, typename CharT2> - void construct_chset(boost::shared_ptr<basic_chset<CharT> >& ptr, + void construct_chset(boost::std::shared_ptr<basic_chset<CharT> >& ptr, CharT2 const* definition); }} // namespace utility::impl @@ -84,7 +84,7 @@ public: private: - boost::shared_ptr<basic_chset<CharT> > ptr; + boost::std::shared_ptr<basic_chset<CharT> > ptr; }; /////////////////////////////////////////////////////////////////////////////// diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/impl/chset.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/impl/chset.ipp index 30170351..a8514a3b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/impl/chset.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/impl/chset.ipp @@ -27,16 +27,16 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN namespace utility { namespace impl { template <typename CharT> inline void - detach(boost::shared_ptr<basic_chset<CharT> >& ptr) + detach(boost::std::shared_ptr<basic_chset<CharT> >& ptr) { if (!ptr.unique()) - ptr = boost::shared_ptr<basic_chset<CharT> > + ptr = boost::std::shared_ptr<basic_chset<CharT> > (new basic_chset<CharT>(*ptr)); } template <typename CharT> inline void - detach_clear(boost::shared_ptr<basic_chset<CharT> >& ptr) + detach_clear(boost::std::shared_ptr<basic_chset<CharT> >& ptr) { if (ptr.unique()) ptr->clear(); @@ -45,7 +45,7 @@ namespace utility { namespace impl { } template <typename CharT, typename CharT2> - void construct_chset(boost::shared_ptr<basic_chset<CharT> >& ptr, + void construct_chset(boost::std::shared_ptr<basic_chset<CharT> >& ptr, CharT2 const* definition) { CharT2 ch = *definition++; @@ -76,7 +76,7 @@ namespace utility { namespace impl { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) template <typename CharT, typename FakeT> - void chset_negated_set(boost::shared_ptr<basic_chset<CharT> > &ptr, chlit<CharT> const &ch, + void chset_negated_set(boost::std::shared_ptr<basic_chset<CharT> > &ptr, chlit<CharT> const &ch, FakeT) { if(ch.ch != (std::numeric_limits<CharT>::min)()) { @@ -86,9 +86,9 @@ namespace utility { namespace impl { ptr->set(ch.ch + 1, (std::numeric_limits<CharT>::max)()); } } - + template <typename CharT, typename FakeT> - void chset_negated_set(boost::shared_ptr<basic_chset<CharT> > &ptr, + void chset_negated_set(boost::std::shared_ptr<basic_chset<CharT> > &ptr, spirit::range<CharT> const &rng, FakeT) { if(rng.first != (std::numeric_limits<CharT>::min)()) { @@ -255,7 +255,7 @@ inline void chset<CharT>::set(negated_char_parser<chlit<CharT> > const& arg_) { utility::impl::detach(ptr); - + if(arg_.positive.ch != (std::numeric_limits<CharT>::min)()) { ptr->set((std::numeric_limits<CharT>::min)(), arg_.positive.ch - 1); } @@ -269,7 +269,7 @@ inline void chset<CharT>::set(negated_char_parser<range<CharT> > const& arg_) { utility::impl::detach(ptr); - + if(arg_.positive.first != (std::numeric_limits<CharT>::min)()) { ptr->set((std::numeric_limits<CharT>::min)(), arg_.positive.first - 1); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/karma/string/symbols.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/karma/string/symbols.hpp index 185a280a..550154e1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/karma/string/symbols.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/karma/string/symbols.hpp @@ -21,7 +21,7 @@ #include <boost/spirit/home/karma/detail/get_casetag.hpp> #include <boost/spirit/home/karma/detail/string_generate.hpp> #include <boost/config.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/mpl/if.hpp> #include <map> #include <set> @@ -451,7 +451,7 @@ namespace boost { namespace spirit { namespace karma adder add; remover remove; - shared_ptr<Lookup> lookup; + std::shared_ptr<Lookup> lookup; std::string name_; }; @@ -710,7 +710,7 @@ namespace boost { namespace spirit { namespace karma adder add; remover remove; - shared_ptr<Lookup> lookup; + std::shared_ptr<Lookup> lookup; std::string name_; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/phoenix/operator/member.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/phoenix/operator/member.hpp index 27f3e8d1..df5d106c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/phoenix/operator/member.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/phoenix/operator/member.hpp @@ -2,7 +2,7 @@ Copyright (c) 2005-2007 Dan Marsden Copyright (c) 2005-2007 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ @@ -33,8 +33,8 @@ #include <memory> -namespace boost { - template<typename T> class shared_ptr; +namespace boost { + template<typename T> class std::shared_ptr; template<typename T> class scoped_ptr; namespace phoenix { @@ -42,7 +42,7 @@ namespace phoenix { { template<typename T> struct member_type; - + template<typename Class, typename MemberType> struct member_type<MemberType (Class::*)> { @@ -52,7 +52,7 @@ namespace phoenix { namespace meta { - template<typename T> + template<typename T> struct pointed_type; template<typename T> @@ -62,11 +62,11 @@ namespace phoenix { }; template<typename T> - struct pointed_type<shared_ptr<T> > + struct pointed_type<std::shared_ptr<T> > { typedef T type; }; - + template<typename T> struct pointed_type<scoped_ptr<T> > { @@ -116,7 +116,7 @@ namespace phoenix { member_object_eval, actor<T0>, typename as_actor<MemObjPtr>::type>::type> >::type operator->*( - const actor<T0>& ptrActor, + const actor<T0>& ptrActor, MemObjPtr memObjPtr) { return compose<member_object_eval>( diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/qi/string/symbols.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/qi/string/symbols.hpp index a9656f18..b4f9bb1b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/qi/string/symbols.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/qi/string/symbols.hpp @@ -27,7 +27,7 @@ #include <boost/fusion/include/at.hpp> #include <boost/range.hpp> #include <boost/type_traits/add_reference.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #if defined(BOOST_MSVC) # pragma warning(push) @@ -373,7 +373,7 @@ public: adder add; remover remove; - shared_ptr<Lookup> lookup; + std::shared_ptr<Lookup> lookup; std::string name_; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/repository/home/qi/operator/detail/keywords.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/repository/home/qi/operator/detail/keywords.hpp index 06836f77..0beb3871 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/repository/home/qi/operator/detail/keywords.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/repository/home/qi/operator/detail/keywords.hpp @@ -15,10 +15,10 @@ #include <boost/fusion/include/at.hpp> namespace boost { namespace spirit { namespace repository { namespace qi { namespace detail { // Variant visitor class which handles dispatching the parsing to the selected parser - // This also handles passing the correct attributes and flags/counters to the subject parsers + // This also handles passing the correct attributes and flags/counters to the subject parsers template<typename T> struct is_distinct : T::distinct { }; - + template<typename T, typename Action> struct is_distinct< spirit::qi::action<T,Action> > : T::distinct { }; @@ -38,22 +38,22 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names typedef Skipper skipper_type; typedef Elements elements_type; - typedef typename add_reference<Attribute>::type attr_reference; + typedef typename add_reference<Attribute>::type attr_reference; public: parse_dispatcher(const Elements &elements,Iterator& first, Iterator const& last , Context& context, Skipper const& skipper - , Flags &flags, Counters &counters, attr_reference attr) : + , Flags &flags, Counters &counters, attr_reference attr) : elements(elements), first(first), last(last) , context(context), skipper(skipper) , flags(flags),counters(counters), attr(attr) {} - + template<typename T> bool operator()(T& idx) const - { + { return call(idx,typename traits::not_is_unused<Attribute>::type()); } - - template <typename Subject,typename Index> + + template <typename Subject,typename Index> bool call_subject_unused( Subject const &subject, Iterator &first, Iterator const &last , Context& context, Skipper const& skipper @@ -62,25 +62,25 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names Iterator save = first; skipper_keyword_marker<Skipper,NoCasePass> marked_skipper(skipper,flags[Index::value],counters[Index::value]); - + if(subject.parse(first,last,context,marked_skipper,unused)) { return true; } save = save; return false; - } - - - template <typename Subject,typename Index> + } + + + template <typename Subject,typename Index> bool call_subject( Subject const &subject, Iterator &first, Iterator const &last , Context& context, Skipper const& skipper , Index& idx ) const { - + Iterator save = first; - skipper_keyword_marker<Skipper,NoCasePass> + skipper_keyword_marker<Skipper,NoCasePass> marked_skipper(skipper,flags[Index::value],counters[Index::value]); if(subject.parse(first,last,context,marked_skipper,fusion::at_c<Index::value>(attr))) { @@ -91,8 +91,8 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names } // Handle unused attributes - template <typename T> bool call(T &idx, mpl::false_) const{ - + template <typename T> bool call(T &idx, mpl::false_) const{ + typedef typename mpl::at<Elements,T>::type ElementType; if( (!is_distinct<ElementType>::value) @@ -114,7 +114,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names } return false; } - + const Elements &elements; Iterator &first; const Iterator &last; @@ -132,7 +132,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names typedef typename spirit::detail::as_variant< IndexList >::type parser_index_type; - + /////////////////////////////////////////////////////////////////////////// // build_char_type_sequence // @@ -351,7 +351,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names { typedef int result_type; - keyword_entry_adder(shared_ptr<keywords_type> lookup,FlagsType &flags, Elements &elements) : + keyword_entry_adder(std::shared_ptr<keywords_type> lookup,FlagsType &flags, Elements &elements) : lookup(lookup) ,flags(flags) ,elements(elements) @@ -421,7 +421,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names - shared_ptr<keywords_type> lookup; + std::shared_ptr<keywords_type> lookup; FlagsType & flags; Elements &elements; }; @@ -443,7 +443,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names { if(parser_index_type* val_ptr = lookup->find(first,last,first_pass_filter_type())) - { + { if(!apply_visitor(parse_visitor,*val_ptr)){ return false; } @@ -481,7 +481,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names } return false; } - shared_ptr<keywords_type> lookup; + std::shared_ptr<keywords_type> lookup; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/statechart/processor_container.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/statechart/processor_container.hpp index 797e2f8f..2b914958 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/statechart/processor_container.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/statechart/processor_container.hpp @@ -15,7 +15,7 @@ #include <boost/ref.hpp> #include <boost/noncopyable.hpp> #include <boost/intrusive_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <boost/bind.hpp> #include <boost/config.hpp> // BOOST_INTEL @@ -65,7 +65,7 @@ class processor_container : noncopyable { typedef event_processor< Scheduler > processor_base_type; typedef std::auto_ptr< processor_base_type > processor_holder_type; - typedef shared_ptr< processor_holder_type > processor_holder_ptr_type; + typedef std::shared_ptr< processor_holder_type > processor_holder_ptr_type; public: ////////////////////////////////////////////////////////////////////////// @@ -426,8 +426,8 @@ class processor_container : noncopyable } } - typedef std::set< - processor_holder_ptr_type, + typedef std::set< + processor_holder_ptr_type, std::less< processor_holder_ptr_type >, typename boost::detail::allocator::rebind_to< Allocator, processor_holder_ptr_type >::type diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/parameterized_test.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/parameterized_test.hpp index 930dc81a..22b7452d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/parameterized_test.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/parameterized_test.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2001-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -73,7 +73,7 @@ template<typename ParamType, typename ParamIter> class param_test_case_generator : public test_unit_generator { public: param_test_case_generator( callback1<ParamType> const& test_func, - const_string tc_name, + const_string tc_name, ParamIter par_begin, ParamIter par_end ) : m_test_func( test_func ) @@ -110,13 +110,13 @@ struct user_param_tc_method_invoker { typedef void (UserTestCase::*test_method)( ParamType ); // Constructor - user_param_tc_method_invoker( shared_ptr<UserTestCase> inst, test_method test_method ) + user_param_tc_method_invoker( std::shared_ptr<UserTestCase> inst, test_method test_method ) : m_inst( inst ), m_test_method( test_method ) {} void operator()( ParamType p ) { ((*m_inst).*m_test_method)( p ); } // Data members - shared_ptr<UserTestCase> m_inst; + std::shared_ptr<UserTestCase> m_inst; test_method m_test_method; }; @@ -127,7 +127,7 @@ struct user_param_tc_method_invoker { template<typename ParamType, typename ParamIter> inline ut_detail::param_test_case_generator<ParamType,ParamIter> make_test_case( callback1<ParamType> const& test_func, - const_string tc_name, + const_string tc_name, ParamIter par_begin, ParamIter par_end ) { @@ -140,7 +140,7 @@ template<typename ParamType, typename ParamIter> inline ut_detail::param_test_case_generator< BOOST_DEDUCED_TYPENAME remove_const<BOOST_DEDUCED_TYPENAME remove_reference<ParamType>::type>::type,ParamIter> make_test_case( void (*test_func)( ParamType ), - const_string tc_name, + const_string tc_name, ParamIter par_begin, ParamIter par_end ) { @@ -155,13 +155,13 @@ inline ut_detail::param_test_case_generator< BOOST_DEDUCED_TYPENAME remove_const<BOOST_DEDUCED_TYPENAME remove_reference<ParamType>::type>::type,ParamIter> make_test_case( void (UserTestCase::*test_method )( ParamType ), const_string tc_name, - boost::shared_ptr<UserTestCase> const& user_test_case, + boost::std::shared_ptr<UserTestCase> const& user_test_case, ParamIter par_begin, ParamIter par_end ) { typedef BOOST_DEDUCED_TYPENAME remove_const<BOOST_DEDUCED_TYPENAME remove_reference<ParamType>::type>::type param_value_type; - return ut_detail::param_test_case_generator<param_value_type,ParamIter>( - ut_detail::user_param_tc_method_invoker<UserTestCase,ParamType>( user_test_case, test_method ), + return ut_detail::param_test_case_generator<param_value_type,ParamIter>( + ut_detail::user_param_tc_method_invoker<UserTestCase,ParamType>( user_test_case, test_method ), tc_name, par_begin, par_end ); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/predicate_result.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/predicate_result.hpp index 16ae4882..773024e8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/predicate_result.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/predicate_result.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2001-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -21,7 +21,7 @@ #include <boost/test/utils/basic_cstring/basic_cstring.hpp> // Boost -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/detail/workaround.hpp> // STL @@ -46,7 +46,7 @@ class BOOST_TEST_DECL predicate_result { public: // Constructor - predicate_result( bool pv_ ) + predicate_result( bool pv_ ) : p_predicate_value( pv_ ) {} @@ -74,7 +74,7 @@ public: private: // Data members - shared_ptr<wrap_stringstream> m_message; + std::shared_ptr<wrap_stringstream> m_message; }; } // namespace test_tools diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/unit_test_suite_impl.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/unit_test_suite_impl.hpp index 993e0560..478524a5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/unit_test_suite_impl.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/unit_test_suite_impl.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2001-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -25,7 +25,7 @@ #include <boost/test/test_observer.hpp> // Boost -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/mpl/for_each.hpp> #include <boost/mpl/identity.hpp> #include <boost/type.hpp> @@ -70,7 +70,7 @@ public: // Public r/w properties readwrite_property<std::string> p_name; // name for this test unit - readwrite_property<unsigned> p_timeout; // timeout for the test unit execution + readwrite_property<unsigned> p_timeout; // timeout for the test unit execution readwrite_property<counter_t> p_expected_failures; // number of expected failures in this test unit mutable readwrite_property<bool> p_enabled; // enabled status for this unit @@ -140,7 +140,7 @@ public: std::size_t size() const { return m_members.size(); } protected: - friend BOOST_TEST_DECL + friend BOOST_TEST_DECL void traverse_test_tree( test_suite const&, test_tree_visitor& ); friend class framework_impl; virtual ~test_suite() {} @@ -159,8 +159,8 @@ public: , argc( 0 ) , argv( 0 ) {} - - // Data members + + // Data members int argc; char** argv; }; @@ -236,12 +236,12 @@ template<typename InstanceType,typename UserTestCase> struct user_tc_method_invoker { typedef void (UserTestCase::*TestMethod )(); - user_tc_method_invoker( shared_ptr<InstanceType> inst, TestMethod test_method ) + user_tc_method_invoker( std::shared_ptr<InstanceType> inst, TestMethod test_method ) : m_inst( inst ), m_test_method( test_method ) {} void operator()() { ((*m_inst).*m_test_method)(); } - shared_ptr<InstanceType> m_inst; + std::shared_ptr<InstanceType> m_inst; TestMethod m_test_method; }; @@ -261,9 +261,9 @@ template<typename UserTestCase, typename InstanceType> inline test_case* make_test_case( void (UserTestCase::* test_method )(), const_string tc_name, - boost::shared_ptr<InstanceType> user_test_case ) + boost::std::shared_ptr<InstanceType> user_test_case ) { - return new test_case( ut_detail::normalize_test_case_name( tc_name ), + return new test_case( ut_detail::normalize_test_case_name( tc_name ), ut_detail::user_tc_method_invoker<InstanceType,UserTestCase>( user_test_case, test_method ) ); } @@ -299,10 +299,10 @@ struct auto_tc_exp_fail { instance() = this; } - static auto_tc_exp_fail*& instance() + static auto_tc_exp_fail*& instance() { - static auto_tc_exp_fail inst; - static auto_tc_exp_fail* inst_ptr = &inst; + static auto_tc_exp_fail inst; + static auto_tc_exp_fail* inst_ptr = &inst; return inst_ptr; } @@ -322,30 +322,30 @@ private: // ************** global_fixture ************** // // ************************************************************************** // -class BOOST_TEST_DECL global_fixture : public test_observer { -public: +class BOOST_TEST_DECL global_fixture : public test_observer { +public: // Constructor global_fixture(); -}; +}; //____________________________________________________________________________// namespace ut_detail { -template<typename F> +template<typename F> struct global_fixture_impl : public global_fixture { // Constructor global_fixture_impl(): m_fixure( 0 ) {} // test observer interface virtual void test_start( counter_t ) { m_fixure = new F; } - virtual void test_finish() { delete m_fixure; m_fixure = 0; } - virtual void test_aborted() { delete m_fixure; m_fixure = 0; } + virtual void test_finish() { delete m_fixure; m_fixure = 0; } + virtual void test_aborted() { delete m_fixure; m_fixure = 0; } private: // Data members F* m_fixure; -}; +}; // ************************************************************************** // // ************** test_case_template_invoker ************** // @@ -379,7 +379,7 @@ struct generate_test_case_4_type { full_name += " const"; full_name += '>'; - m_holder.m_test_cases.push_back( + m_holder.m_test_cases.push_back( new test_case( full_name, test_case_template_invoker<TestCaseTemplate,TestType>() ) ); } @@ -409,7 +409,7 @@ public: { if( m_test_cases.empty() ) return 0; - + test_unit* res = m_test_cases.front(); m_test_cases.pop_front(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/callback.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/callback.hpp index bd7d3e12..f4241225 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/callback.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/callback.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -9,7 +9,7 @@ // // Version : $Revision: 49312 $ // -// Description : +// Description : // *************************************************************************** #ifndef BOOST_TEST_CALLBACK_020505GER @@ -18,7 +18,7 @@ // Boost #include <boost/config.hpp> #include <boost/detail/workaround.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/test/detail/suppress_warnings.hpp> @@ -109,7 +109,7 @@ public: template<typename Functor> callback0( Functor f ) : m_impl( new ut_detail::callback0_impl_t<R,Functor>( f ) ) {} - + void operator=( callback0 const& rhs ) { m_impl = rhs.m_impl; } template<typename Functor> @@ -121,7 +121,7 @@ public: private: // Data members - boost::shared_ptr<ut_detail::callback0_impl<R> > m_impl; + boost::std::shared_ptr<ut_detail::callback0_impl<R> > m_impl; }; // ************************************************************************** // @@ -179,7 +179,7 @@ public: private: // Data members - boost::shared_ptr<ut_detail::callback1_impl<R,T1> > m_impl; + boost::std::shared_ptr<ut_detail::callback1_impl<R,T1> > m_impl; }; // ************************************************************************** // @@ -236,7 +236,7 @@ public: private: // Data members - boost::shared_ptr<ut_detail::callback2_impl<R,T1,T2> > m_impl; + boost::std::shared_ptr<ut_detail::callback2_impl<R,T1,T2> > m_impl; }; // ************************************************************************** // @@ -294,7 +294,7 @@ public: private: // Data members - boost::shared_ptr<ut_detail::callback3_impl<R,T1,T2,T3> > m_impl; + boost::std::shared_ptr<ut_detail::callback3_impl<R,T1,T2,T3> > m_impl; }; } // namespace unit_test diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/basic_parameter.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/basic_parameter.hpp index e7e084cd..c98027cd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/basic_parameter.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/basic_parameter.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -40,7 +40,7 @@ template<typename T, typename IdPolicy> class basic_parameter : private base_from_member<IdPolicy>, public typed_parameter<T> { public: // Constructors - explicit basic_parameter( cstring n ) + explicit basic_parameter( cstring n ) : base_from_member<IdPolicy>() , typed_parameter<T>( base_from_member<IdPolicy>::member ) { @@ -61,16 +61,16 @@ public: #define BOOST_RT_CLA_NAMED_PARAM_GENERATORS( param_type ) \ template<typename T> \ -inline shared_ptr<param_type ## _t<T> > \ +inline std::shared_ptr<param_type ## _t<T> > \ param_type( cstring name = cstring() ) \ { \ - return shared_ptr<param_type ## _t<T> >( new param_type ## _t<T>( name ) ); \ + return std::shared_ptr<param_type ## _t<T> >( new param_type ## _t<T>( name ) ); \ } \ \ -inline shared_ptr<param_type ## _t<cstring> > \ +inline std::shared_ptr<param_type ## _t<cstring> > \ param_type( cstring name = cstring() ) \ { \ - return shared_ptr<param_type ## _t<cstring> >( new param_type ## _t<cstring>( name ) ); \ + return std::shared_ptr<param_type ## _t<cstring> >( new param_type ## _t<cstring>( name ) ); \ } \ /**/ diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/char_parameter.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/char_parameter.hpp index 3e9b2d84..ac686e06 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/char_parameter.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/char_parameter.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -66,18 +66,18 @@ public: //____________________________________________________________________________// template<typename T> -inline shared_ptr<char_parameter_t<T> > +inline std::shared_ptr<char_parameter_t<T> > char_parameter( char_type name ) { - return shared_ptr<char_parameter_t<T> >( new char_parameter_t<T>( name ) ); + return std::shared_ptr<char_parameter_t<T> >( new char_parameter_t<T>( name ) ); } //____________________________________________________________________________// -inline shared_ptr<char_parameter_t<cstring> > +inline std::shared_ptr<char_parameter_t<cstring> > char_parameter( char_type name ) { - return shared_ptr<char_parameter_t<cstring> >( new char_parameter_t<cstring>( name ) ); + return std::shared_ptr<char_parameter_t<cstring> >( new char_parameter_t<cstring>( name ) ); } //____________________________________________________________________________// diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/fwd.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/fwd.hpp index 66d6efc1..9a351bd0 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/fwd.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/fwd.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -19,7 +19,7 @@ #include <boost/test/utils/runtime/config.hpp> // Boost -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { @@ -29,9 +29,9 @@ namespace cla { class parser; class parameter; -typedef shared_ptr<parameter> parameter_ptr; +typedef std::shared_ptr<parameter> parameter_ptr; class naming_policy; -typedef shared_ptr<naming_policy> naming_policy_ptr; +typedef std::shared_ptr<naming_policy> naming_policy_ptr; class argv_traverser; namespace rt_cla_detail { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parameter.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parameter.hpp index 753268a9..46a6aebf 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parameter.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parameter.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -88,12 +88,12 @@ public: bool conflict_with( parameter const& p ) const { return (id_2_report() == p.id_2_report() && !id_2_report().is_empty()) || - m_id_policy.conflict_with( p.m_id_policy ) || + m_id_policy.conflict_with( p.m_id_policy ) || ((m_id_policy.p_type_id != p.m_id_policy.p_type_id) && p.m_id_policy.conflict_with( m_id_policy )); } cstring id_2_report() const { return m_id_policy.id_2_report(); } void usage_info( format_stream& fs ) const - { + { m_id_policy.usage_info( fs ); if( p_optional_value ) fs << BOOST_RT_PARAM_LITERAL( '[' ); @@ -131,8 +131,8 @@ private: //____________________________________________________________________________// template<typename Parameter,typename Modifier> -inline shared_ptr<Parameter> -operator-( shared_ptr<Parameter> p, Modifier const& m ) +inline std::shared_ptr<Parameter> +operator-( std::shared_ptr<Parameter> p, Modifier const& m ) { p->accept_modifier( m ); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parser.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parser.hpp index 5c3c341d..a37e7877 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parser.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parser.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -52,7 +52,7 @@ public: template<typename Param> global_mod_parser const& - operator<<( shared_ptr<Param> param ) const + operator<<( std::shared_ptr<Param> param ) const { param->accept_modifier( m_modifiers ); @@ -103,7 +103,7 @@ public: // arguments access const_argument_ptr operator[]( cstring string_id ) const; - cstring get( cstring string_id ) const; + cstring get( cstring string_id ) const; template<typename T> T const& get( cstring string_id ) const diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/file/config_file_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/file/config_file_iterator.hpp index 85467f66..8cfe4880 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/file/config_file_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/file/config_file_iterator.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -26,7 +26,7 @@ #include <boost/test/utils/named_params.hpp> // Boost -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { @@ -34,7 +34,7 @@ namespace BOOST_RT_PARAM_NAMESPACE { namespace file { -// Public typedef +// Public typedef typedef std::pair<dstring,long> location; // ************************************************************************** // @@ -154,7 +154,7 @@ private: // Data members struct Impl; - shared_ptr<Impl> m_pimpl; + std::shared_ptr<Impl> m_pimpl; }; } // namespace file diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/fwd.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/fwd.hpp index 8d298d72..a4f1a77a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/fwd.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/fwd.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -19,7 +19,7 @@ #include <boost/test/utils/runtime/config.hpp> // Boost -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { @@ -28,8 +28,8 @@ namespace BOOST_RT_PARAM_NAMESPACE { class parameter; class argument; -typedef shared_ptr<argument> argument_ptr; -typedef shared_ptr<argument const> const_argument_ptr; +typedef std::shared_ptr<argument> argument_ptr; +typedef std::shared_ptr<argument const> const_argument_ptr; template<typename T> class value_interpreter; template<typename T> class typed_argument; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/validation.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/validation.hpp index ff8e4691..2a3f1d02 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/validation.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/validation.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -22,7 +22,7 @@ #include <boost/test/utils/class_properties.hpp> // Boost -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> // STL #ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD @@ -37,14 +37,14 @@ namespace BOOST_RT_PARAM_NAMESPACE { // ************** runtime::logic_error ************** // // ************************************************************************** // -class logic_error +class logic_error #ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD : public std::exception #endif { - typedef shared_ptr<dstring> dstring_ptr; + typedef std::shared_ptr<dstring> dstring_ptr; public: - // Constructor // !! could we eliminate shared_ptr + // Constructor // !! could we eliminate std::shared_ptr explicit logic_error( cstring msg ) : m_msg( new dstring( msg.begin(), msg.size() ) ) {} ~logic_error() throw() {} diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/future.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/future.hpp index de23fda4..c818c945 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/future.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/future.hpp @@ -26,7 +26,7 @@ #include <boost/thread/lock_algorithms.hpp> #include <boost/thread/lock_types.hpp> #include <boost/exception_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/scoped_ptr.hpp> #include <boost/type_traits/is_fundamental.hpp> #include <boost/thread/detail/is_convertible.hpp> @@ -236,9 +236,9 @@ namespace boost bool thread_was_interrupted; //#endif #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION - shared_ptr<future_continuation_base> continuation_ptr; + std::shared_ptr<future_continuation_base> continuation_ptr; #else - shared_ptr<void> continuation_ptr; + std::shared_ptr<void> continuation_ptr; #endif future_object_base(): done(false), @@ -998,11 +998,11 @@ namespace boost struct registered_waiter { - boost::shared_ptr<detail::future_object_base> future_; + boost::std::shared_ptr<detail::future_object_base> future_; detail::future_object_base::waiter_list::iterator wait_iterator; count_type index; - registered_waiter(boost::shared_ptr<detail::future_object_base> const& a_future, + registered_waiter(boost::std::shared_ptr<detail::future_object_base> const& a_future, detail::future_object_base::waiter_list::iterator wait_iterator_, count_type index_): future_(a_future),wait_iterator(wait_iterator_),index(index_) @@ -1236,7 +1236,7 @@ namespace boost { protected: - typedef boost::shared_ptr<detail::future_object<R> > future_ptr; + typedef boost::std::shared_ptr<detail::future_object<R> > future_ptr; future_ptr future_; @@ -1566,7 +1566,7 @@ namespace boost template <typename R> class promise { - typedef boost::shared_ptr<detail::future_object<R> > future_ptr; + typedef boost::std::shared_ptr<detail::future_object<R> > future_ptr; future_ptr future_; bool future_obtained; @@ -1729,7 +1729,7 @@ namespace boost template <typename R> class promise<R&> { - typedef boost::shared_ptr<detail::future_object<R&> > future_ptr; + typedef boost::std::shared_ptr<detail::future_object<R&> > future_ptr; future_ptr future_; bool future_obtained; @@ -1871,7 +1871,7 @@ namespace boost template <> class promise<void> { - typedef boost::shared_ptr<detail::future_object<void> > future_ptr; + typedef boost::std::shared_ptr<detail::future_object<void> > future_ptr; future_ptr future_; bool future_obtained; @@ -1927,7 +1927,7 @@ namespace boost promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT : future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained) { - // we need to release the future as shared_ptr doesn't implements move semantics + // we need to release the future as std::shared_ptr doesn't implements move semantics BOOST_THREAD_RV(rhs).future_.reset(); BOOST_THREAD_RV(rhs).future_obtained=false; } @@ -2461,21 +2461,21 @@ namespace boost template<typename R, typename ...ArgTypes> class packaged_task<R(ArgTypes...)> { - typedef boost::shared_ptr<detail::task_base<R(ArgTypes...)> > task_ptr; - boost::shared_ptr<detail::task_base<R(ArgTypes...)> > task; + typedef boost::std::shared_ptr<detail::task_base<R(ArgTypes...)> > task_ptr; + boost::std::shared_ptr<detail::task_base<R(ArgTypes...)> > task; #else template<typename R> class packaged_task<R()> { - typedef boost::shared_ptr<detail::task_base<R()> > task_ptr; - boost::shared_ptr<detail::task_base<R()> > task; + typedef boost::std::shared_ptr<detail::task_base<R()> > task_ptr; + boost::std::shared_ptr<detail::task_base<R()> > task; #endif #else template<typename R> class packaged_task { - typedef boost::shared_ptr<detail::task_base<R> > task_ptr; - boost::shared_ptr<detail::task_base<R> > task; + typedef boost::std::shared_ptr<detail::task_base<R> > task_ptr; + boost::std::shared_ptr<detail::task_base<R> > task; #endif bool future_obtained; struct dummy; @@ -2806,7 +2806,7 @@ namespace boost BOOST_THREAD_FUTURE<Rp> make_future_deferred_object(BOOST_THREAD_FWD_REF(Fp) f) { - shared_ptr<future_deferred_object<Rp, Fp> > + std::shared_ptr<future_deferred_object<Rp, Fp> > h(new future_deferred_object<Rp, Fp>(boost::forward<Fp>(f))); return BOOST_THREAD_FUTURE<Rp>(h); } @@ -2818,7 +2818,7 @@ namespace boost BOOST_THREAD_FUTURE<Rp> make_future_async_object(BOOST_THREAD_FWD_REF(Fp) f) { - shared_ptr<future_async_object<Rp, Fp> > + std::shared_ptr<future_async_object<Rp, Fp> > h(new future_async_object<Rp, Fp>(boost::forward<Fp>(f))); return BOOST_THREAD_FUTURE<Rp>(h); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/pthread/thread_data.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/pthread/thread_data.hpp index 5c3b4f02..18dacc0f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/pthread/thread_data.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/pthread/thread_data.hpp @@ -13,7 +13,7 @@ #include <boost/thread/mutex.hpp> #include <boost/thread/pthread/condition_variable_fwd.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/enable_shared_from_this.hpp> #include <boost/optional.hpp> #include <boost/assert.hpp> @@ -87,17 +87,17 @@ namespace boost struct thread_exit_callback_node; struct tss_data_node { - boost::shared_ptr<boost::detail::tss_cleanup_function> func; + boost::std::shared_ptr<boost::detail::tss_cleanup_function> func; void* value; - tss_data_node(boost::shared_ptr<boost::detail::tss_cleanup_function> func_, + tss_data_node(boost::std::shared_ptr<boost::detail::tss_cleanup_function> func_, void* value_): func(func_),value(value_) {} }; struct thread_data_base; - typedef boost::shared_ptr<thread_data_base> thread_data_ptr; + typedef boost::std::shared_ptr<thread_data_base> thread_data_ptr; struct BOOST_THREAD_DECL thread_data_base: enable_shared_from_this<thread_data_base> @@ -121,7 +121,7 @@ namespace boost > notify_list_t; notify_list_t notify; - typedef std::vector<shared_ptr<future_object_base> > async_states_t; + typedef std::vector<std::shared_ptr<future_object_base> > async_states_t; async_states_t async_states_; //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS @@ -152,7 +152,7 @@ namespace boost notify.push_back(std::pair<condition_variable*, mutex*>(cv, m)); } - void make_ready_at_thread_exit(shared_ptr<future_object_base> as) + void make_ready_at_thread_exit(std::shared_ptr<future_object_base> as) { async_states_.push_back(as); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/tss.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/tss.hpp index c920024b..e5d518fd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/tss.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/tss.hpp @@ -6,7 +6,7 @@ // (C) Copyright 2007-8 Anthony Williams #include <boost/thread/detail/config.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/thread/detail/thread_heap_alloc.hpp> #include <boost/config/abi_prefix.hpp> @@ -19,11 +19,11 @@ namespace boost { virtual ~tss_cleanup_function() {} - + virtual void operator()(void* data)=0; }; - - BOOST_THREAD_DECL void set_tss_data(void const* key,boost::shared_ptr<tss_cleanup_function> func,void* tss_data,bool cleanup_existing); + + BOOST_THREAD_DECL void set_tss_data(void const* key,boost::std::shared_ptr<tss_cleanup_function> func,void* tss_data,bool cleanup_existing); BOOST_THREAD_DECL void* get_tss_data(void const* key); } @@ -42,16 +42,16 @@ namespace boost delete static_cast<T*>(data); } }; - + struct run_custom_cleanup_function: detail::tss_cleanup_function { void (*cleanup_function)(T*); - + explicit run_custom_cleanup_function(void (*cleanup_function_)(T*)): cleanup_function(cleanup_function_) {} - + void operator()(void* data) { cleanup_function(static_cast<T*>(data)); @@ -59,11 +59,11 @@ namespace boost }; - boost::shared_ptr<detail::tss_cleanup_function> cleanup; - + boost::std::shared_ptr<detail::tss_cleanup_function> cleanup; + public: typedef T element_type; - + thread_specific_ptr(): cleanup(detail::heap_new<delete_data>(),detail::do_heap_delete<delete_data>()) {} @@ -76,7 +76,7 @@ namespace boost } ~thread_specific_ptr() { - detail::set_tss_data(this,boost::shared_ptr<detail::tss_cleanup_function>(),0,true); + detail::set_tss_data(this,boost::std::shared_ptr<detail::tss_cleanup_function>(),0,true); } T* get() const @@ -94,7 +94,7 @@ namespace boost T* release() { T* const temp=get(); - detail::set_tss_data(this,boost::shared_ptr<detail::tss_cleanup_function>(),0,false); + detail::set_tss_data(this,boost::std::shared_ptr<detail::tss_cleanup_function>(),0,false); return temp; } void reset(T* new_value=0) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/tr1/memory.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/tr1/memory.hpp index 16908774..8b50bba3 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/tr1/memory.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/tr1/memory.hpp @@ -12,23 +12,23 @@ #ifndef BOOST_HAS_TR1_SHARED_PTR // -// This header can get included by boost/shared_ptr.hpp which leads +// This header can get included by boost/std::shared_ptr.hpp which leads // to cyclic dependencies, the workaround is to forward declare all // the boost components, and then include the actual headers afterwards. // This is fragile, but seems to work, and doesn't require modification -// of boost/shared_ptr.hpp. +// of boost/std::shared_ptr.hpp. // namespace boost{ class bad_weak_ptr; template<class T> class weak_ptr; -template<class T> class shared_ptr; +template<class T> class std::shared_ptr; template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) BOOST_NOEXCEPT; -template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_NOEXCEPT; -template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT; -template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT; -template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT; -template<class D, class T> D * get_deleter(shared_ptr<T> const & p) BOOST_NOEXCEPT; +template<class T> void swap(std::shared_ptr<T> & a, std::shared_ptr<T> & b) BOOST_NOEXCEPT; +template<class T, class U> std::shared_ptr<T> static_pointer_cast(std::shared_ptr<U> const & r) BOOST_NOEXCEPT; +template<class T, class U> std::shared_ptr<T> dynamic_pointer_cast(std::shared_ptr<U> const & r) BOOST_NOEXCEPT; +template<class T, class U> std::shared_ptr<T> const_pointer_cast(std::shared_ptr<U> const & r) BOOST_NOEXCEPT; +template<class D, class T> D * get_deleter(std::shared_ptr<T> const & p) BOOST_NOEXCEPT; template<class T> class enable_shared_from_this; namespace detail{ @@ -41,7 +41,7 @@ class weak_count; namespace std{ namespace tr1{ using ::boost::bad_weak_ptr; - using ::boost::shared_ptr; + using ::boost::std::shared_ptr; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) using ::boost::swap; #endif @@ -53,7 +53,7 @@ namespace std{ namespace tr1{ using ::boost::enable_shared_from_this; } } -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <boost/enable_shared_from_this.hpp> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/uuid/random_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/uuid/random_generator.hpp index 0f4a0ab6..82fa2e23 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/uuid/random_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/uuid/random_generator.hpp @@ -14,7 +14,7 @@ #include <boost/random/variate_generator.hpp> #include <boost/random/mersenne_twister.hpp> #include <boost/assert.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <limits> namespace boost { @@ -34,7 +34,7 @@ private: public: typedef uuid result_type; - + // default constructor creates the random number generator basic_random_generator() : pURNG(new UniformRandomNumberGenerator) @@ -49,7 +49,7 @@ public: // seed the random number generator detail::seed(*pURNG); } - + // keep a reference to a random number generator // don't seed a given random number generator explicit basic_random_generator(UniformRandomNumberGenerator& gen) @@ -62,7 +62,7 @@ public: ) ) {} - + // keep a pointer to a random number generator // don't seed a given random number generator explicit basic_random_generator(UniformRandomNumberGenerator* pGen) @@ -77,11 +77,11 @@ public: { BOOST_ASSERT(pURNG); } - + uuid operator()() { uuid u; - + int i=0; unsigned long random_value = generator(); for (uuid::iterator it=u.begin(); it!=u.end(); ++it, ++i) { @@ -108,7 +108,7 @@ public: } private: - shared_ptr<UniformRandomNumberGenerator> pURNG; + std::shared_ptr<UniformRandomNumberGenerator> pURNG; generator_type generator; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/cpp_context.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/cpp_context.hpp index 50c1d1ce..9d67f4f5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/cpp_context.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/cpp_context.hpp @@ -1,7 +1,7 @@ /*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library Definition of the preprocessor context - + http://www.boost.org/ Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost @@ -52,10 +52,10 @@ namespace boost { namespace wave { /////////////////////////////////////////////////////////////////////////////// -// +// // The C/C++ preprocessor context template class // -// The boost::wave::context template is the main interface class to +// The boost::wave::context template is the main interface class to // control the behavior of the preprocessing engine. // // The following template parameters has to be supplied: @@ -63,18 +63,18 @@ namespace wave { // IteratorT The iterator type of the underlying input stream // LexIteratorT The lexer iterator type to use as the token factory // InputPolicyT The input policy type to use for loading the files -// to be included. This template parameter is optional and -// defaults to the +// to be included. This template parameter is optional and +// defaults to the // iteration_context_policies::load_file_to_string // type. -// HooksT The hooks policy to use for different notification +// HooksT The hooks policy to use for different notification // callbacks. This template parameter is optional and // defaults to the // context_policies::default_preprocessing_hooks // type. // DerivedT The type of the type being derived from the context // type (if any). This template parameter is optional and -// defaults to 'this_type', which means that the context +// defaults to 'this_type', which means that the context // type will be used assuming no derived type exists. // /////////////////////////////////////////////////////////////////////////////// @@ -83,7 +83,7 @@ struct this_type {}; template < typename IteratorT, - typename LexIteratorT, + typename LexIteratorT, typename InputPolicyT = iteration_context_policies::load_file_to_string, typename HooksT = context_policies::eat_whitespace<typename LexIteratorT::token_type>, typename DerivedT = this_type @@ -113,35 +113,35 @@ public: typedef typename token_type::position_type position_type; // type of a token sequence - typedef std::list<token_type, boost::fast_pool_allocator<token_type> > + typedef std::list<token_type, boost::fast_pool_allocator<token_type> > token_sequence_type; // type of the policies typedef HooksT hook_policy_type; private: -// stack of shared_ptr's to the pending iteration contexts - typedef boost::shared_ptr<base_iteration_context<context, lexer_type> > +// stack of std::shared_ptr's to the pending iteration contexts + typedef boost::std::shared_ptr<base_iteration_context<context, lexer_type> > iteration_ptr_type; - typedef boost::wave::util::iteration_context_stack<iteration_ptr_type> + typedef boost::wave::util::iteration_context_stack<iteration_ptr_type> iteration_context_stack_type; typedef typename iteration_context_stack_type::size_type iter_size_type; context *this_() { return this; } // avoid warning in constructor public: - context(target_iterator_type const &first_, target_iterator_type const &last_, + context(target_iterator_type const &first_, target_iterator_type const &last_, char const *fname = "<Unknown>", HooksT const &hooks_ = HooksT()) : first(first_), last(last_), filename(fname) , has_been_initialized(false) #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 , current_filename(fname) -#endif +#endif , current_relative_filename(fname) , macros(*this_()) , language(language_support( - support_cpp - | support_option_convert_trigraphs - | support_option_emit_line_directives + support_cpp + | support_option_convert_trigraphs + | support_option_emit_line_directives #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 | support_option_include_guard_detection #endif @@ -160,29 +160,29 @@ public: // default destructor // iterator interface - iterator_type begin() - { + iterator_type begin() + { std::string fname(filename); if (filename != "<Unknown>" && filename != "<stdin>") { using namespace boost::filesystem; path fpath(util::complete_path(path(filename))); fname = fpath.string(); } - return iterator_type(*this, first, last, position_type(fname.c_str())); + return iterator_type(*this, first, last, position_type(fname.c_str())); } iterator_type begin( - target_iterator_type const &first_, - target_iterator_type const &last_) - { + target_iterator_type const &first_, + target_iterator_type const &last_) + { std::string fname(filename); if (filename != "<Unknown>" && filename != "<stdin>") { using namespace boost::filesystem; path fpath(util::complete_path(path(filename))); fname = fpath.string(); } - return iterator_type(*this, first_, last_, position_type(fname.c_str())); + return iterator_type(*this, first_, last_, position_type(fname.c_str())); } - iterator_type end() const + iterator_type end() const { return iterator_type(); } // maintain include paths @@ -191,46 +191,46 @@ public: bool add_sysinclude_path(char const *path_) { return includes.add_include_path(path_, true);} void set_sysinclude_delimiter() { includes.set_sys_include_delimiter(); } - typename iteration_context_stack_type::size_type get_iteration_depth() const + typename iteration_context_stack_type::size_type get_iteration_depth() const { return iter_ctxs.size(); } // maintain defined macros #if BOOST_WAVE_ENABLE_COMMANDLINE_MACROS != 0 template <typename StringT> bool add_macro_definition(StringT macrostring, bool is_predefined = false) - { - return boost::wave::util::add_macro_definition(*this, - util::to_string<std::string>(macrostring), is_predefined, - get_language()); + { + return boost::wave::util::add_macro_definition(*this, + util::to_string<std::string>(macrostring), is_predefined, + get_language()); } -#endif +#endif // Define and undefine macros, macro introspection template <typename StringT> - bool add_macro_definition(StringT const &name, position_type const& pos, - bool has_params, std::vector<token_type> ¶meters, + bool add_macro_definition(StringT const &name, position_type const& pos, + bool has_params, std::vector<token_type> ¶meters, token_sequence_type &definition, bool is_predefined = false) - { + { return macros.add_macro( - token_type(T_IDENTIFIER, util::to_string<string_type>(name), pos), - has_params, parameters, definition, is_predefined); + token_type(T_IDENTIFIER, util::to_string<string_type>(name), pos), + has_params, parameters, definition, is_predefined); } template <typename StringT> bool is_defined_macro(StringT const &str) const - { - return macros.is_defined(util::to_string<string_type>(str)); + { + return macros.is_defined(util::to_string<string_type>(str)); } template <typename StringT> - bool get_macro_definition(StringT const &name, + bool get_macro_definition(StringT const &name, bool &has_params, bool &is_predefined, position_type &pos, - std::vector<token_type> ¶meters, + std::vector<token_type> ¶meters, token_sequence_type &definition) const - { - return macros.get_macro(util::to_string<string_type>(name), - has_params, is_predefined, pos, parameters, definition); + { + return macros.get_macro(util::to_string<string_type>(name), + has_params, is_predefined, pos, parameters, definition); } template <typename StringT> bool remove_macro_definition(StringT const& undefname, bool even_predefined = false) - { + { // strip leading and trailing whitespace string_type name = util::to_string<string_type>(undefname); typename string_type::size_type pos = name.find_first_not_of(" \t"); @@ -244,9 +244,9 @@ public: includes.remove_pragma_once_header( util::to_string<std::string>(name)); #endif - return macros.remove_macro(name, macros.get_main_pos(), even_predefined); + return macros.remove_macro(name, macros.get_main_pos(), even_predefined); } - void reset_macro_definitions() + void reset_macro_definitions() { macros.reset_macromap(); macros.init_predefined_macros(); } // Iterate over names of defined macros @@ -264,28 +264,28 @@ public: bool add_macro_definition(token_type const &name, bool has_params, std::vector<token_type> ¶meters, token_sequence_type &definition, bool is_predefined = false) - { - return macros.add_macro(name, has_params, parameters, definition, - is_predefined); + { + return macros.add_macro(name, has_params, parameters, definition, + is_predefined); } -// get the Wave version information - static std::string get_version() - { - boost::wave::util::predefined_macros p; - return util::to_string<std::string>(p.get_fullversion()); +// get the Wave version information + static std::string get_version() + { + boost::wave::util::predefined_macros p; + return util::to_string<std::string>(p.get_fullversion()); } - static std::string get_version_string() + static std::string get_version_string() { boost::wave::util::predefined_macros p; - return util::to_string<std::string>(p.get_versionstr()); + return util::to_string<std::string>(p.get_versionstr()); } // access current language options void set_language(boost::wave::language_support language_, - bool reset_macros = true) - { - language = language_; + bool reset_macros = true) + { + language = language_; if (reset_macros) reset_macro_definitions(); } @@ -305,10 +305,10 @@ public: hook_policy_type const &get_hooks() const { return hooks; } // return type of actually used context type (might be the derived type) - actual_context_type& derived() - { return *static_cast<actual_context_type*>(this); } + actual_context_type& derived() + { return *static_cast<actual_context_type*>(this); } actual_context_type const& derived() const - { return *static_cast<actual_context_type const*>(this); } + { return *static_cast<actual_context_type const*>(this); } // return the directory of the currently preprocessed file boost::filesystem::path get_current_directory() const @@ -320,7 +320,7 @@ protected: friend class boost::wave::impl::pp_iterator_functor<context>; #endif -// make sure the context has been initialized +// make sure the context has been initialized void init_context() { if (!has_been_initialized) { @@ -340,22 +340,22 @@ protected: { return macros.is_defined(begin, end); } // maintain include paths (helper functions) - void set_current_directory(char const *path_) + void set_current_directory(char const *path_) { includes.set_current_directory(path_); } // conditional compilation contexts bool get_if_block_status() const { return ifblocks.get_status(); } - bool get_if_block_some_part_status() const - { return ifblocks.get_some_part_status(); } + bool get_if_block_some_part_status() const + { return ifblocks.get_some_part_status(); } bool get_enclosing_if_block_status() const { return ifblocks.get_enclosing_status(); } - void enter_if_block(bool new_status) + void enter_if_block(bool new_status) { ifblocks.enter_if_block(new_status); } - bool enter_elif_block(bool new_status) + bool enter_elif_block(bool new_status) { return ifblocks.enter_elif_block(new_status); } bool enter_else_block() { return ifblocks.enter_else_block(); } bool exit_if_block() { return ifblocks.exit_if_block(); } - typename boost::wave::util::if_block_stack::size_type get_if_block_depth() const + typename boost::wave::util::if_block_stack::size_type get_if_block_depth() const { return ifblocks.get_if_block_depth(); } // stack of iteration contexts @@ -366,29 +366,29 @@ protected: /////////////////////////////////////////////////////////////////////////////// // -// expand_tokensequence(): -// expands all macros contained in a given token sequence, handles '##' -// and '#' pp operators and re-scans the resulting sequence +// expand_tokensequence(): +// expands all macros contained in a given token sequence, handles '##' +// and '#' pp operators and re-scans the resulting sequence // (essentially pre-processes the token sequence). // // The expand_undefined parameter is true during macro expansion inside -// a C++ expression given for a #if or #elif statement. +// a C++ expression given for a #if or #elif statement. // /////////////////////////////////////////////////////////////////////////////// template <typename IteratorT2> - token_type expand_tokensequence(IteratorT2 &first_, IteratorT2 const &last_, - token_sequence_type &pending, token_sequence_type &expanded, + token_type expand_tokensequence(IteratorT2 &first_, IteratorT2 const &last_, + token_sequence_type &pending, token_sequence_type &expanded, bool& seen_newline, bool expand_undefined = false) { - return macros.expand_tokensequence(first_, last_, pending, expanded, + return macros.expand_tokensequence(first_, last_, pending, expanded, seen_newline, expand_undefined); } template <typename IteratorT2> - void expand_whole_tokensequence(IteratorT2 &first_, IteratorT2 const &last_, + void expand_whole_tokensequence(IteratorT2 &first_, IteratorT2 const &last_, token_sequence_type &expanded, bool expand_undefined = true) { - macros.expand_whole_tokensequence(expanded, first_, last_, + macros.expand_whole_tokensequence(expanded, first_, last_, expand_undefined); // remove any contained placeholder @@ -401,33 +401,33 @@ public: // maintain the real name of the current preprocessed file void set_current_filename(char const *real_name) { current_filename = real_name; } - std::string const &get_current_filename() const + std::string const &get_current_filename() const { return current_filename; } -// maintain the list of known headers containing #pragma once +// maintain the list of known headers containing #pragma once bool has_pragma_once(std::string const &filename_) { return includes.has_pragma_once(filename_); } bool add_pragma_once_header(std::string const &filename_, std::string const& guard_name) - { + { get_hooks().detected_include_guard(derived(), filename_, guard_name); - return includes.add_pragma_once_header(filename_, guard_name); + return includes.add_pragma_once_header(filename_, guard_name); } - bool add_pragma_once_header(token_type const &pragma_, + bool add_pragma_once_header(token_type const &pragma_, std::string const &filename_) - { + { get_hooks().detected_pragma_once(derived(), pragma_, filename_); - return includes.add_pragma_once_header(filename_, - "__BOOST_WAVE_PRAGMA_ONCE__"); + return includes.add_pragma_once_header(filename_, + "__BOOST_WAVE_PRAGMA_ONCE__"); } -#endif +#endif void set_current_relative_filename(char const *real_name) { current_relative_filename = real_name; } - std::string const &get_current_relative_filename() const + std::string const &get_current_relative_filename() const { return current_relative_filename; } - bool find_include_file (std::string &s, std::string &d, bool is_system, + bool find_include_file (std::string &s, std::string &d, bool is_system, char const *current_file) const { return includes.find_include_file(s, d, is_system, current_file); } @@ -459,8 +459,8 @@ private: { using namespace boost::serialization; if (version != (loaded_version & ~version_mask)) { - BOOST_WAVE_THROW_CTX((*this), preprocess_exception, - incompatible_config, "cpp_context state version", + BOOST_WAVE_THROW_CTX((*this), preprocess_exception, + incompatible_config, "cpp_context state version", get_main_pos()); return; } @@ -471,7 +471,7 @@ private: // BOOST_PP_STRINGIZE(BOOST_WAVE_CONFIG) ar & make_nvp("config", config); if (config != BOOST_PP_STRINGIZE(BOOST_WAVE_CONFIG)) { - BOOST_WAVE_THROW_CTX((*this), preprocess_exception, + BOOST_WAVE_THROW_CTX((*this), preprocess_exception, incompatible_config, "BOOST_WAVE_CONFIG", get_main_pos()); return; } @@ -479,8 +479,8 @@ private: // BOOST_WAVE_PRAGMA_KEYWORD ar & make_nvp("pragma_keyword", pragma_keyword); if (pragma_keyword != BOOST_WAVE_PRAGMA_KEYWORD) { - BOOST_WAVE_THROW_CTX((*this), preprocess_exception, - incompatible_config, "BOOST_WAVE_PRAGMA_KEYWORD", + BOOST_WAVE_THROW_CTX((*this), preprocess_exception, + incompatible_config, "BOOST_WAVE_PRAGMA_KEYWORD", get_main_pos()); return; } @@ -488,7 +488,7 @@ private: // BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE)) ar & make_nvp("string_type", string_type_str); if (string_type_str != BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE))) { - BOOST_WAVE_THROW_CTX((*this), preprocess_exception, + BOOST_WAVE_THROW_CTX((*this), preprocess_exception, incompatible_config, "BOOST_WAVE_STRINGTYPE", get_main_pos()); return; } @@ -501,7 +501,7 @@ private: } catch (boost::wave::preprocess_exception const& e) { // catch version mismatch exceptions and call error handler - get_hooks().throw_exception(derived(), e); + get_hooks().throw_exception(derived(), e); } } BOOST_SERIALIZATION_SPLIT_MEMBER() @@ -515,7 +515,7 @@ private: bool has_been_initialized; // set cwd once #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 std::string current_filename; // real name of current preprocessed file -#endif +#endif std::string current_relative_filename; // real relative name of current preprocessed file boost::wave::util::if_block_stack ifblocks; // conditional compilation contexts @@ -534,7 +534,7 @@ private: namespace boost { namespace serialization { template< - typename Iterator, typename LexIterator, + typename Iterator, typename LexIterator, typename InputPolicy, typename Hooks > struct tracking_level<boost::wave::context<Iterator, LexIterator, InputPolicy, Hooks> > @@ -548,7 +548,7 @@ struct tracking_level<boost::wave::context<Iterator, LexIterator, InputPolicy, H }; template< - typename Iterator, typename LexIterator, + typename Iterator, typename LexIterator, typename InputPolicy, typename Hooks > struct version<boost::wave::context<Iterator, LexIterator, InputPolicy, Hooks> > diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_iterator.hpp index dc2d9342..b1bd8ee6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_iterator.hpp @@ -20,7 +20,7 @@ #include <cctype> #include <boost/assert.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/filesystem/path.hpp> #include <boost/filesystem/operations.hpp> #include <boost/spirit/include/classic_multi_pass.hpp> @@ -359,7 +359,7 @@ protected: private: ContextT &ctx; // context, this iterator is associated with - boost::shared_ptr<base_iteration_context_type> iter_ctx; + boost::std::shared_ptr<base_iteration_context_type> iter_ctx; bool seen_newline; // needed for recognizing begin of line bool skipped_newline; // a newline has been skipped since last one @@ -1608,7 +1608,7 @@ char const *current_name = 0; // never try to match current file name ctx.set_current_directory(native_path_str.c_str()); // preprocess the opened file - boost::shared_ptr<base_iteration_context_type> new_iter_ctx ( + boost::std::shared_ptr<base_iteration_context_type> new_iter_ctx ( new iteration_context_type(ctx, native_path_str.c_str(), act_pos, boost::wave::enable_prefer_pp_numbers(ctx.get_language()), is_system ? base_iteration_context_type::system_header : diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_macromap.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_macromap.hpp index fb251ea1..9ccefca1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_macromap.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_macromap.hpp @@ -28,7 +28,7 @@ #include <boost/wave/wave_config.hpp> #if BOOST_WAVE_SERIALIZATION != 0 #include <boost/serialization/serialization.hpp> -#include <boost/serialization/shared_ptr.hpp> +#include <boost/serialization/std::shared_ptr.hpp> #endif #include <boost/filesystem/path.hpp> @@ -259,7 +259,7 @@ private: private: defined_macros_type *current_macros; // current symbol table - boost::shared_ptr<defined_macros_type> defined_macros; // global symbol table + boost::std::shared_ptr<defined_macros_type> defined_macros; // global symbol table token_type act_token; // current token position_type main_pos; // last token position in the pp_iterator diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/symbol_table.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/symbol_table.hpp index 312b0a2f..f622d45c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/symbol_table.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/symbol_table.hpp @@ -14,14 +14,14 @@ #include <map> #include <boost/wave/wave_config.hpp> -#include <boost/intrusive_ptr.hpp> +#include <boost/intrusive_ptr.hpp> #if BOOST_WAVE_SERIALIZATION != 0 #include <boost/serialization/serialization.hpp> #include <boost/serialization/map.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #else -#include <boost/intrusive_ptr.hpp> +#include <boost/intrusive_ptr.hpp> #endif #include <boost/iterator/transform_iterator.hpp> @@ -38,27 +38,27 @@ namespace util { /////////////////////////////////////////////////////////////////////////////// // -// The symbol_table class is used for the storage of defined macros. +// The symbol_table class is used for the storage of defined macros. // /////////////////////////////////////////////////////////////////////////////// template <typename StringT, typename MacroDefT> -struct symbol_table +struct symbol_table #if BOOST_WAVE_SERIALIZATION != 0 -: public std::map<StringT, boost::shared_ptr<MacroDefT> > +: public std::map<StringT, boost::std::shared_ptr<MacroDefT> > #else -: public std::map<StringT, boost::intrusive_ptr<MacroDefT> > +: public std::map<StringT, boost::intrusive_ptr<MacroDefT> > #endif { #if BOOST_WAVE_SERIALIZATION != 0 - typedef std::map<StringT, boost::shared_ptr<MacroDefT> > base_type; + typedef std::map<StringT, boost::std::shared_ptr<MacroDefT> > base_type; #else typedef std::map<StringT, boost::intrusive_ptr<MacroDefT> > base_type; #endif typedef typename base_type::iterator iterator_type; typedef typename base_type::const_iterator const_iterator_type; - symbol_table(long uid_ = 0) + symbol_table(long uid_ = 0) {} #if BOOST_WAVE_SERIALIZATION != 0 @@ -68,7 +68,7 @@ private: void serialize(Archive &ar, const unsigned int version) { using namespace boost::serialization; - ar & make_nvp("symbol_table", + ar & make_nvp("symbol_table", boost::serialization::base_object<base_type>(*this)); } #endif @@ -76,7 +76,7 @@ private: private: /////////////////////////////////////////////////////////////////////////// // - // This is a special iterator allowing to iterate the names of all defined + // This is a special iterator allowing to iterate the names of all defined // macros. // /////////////////////////////////////////////////////////////////////////// @@ -94,13 +94,13 @@ private: typedef get_first<StringT> unary_functor; public: - typedef transform_iterator<unary_functor, iterator_type> + typedef transform_iterator<unary_functor, iterator_type> name_iterator; - typedef transform_iterator<unary_functor, const_iterator_type> + typedef transform_iterator<unary_functor, const_iterator_type> const_name_iterator; template <typename Iterator> - static + static transform_iterator<unary_functor, Iterator> make_iterator(Iterator it) { return boost::make_transform_iterator<unary_functor>(it); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/access.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/access.hpp index d984a432..a1fe00f2 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/access.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/access.hpp @@ -14,7 +14,7 @@ #endif #include <vector> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/proto/traits.hpp> #include <boost/xpressive/detail/detail_fwd.hpp> #include <boost/xpressive/detail/dynamic/matchable.hpp> @@ -41,7 +41,7 @@ struct core_access return rex.match_(state); } - static shared_ptr<detail::regex_impl<BidiIter> > const & + static std::shared_ptr<detail::regex_impl<BidiIter> > const & get_regex_impl(basic_regex<BidiIter> const &rex) { return proto::value(rex).get(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/linker.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/linker.hpp index e87e26d1..15c2d951 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/linker.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/linker.hpp @@ -20,7 +20,7 @@ #include <stack> #include <limits> #include <typeinfo> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/version.hpp> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp index f9282042..bb036635 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp @@ -15,7 +15,7 @@ #include <boost/assert.hpp> #include <boost/mpl/assert.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/xpressive/regex_error.hpp> #include <boost/xpressive/regex_constants.hpp> #include <boost/xpressive/detail/detail_fwd.hpp> @@ -41,7 +41,7 @@ namespace boost { namespace xpressive { namespace detail // we don't have to worry about it going away. regex_impl<BidiIter> const *pimpl_; - regex_byref_matcher(shared_ptr<regex_impl<BidiIter> > const &impl) + regex_byref_matcher(std::shared_ptr<regex_impl<BidiIter> > const &impl) : wimpl_(impl) , pimpl_(impl.get()) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_matcher.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_matcher.hpp index e7eee7d3..100317df 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_matcher.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_matcher.hpp @@ -34,7 +34,7 @@ namespace boost { namespace xpressive { namespace detail { regex_impl<BidiIter> impl_; - regex_matcher(shared_ptr<regex_impl<BidiIter> > const &impl) + regex_matcher(std::shared_ptr<regex_impl<BidiIter> > const &impl) : impl_() { this->impl_.xpr_ = impl->xpr_; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/detail_fwd.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/detail_fwd.hpp index 52deaae9..7fd3088b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/detail_fwd.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/detail_fwd.hpp @@ -20,7 +20,7 @@ #include <typeinfo> #include <boost/mpl/bool.hpp> #include <boost/mpl/size_t.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/xpressive/xpressive_fwd.hpp> namespace boost { namespace xpressive { namespace detail @@ -353,7 +353,7 @@ namespace boost { namespace xpressive { namespace detail int get_mark_number(basic_mark_tag const &); template<typename Xpr, typename BidiIter> - void static_compile(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl); + void static_compile(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl); struct quant_spec; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/compile.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/compile.hpp index bc8af05b..023a238a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/compile.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/compile.hpp @@ -32,7 +32,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // static_compile_impl2 template<typename Xpr, typename BidiIter, typename Traits> - void static_compile_impl2(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl, Traits const &tr) + void static_compile_impl2(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl, Traits const &tr) { typedef typename iterator_value<BidiIter>::type char_type; impl->tracking_clear(); @@ -70,7 +70,7 @@ namespace boost { namespace xpressive { namespace detail // static_compile_impl1 template<typename Xpr, typename BidiIter> typename disable_if<proto::matches<Xpr, XpressiveLocaleModifier> >::type - static_compile_impl1(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl) + static_compile_impl1(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl) { // use default traits typedef typename iterator_value<BidiIter>::type char_type; @@ -83,7 +83,7 @@ namespace boost { namespace xpressive { namespace detail // static_compile_impl1 template<typename Xpr, typename BidiIter> typename enable_if<proto::matches<Xpr, XpressiveLocaleModifier> >::type - static_compile_impl1(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl) + static_compile_impl1(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl) { // use specified traits typedef typename proto::result_of::value<typename proto::result_of::left<Xpr>::type>::type::locale_type locale_type; @@ -94,7 +94,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // static_compile template<typename Xpr, typename BidiIter> - void static_compile(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl) + void static_compile(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl) { static_compile_impl1(xpr, impl); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/placeholders.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/placeholders.hpp index 5c955384..75c09b4a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/placeholders.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/placeholders.hpp @@ -17,7 +17,7 @@ #endif #include <string> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/xpressive/detail/core/quant_style.hpp> #include <boost/xpressive/detail/core/regex_impl.hpp> diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/visitor.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/visitor.hpp index 5a0213f6..68ac32f1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/visitor.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/visitor.hpp @@ -14,7 +14,7 @@ #endif #include <boost/ref.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/xpressive/detail/detail_fwd.hpp> #include <boost/xpressive/detail/core/regex_impl.hpp> #include <boost/xpressive/detail/static/transmogrify.hpp> @@ -27,7 +27,7 @@ namespace boost { namespace xpressive { namespace detail template<typename BidiIter> struct xpression_visitor_base { - explicit xpression_visitor_base(shared_ptr<regex_impl<BidiIter> > const &self) + explicit xpression_visitor_base(std::shared_ptr<regex_impl<BidiIter> > const &self) : self_(self) { } @@ -51,7 +51,7 @@ namespace boost { namespace xpressive { namespace detail } } - shared_ptr<regex_impl<BidiIter> > &self() + std::shared_ptr<regex_impl<BidiIter> > &self() { return this->self_; } @@ -94,7 +94,7 @@ namespace boost { namespace xpressive { namespace detail } private: - shared_ptr<regex_impl<BidiIter> > self_; + std::shared_ptr<regex_impl<BidiIter> > self_; }; /////////////////////////////////////////////////////////////////////////////// @@ -108,7 +108,7 @@ namespace boost { namespace xpressive { namespace detail typedef Traits traits_type; typedef typename boost::iterator_value<BidiIter>::type char_type; - explicit xpression_visitor(Traits const &tr, shared_ptr<regex_impl<BidiIter> > const &self) + explicit xpression_visitor(Traits const &tr, std::shared_ptr<regex_impl<BidiIter> > const &self) : xpression_visitor_base<BidiIter>(self) , traits_(tr) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/symbols.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/symbols.hpp index 5efa4aba..ffb9b552 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/symbols.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/symbols.hpp @@ -26,7 +26,7 @@ #include <boost/range/end.hpp> #include <boost/range/value_type.hpp> #include <boost/range/const_iterator.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> namespace boost { namespace xpressive { namespace detail { @@ -75,9 +75,9 @@ namespace boost { namespace xpressive { namespace detail private: /////////////////////////////////////////////////////////////////////////////// - // struct node : a node in the TST. + // struct node : a node in the TST. // The "eq" field stores the result pointer when ch is zero. - // + // struct node : boost::noncopyable { @@ -125,7 +125,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // insert : insert a string into the TST - // + // template<typename Trans> node* insert(node* p, key_iterator &begin, key_iterator end, result_type r, Trans trans) const { @@ -168,7 +168,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // conditional rotation : the goal is to minimize the overall // weighted path length of each binary search tree - // + // bool cond_rotation(bool left, node* const i, node* const j) const { // don't rotate top node in binary search tree @@ -201,7 +201,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // search : find a string in the TST - // + // template<typename BidiIter, typename Trans> result_type search(BidiIter &begin, BidiIter end, Trans trans, node* p) const { @@ -276,7 +276,7 @@ namespace boost { namespace xpressive { namespace detail } } - boost::shared_ptr<node> root; + boost::std::shared_ptr<node> root; }; }}} // namespace boost::xpressive::detail diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/tracking_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/tracking_ptr.hpp index c6a0353e..0c211c3c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/tracking_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/tracking_ptr.hpp @@ -21,7 +21,7 @@ #include <boost/config.hpp> #include <boost/assert.hpp> #include <boost/weak_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <boost/std::shared_ptr.hpp> #include <boost/mpl/assert.hpp> #include <boost/intrusive_ptr.hpp> #include <boost/detail/workaround.hpp> @@ -48,7 +48,7 @@ struct weak_iterator : iterator_facade < weak_iterator<Derived> - , shared_ptr<Derived> const + , std::shared_ptr<Derived> const , std::forward_iterator_tag > { @@ -73,7 +73,7 @@ struct weak_iterator private: friend class boost::iterator_core_access; - shared_ptr<Derived> const &dereference() const + std::shared_ptr<Derived> const &dereference() const { return this->cur_; } @@ -102,7 +102,7 @@ private: this->cur_.reset(); } - shared_ptr<Derived> cur_; + std::shared_ptr<Derived> cur_; base_iterator iter_; set_type *set_; }; @@ -112,14 +112,14 @@ private: // for use with a filter_iterator to filter a node out of a list of dependencies template<typename Derived> struct filter_self - : std::unary_function<shared_ptr<Derived>, bool> + : std::unary_function<std::shared_ptr<Derived>, bool> { filter_self(enable_reference_tracking<Derived> *self) : self_(self) { } - bool operator ()(shared_ptr<Derived> const &that) const + bool operator ()(std::shared_ptr<Derived> const &that) const { return this->self_ != that.get(); } @@ -144,7 +144,7 @@ void adl_swap(T &t1, T &t2) template<typename Derived> struct enable_reference_tracking { - typedef std::set<shared_ptr<Derived> > references_type; + typedef std::set<std::shared_ptr<Derived> > references_type; typedef std::set<weak_ptr<Derived> > dependents_type; void tracking_copy(Derived const &that) @@ -321,7 +321,7 @@ private: references_type refs_; dependents_type deps_; - shared_ptr<Derived> self_; + std::shared_ptr<Derived> self_; boost::detail::atomic_count cnt_; }; @@ -345,7 +345,7 @@ inline void intrusive_ptr_release(enable_reference_tracking<Derived> *p) template<typename Derived> inline void enable_reference_tracking<Derived>::dump_(std::ostream &sout) const { - shared_ptr<Derived> this_ = this->self_; + std::shared_ptr<Derived> this_ = this->self_; sout << "0x" << (void*)this << " cnt=" << this_.use_count()-1 << " refs={"; typename references_type::const_iterator cur1 = this->refs_.begin(); typename references_type::const_iterator end1 = this->refs_.end(); @@ -358,8 +358,8 @@ inline void enable_reference_tracking<Derived>::dump_(std::ostream &sout) const typename dependents_type::const_iterator end2 = this->deps_.end(); for(; cur2 != end2; ++cur2) { - // ericne, 27/nov/05: CW9_4 doesn't like if(shared_ptr x = y) - shared_ptr<Derived> dep = cur2->lock(); + // ericne, 27/nov/05: CW9_4 doesn't like if(std::shared_ptr x = y) + std::shared_ptr<Derived> dep = cur2->lock(); if(dep.get()) { sout << "0x" << (void*)&*dep << ','; @@ -425,7 +425,7 @@ struct tracking_ptr } // calling this forces this->impl_ to fork. - shared_ptr<element_type> const &get() const + std::shared_ptr<element_type> const &get() const { if(intrusive_ptr<element_type> impl = this->fork_()) { @@ -480,7 +480,7 @@ private: { impl = this->impl_; BOOST_ASSERT(!this->has_deps_()); - shared_ptr<element_type> simpl(new element_type); + std::shared_ptr<element_type> simpl(new element_type); this->impl_ = get_pointer(simpl->self_ = simpl); } return impl; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/regex_compiler.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/regex_compiler.hpp index 4a2a9d74..ca47501e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/regex_compiler.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/regex_compiler.hpp @@ -375,7 +375,7 @@ private: , "mismatched parenthesis" ); basic_regex<BidiIter> &rex = this->rules_[name]; - shared_ptr<detail::regex_impl<BidiIter> > impl = access::get_regex_impl(rex); + std::shared_ptr<detail::regex_impl<BidiIter> > impl = access::get_regex_impl(rex); this->self_->track_reference(*impl); return detail::make_dynamic<BidiIter>(detail::regex_byref_matcher<BidiIter>(impl)); } @@ -735,7 +735,7 @@ private: std::size_t hidden_mark_count_; CompilerTraits traits_; typename RegexTraits::char_class_type upper_; - shared_ptr<detail::regex_impl<BidiIter> > self_; + std::shared_ptr<detail::regex_impl<BidiIter> > self_; std::map<string_type, basic_regex<BidiIter> > rules_; }; diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp index 1cb5e2ee..a5e97a2f 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp @@ -3,7 +3,7 @@ #ifndef SN_TARGET_PS3_SPU // #include "..\..\..\stdafx.h" #endif -#endif +#endif #include "ChunkRebuildData.h" #include "Tesselator_SPU.h" @@ -13,7 +13,7 @@ #include "..\..\..\..\Minecraft.World\Tile.h" #include "..\..\..\..\Minecraft.World\Level.h" #include "..\..\..\..\Minecraft.World\Dimension.h" -// +// // #include "..\..\..\Chunk.h" // #include "..\..\..\TileRenderer.h" // #include "..\..\..\TileEntityRenderDispatcher.h" @@ -26,13 +26,13 @@ #include "..\..\..\..\Minecraft.World\BiomeSource.h" #else - + #include "..\Common\spu_assert.h" #endif //SN_TARGET_PS3_SPU static const int Level_maxBuildHeight = 256; -static const int Level_MAX_LEVEL_SIZE = 30000000; +static const int Level_MAX_LEVEL_SIZE = 30000000; static const int Level_MAX_BRIGHTNESS = 15; @@ -53,7 +53,7 @@ int ChunkRebuildData::getGrassColor( int x, int z ) { return m_grassColor[get int ChunkRebuildData::getFoliageColor( int x, int z ) { return m_foliageColor[getTileIdx(x,z)]; } int ChunkRebuildData::getFlags(int x, int y, int z) { return m_data_flags[getTileIdx(x,y,z)] >> 4; } void ChunkRebuildData::setFlag(int x, int y, int z, int flag) { m_data_flags[getTileIdx(x,y,z)] |= (flag<<4);} -#endif +#endif @@ -77,7 +77,7 @@ void ChunkRebuildData::disableUnseenTiles() int tileID = getTile(iX,iY,iZ); if( tileID == 0 ) continue; m_flags &= ~e_flag_EmptyChunk; - + // Don't bother trying to work out neighbours for this tile if we are at the edge of the chunk - apart from the very // bottom of the world where we shouldn't ever be able to see @@ -120,7 +120,7 @@ void ChunkRebuildData::disableUnseenTiles() } } } - + #ifndef SN_TARGET_PS3_SPU void setIconSPUFromIcon(Icon_SPU* iconSpu, Icon* icon) @@ -145,78 +145,78 @@ void ChunkRebuildData::buildMaterial(int matSPUIndex, Material* mat) void ChunkRebuildData::buildMaterials() { - buildMaterial(Material_SPU::air_Id, Material::air); - buildMaterial(Material_SPU::grass_Id, Material::grass); - buildMaterial(Material_SPU::dirt_Id, Material::dirt); - buildMaterial(Material_SPU::wood_Id, Material::wood); - buildMaterial(Material_SPU::stone_Id, Material::stone); - buildMaterial(Material_SPU::metal_Id, Material::metal); - buildMaterial(Material_SPU::water_Id, Material::water); - buildMaterial(Material_SPU::lava_Id, Material::lava); - buildMaterial(Material_SPU::leaves_Id, Material::leaves); - buildMaterial(Material_SPU::plant_Id, Material::plant); - buildMaterial(Material_SPU::replaceable_plant_Id, Material::replaceable_plant); - buildMaterial(Material_SPU::sponge_Id, Material::sponge); - buildMaterial(Material_SPU::cloth_Id, Material::cloth); - buildMaterial(Material_SPU::fire_Id, Material::fire); - buildMaterial(Material_SPU::sand_Id, Material::sand); - buildMaterial(Material_SPU::decoration_Id, Material::decoration); - buildMaterial(Material_SPU::clothDecoration_Id, Material::clothDecoration); - buildMaterial(Material_SPU::glass_Id, Material::glass); - buildMaterial(Material_SPU::explosive_Id, Material::explosive); - buildMaterial(Material_SPU::coral_Id, Material::coral); - buildMaterial(Material_SPU::ice_Id, Material::ice); - buildMaterial(Material_SPU::topSnow_Id, Material::topSnow); - buildMaterial(Material_SPU::snow_Id, Material::snow); - buildMaterial(Material_SPU::cactus_Id, Material::cactus); - buildMaterial(Material_SPU::clay_Id, Material::clay); - buildMaterial(Material_SPU::vegetable_Id, Material::vegetable); - buildMaterial(Material_SPU::egg_Id, Material::egg); - buildMaterial(Material_SPU::portal_Id, Material::portal); - buildMaterial(Material_SPU::cake_Id, Material::cake); - buildMaterial(Material_SPU::web_Id, Material::web); - buildMaterial(Material_SPU::piston_Id, Material::piston); - buildMaterial(Material_SPU::buildable_glass_Id, Material::buildable_glass); - buildMaterial(Material_SPU::heavyMetal_Id, Material::heavyMetal); + buildMaterial(Material_SPU::air_Id, Material::air); + buildMaterial(Material_SPU::grass_Id, Material::grass); + buildMaterial(Material_SPU::dirt_Id, Material::dirt); + buildMaterial(Material_SPU::wood_Id, Material::wood); + buildMaterial(Material_SPU::stone_Id, Material::stone); + buildMaterial(Material_SPU::metal_Id, Material::metal); + buildMaterial(Material_SPU::water_Id, Material::water); + buildMaterial(Material_SPU::lava_Id, Material::lava); + buildMaterial(Material_SPU::leaves_Id, Material::leaves); + buildMaterial(Material_SPU::plant_Id, Material::plant); + buildMaterial(Material_SPU::replaceable_plant_Id, Material::replaceable_plant); + buildMaterial(Material_SPU::sponge_Id, Material::sponge); + buildMaterial(Material_SPU::cloth_Id, Material::cloth); + buildMaterial(Material_SPU::fire_Id, Material::fire); + buildMaterial(Material_SPU::sand_Id, Material::sand); + buildMaterial(Material_SPU::decoration_Id, Material::decoration); + buildMaterial(Material_SPU::clothDecoration_Id, Material::clothDecoration); + buildMaterial(Material_SPU::glass_Id, Material::glass); + buildMaterial(Material_SPU::explosive_Id, Material::explosive); + buildMaterial(Material_SPU::coral_Id, Material::coral); + buildMaterial(Material_SPU::ice_Id, Material::ice); + buildMaterial(Material_SPU::topSnow_Id, Material::topSnow); + buildMaterial(Material_SPU::snow_Id, Material::snow); + buildMaterial(Material_SPU::cactus_Id, Material::cactus); + buildMaterial(Material_SPU::clay_Id, Material::clay); + buildMaterial(Material_SPU::vegetable_Id, Material::vegetable); + buildMaterial(Material_SPU::egg_Id, Material::egg); + buildMaterial(Material_SPU::portal_Id, Material::portal); + buildMaterial(Material_SPU::cake_Id, Material::cake); + buildMaterial(Material_SPU::web_Id, Material::web); + buildMaterial(Material_SPU::piston_Id, Material::piston); + buildMaterial(Material_SPU::buildable_glass_Id, Material::buildable_glass); + buildMaterial(Material_SPU::heavyMetal_Id, Material::heavyMetal); } int ChunkRebuildData::getMaterialID(Tile* pTile) { Material* m = pTile->material; - if(m == Material::air) return Material_SPU::air_Id; - if(m == Material::grass) return Material_SPU::grass_Id; - if(m == Material::dirt) return Material_SPU::dirt_Id; - if(m == Material::wood) return Material_SPU::wood_Id; - if(m == Material::stone) return Material_SPU::stone_Id; - if(m == Material::metal) return Material_SPU::metal_Id; - if(m == Material::water) return Material_SPU::water_Id; - if(m == Material::lava) return Material_SPU::lava_Id; - if(m == Material::leaves) return Material_SPU::leaves_Id; - if(m == Material::plant) return Material_SPU::plant_Id; - if(m == Material::replaceable_plant)return Material_SPU::replaceable_plant_Id; - if(m == Material::sponge) return Material_SPU::sponge_Id; - if(m == Material::cloth) return Material_SPU::cloth_Id; - if(m == Material::fire) return Material_SPU::fire_Id; - if(m == Material::sand) return Material_SPU::sand_Id; - if(m == Material::decoration) return Material_SPU::decoration_Id; - if(m == Material::clothDecoration) return Material_SPU::clothDecoration_Id; + if(m == Material::air) return Material_SPU::air_Id; + if(m == Material::grass) return Material_SPU::grass_Id; + if(m == Material::dirt) return Material_SPU::dirt_Id; + if(m == Material::wood) return Material_SPU::wood_Id; + if(m == Material::stone) return Material_SPU::stone_Id; + if(m == Material::metal) return Material_SPU::metal_Id; + if(m == Material::water) return Material_SPU::water_Id; + if(m == Material::lava) return Material_SPU::lava_Id; + if(m == Material::leaves) return Material_SPU::leaves_Id; + if(m == Material::plant) return Material_SPU::plant_Id; + if(m == Material::replaceable_plant)return Material_SPU::replaceable_plant_Id; + if(m == Material::sponge) return Material_SPU::sponge_Id; + if(m == Material::cloth) return Material_SPU::cloth_Id; + if(m == Material::fire) return Material_SPU::fire_Id; + if(m == Material::sand) return Material_SPU::sand_Id; + if(m == Material::decoration) return Material_SPU::decoration_Id; + if(m == Material::clothDecoration) return Material_SPU::clothDecoration_Id; if(m == Material::glass) return Material_SPU::glass_Id; - if(m == Material::explosive) return Material_SPU::explosive_Id; - if(m == Material::coral) return Material_SPU::coral_Id; - if(m == Material::ice) return Material_SPU::ice_Id; - if(m == Material::topSnow) return Material_SPU::topSnow_Id; - if(m == Material::snow) return Material_SPU::snow_Id; - if(m == Material::cactus) return Material_SPU::cactus_Id; - if(m == Material::clay) return Material_SPU::clay_Id; - if(m == Material::vegetable) return Material_SPU::vegetable_Id; - if(m == Material::egg) return Material_SPU::egg_Id; - if(m == Material::portal) return Material_SPU::portal_Id; - if(m == Material::cake) return Material_SPU::cake_Id; - if(m == Material::web) return Material_SPU::web_Id; - if(m == Material::piston) return Material_SPU::piston_Id; + if(m == Material::explosive) return Material_SPU::explosive_Id; + if(m == Material::coral) return Material_SPU::coral_Id; + if(m == Material::ice) return Material_SPU::ice_Id; + if(m == Material::topSnow) return Material_SPU::topSnow_Id; + if(m == Material::snow) return Material_SPU::snow_Id; + if(m == Material::cactus) return Material_SPU::cactus_Id; + if(m == Material::clay) return Material_SPU::clay_Id; + if(m == Material::vegetable) return Material_SPU::vegetable_Id; + if(m == Material::egg) return Material_SPU::egg_Id; + if(m == Material::portal) return Material_SPU::portal_Id; + if(m == Material::cake) return Material_SPU::cake_Id; + if(m == Material::web) return Material_SPU::web_Id; + if(m == Material::piston) return Material_SPU::piston_Id; if(m == Material::buildable_glass) return Material_SPU::buildable_glass_Id; if(m == Material::heavyMetal) return Material_SPU::heavyMetal_Id; - assert(0); + assert(0); return Material_SPU::air_Id; } @@ -364,12 +364,12 @@ void ChunkRebuildData::createTileData() // recordPlayer setIconSPUFromIcon(&m_tileData.recordPlayer_iconTop, ((RecordPlayerTile*)Tile::recordPlayer)->iconTop); - // pumpkin + // pumpkin setIconSPUFromIcon(&m_tileData.pumpkinTile_iconTop, ((PumpkinTile*)Tile::pumpkin)->iconTop); setIconSPUFromIcon(&m_tileData.pumpkinTile_iconFace, ((PumpkinTile*)Tile::pumpkin)->iconFace); setIconSPUFromIcon(&m_tileData.pumpkinTile_iconFaceLit, ((PumpkinTile*)Tile::litPumpkin)->iconFace); - // cakeTile + // cakeTile setIconSPUFromIcon(&m_tileData.cakeTile_iconTop, ((CakeTile*)Tile::cake)->iconTop); setIconSPUFromIcon(&m_tileData.cakeTile_iconBottom, ((CakeTile*)Tile::cake)->iconBottom); setIconSPUFromIcon(&m_tileData.cakeTile_iconInner, ((CakeTile*)Tile::cake)->iconInner); @@ -509,7 +509,7 @@ void ChunkRebuildData::buildForChunk( Region* region, Level* level, int x0, int // assert(index < 400); int cacheBlockIndex = (cacheMap[iZ-m_z0]*3) + cacheMap[iX-m_x0]; BiomeCache::Block* pCacheBlock = cacheBlocks[cacheBlockIndex]; -// assert(region->getBiomeSource()->getBlockAt(iX, iZ) == pCacheBlock); +// assert(region->getBiomeSource()->getBlockAt(iX, iZ) == pCacheBlock); Biome* pBiome = pCacheBlock->getBiome(iX, iZ); m_grassColor[index] = pColourTable->getColor(pBiome->m_grassColor); m_foliageColor[index] = pColourTable->getColor(pBiome->m_foliageColor); @@ -537,7 +537,7 @@ void ChunkRebuildData::copyFromTesselator() m_tesselator.m_PPUOffset = 0; // copy tesselator vars over - m_tesselator.vertices = t->vertices; + m_tesselator.vertices = t->vertices; m_tesselator.u = t->u; m_tesselator.v = t->v; m_tesselator._tex2 = t->_tex2; @@ -588,7 +588,7 @@ void ChunkRebuildData::storeInTesselator() Tesselator* t = Tesselator::getInstance(); // 4J - added - static initialiser being set at the wrong time // copy tesselator vars over - t->vertices = m_tesselator.vertices; + t->vertices = m_tesselator.vertices; t->u = m_tesselator.u; t->v = m_tesselator.v; t->_tex2 = m_tesselator._tex2; @@ -647,7 +647,7 @@ void ChunkRebuildData::tesselateAllTiles(TileRenderer_SPU* pTileRenderer) { // if (m_currentLayer == 0 && m_tileData.isEntityTile[tileId]) // { -// shared_ptr<TileEntity> et = region->getTileEntity(x, y, z); +// std::shared_ptr<TileEntity> et = region->getTileEntity(x, y, z); // if (TileEntityRenderDispatcher::instance->hasRenderer(et)) // { // renderableTileEntities.push_back(et); @@ -801,7 +801,7 @@ int ChunkRebuildData::getBrightnessPropagate(LightLayer::variety layer, int x, i if(layer == LightLayer::Sky) return getBrightnessSky(x, y, z); return getBrightnessBlock(x, y, z); - + } int ChunkRebuildData::getLightColor(int x, int y, int z, int emitt) // 4J - change brought forward from 1.8.2 { @@ -865,7 +865,7 @@ int ChunkRebuildData::getRawBrightness(int x, int y, int z, bool propagate) int ChunkRebuildData::LevelChunk_getRawBrightness(int x, int y, int z, int skyDampen) { int light = (m_flags & e_flag_HasCeiling) ? 0 : getBrightnessSky(x, y, z); - if (light > 0) + if (light > 0) m_flags |= e_flag_TouchedSky; light -= skyDampen; int block = getBrightnessBlock(x, y, z); diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h index 06dda5bb..53c9f3ec 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h @@ -8,5 +8,5 @@ public: virtual bool blocksLight() { return false; } virtual bool isSolidRender(bool isServerLevel = false) { return false; } virtual int getRenderShape() { return Tile_SPU::SHAPE_LEVER; } -// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param +// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, std::shared_ptr<TileEntity> forceEntity = std::shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param }; diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h index e8411c88..a8c6851c 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h @@ -12,7 +12,7 @@ public: virtual int getRenderShape() { return SHAPE_PISTON_BASE; } virtual bool isSolidRender(bool isServerLevel = false) { return false; } - // virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param + // virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, std::shared_ptr<TileEntity> forceEntity = std::shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param // virtual void updateDefaultShape(); };
\ No newline at end of file diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonExtensionTile_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonExtensionTile_SPU.h index d5460492..3323cfd0 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonExtensionTile_SPU.h +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonExtensionTile_SPU.h @@ -9,5 +9,5 @@ public: virtual Icon_SPU *getTexture(int face, int data) { return NULL; } virtual int getRenderShape() { return SHAPE_PISTON_EXTENSION; } virtual bool isSolidRender(bool isServerLevel = false) { return false; } -// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param +// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, std::shared_ptr<TileEntity> forceEntity = std::shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param };
\ No newline at end of file diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h index f6e3b3e7..b8bed9a8 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h @@ -6,7 +6,7 @@ class TheEndPortal_SPU : public EntityTile_SPU public: TheEndPortal_SPU(int id) : EntityTile_SPU(id) {} -// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param +// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, std::shared_ptr<TileEntity> forceEntity = std::shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param virtual bool shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, int face) { if (face != 0) return false; diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp index f2dfeaac..552345fd 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp @@ -118,14 +118,14 @@ float Tile_SPU::getBrightness(ChunkRebuildData *level, int x, int y, int z) { return level->getBrightness(x, y, z, ms_pTileData->lightEmission[id]); } -// +// // // 4J - brought forward from 1.8.2 int Tile_SPU::getLightColor(ChunkRebuildData *level, int x, int y, int z) { int tileID = level->getTile(x, y, z); return level->getLightColor(x, y, z, ms_pTileData->lightEmission[tileID]); } -// +// // bool Tile_SPU::isFaceVisible(Level *level, int x, int y, int z, int f) // { // if (f == 0) y--; @@ -136,7 +136,7 @@ int Tile_SPU::getLightColor(ChunkRebuildData *level, int x, int y, int z) // if (f == 5) x++; // return !level->isSolidRenderTile(x, y, z); // } -// +// bool Tile_SPU::shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, int face) { if (face == 0 && getShapeY0() > 0) return true; @@ -147,7 +147,7 @@ bool Tile_SPU::shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, in if (face == 5 && getShapeX1() < 1) return true; return (!level->isSolidRenderTile(x, y, z)); } -// +// bool Tile_SPU::isSolidFace(ChunkRebuildData *level, int x, int y, int z, int face) { return (level->getMaterial(x, y, z)->isSolid()); @@ -196,39 +196,39 @@ Icon_SPU *Tile_SPU::getTexture(ChunkRebuildData *level, int x, int y, int z, int } return getTexture(face, tileData); } -// +// Icon_SPU *Tile_SPU::getTexture(int face, int data) { return &ms_pTileData->iconData[id]; } -// +// Icon_SPU *Tile_SPU::getTexture(int face) { return getTexture(face, 0); } -// +// // AABB *Tile_SPU::getTileAABB(Level *level, int x, int y, int z) // { // return AABB::newTemp(x + xx0, y + yy0, z + zz0, x + xx1, y + yy1, z + zz1); // } -// -// void Tile_SPU::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, Entity *source) +// +// void Tile_SPU::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, Entity *source) // { // AABB *aabb = getAABB(level, x, y, z); // if (aabb != NULL && box->intersects(aabb)) boxes->push_back(aabb); // } -// +// // void Tile_SPU::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes) // { // AABB *aabb = getAABB(level, x, y, z); // if (aabb != NULL && box->intersects(aabb)) boxes->push_back(aabb); // } -// +// // AABB *Tile_SPU::getAABB(Level *level, int x, int y, int z) // { // return AABB::newTemp(x + xx0, y + yy0, z + zz0, x + xx1, y + yy1, z + zz1); // } -// +// bool Tile_SPU::isSolidRender(bool isServerLevel) { return true; @@ -239,67 +239,67 @@ Icon_SPU *Tile_SPU::getTexture(int face) // { // return mayPick(); // } -// +// // bool Tile_SPU::mayPick() // { // return true; // } -// +// // void Tile_SPU::tick(Level *level, int x, int y, int z, Random *random) // { // } -// +// // void Tile_SPU::animateTick(Level *level, int x, int y, int z, Random *random) // { // } -// +// // void Tile_SPU::destroy(Level *level, int x, int y, int z, int data) // { // } -// +// // void Tile_SPU::neighborChanged(Level *level, int x, int y, int z, int type) // { // } -// +// // void Tile_SPU::addLights(Level *level, int x, int y, int z) // { // } -// +// // int Tile_SPU::getTickDelay() // { // return 10; // } -// +// // void Tile_SPU::onPlace(Level *level, int x, int y, int z) // { // } -// +// // void Tile_SPU::onRemove(Level *level, int x, int y, int z) // { // } -// +// // int Tile_SPU::getResourceCount(Random *random) // { // return 1; // } -// +// // int Tile_SPU::getResource(int data, Random *random, int playerBonusLevel) // { // return id; // } -// -// float Tile_SPU::getDestroyProgress(shared_ptr<Player> player) +// +// float Tile_SPU::getDestroyProgress(std::shared_ptr<Player> player) // { // if (destroySpeed < 0) return 0; // if (!player->canDestroy(this)) return 1 / destroySpeed / 100.0f; // return (player->getDestroySpeed(this) / destroySpeed) / 30; // } -// +// // void Tile_SPU::spawnResources(Level *level, int x, int y, int z, int data, int playerBonusLevel) // { // spawnResources(level, x, y, z, data, 1, playerBonusLevel); // } -// +// // void Tile_SPU::spawnResources(Level *level, int x, int y, int z, int data, float odds, int playerBonusLevel) // { // if (level->isClientSide) return; @@ -309,24 +309,24 @@ Icon_SPU *Tile_SPU::getTexture(int face) // if (level->random->nextFloat() > odds) continue; // int type = getResource(data, level->random, playerBonusLevel); // if (type <= 0) continue; -// -// popResource(level, x, y, z, shared_ptr<ItemInstance>( new ItemInstance(type, 1, getSpawnResourcesAuxValue(data) ) ) ); +// +// popResource(level, x, y, z, std::shared_ptr<ItemInstance>( new ItemInstance(type, 1, getSpawnResourcesAuxValue(data) ) ) ); // } // } -// -// void Tile_SPU::popResource(Level *level, int x, int y, int z, shared_ptr<ItemInstance> itemInstance) +// +// void Tile_SPU::popResource(Level *level, int x, int y, int z, std::shared_ptr<ItemInstance> itemInstance) // { // if( level->isClientSide ) return; -// +// // float s = 0.7f; // double xo = level->random->nextFloat() * s + (1 - s) * 0.5; // double yo = level->random->nextFloat() * s + (1 - s) * 0.5; // double zo = level->random->nextFloat() * s + (1 - s) * 0.5; -// shared_ptr<ItemEntity> item = shared_ptr<ItemEntity>( new ItemEntity(level, x + xo, y + yo, z + zo, itemInstance ) ); +// std::shared_ptr<ItemEntity> item = std::shared_ptr<ItemEntity>( new ItemEntity(level, x + xo, y + yo, z + zo, itemInstance ) ); // item->throwTime = 10; // level->addEntity(item); // } -// +// // // Brought forward for TU7 // void Tile_SPU::popExperience(Level *level, int x, int y, int z, int amount) // { @@ -336,182 +336,182 @@ Icon_SPU *Tile_SPU::getTexture(int face) // { // int newCount = ExperienceOrb::getExperienceValue(amount); // amount -= newCount; -// level->addEntity(shared_ptr<ExperienceOrb>( new ExperienceOrb(level, x + .5, y + .5, z + .5, newCount))); +// level->addEntity(std::shared_ptr<ExperienceOrb>( new ExperienceOrb(level, x + .5, y + .5, z + .5, newCount))); // } // } // } -// +// // int Tile_SPU::getSpawnResourcesAuxValue(int data) // { // return 0; // } -// -// float Tile_SPU::getExplosionResistance(shared_ptr<Entity> source) +// +// float Tile_SPU::getExplosionResistance(std::shared_ptr<Entity> source) // { // return explosionResistance / 5.0f; // } -// +// // HitResult *Tile_SPU::clip(Level *level, int xt, int yt, int zt, Vec3 *a, Vec3 *b) // { // EnterCriticalSection(&m_csShape); // updateShape(level, xt, yt, zt); -// +// // a = a->add(-xt, -yt, -zt); // b = b->add(-xt, -yt, -zt); -// +// // Vec3 *xh0 = a->clipX(b, xx0); // Vec3 *xh1 = a->clipX(b, xx1); -// +// // Vec3 *yh0 = a->clipY(b, yy0); // Vec3 *yh1 = a->clipY(b, yy1); -// +// // Vec3 *zh0 = a->clipZ(b, zz0); // Vec3 *zh1 = a->clipZ(b, zz1); -// +// // Vec3 *closest = NULL; -// +// // if (containsX(xh0) && (closest == NULL || a->distanceTo(xh0) < a->distanceTo(closest))) closest = xh0; // if (containsX(xh1) && (closest == NULL || a->distanceTo(xh1) < a->distanceTo(closest))) closest = xh1; // if (containsY(yh0) && (closest == NULL || a->distanceTo(yh0) < a->distanceTo(closest))) closest = yh0; // if (containsY(yh1) && (closest == NULL || a->distanceTo(yh1) < a->distanceTo(closest))) closest = yh1; // if (containsZ(zh0) && (closest == NULL || a->distanceTo(zh0) < a->distanceTo(closest))) closest = zh0; // if (containsZ(zh1) && (closest == NULL || a->distanceTo(zh1) < a->distanceTo(closest))) closest = zh1; -// +// // LeaveCriticalSection(&m_csShape); -// +// // if (closest == NULL) return NULL; -// +// // int face = -1; -// +// // if (closest == xh0) face = 4; // if (closest == xh1) face = 5; // if (closest == yh0) face = 0; // if (closest == yh1) face = 1; // if (closest == zh0) face = 2; // if (closest == zh1) face = 3; -// +// // return new HitResult(xt, yt, zt, face, closest->add(xt, yt, zt)); // } -// +// // bool Tile_SPU::containsX(Vec3 *v) // { // if( v == NULL) return false; // return v->y >= yy0 && v->y <= yy1 && v->z >= zz0 && v->z <= zz1; // } -// +// // bool Tile_SPU::containsY(Vec3 *v) // { // if( v == NULL) return false; // return v->x >= xx0 && v->x <= xx1 && v->z >= zz0 && v->z <= zz1; // } -// +// // bool Tile_SPU::containsZ(Vec3 *v) // { // if( v == NULL) return false; // return v->x >= xx0 && v->x <= xx1 && v->y >= yy0 && v->y <= yy1; // } -// +// // void Tile_SPU::wasExploded(Level *level, int x, int y, int z) // { // } -// +// int Tile_SPU::getRenderLayer() { return 0; } -// +// // bool Tile_SPU::mayPlace(Level *level, int x, int y, int z, int face) // { // return mayPlace(level, x, y, z); // } -// +// // bool Tile_SPU::mayPlace(Level *level, int x, int y, int z) // { // int t = level->getTile(x, y, z); // return t == 0 || Tile_SPU::tiles[t]->material->isReplaceable(); // } -// +// // // 4J-PB - Adding a TestUse for tooltip display // bool Tile_SPU::TestUse() // { // return false; // } -// -// bool Tile_SPU::TestUse(Level *level, int x, int y, int z, shared_ptr<Player> player) +// +// bool Tile_SPU::TestUse(Level *level, int x, int y, int z, std::shared_ptr<Player> player) // { // return false; // } -// -// bool Tile_SPU::use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param +// +// bool Tile_SPU::use(Level *level, int x, int y, int z, std::shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param // { // return false; // } -// -// void Tile_SPU::stepOn(Level *level, int x, int y, int z, shared_ptr<Entity> entity) +// +// void Tile_SPU::stepOn(Level *level, int x, int y, int z, std::shared_ptr<Entity> entity) // { // } -// +// // void Tile_SPU::setPlacedOnFace(Level *level, int x, int y, int z, int face) // { // } -// +// // void Tile_SPU::prepareRender(Level *level, int x, int y, int z) // { // } -// -// void Tile_SPU::attack(Level *level, int x, int y, int z, shared_ptr<Player> player) +// +// void Tile_SPU::attack(Level *level, int x, int y, int z, std::shared_ptr<Player> player) // { // } -// -// void Tile_SPU::handleEntityInside(Level *level, int x, int y, int z, shared_ptr<Entity> e, Vec3 *current) +// +// void Tile_SPU::handleEntityInside(Level *level, int x, int y, int z, std::shared_ptr<Entity> e, Vec3 *current) // { // } -// +// void Tile_SPU::updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData, TileEntity* forceEntity) // 4J added forceData, forceEntity param { } -// +// int Tile_SPU::getColor(ChunkRebuildData *level, int x, int y, int z) { return 0xffffff; } -// +// // int Tile_SPU::getColor(LevelSource *level, int x, int y, int z, int data) // { // return 0xffffff; // } -// +// // bool Tile_SPU::getSignal(LevelSource *level, int x, int y, int z) // { // return false; // } -// +// // bool Tile_SPU::getSignal(LevelSource *level, int x, int y, int z, int dir) // { // return false; // } -// +// // bool Tile_SPU::isSignalSource() // { // return false; // } -// -// void Tile_SPU::entityInside(Level *level, int x, int y, int z, shared_ptr<Entity> entity) +// +// void Tile_SPU::entityInside(Level *level, int x, int y, int z, std::shared_ptr<Entity> entity) // { // } -// +// // bool Tile_SPU::getDirectSignal(Level *level, int x, int y, int z, int dir) // { // return false; // } -// +// void Tile_SPU::updateDefaultShape() { } -// -// void Tile_SPU::playerDestroy(Level *level, shared_ptr<Player> player, int x, int y, int z, int data) +// +// void Tile_SPU::playerDestroy(Level *level, std::shared_ptr<Player> player, int x, int y, int z, int data) // { // // 4J Stu - Special case - only record a crop destroy if is fully grown // if(id==Tile_SPU::crops_Id) @@ -525,14 +525,14 @@ void Tile_SPU::updateDefaultShape() // } // player->awardStat(Stats::totalBlocksMined, 1); // 4J : WESTY : Added for other award. // player->causeFoodExhaustion(FoodConstants::EXHAUSTION_MINE); -// +// // if( id == Tile_SPU::treeTrunk_Id ) // player->awardStat(Achievements::mineWood); -// -// +// +// // if (isCubeShaped() && !isEntityTile[id] && EnchantmentHelper::hasSilkTouch(player->inventory)) // { -// shared_ptr<ItemInstance> item = getSilkTouchItemInstance(data); +// std::shared_ptr<ItemInstance> item = getSilkTouchItemInstance(data); // if (item != NULL) // { // popResource(level, x, y, z, item); @@ -544,78 +544,78 @@ void Tile_SPU::updateDefaultShape() // spawnResources(level, x, y, z, data, playerBonusLevel); // } // } -// -// shared_ptr<ItemInstance> Tile_SPU::getSilkTouchItemInstance(int data) +// +// std::shared_ptr<ItemInstance> Tile_SPU::getSilkTouchItemInstance(int data) // { // int popData = 0; // if (id >= 0 && id < Item::items.length && Item::items[id]->isStackedByData()) // { // popData = data; // } -// return shared_ptr<ItemInstance>(new ItemInstance(id, 1, popData)); +// return std::shared_ptr<ItemInstance>(new ItemInstance(id, 1, popData)); // } -// +// // int Tile_SPU::getResourceCountForLootBonus(int bonusLevel, Random *random) // { // return getResourceCount(random); // } -// +// // bool Tile_SPU::canSurvive(Level *level, int x, int y, int z) // { // return true; // } -// -// void Tile_SPU::setPlacedBy(Level *level, int x, int y, int z, shared_ptr<Mob> by) +// +// void Tile_SPU::setPlacedBy(Level *level, int x, int y, int z, std::shared_ptr<Mob> by) // { // } -// +// // Tile *Tile_SPU::setDescriptionId(unsigned int id) // { // this->descriptionId = id; // return this; // } -// +// // wstring Tile_SPU::getName() // { // return I18n::get(getDescriptionId() + L".name"); // } -// +// // unsigned int Tile_SPU::getDescriptionId(int iData /*= -1*/) // { // return descriptionId; // } -// +// // Tile *Tile_SPU::setUseDescriptionId(unsigned int id) // { // this->useDescriptionId = id; // return this; // } -// +// // unsigned int Tile_SPU::getUseDescriptionId() // { // return useDescriptionId; // } -// +// // void Tile_SPU::triggerEvent(Level *level, int x, int y, int z, int b0, int b1) // { // } -// +// // bool Tile_SPU::isCollectStatistics() // { // return collectStatistics; // } -// +// // Tile *Tile_SPU::setNotCollectStatistics() // { // collectStatistics = false; // return this; // } -// +// // int Tile_SPU::getPistonPushReaction() // { // return material->getPushReaction(); // } -// +// // // 4J - brought forward from 1.8.2 float Tile_SPU::getShadeBrightness(ChunkRebuildData *level, int x, int y, int z) { @@ -629,37 +629,37 @@ Tile_SPU* Tile_SPU::createFromID( int tileID ) if(m_tiles[tileID].id != -1) return &m_tiles[tileID]; - + #ifndef SN_TARGET_PS3_SPU app.DebugPrintf("missing tile ID %d\n", tileID); #else spu_print("missing tile ID %d\n", tileID); -#endif +#endif return &m_tiles[1]; } Material_SPU* Tile_SPU::getMaterial() { - int matID = ms_pTileData->materialIDs[id]; + int matID = ms_pTileData->materialIDs[id]; return &ms_pTileData->materials[matID]; } -// -// void Tile_SPU::fallOn(Level *level, int x, int y, int z, shared_ptr<Entity> entity, float fallDistance) +// +// void Tile_SPU::fallOn(Level *level, int x, int y, int z, std::shared_ptr<Entity> entity, float fallDistance) // { // } -// +// // void Tile_SPU::registerIcons(IconRegister *iconRegister) // { // icon = iconRegister->registerIcon(m_textureName); // } -// +// // wstring Tile_SPU::getTileItemIconName() // { // return L""; // } -// +// // Tile *Tile_SPU::setTextureName(const wstring &name) // { // m_textureName = name; @@ -690,7 +690,7 @@ void Tile_SPU::initTilePointers() CREATE_TILE_TYPE(stairs_wood_Id, StairTile_SPU); CREATE_TILE_TYPE(stairs_stone_Id, StairTile_SPU); - CREATE_TILE_TYPE(stairs_bricks_Id, StairTile_SPU); + CREATE_TILE_TYPE(stairs_bricks_Id, StairTile_SPU); CREATE_TILE_TYPE(stairs_stoneBrickSmooth_Id, StairTile_SPU); CREATE_TILE_TYPE(stairs_netherBricks_Id, StairTile_SPU); CREATE_TILE_TYPE(stairs_sandstone_Id, StairTile_SPU); @@ -863,7 +863,7 @@ void Tile_SPU::initTilePointers() CREATE_TILE_TYPE(goldOre_Id, Tile_SPU); // OreTile CREATE_TILE_TYPE(ironOre_Id, Tile_SPU); // OreTile CREATE_TILE_TYPE(coalOre_Id, Tile_SPU); // OreTile - CREATE_TILE_TYPE(lapisOre_Id, Tile_SPU); // OreTile + CREATE_TILE_TYPE(lapisOre_Id, Tile_SPU); // OreTile CREATE_TILE_TYPE(diamondOre_Id, Tile_SPU); // OreTile CREATE_TILE_TYPE(clay_Id, Tile_SPU); // ClayTile CREATE_TILE_TYPE(redStoneOre_Id, Tile_SPU); // RedStoneOreTile @@ -884,7 +884,7 @@ void Tile_SPU::initTilePointers() CREATE_TILE_TYPE(enderChest_Id, EnderChestTile_SPU); CREATE_TILE_TYPE(tripWireSource_Id, TripWireSourceTile_SPU); CREATE_TILE_TYPE(tripWire_Id, TripWireTile_SPU); -// +// CREATE_TILE_TYPE(emeraldBlock_Id, Tile_SPU); // MetalTile CREATE_TILE_TYPE(cobbleWall_Id, WallTile_SPU); CREATE_TILE_TYPE(flowerPot_Id, FlowerPotTile_SPU); diff --git a/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.cpp b/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.cpp index 0912e33a..3de39461 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.cpp +++ b/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.cpp @@ -21,7 +21,7 @@ PlayStation(R)3 Programmer Tool Runtime Library 430.001 // #define SPU_HEAPSIZE (128*1024) // #define SPU_STACKSIZE (16*1024) -// +// // CELL_SPU_LS_PARAM(128*1024, 16*1024); // can't use #defines here as it seems to create an asm instruction @@ -132,7 +132,7 @@ bool LevelRenderer_FindNearestChunk_DataIn::MultiplayerChunkCache::getChunkEmpty } -bool LevelRenderer_FindNearestChunk_DataIn::CompressedTileStorage::isRenderChunkEmpty(int y) // y == 0, 16, 32... 112 (representing a 16 byte range) +bool LevelRenderer_FindNearestChunk_DataIn::CompressedTileStorage::isRenderChunkEmpty(int y) // y == 0, 16, 32... 112 (representing a 16 byte range) { int blockIdx; unsigned short *blockIndices = (unsigned short *)indicesAndData; @@ -162,30 +162,30 @@ void LevelRenderer_FindNearestChunk_DataIn::findNearestChunk() unsigned char* globalChunkFlags = (unsigned char*)alloca(numGlobalChunks); // 164K !!! DmaData_SPU::getAndWait(globalChunkFlags, (uintptr_t)pGlobalChunkFlags, sizeof(unsigned char)*numGlobalChunks); - + nearChunk = NULL; // Nearest chunk that is dirty veryNearCount = 0; int minDistSq = 0x7fffffff; // Distances to this chunk - + // Find nearest chunk that is dirty for( int p = 0; p < 4; p++ ) { // It's possible that the localplayers member can be set to NULL on the main thread when a player chooses to exit the game - // So take a reference to the player object now. As it is a shared_ptr it should live as long as we need it - PlayerData* player = &playerData[p]; + // So take a reference to the player object now. As it is a std::shared_ptr it should live as long as we need it + PlayerData* player = &playerData[p]; if( player->bValid == NULL ) continue; if( chunks[p] == NULL ) continue; if( level[p] == NULL ) continue; if( chunkLengths[p] != xChunks * zChunks * CHUNK_Y_COUNT ) continue; int px = (int)player->x; int py = (int)player->y; - int pz = (int)player->z; + int pz = (int)player->z; ClipChunk clipChunk[512]; for( int z = 0; z < zChunks; z++ ) - { + { uintptr_t ClipChunkX_PPU = (uintptr_t)&chunks[p][(z * yChunks + 0) * xChunks + 0]; DmaData_SPU::getAndWait(&clipChunk[0], ClipChunkX_PPU, sizeof(ClipChunk) * xChunks*CHUNK_Y_COUNT); for( int y = 0; y < CHUNK_Y_COUNT; y++ ) @@ -196,7 +196,7 @@ void LevelRenderer_FindNearestChunk_DataIn::findNearestChunk() // Get distance to this chunk - deliberately not calling the chunk's method of doing this to avoid overheads (passing entitie, type conversion etc.) that this involves int xd = pClipChunk->xm - px; - int yd = pClipChunk->ym - py; + int yd = pClipChunk->ym - py; int zd = pClipChunk->zm - pz; int distSq = xd * xd + yd * yd + zd * zd; int distSqWeighted = xd * xd + yd * yd * 4 + zd * zd; // Weighting against y to prioritise things in same x/z plane as player first @@ -257,12 +257,12 @@ void cellSpursJobQueueMain(CellSpursJobContext2 *pContext, CellSpursJob256 *pJob spu_print("LevelRenderer_cull [SPU#%u] start\n", idSpu); g_pSpursJobContext = pContext; - uint32_t eaDataIn = pJob->workArea.userData[0]; + uint32_t eaDataIn = pJob->workArea.userData[0]; // uint32_t eaDataOut =pJob->workArea.userData[1]; LevelRenderer_FindNearestChunk_DataIn dataIn; DmaData_SPU::getAndWait(&dataIn, eaDataIn, sizeof(LevelRenderer_FindNearestChunk_DataIn)); - + dataIn.findNearestChunk(); DmaData_SPU::putAndWait(&dataIn, eaDataIn, sizeof(LevelRenderer_FindNearestChunk_DataIn)); diff --git a/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h b/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h index 55ffcabd..a6c3ef2a 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h +++ b/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h @@ -23,7 +23,7 @@ public: int xm, ym, zm; }; - class AABB + class AABB { double x0, y0, z0; double x1, y1, z1; @@ -64,7 +64,7 @@ public: int id; int padding[1]; //public: - // vector<shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed + // vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed private: void *globalRenderableTileEntities; @@ -86,7 +86,7 @@ public: MultiplayerChunkCache multiplayerChunkCache[4]; int lowerOffset; // offsets into the level class, we don't want to compile the entire class - int upperOffset; + int upperOffset; int xChunks, yChunks, zChunks; diff --git a/Minecraft.Client/PaintingRenderer.cpp b/Minecraft.Client/PaintingRenderer.cpp index 4238f759..b3a8acd2 100644 --- a/Minecraft.Client/PaintingRenderer.cpp +++ b/Minecraft.Client/PaintingRenderer.cpp @@ -11,11 +11,11 @@ PaintingRenderer::PaintingRenderer() random = new Random(); } -void PaintingRenderer::render(shared_ptr<Entity> _painting, double x, double y, double z, float rot, float a) +void PaintingRenderer::render(std::shared_ptr<Entity> _painting, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Painting> painting = dynamic_pointer_cast<Painting>(_painting); - + std::shared_ptr<Painting> painting = dynamic_pointer_cast<Painting>(_painting); + random->setSeed(187); glPushMatrix(); @@ -33,7 +33,7 @@ void PaintingRenderer::render(shared_ptr<Entity> _painting, double x, double y, glPopMatrix(); } -void PaintingRenderer::renderPainting(shared_ptr<Painting> painting, int w, int h, int uo, int vo) +void PaintingRenderer::renderPainting(std::shared_ptr<Painting> painting, int w, int h, int uo, int vo) { float xx0 = -w / 2.0f; float yy0 = -h / 2.0f; @@ -113,7 +113,7 @@ void PaintingRenderer::renderPainting(shared_ptr<Painting> painting, int w, int } -void PaintingRenderer::setBrightness(shared_ptr<Painting> painting, float ss, float ya) +void PaintingRenderer::setBrightness(std::shared_ptr<Painting> painting, float ss, float ya) { int x = Mth::floor(painting->x); int y = Mth::floor(painting->y + ya/16.0f); diff --git a/Minecraft.Client/PaintingRenderer.h b/Minecraft.Client/PaintingRenderer.h index a750e128..f940c169 100644 --- a/Minecraft.Client/PaintingRenderer.h +++ b/Minecraft.Client/PaintingRenderer.h @@ -11,9 +11,9 @@ private: public: PaintingRenderer(); // 4J -added - virtual void render(shared_ptr<Entity> _painting, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _painting, double x, double y, double z, float rot, float a); private: - void renderPainting(shared_ptr<Painting> painting, int w, int h, int uo, int vo); - void setBrightness(shared_ptr<Painting> painting, float ss, float ya); + void renderPainting(std::shared_ptr<Painting> painting, int w, int h, int uo, int vo); + void setBrightness(std::shared_ptr<Painting> painting, float ss, float ya); }; diff --git a/Minecraft.Client/Particle.cpp b/Minecraft.Client/Particle.cpp index 90ef93bc..30f14878 100644 --- a/Minecraft.Client/Particle.cpp +++ b/Minecraft.Client/Particle.cpp @@ -61,7 +61,7 @@ Particle::Particle(Level *level, double x, double y, double z, double xa, double yd = yd / dd * speed * 0.4f + 0.1f; zd = zd / dd * speed * 0.4f;} -shared_ptr<Particle> Particle::setPower(float power) +std::shared_ptr<Particle> Particle::setPower(float power) { xd *= power; yd = (yd - 0.1f) * power + 0.1f; @@ -69,7 +69,7 @@ shared_ptr<Particle> Particle::setPower(float power) return dynamic_pointer_cast<Particle>( shared_from_this() ); } -shared_ptr<Particle> Particle::scale(float scale) +std::shared_ptr<Particle> Particle::scale(float scale) { setSize(0.2f * scale, 0.2f * scale); size *= scale; @@ -168,9 +168,9 @@ void Particle::render(Tesselator *t, float a, float xa, float ya, float za, floa #ifdef __PSVITA__ // AP - this will set up the 4 vertices in half the time. t->tileParticleQuad((float)(x - xa * r - xa2 * r), (float)( y - ya * r), (float)( z - za * r - za2 * r), (float)( u1), (float)( v1), - (float)(x - xa * r + xa2 * r), (float)( y + ya * r), (float)( z - za * r + za2 * r), (float)( u1), (float)( v0), - (float)(x + xa * r + xa2 * r), (float)( y + ya * r), (float)( z + za * r + za2 * r), (float)( u0), (float)( v0), - (float)(x + xa * r - xa2 * r), (float)( y - ya * r), (float)( z + za * r - za2 * r), (float)( u0), (float)( v1), + (float)(x - xa * r + xa2 * r), (float)( y + ya * r), (float)( z - za * r + za2 * r), (float)( u1), (float)( v0), + (float)(x + xa * r + xa2 * r), (float)( y + ya * r), (float)( z + za * r + za2 * r), (float)( u0), (float)( v0), + (float)(x + xa * r - xa2 * r), (float)( y - ya * r), (float)( z + za * r - za2 * r), (float)( u0), (float)( v1), rCol * br, gCol * br, bCol * br, alpha); #else t->color(rCol * br, gCol * br, bCol * br, alpha); diff --git a/Minecraft.Client/Particle.h b/Minecraft.Client/Particle.h index d9b0ba3a..a56c2e4d 100644 --- a/Minecraft.Client/Particle.h +++ b/Minecraft.Client/Particle.h @@ -28,8 +28,8 @@ protected: Particle(Level *level, double x, double y, double z); public: Particle(Level *level, double x, double y, double z, double xa, double ya, double za); - virtual shared_ptr<Particle> setPower(float power); - virtual shared_ptr<Particle> scale(float scale); + virtual std::shared_ptr<Particle> setPower(float power); + virtual std::shared_ptr<Particle> scale(float scale); void setColor(float r, float g, float b); void setAlpha(float alpha); float getRedCol(); diff --git a/Minecraft.Client/ParticleEngine.cpp b/Minecraft.Client/ParticleEngine.cpp index 3a34253a..12ef4a87 100644 --- a/Minecraft.Client/ParticleEngine.cpp +++ b/Minecraft.Client/ParticleEngine.cpp @@ -18,7 +18,7 @@ ParticleEngine::ParticleEngine(Level *level, Textures *textures) this->level = level; } this->textures = textures; - + this->random = new Random(); } @@ -27,7 +27,7 @@ ParticleEngine::~ParticleEngine() delete random; } -void ParticleEngine::add(shared_ptr<Particle> p) +void ParticleEngine::add(std::shared_ptr<Particle> p) { int t = p->getParticleTexture(); int l = p->level->dimension->id == 0 ? 0 : ( p->level->dimension->id == -1 ? 1 : 2); @@ -43,7 +43,7 @@ void ParticleEngine::tick() { for (unsigned int i = 0; i < particles[l][tt].size(); i++) { - shared_ptr<Particle> p = particles[l][tt][i]; + std::shared_ptr<Particle> p = particles[l][tt][i]; p->tick(); if (p->removed) { @@ -56,7 +56,7 @@ void ParticleEngine::tick() } } -void ParticleEngine::render(shared_ptr<Entity> player, float a) +void ParticleEngine::render(std::shared_ptr<Entity> player, float a) { // 4J - change brought forward from 1.2.3 float xa = Camera::xa; @@ -99,7 +99,7 @@ void ParticleEngine::render(shared_ptr<Entity> player, float a) t->end(); t->begin(); } - shared_ptr<Particle> p = particles[l][tt][i]; + std::shared_ptr<Particle> p = particles[l][tt][i]; if (SharedConstants::TEXTURE_LIGHTING) // 4J - change brought forward from 1.8.2 { @@ -118,7 +118,7 @@ void ParticleEngine::render(shared_ptr<Entity> player, float a) } -void ParticleEngine::renderLit(shared_ptr<Entity> player, float a) +void ParticleEngine::renderLit(std::shared_ptr<Entity> player, float a) { // 4J - added. We call this before ParticleEngine::render in the general render per player, so if we // don't set this here then the offsets will be from the previous player - a single frame lag for the @@ -142,7 +142,7 @@ void ParticleEngine::renderLit(shared_ptr<Entity> player, float a) Tesselator *t = Tesselator::getInstance(); for (unsigned int i = 0; i < particles[l][tt].size(); i++) { - shared_ptr<Particle> p = particles[l][tt][i]; + std::shared_ptr<Particle> p = particles[l][tt][i]; if (SharedConstants::TEXTURE_LIGHTING) // 4J - change brought forward from 1.8.2 { @@ -182,7 +182,7 @@ void ParticleEngine::destroy(int x, int y, int z, int tid, int data) double yp = y + (yy + 0.5) / SD; double zp = z + (zz + 0.5) / SD; int face = random->nextInt(6); - add(( shared_ptr<TerrainParticle>(new TerrainParticle(level, xp, yp, zp, xp - x - 0.5f, yp - y - 0.5f, zp - z - 0.5f, tile, face, data, textures) ) )->init(x, y, z, data)); + add(( std::shared_ptr<TerrainParticle>(new TerrainParticle(level, xp, yp, zp, xp - x - 0.5f, yp - y - 0.5f, zp - z - 0.5f, tile, face, data, textures) ) )->init(x, y, z, data)); } } @@ -201,7 +201,7 @@ void ParticleEngine::crack(int x, int y, int z, int face) if (face == 3) zp = z + tile->getShapeZ1() + r; if (face == 4) xp = x + tile->getShapeX0() - r; if (face == 5) xp = x + tile->getShapeX1() + r; - add(( shared_ptr<TerrainParticle>(new TerrainParticle(level, xp, yp, zp, 0, 0, 0, tile, face, level->getData(x, y, z), textures) ) )->init(x, y, z, level->getData(x, y, z))->setPower(0.2f)->scale(0.6f)); + add(( std::shared_ptr<TerrainParticle>(new TerrainParticle(level, xp, yp, zp, 0, 0, 0, tile, face, level->getData(x, y, z), textures) ) )->init(x, y, z, level->getData(x, y, z))->setPower(0.2f)->scale(0.6f)); } diff --git a/Minecraft.Client/ParticleEngine.h b/Minecraft.Client/ParticleEngine.h index 09e3685b..0fee7a16 100644 --- a/Minecraft.Client/ParticleEngine.h +++ b/Minecraft.Client/ParticleEngine.h @@ -26,17 +26,17 @@ public: protected: Level *level; private: - deque<shared_ptr<Particle> > particles[3][TEXTURE_COUNT]; // 4J made two arrays to cope with simultaneous two dimensions + deque<std::shared_ptr<Particle> > particles[3][TEXTURE_COUNT]; // 4J made two arrays to cope with simultaneous two dimensions Textures *textures; Random *random; public: ParticleEngine(Level *level, Textures *textures); ~ParticleEngine(); - void add(shared_ptr<Particle> p); + void add(std::shared_ptr<Particle> p); void tick(); - void render(shared_ptr<Entity> player, float a); - void renderLit(shared_ptr<Entity> player, float a); + void render(std::shared_ptr<Entity> player, float a); + void renderLit(std::shared_ptr<Entity> player, float a); void setLevel(Level *level); void destroy(int x, int y, int z, int tid, int data); void crack(int x, int y, int z, int face); diff --git a/Minecraft.Client/PendingConnection.cpp b/Minecraft.Client/PendingConnection.cpp index 841863b6..f8f61bdb 100644 --- a/Minecraft.Client/PendingConnection.cpp +++ b/Minecraft.Client/PendingConnection.cpp @@ -61,7 +61,7 @@ void PendingConnection::disconnect(DisconnectPacket::eDisconnectReason reason) // try { // 4J - removed try/catch // logger.info("Disconnecting " + getName() + ": " + reason); app.DebugPrintf("Pending connection disconnect: %d\n", reason ); - connection->send( shared_ptr<DisconnectPacket>( new DisconnectPacket(reason) ) ); + connection->send( std::shared_ptr<DisconnectPacket>( new DisconnectPacket(reason) ) ); connection->sendAndQuit(); done = true; // } catch (Exception e) { @@ -69,7 +69,7 @@ void PendingConnection::disconnect(DisconnectPacket::eDisconnectReason reason) // } } -void PendingConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet) +void PendingConnection::handlePreLogin(std::shared_ptr<PreLoginPacket> packet) { if (packet->m_netcodeVersion != MINECRAFT_NET_VERSION) { @@ -103,10 +103,10 @@ void PendingConnection::sendPreLoginResponse() PlayerList *playerList = MinecraftServer::getInstance()->getPlayers(); for(AUTO_VAR(it, playerList->players.begin()); it != playerList->players.end(); ++it) { - shared_ptr<ServerPlayer> player = *it; + std::shared_ptr<ServerPlayer> player = *it; // If the offline Xuid is invalid but the online one is not then that's guest which we should ignore // If the online Xuid is invalid but the offline one is not then we are definitely an offline game so dont care about UGC - + // PADDY - this is failing when a local player with chat restrictions joins an online game if( player != NULL && player->connection->m_offlineXUID != INVALID_XUID && player->connection->m_onlineXUID != INVALID_XUID ) @@ -128,16 +128,16 @@ void PendingConnection::sendPreLoginResponse() if (false)// server->onlineMode) // 4J - removed { loginKey = L"TOIMPLEMENT"; // 4J - todo Long.toHexString(random.nextLong()); - connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(loginKey, ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion, szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex) ) ); + connection->send( std::shared_ptr<PreLoginPacket>( new PreLoginPacket(loginKey, ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion, szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex) ) ); } else #endif { - connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(L"-", ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion,szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex, server->m_texturePackId) ) ); + connection->send( std::shared_ptr<PreLoginPacket>( new PreLoginPacket(L"-", ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion,szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex, server->m_texturePackId) ) ); } } -void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet) +void PendingConnection::handleLogin(std::shared_ptr<LoginPacket> packet) { // printf("Server: handleLogin\n"); //name = packet->userName; @@ -173,7 +173,7 @@ void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet) //else { //4J - removed -#if 0 +#if 0 new Thread() { public void run() { try { @@ -198,7 +198,7 @@ void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet) } -void PendingConnection::handleAcceptedLogin(shared_ptr<LoginPacket> packet) +void PendingConnection::handleAcceptedLogin(std::shared_ptr<LoginPacket> packet) { if(packet->m_ugcPlayersVersion != server->m_ugcPlayersVersion) { @@ -211,7 +211,7 @@ void PendingConnection::handleAcceptedLogin(shared_ptr<LoginPacket> packet) PlayerUID playerXuid = packet->m_offlineXuid; if(playerXuid == INVALID_XUID) playerXuid = packet->m_onlineXuid; - shared_ptr<ServerPlayer> playerEntity = server->getPlayers()->getPlayerForLogin(this, name, playerXuid,packet->m_onlineXuid); + std::shared_ptr<ServerPlayer> playerEntity = server->getPlayers()->getPlayerForLogin(this, name, playerXuid,packet->m_onlineXuid); if (playerEntity != NULL) { server->getPlayers()->placeNewPlayer(connection, playerEntity, packet); @@ -227,12 +227,12 @@ void PendingConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason, done = true; } -void PendingConnection::handleGetInfo(shared_ptr<GetInfoPacket> packet) +void PendingConnection::handleGetInfo(std::shared_ptr<GetInfoPacket> packet) { //try { - //String message = server->motd + "§" + server->players->getPlayerCount() + "§" + server->players->getMaxPlayers(); + //String message = server->motd + "�" + server->players->getPlayerCount() + "�" + server->players->getMaxPlayers(); //connection->send(new DisconnectPacket(message)); - connection->send(shared_ptr<DisconnectPacket>(new DisconnectPacket(DisconnectPacket::eDisconnect_ServerFull) ) ); + connection->send(std::shared_ptr<DisconnectPacket>(new DisconnectPacket(DisconnectPacket::eDisconnect_ServerFull) ) ); connection->sendAndQuit(); server->connection->removeSpamProtection(connection->getSocket()); done = true; @@ -241,17 +241,17 @@ void PendingConnection::handleGetInfo(shared_ptr<GetInfoPacket> packet) //} } -void PendingConnection::handleKeepAlive(shared_ptr<KeepAlivePacket> packet) +void PendingConnection::handleKeepAlive(std::shared_ptr<KeepAlivePacket> packet) { // Ignore } -void PendingConnection::onUnhandledPacket(shared_ptr<Packet> packet) +void PendingConnection::onUnhandledPacket(std::shared_ptr<Packet> packet) { disconnect(DisconnectPacket::eDisconnect_UnexpectedPacket); } -void PendingConnection::send(shared_ptr<Packet> packet) +void PendingConnection::send(std::shared_ptr<Packet> packet) { connection->send(packet); } diff --git a/Minecraft.Client/PendingConnection.h b/Minecraft.Client/PendingConnection.h index 02d706f9..45d8163d 100644 --- a/Minecraft.Client/PendingConnection.h +++ b/Minecraft.Client/PendingConnection.h @@ -24,7 +24,7 @@ private: MinecraftServer *server; int _tick; wstring name; - shared_ptr<LoginPacket> acceptedLogin; + std::shared_ptr<LoginPacket> acceptedLogin; wstring loginKey; public: @@ -32,14 +32,14 @@ public: ~PendingConnection(); void tick(); void disconnect(DisconnectPacket::eDisconnectReason reason); - virtual void handlePreLogin(shared_ptr<PreLoginPacket> packet); - virtual void handleLogin(shared_ptr<LoginPacket> packet); - virtual void handleAcceptedLogin(shared_ptr<LoginPacket> packet); + virtual void handlePreLogin(std::shared_ptr<PreLoginPacket> packet); + virtual void handleLogin(std::shared_ptr<LoginPacket> packet); + virtual void handleAcceptedLogin(std::shared_ptr<LoginPacket> packet); virtual void onDisconnect(DisconnectPacket::eDisconnectReason reason, void *reasonObjects); - virtual void handleGetInfo(shared_ptr<GetInfoPacket> packet); - virtual void handleKeepAlive(shared_ptr<KeepAlivePacket> packet); - virtual void onUnhandledPacket(shared_ptr<Packet> packet); - void send(shared_ptr<Packet> packet); + virtual void handleGetInfo(std::shared_ptr<GetInfoPacket> packet); + virtual void handleKeepAlive(std::shared_ptr<KeepAlivePacket> packet); + virtual void onUnhandledPacket(std::shared_ptr<Packet> packet); + void send(std::shared_ptr<Packet> packet); wstring getName(); virtual bool isServerPacketListener(); diff --git a/Minecraft.Client/PigRenderer.cpp b/Minecraft.Client/PigRenderer.cpp index eb78cd20..7e50fe35 100644 --- a/Minecraft.Client/PigRenderer.cpp +++ b/Minecraft.Client/PigRenderer.cpp @@ -7,10 +7,10 @@ PigRenderer::PigRenderer(Model *model, Model *armor, float shadow) : MobRenderer setArmor(armor); } -int PigRenderer::prepareArmor(shared_ptr<Mob> _pig, int layer, float a) +int PigRenderer::prepareArmor(std::shared_ptr<Mob> _pig, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Pig> pig = dynamic_pointer_cast<Pig>(_pig); + std::shared_ptr<Pig> pig = dynamic_pointer_cast<Pig>(_pig); MemSect(31); bindTexture(TN_MOB_SADDLE); // 4J was L"/mob/saddle.png" @@ -18,7 +18,7 @@ int PigRenderer::prepareArmor(shared_ptr<Mob> _pig, int layer, float a) return (layer == 0 && pig->hasSaddle()) ? 1 : -1; } -void PigRenderer::render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) +void PigRenderer::render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); -}
\ No newline at end of file +}
\ No newline at end of file diff --git a/Minecraft.Client/PigRenderer.h b/Minecraft.Client/PigRenderer.h index e674b508..9dc3edfa 100644 --- a/Minecraft.Client/PigRenderer.h +++ b/Minecraft.Client/PigRenderer.h @@ -6,8 +6,8 @@ class PigRenderer : public MobRenderer public: PigRenderer(Model *model, Model *armor, float shadow); protected: - virtual int prepareArmor(shared_ptr<Mob> _pig, int layer, float a); + virtual int prepareArmor(std::shared_ptr<Mob> _pig, int layer, float a); public: - virtual void render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/PistonPieceRenderer.cpp b/Minecraft.Client/PistonPieceRenderer.cpp index 1ce084cf..b33df7b2 100644 --- a/Minecraft.Client/PistonPieceRenderer.cpp +++ b/Minecraft.Client/PistonPieceRenderer.cpp @@ -12,10 +12,10 @@ PistonPieceRenderer::PistonPieceRenderer() tileRenderer = NULL; } -void PistonPieceRenderer::render(shared_ptr<TileEntity> _entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void PistonPieceRenderer::render(std::shared_ptr<TileEntity> _entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<PistonPieceEntity> entity = dynamic_pointer_cast<PistonPieceEntity>(_entity); + std::shared_ptr<PistonPieceEntity> entity = dynamic_pointer_cast<PistonPieceEntity>(_entity); Tile *tile = Tile::tiles[entity->getId()]; if (tile != NULL && entity->getProgress(a) <= 1) // 4J - changed condition from < to <= as our chunk update is async to main thread and so we can have to render these with progress of 1 @@ -60,7 +60,7 @@ void PistonPieceRenderer::render(shared_ptr<TileEntity> _entity, double x, doubl } } - + void PistonPieceRenderer::onNewLevel(Level *level) { delete tileRenderer; diff --git a/Minecraft.Client/PistonPieceRenderer.h b/Minecraft.Client/PistonPieceRenderer.h index 830ddd43..7a2a3b7d 100644 --- a/Minecraft.Client/PistonPieceRenderer.h +++ b/Minecraft.Client/PistonPieceRenderer.h @@ -2,13 +2,13 @@ class PistonPieceEntity; class TileRenderer; -class PistonPieceRenderer : public TileEntityRenderer +class PistonPieceRenderer : public TileEntityRenderer { private: TileRenderer *tileRenderer; public: PistonPieceRenderer(); - virtual void render(shared_ptr<TileEntity> _entity, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + virtual void render(std::shared_ptr<TileEntity> _entity, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param virtual void onNewLevel(Level *level); }; diff --git a/Minecraft.Client/PlayerChunkMap.cpp b/Minecraft.Client/PlayerChunkMap.cpp index 1c7516cf..06bdcf73 100644 --- a/Minecraft.Client/PlayerChunkMap.cpp +++ b/Minecraft.Client/PlayerChunkMap.cpp @@ -44,12 +44,12 @@ void PlayerChunkMap::flagEntitiesToBeRemoved(unsigned int *flags, bool *flagToBe { for(AUTO_VAR(it,players.begin()); it != players.end(); it++) { - shared_ptr<ServerPlayer> serverPlayer = *it; + std::shared_ptr<ServerPlayer> serverPlayer = *it; serverPlayer->flagEntitiesToBeRemoved(flags, flagToBeRemoved); } } -void PlayerChunkMap::PlayerChunk::add(shared_ptr<ServerPlayer> player, bool sendPacket /*= true*/) +void PlayerChunkMap::PlayerChunk::add(std::shared_ptr<ServerPlayer> player, bool sendPacket /*= true*/) { //app.DebugPrintf("--- Adding player to chunk x=%d\tz=%d\n",x, z); if (find(players.begin(),players.end(),player) != players.end()) @@ -66,7 +66,7 @@ void PlayerChunkMap::PlayerChunk::add(shared_ptr<ServerPlayer> player, bool send player->seenChunks.insert(pos); // 4J Added the sendPacket check. See PlayerChunkMap::add for the usage - if( sendPacket ) player->connection->send( shared_ptr<ChunkVisibilityPacket>( new ChunkVisibilityPacket(pos.x, pos.z, true) ) ); + if( sendPacket ) player->connection->send( std::shared_ptr<ChunkVisibilityPacket>( new ChunkVisibilityPacket(pos.x, pos.z, true) ) ); players.push_back(player); @@ -77,7 +77,7 @@ void PlayerChunkMap::PlayerChunk::add(shared_ptr<ServerPlayer> player, bool send #endif } -void PlayerChunkMap::PlayerChunk::remove(shared_ptr<ServerPlayer> player) +void PlayerChunkMap::PlayerChunk::remove(std::shared_ptr<ServerPlayer> player) { PlayerChunkMap::PlayerChunk *toDelete = NULL; @@ -121,7 +121,7 @@ void PlayerChunkMap::PlayerChunk::remove(shared_ptr<ServerPlayer> player) { for( AUTO_VAR(it, players.begin()); it < players.end(); ++it ) { - shared_ptr<ServerPlayer> currPlayer = *it; + std::shared_ptr<ServerPlayer> currPlayer = *it; INetworkPlayer *currNetPlayer = currPlayer->connection->getNetworkPlayer(); if( currNetPlayer != NULL && currNetPlayer->IsSameSystem( thisNetPlayer ) && currPlayer->seenChunks.find(pos) != currPlayer->seenChunks.end() ) { @@ -132,7 +132,7 @@ void PlayerChunkMap::PlayerChunk::remove(shared_ptr<ServerPlayer> player) if(noOtherPlayersFound) { //wprintf(L"Sending ChunkVisiblity packet false for chunk (%d,%d) to player %ls\n", x, z, player->name.c_str() ); - player->connection->send( shared_ptr<ChunkVisibilityPacket>( new ChunkVisibilityPacket(pos.x, pos.z, false) ) ); + player->connection->send( std::shared_ptr<ChunkVisibilityPacket>( new ChunkVisibilityPacket(pos.x, pos.z, false) ) ); } } else @@ -181,12 +181,12 @@ void PlayerChunkMap::PlayerChunk::prioritiseTileChanges() prioritised = true; } -void PlayerChunkMap::PlayerChunk::broadcast(shared_ptr<Packet> packet) +void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr<Packet> packet) { - vector< shared_ptr<ServerPlayer> > sentTo; + vector< std::shared_ptr<ServerPlayer> > sentTo; for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> player = players[i]; + std::shared_ptr<ServerPlayer> player = players[i]; // 4J - don't send to a player we've already sent this data to that shares the same machine. TileUpdatePacket, // ChunkTilesUpdatePacket and SignUpdatePacket all used to limit themselves to sending once to each machine @@ -205,7 +205,7 @@ void PlayerChunkMap::PlayerChunk::broadcast(shared_ptr<Packet> packet) { for(unsigned int j = 0; j < sentTo.size(); j++ ) { - shared_ptr<ServerPlayer> player2 = sentTo[j]; + std::shared_ptr<ServerPlayer> player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { @@ -244,7 +244,7 @@ void PlayerChunkMap::PlayerChunk::broadcast(shared_ptr<Packet> packet) for( int i = 0; i < parent->level->getServer()->getPlayers()->players.size(); i++ ) { - shared_ptr<ServerPlayer> player = parent->level->getServer()->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = parent->level->getServer()->getPlayers()->players[i]; // Don't worry about local players, they get all their updates through sharing level with the server anyway if ( player->connection == NULL ) continue; if( player->connection->isLocal() ) continue; @@ -267,7 +267,7 @@ void PlayerChunkMap::PlayerChunk::broadcast(shared_ptr<Packet> packet) { for(unsigned int j = 0; j < sentTo.size(); j++ ) { - shared_ptr<ServerPlayer> player2 = sentTo[j]; + std::shared_ptr<ServerPlayer> player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { @@ -299,7 +299,7 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) int x = pos.x * 16 + xChangeMin; int y = yChangeMin; int z = pos.z * 16 + zChangeMin; - broadcast( shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); + broadcast( std::shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); if (level->isEntityTile(x, y, z)) { broadcast(level->getTileEntity(x, y, z)); @@ -329,8 +329,8 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) // Block region update packets can only encode ys in a range of 1 - 256 if( ys > 256 ) ys = 256; - broadcast( shared_ptr<BlockRegionUpdatePacket>( new BlockRegionUpdatePacket(xp, yp, zp, xs, ys, zs, level) ) ); - vector<shared_ptr<TileEntity> > *tes = level->getTileEntitiesInRegion(xp, yp, zp, xp + xs, yp + ys, zp + zs); + broadcast( std::shared_ptr<BlockRegionUpdatePacket>( new BlockRegionUpdatePacket(xp, yp, zp, xs, ys, zs, level) ) ); + vector<std::shared_ptr<TileEntity> > *tes = level->getTileEntitiesInRegion(xp, yp, zp, xp + xs, yp + ys, zp + zs); for (unsigned int i = 0; i < tes->size(); i++) { broadcast(tes->at(i)); @@ -342,7 +342,7 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) else { // 4J As we only get here if changes is less than MAX_CHANGES_BEFORE_RESEND (10) we only need to send a byte value in the packet - broadcast( shared_ptr<ChunkTilesUpdatePacket>( new ChunkTilesUpdatePacket(pos.x, pos.z, changedTiles, (byte)changes, level) ) ); + broadcast( std::shared_ptr<ChunkTilesUpdatePacket>( new ChunkTilesUpdatePacket(pos.x, pos.z, changedTiles, (byte)changes, level) ) ); for (int i = 0; i < changes; i++) { int x = pos.x * 16 + ((changedTiles[i] >> 12) & 15); @@ -361,11 +361,11 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) return didRegionUpdate; } -void PlayerChunkMap::PlayerChunk::broadcast(shared_ptr<TileEntity> te) +void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr<TileEntity> te) { if (te != NULL) { - shared_ptr<Packet> p = te->getUpdatePacket(); + std::shared_ptr<Packet> p = te->getUpdatePacket(); if (p != NULL) { broadcast(p); @@ -458,7 +458,7 @@ PlayerChunkMap::PlayerChunk *PlayerChunkMap::getChunk(int x, int z, bool create) // 4J - added. If a chunk exists, add a player to it straight away. If it doesn't exist, // queue a request for it to be created. -void PlayerChunkMap::getChunkAndAddPlayer(int x, int z, shared_ptr<ServerPlayer> player) +void PlayerChunkMap::getChunkAndAddPlayer(int x, int z, std::shared_ptr<ServerPlayer> player) { int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32); AUTO_VAR(it, chunks.find(id)); @@ -475,7 +475,7 @@ void PlayerChunkMap::getChunkAndAddPlayer(int x, int z, shared_ptr<ServerPlayer> // 4J - added. If the chunk and player are in the queue to be added, remove from there. Otherwise // attempt to remove from main chunk map. -void PlayerChunkMap::getChunkAndRemovePlayer(int x, int z, shared_ptr<ServerPlayer> player) +void PlayerChunkMap::getChunkAndRemovePlayer(int x, int z, std::shared_ptr<ServerPlayer> player) { for( AUTO_VAR(it, addRequests.begin()); it != addRequests.end(); it++ ) { @@ -497,7 +497,7 @@ void PlayerChunkMap::getChunkAndRemovePlayer(int x, int z, shared_ptr<ServerPlay } // 4J - added - actually create & add player to a playerchunk, if there is one queued for this player. -void PlayerChunkMap::tickAddRequests(shared_ptr<ServerPlayer> player) +void PlayerChunkMap::tickAddRequests(std::shared_ptr<ServerPlayer> player) { if( addRequests.size() ) { @@ -533,7 +533,7 @@ void PlayerChunkMap::tickAddRequests(shared_ptr<ServerPlayer> player) } } -void PlayerChunkMap::broadcastTileUpdate(shared_ptr<Packet> packet, int x, int y, int z) +void PlayerChunkMap::broadcastTileUpdate(std::shared_ptr<Packet> packet, int x, int y, int z) { int xc = x >> 4; int zc = z >> 4; @@ -576,7 +576,7 @@ void PlayerChunkMap::prioritiseTileChanges(int x, int y, int z) } } -void PlayerChunkMap::add(shared_ptr<ServerPlayer> player) +void PlayerChunkMap::add(std::shared_ptr<ServerPlayer> player) { static int direction[4][2] = { { 1, 0 }, { 0, 1 }, { -1, 0 }, {0, -1} }; @@ -649,7 +649,7 @@ void PlayerChunkMap::add(shared_ptr<ServerPlayer> player) } // CraftBukkit end - player->connection->send( shared_ptr<ChunkVisibilityAreaPacket>( new ChunkVisibilityAreaPacket(minX, maxX, minZ, maxZ) ) ); + player->connection->send( std::shared_ptr<ChunkVisibilityAreaPacket>( new ChunkVisibilityAreaPacket(minX, maxX, minZ, maxZ) ) ); #ifdef _LARGE_WORLDS getLevel()->cache->dontDrop(xc,zc); @@ -659,7 +659,7 @@ void PlayerChunkMap::add(shared_ptr<ServerPlayer> player) } -void PlayerChunkMap::remove(shared_ptr<ServerPlayer> player) +void PlayerChunkMap::remove(std::shared_ptr<ServerPlayer> player) { int xc = ((int) player->lastMoveX) >> 4; int zc = ((int) player->lastMoveZ) >> 4; @@ -702,7 +702,7 @@ bool PlayerChunkMap::chunkInRange(int x, int z, int xc, int zc) // 4J - have changed this so that we queue requests to add the player to chunks if they // need to be created, so that we aren't creating potentially 20 chunks per player per tick -void PlayerChunkMap::move(shared_ptr<ServerPlayer> player) +void PlayerChunkMap::move(std::shared_ptr<ServerPlayer> player) { int xc = ((int) player->x) >> 4; int zc = ((int) player->z) >> 4; @@ -744,7 +744,7 @@ int PlayerChunkMap::getMaxRange() return radius * 16 - 16; } -bool PlayerChunkMap::isPlayerIn(shared_ptr<ServerPlayer> player, int xChunk, int zChunk) +bool PlayerChunkMap::isPlayerIn(std::shared_ptr<ServerPlayer> player, int xChunk, int zChunk) { PlayerChunk *chunk = getChunk(xChunk, zChunk, false); @@ -775,7 +775,7 @@ void PlayerChunkMap::setRadius(int newRadius) PlayerList* players = level->getServer()->getPlayerList(); for( int i = 0;i < players->players.size();i += 1 ) { - shared_ptr<ServerPlayer> player = players->players[i]; + std::shared_ptr<ServerPlayer> player = players->players[i]; if( player->level == level ) { int xc = ((int) player->x) >> 4; diff --git a/Minecraft.Client/PlayerChunkMap.h b/Minecraft.Client/PlayerChunkMap.h index 08cda2a7..5e87934b 100644 --- a/Minecraft.Client/PlayerChunkMap.h +++ b/Minecraft.Client/PlayerChunkMap.h @@ -25,8 +25,8 @@ public: { public: int x,z; - shared_ptr<ServerPlayer> player; - PlayerChunkAddRequest(int x, int z, shared_ptr<ServerPlayer> player ) : x(x), z(z), player(player) {} + std::shared_ptr<ServerPlayer> player; + PlayerChunkAddRequest(int x, int z, std::shared_ptr<ServerPlayer> player ) : x(x), z(z), player(player) {} }; class PlayerChunk @@ -34,7 +34,7 @@ public: friend class PlayerChunkMap; private: PlayerChunkMap *parent; // 4J added - vector<shared_ptr<ServerPlayer> > players; + vector<std::shared_ptr<ServerPlayer> > players; //int x, z; ChunkPos pos; @@ -51,25 +51,25 @@ public: ~PlayerChunk(); // 4J Added sendPacket param so we can aggregate the initial send into one much smaller packet - void add(shared_ptr<ServerPlayer> player, bool sendPacket = true); - void remove(shared_ptr<ServerPlayer> player); + void add(std::shared_ptr<ServerPlayer> player, bool sendPacket = true); + void remove(std::shared_ptr<ServerPlayer> player); void tileChanged(int x, int y, int z); void prioritiseTileChanges(); // 4J added - void broadcast(shared_ptr<Packet> packet); + void broadcast(std::shared_ptr<Packet> packet); bool broadcastChanges(bool allowRegionUpdate); // 4J - added parm private: - void broadcast(shared_ptr<TileEntity> te); + void broadcast(std::shared_ptr<TileEntity> te); }; public: - vector<shared_ptr<ServerPlayer> > players; + vector<std::shared_ptr<ServerPlayer> > players; void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added private: unordered_map<int64_t,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap vector<PlayerChunk *> changedChunks; vector<PlayerChunkAddRequest> addRequests; // 4J added - void tickAddRequests(shared_ptr<ServerPlayer> player); // 4J added + void tickAddRequests(std::shared_ptr<ServerPlayer> player); // 4J added ServerLevel *level; int radius; @@ -83,21 +83,21 @@ public: bool hasChunk(int x, int z); private: PlayerChunk *getChunk(int x, int z, bool create); - void getChunkAndAddPlayer(int x, int z, shared_ptr<ServerPlayer> player); // 4J added - void getChunkAndRemovePlayer(int x, int z, shared_ptr<ServerPlayer> player); // 4J added + void getChunkAndAddPlayer(int x, int z, std::shared_ptr<ServerPlayer> player); // 4J added + void getChunkAndRemovePlayer(int x, int z, std::shared_ptr<ServerPlayer> player); // 4J added public: - void broadcastTileUpdate(shared_ptr<Packet> packet, int x, int y, int z); + void broadcastTileUpdate(std::shared_ptr<Packet> packet, int x, int y, int z); void tileChanged(int x, int y, int z); bool isTrackingTile(int x, int y, int z); // 4J added void prioritiseTileChanges(int x, int y, int z); // 4J added - void add(shared_ptr<ServerPlayer> player); - void remove(shared_ptr<ServerPlayer> player); + void add(std::shared_ptr<ServerPlayer> player); + void remove(std::shared_ptr<ServerPlayer> player); private: bool chunkInRange(int x, int z, int xc, int zc); public: - void move(shared_ptr<ServerPlayer> player); + void move(std::shared_ptr<ServerPlayer> player); int getMaxRange(); - bool isPlayerIn(shared_ptr<ServerPlayer> player, int xChunk, int zChunk); + bool isPlayerIn(std::shared_ptr<ServerPlayer> player, int xChunk, int zChunk); static int convertChunkRangeToBlock(int radius); // AP added for Vita diff --git a/Minecraft.Client/PlayerCloudParticle.cpp b/Minecraft.Client/PlayerCloudParticle.cpp index 6976fbab..ca7e9d90 100644 --- a/Minecraft.Client/PlayerCloudParticle.cpp +++ b/Minecraft.Client/PlayerCloudParticle.cpp @@ -49,7 +49,7 @@ void PlayerCloudParticle::tick() xd *= 0.96f; yd *= 0.96f; zd *= 0.96f; - shared_ptr<Player> p = level->getNearestPlayer(shared_from_this(), 2); + std::shared_ptr<Player> p = level->getNearestPlayer(shared_from_this(), 2); if (p != NULL) { if (y > p->bb->y0) diff --git a/Minecraft.Client/PlayerConnection.cpp b/Minecraft.Client/PlayerConnection.cpp index f0e538a8..393ae105 100644 --- a/Minecraft.Client/PlayerConnection.cpp +++ b/Minecraft.Client/PlayerConnection.cpp @@ -34,7 +34,7 @@ Random PlayerConnection::random; -PlayerConnection::PlayerConnection(MinecraftServer *server, Connection *connection, shared_ptr<ServerPlayer> player) +PlayerConnection::PlayerConnection(MinecraftServer *server, Connection *connection, std::shared_ptr<ServerPlayer> player) { // 4J - added initialisers done = false; @@ -93,12 +93,12 @@ void PlayerConnection::tick() lastKeepAliveTick = tickCount; lastKeepAliveTime = System::nanoTime() / 1000000; lastKeepAliveId = random.nextInt(); - send( shared_ptr<KeepAlivePacket>( new KeepAlivePacket(lastKeepAliveId) ) ); + send( std::shared_ptr<KeepAlivePacket>( new KeepAlivePacket(lastKeepAliveId) ) ); } // if (!didTick) { // player->doTick(false); // } - + if (chatSpamTickCount > 0) { chatSpamTickCount--; @@ -123,30 +123,30 @@ void PlayerConnection::disconnect(DisconnectPacket::eDisconnectReason reason) // 4J Stu - Need to remove the player from the receiving list before their socket is NULLed so that we can find another player on their system server->getPlayers()->removePlayerFromReceiving( player ); - send( shared_ptr<DisconnectPacket>( new DisconnectPacket(reason) )); + send( std::shared_ptr<DisconnectPacket>( new DisconnectPacket(reason) )); connection->sendAndQuit(); // 4J-PB - removed, since it needs to be localised in the language the client is in - //server->players->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(L"§e" + player->name + L" left the game.") ) ); + //server->players->broadcastAll( std::shared_ptr<ChatPacket>( new ChatPacket(L"�e" + player->name + L" left the game.") ) ); if(getWasKicked()) { - server->getPlayers()->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); + server->getPlayers()->broadcastAll( std::shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); } else { - server->getPlayers()->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); + server->getPlayers()->broadcastAll( std::shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); } - + server->getPlayers()->remove(player); done = true; LeaveCriticalSection(&done_cs); } -void PlayerConnection::handlePlayerInput(shared_ptr<PlayerInputPacket> packet) +void PlayerConnection::handlePlayerInput(std::shared_ptr<PlayerInputPacket> packet) { player->setPlayerInput(packet->getXa(), packet->getYa(), packet->isJumping(), packet->isSneaking(), packet->getXRot(), packet->getYRot()); } -void PlayerConnection::handleMovePlayer(shared_ptr<MovePlayerPacket> packet) +void PlayerConnection::handleMovePlayer(std::shared_ptr<MovePlayerPacket> packet) { ServerLevel *level = server->getLevel(player->dimension); @@ -391,10 +391,10 @@ void PlayerConnection::teleport(double x, double y, double z, float yRot, float player->absMoveTo(x, y, z, yRot, xRot); // 4J - note that 1.62 is added to the height here as the client connection that receives this will presume it represents y + heightOffset at that end // This is different to the way that height is sent back to the server, where it represents the bottom of the player bounding volume - if(sendPacket) player->connection->send( shared_ptr<MovePlayerPacket>( new MovePlayerPacket::PosRot(x, y + 1.62f, y, z, yRot, xRot, false, false) ) ); + if(sendPacket) player->connection->send( std::shared_ptr<MovePlayerPacket>( new MovePlayerPacket::PosRot(x, y + 1.62f, y, z, yRot, xRot, false, false) ) ); } -void PlayerConnection::handlePlayerAction(shared_ptr<PlayerActionPacket> packet) +void PlayerConnection::handlePlayerAction(std::shared_ptr<PlayerActionPacket> packet) { ServerLevel *level = server->getLevel(player->dimension); @@ -442,19 +442,19 @@ void PlayerConnection::handlePlayerAction(shared_ptr<PlayerActionPacket> packet) if (packet->action == PlayerActionPacket::START_DESTROY_BLOCK) { if (zd > 16 || canEditSpawn) player->gameMode->startDestroyBlock(x, y, z, packet->face); - else player->connection->send( shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); + else player->connection->send( std::shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); } else if (packet->action == PlayerActionPacket::STOP_DESTROY_BLOCK) { player->gameMode->stopDestroyBlock(x, y, z); server->getPlayers()->prioritiseTileChanges(x, y, z, level->dimension->id); // 4J added - make sure that the update packets for this get prioritised over other general world updates - if (level->getTile(x, y, z) != 0) player->connection->send( shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); + if (level->getTile(x, y, z) != 0) player->connection->send( std::shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); } else if (packet->action == PlayerActionPacket::ABORT_DESTROY_BLOCK) { player->gameMode->abortDestroyBlock(x, y, z); - if (level->getTile(x, y, z) != 0) player->connection->send(shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level))); + if (level->getTile(x, y, z) != 0) player->connection->send(std::shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level))); } else if (packet->action == PlayerActionPacket::GET_UPDATED_BLOCK) { @@ -464,7 +464,7 @@ void PlayerConnection::handlePlayerAction(shared_ptr<PlayerActionPacket> packet) double dist = xDist * xDist + yDist * yDist + zDist * zDist; if (dist < 16 * 16) { - player->connection->send( shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); + player->connection->send( std::shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); } } @@ -473,16 +473,16 @@ void PlayerConnection::handlePlayerAction(shared_ptr<PlayerActionPacket> packet) } -void PlayerConnection::handleUseItem(shared_ptr<UseItemPacket> packet) +void PlayerConnection::handleUseItem(std::shared_ptr<UseItemPacket> packet) { ServerLevel *level = server->getLevel(player->dimension); - shared_ptr<ItemInstance> item = player->inventory->getSelected(); + std::shared_ptr<ItemInstance> item = player->inventory->getSelected(); bool informClient = false; int x = packet->getX(); int y = packet->getY(); int z = packet->getZ(); int face = packet->getFace(); - + // 4J Stu - We don't have ops, so just use the levels setting bool canEditSpawn = level->canEditSpawn; // = level->dimension->id != 0 || server->players->isOp(player->name); if (packet->getFace() == 255) @@ -509,14 +509,14 @@ void PlayerConnection::handleUseItem(shared_ptr<UseItemPacket> packet) } else { - //player->connection->send(shared_ptr<ChatPacket>(new ChatPacket("\u00A77Height limit for building is " + server->maxBuildHeight))); + //player->connection->send(std::shared_ptr<ChatPacket>(new ChatPacket("\u00A77Height limit for building is " + server->maxBuildHeight))); informClient = true; } if (informClient) { - player->connection->send( shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); + player->connection->send( std::shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); if (face == 0) y--; if (face == 1) y++; @@ -524,7 +524,7 @@ void PlayerConnection::handleUseItem(shared_ptr<UseItemPacket> packet) if (face == 3) z++; if (face == 4) x--; if (face == 5) x++; - + // 4J - Fixes an issue where pistons briefly disappear when retracting. The pistons themselves shouldn't have their change from being pistonBase_Id to pistonMovingPiece_Id // directly sent to the client, as this will happen on the client as a result of it actioning (via a tile event) the retraction of the piston locally. However, by putting a switch // beside a piston and then performing an action on the side of it facing a piston, the following line of code will send a TileUpdatePacket containing the change to pistonMovingPiece_Id @@ -532,7 +532,7 @@ void PlayerConnection::handleUseItem(shared_ptr<UseItemPacket> packet) // isn't what it is expecting. if( level->getTile(x,y,z) != Tile::pistonMovingPiece_Id ) { - player->connection->send( shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); + player->connection->send( std::shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ) ); } } @@ -554,7 +554,7 @@ void PlayerConnection::handleUseItem(shared_ptr<UseItemPacket> packet) if (!ItemInstance::matches(player->inventory->getSelected(), packet->getItem())) { - send( shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(player->containerMenu->containerId, s->index, player->inventory->getSelected()) ) ); + send( std::shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(player->containerMenu->containerId, s->index, player->inventory->getSelected()) ) ); } } @@ -569,27 +569,27 @@ void PlayerConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason, if( done ) return; // logger.info(player.name + " lost connection: " + reason); // 4J-PB - removed, since it needs to be localised in the language the client is in - //server->players->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(L"§e" + player->name + L" left the game.") ) ); + //server->players->broadcastAll( std::shared_ptr<ChatPacket>( new ChatPacket(L"�e" + player->name + L" left the game.") ) ); if(getWasKicked()) { - server->getPlayers()->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); + server->getPlayers()->broadcastAll( std::shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); } else { - server->getPlayers()->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); + server->getPlayers()->broadcastAll( std::shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); } server->getPlayers()->remove(player); done = true; LeaveCriticalSection(&done_cs); } -void PlayerConnection::onUnhandledPacket(shared_ptr<Packet> packet) +void PlayerConnection::onUnhandledPacket(std::shared_ptr<Packet> packet) { // logger.warning(getClass() + " wasn't prepared to deal with a " + packet.getClass()); disconnect(DisconnectPacket::eDisconnect_UnexpectedPacket); } -void PlayerConnection::send(shared_ptr<Packet> packet) +void PlayerConnection::send(std::shared_ptr<Packet> packet) { if( connection->getSocket() != NULL ) { @@ -607,7 +607,7 @@ void PlayerConnection::send(shared_ptr<Packet> packet) } // 4J Added -void PlayerConnection::queueSend(shared_ptr<Packet> packet) +void PlayerConnection::queueSend(std::shared_ptr<Packet> packet) { if( connection->getSocket() != NULL ) { @@ -624,7 +624,7 @@ void PlayerConnection::queueSend(shared_ptr<Packet> packet) } } -void PlayerConnection::handleSetCarriedItem(shared_ptr<SetCarriedItemPacket> packet) +void PlayerConnection::handleSetCarriedItem(std::shared_ptr<SetCarriedItemPacket> packet) { if (packet->slot < 0 || packet->slot >= Inventory::getSelectionSize()) { @@ -634,7 +634,7 @@ void PlayerConnection::handleSetCarriedItem(shared_ptr<SetCarriedItemPacket> pac player->inventory->selected = packet->slot; } -void PlayerConnection::handleChat(shared_ptr<ChatPacket> packet) +void PlayerConnection::handleChat(std::shared_ptr<ChatPacket> packet) { // 4J - TODO #if 0 @@ -678,7 +678,7 @@ void PlayerConnection::handleCommand(const wstring& message) #endif } -void PlayerConnection::handleAnimate(shared_ptr<AnimatePacket> packet) +void PlayerConnection::handleAnimate(std::shared_ptr<AnimatePacket> packet) { if (packet->action == AnimatePacket::SWING) { @@ -686,7 +686,7 @@ void PlayerConnection::handleAnimate(shared_ptr<AnimatePacket> packet) } } -void PlayerConnection::handlePlayerCommand(shared_ptr<PlayerCommandPacket> packet) +void PlayerConnection::handlePlayerCommand(std::shared_ptr<PlayerCommandPacket> packet) { if (packet->action == PlayerCommandPacket::START_SNEAKING) { @@ -725,7 +725,7 @@ void PlayerConnection::setShowOnMaps(bool bVal) player->setShowOnMaps(bVal); } -void PlayerConnection::handleDisconnect(shared_ptr<DisconnectPacket> packet) +void PlayerConnection::handleDisconnect(std::shared_ptr<DisconnectPacket> packet) { // 4J Stu - Need to remove the player from the receiving list before their socket is NULLed so that we can find another player on their system server->getPlayers()->removePlayerFromReceiving( player ); @@ -740,13 +740,13 @@ int PlayerConnection::countDelayedPackets() void PlayerConnection::info(const wstring& string) { // 4J-PB - removed, since it needs to be localised in the language the client is in - //send( shared_ptr<ChatPacket>( new ChatPacket(L"§7" + string) ) ); + //send( std::shared_ptr<ChatPacket>( new ChatPacket(L"�7" + string) ) ); } void PlayerConnection::warn(const wstring& string) { // 4J-PB - removed, since it needs to be localised in the language the client is in - //send( shared_ptr<ChatPacket>( new ChatPacket(L"§9" + string) ) ); + //send( std::shared_ptr<ChatPacket>( new ChatPacket(L"�9" + string) ) ); } wstring PlayerConnection::getConsoleName() @@ -754,10 +754,10 @@ wstring PlayerConnection::getConsoleName() return player->name; } -void PlayerConnection::handleInteract(shared_ptr<InteractPacket> packet) +void PlayerConnection::handleInteract(std::shared_ptr<InteractPacket> packet) { ServerLevel *level = server->getLevel(player->dimension); - shared_ptr<Entity> target = level->getEntity(packet->target); + std::shared_ptr<Entity> target = level->getEntity(packet->target); // Fix for #8218 - Gameplay: Attacking zombies from a different level often results in no hits being registered // 4J Stu - If the client says that we hit something, then agree with it. The canSee can fail here as it checks @@ -792,7 +792,7 @@ bool PlayerConnection::canHandleAsyncPackets() return true; } -void PlayerConnection::handleTexture(shared_ptr<TexturePacket> packet) +void PlayerConnection::handleTexture(std::shared_ptr<TexturePacket> packet) { // Both PlayerConnection and ClientConnection should handle this mostly the same way @@ -803,12 +803,12 @@ void PlayerConnection::handleTexture(shared_ptr<TexturePacket> packet) wprintf(L"Server received request for custom texture %ls\n",packet->textureName.c_str()); #endif PBYTE pbData=NULL; - DWORD dwBytes=0; + DWORD dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); if(dwBytes!=0) { - send( shared_ptr<TexturePacket>( new TexturePacket(packet->textureName,pbData,dwBytes) ) ); + send( std::shared_ptr<TexturePacket>( new TexturePacket(packet->textureName,pbData,dwBytes) ) ); } else { @@ -826,7 +826,7 @@ void PlayerConnection::handleTexture(shared_ptr<TexturePacket> packet) } } -void PlayerConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPacket> packet) +void PlayerConnection::handleTextureAndGeometry(std::shared_ptr<TextureAndGeometryPacket> packet) { // Both PlayerConnection and ClientConnection should handle this mostly the same way @@ -837,7 +837,7 @@ void PlayerConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPac wprintf(L"Server received request for custom texture %ls\n",packet->textureName.c_str()); #endif PBYTE pbData=NULL; - DWORD dwTextureBytes=0; + DWORD dwTextureBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwTextureBytes); DLCSkinFile *pDLCSkinFile = app.m_dlcManager.getSkinFile(packet->textureName); @@ -848,11 +848,11 @@ void PlayerConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPac { if(pDLCSkinFile->getAdditionalBoxesCount()!=0) { - send( shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pDLCSkinFile) ) ); + send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pDLCSkinFile) ) ); } else { - send( shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes) ) ); + send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes) ) ); } } else @@ -861,7 +861,7 @@ void PlayerConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPac vector<SKIN_BOX *> *pvSkinBoxes = app.GetAdditionalSkinBoxes(packet->dwSkinID); unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(packet->dwSkinID); - send( shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pvSkinBoxes,uiAnimOverrideBitmask) ) ); + send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pvSkinBoxes,uiAnimOverrideBitmask) ) ); } } else @@ -901,12 +901,12 @@ void PlayerConnection::handleTextureReceived(const wstring &textureName) if( it != m_texturesRequested.end() ) { PBYTE pbData=NULL; - DWORD dwBytes=0; + DWORD dwBytes=0; app.GetMemFileDetails(textureName,&pbData,&dwBytes); if(dwBytes!=0) { - send( shared_ptr<TexturePacket>( new TexturePacket(textureName,pbData,dwBytes) ) ); + send( std::shared_ptr<TexturePacket>( new TexturePacket(textureName,pbData,dwBytes) ) ); m_texturesRequested.erase(it); } } @@ -919,7 +919,7 @@ void PlayerConnection::handleTextureAndGeometryReceived(const wstring &textureNa if( it != m_texturesRequested.end() ) { PBYTE pbData=NULL; - DWORD dwTextureBytes=0; + DWORD dwTextureBytes=0; app.GetMemFileDetails(textureName,&pbData,&dwTextureBytes); DLCSkinFile *pDLCSkinFile=app.m_dlcManager.getSkinFile(textureName); @@ -927,7 +927,7 @@ void PlayerConnection::handleTextureAndGeometryReceived(const wstring &textureNa { if(pDLCSkinFile && (pDLCSkinFile->getAdditionalBoxesCount()!=0)) { - send( shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes,pDLCSkinFile) ) ); + send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes,pDLCSkinFile) ) ); } else { @@ -936,14 +936,14 @@ void PlayerConnection::handleTextureAndGeometryReceived(const wstring &textureNa vector<SKIN_BOX *> *pvSkinBoxes = app.GetAdditionalSkinBoxes(dwSkinID); unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(dwSkinID); - send( shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes, pvSkinBoxes, uiAnimOverrideBitmask) ) ); + send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes, pvSkinBoxes, uiAnimOverrideBitmask) ) ); } - m_texturesRequested.erase(it); + m_texturesRequested.erase(it); } } } -void PlayerConnection::handleTextureChange(shared_ptr<TextureChangePacket> packet) +void PlayerConnection::handleTextureChange(std::shared_ptr<TextureChangePacket> packet) { switch(packet->action) { @@ -968,26 +968,26 @@ void PlayerConnection::handleTextureChange(shared_ptr<TextureChangePacket> packe #ifndef _CONTENT_PACKAGE wprintf(L"Sending texture packet to get custom skin %ls from player %ls\n",packet->path.c_str(), player->name.c_str()); #endif - send(shared_ptr<TexturePacket>( new TexturePacket(packet->path,NULL,0) ) ); + send(std::shared_ptr<TexturePacket>( new TexturePacket(packet->path,NULL,0) ) ); } } else if(!packet->path.empty() && app.IsFileInMemoryTextures(packet->path)) - { + { // Update the ref count on the memory texture data app.AddMemoryTextureFile(packet->path,NULL,0); } - server->getPlayers()->broadcastAll( shared_ptr<TextureChangePacket>( new TextureChangePacket(player,packet->action,packet->path) ), player->dimension ); + server->getPlayers()->broadcastAll( std::shared_ptr<TextureChangePacket>( new TextureChangePacket(player,packet->action,packet->path) ), player->dimension ); } -void PlayerConnection::handleTextureAndGeometryChange(shared_ptr<TextureAndGeometryChangePacket> packet) +void PlayerConnection::handleTextureAndGeometryChange(std::shared_ptr<TextureAndGeometryChangePacket> packet) { player->setCustomSkin( app.getSkinIdFromPath( packet->path ) ); #ifndef _CONTENT_PACKAGE wprintf(L"PlayerConnection::handleTextureAndGeometryChange - Skin for server player %ls has changed to %ls (%d)\n", player->name.c_str(), player->customTextureUrl.c_str(), player->getPlayerDefaultSkin() ); #endif - - + + if(!packet->path.empty() && packet->path.substr(0,3).compare(L"def") != 0 && !app.IsFileInMemoryTextures(packet->path)) { if( server->connection->addPendingTextureRequest(packet->path)) @@ -995,11 +995,11 @@ void PlayerConnection::handleTextureAndGeometryChange(shared_ptr<TextureAndGeome #ifndef _CONTENT_PACKAGE wprintf(L"Sending texture packet to get custom skin %ls from player %ls\n",packet->path.c_str(), player->name.c_str()); #endif - send(shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->path,NULL,0) ) ); + send(std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->path,NULL,0) ) ); } } else if(!packet->path.empty() && app.IsFileInMemoryTextures(packet->path)) - { + { // Update the ref count on the memory texture data app.AddMemoryTextureFile(packet->path,NULL,0); @@ -1009,10 +1009,10 @@ void PlayerConnection::handleTextureAndGeometryChange(shared_ptr<TextureAndGeome //app.SetAdditionalSkinBoxes(packet->dwSkinID,) //DebugBreak(); } - server->getPlayers()->broadcastAll( shared_ptr<TextureAndGeometryChangePacket>( new TextureAndGeometryChangePacket(player,packet->path) ), player->dimension ); + server->getPlayers()->broadcastAll( std::shared_ptr<TextureAndGeometryChangePacket>( new TextureAndGeometryChangePacket(player,packet->path) ), player->dimension ); } -void PlayerConnection::handleServerSettingsChanged(shared_ptr<ServerSettingsChangedPacket> packet) +void PlayerConnection::handleServerSettingsChanged(std::shared_ptr<ServerSettingsChangedPacket> packet) { if(packet->action==ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS) { @@ -1024,7 +1024,7 @@ void PlayerConnection::handleServerSettingsChanged(shared_ptr<ServerSettingsChan app.SetGameHostOption(eGameHostOption_FireSpreads, app.GetGameHostOption(packet->data,eGameHostOption_FireSpreads)); app.SetGameHostOption(eGameHostOption_TNT, app.GetGameHostOption(packet->data,eGameHostOption_TNT)); - server->getPlayers()->broadcastAll( shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS,app.GetGameHostOption(eGameHostOption_All) ) ) ); + server->getPlayers()->broadcastAll( std::shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS,app.GetGameHostOption(eGameHostOption_All) ) ) ); // Update the QoS data g_NetworkManager.UpdateAndSetGameSessionData(); @@ -1032,21 +1032,21 @@ void PlayerConnection::handleServerSettingsChanged(shared_ptr<ServerSettingsChan } } -void PlayerConnection::handleKickPlayer(shared_ptr<KickPlayerPacket> packet) +void PlayerConnection::handleKickPlayer(std::shared_ptr<KickPlayerPacket> packet) { INetworkPlayer *networkPlayer = getNetworkPlayer(); if( (networkPlayer != NULL && networkPlayer->IsHost()) || player->isModerator()) - { + { server->getPlayers()->kickPlayerByShortId(packet->m_networkSmallId); } } -void PlayerConnection::handleGameCommand(shared_ptr<GameCommandPacket> packet) +void PlayerConnection::handleGameCommand(std::shared_ptr<GameCommandPacket> packet) { MinecraftServer::getInstance()->getCommandDispatcher()->performCommand(player, packet->command, packet->data); } -void PlayerConnection::handleClientCommand(shared_ptr<ClientCommandPacket> packet) +void PlayerConnection::handleClientCommand(std::shared_ptr<ClientCommandPacket> packet) { if (packet->action == ClientCommandPacket::PERFORM_RESPAWN) { @@ -1078,17 +1078,17 @@ void PlayerConnection::handleClientCommand(shared_ptr<ClientCommandPacket> packe } } -void PlayerConnection::handleRespawn(shared_ptr<RespawnPacket> packet) +void PlayerConnection::handleRespawn(std::shared_ptr<RespawnPacket> packet) { } -void PlayerConnection::handleContainerClose(shared_ptr<ContainerClosePacket> packet) +void PlayerConnection::handleContainerClose(std::shared_ptr<ContainerClosePacket> packet) { player->doCloseContainer(); } -#ifndef _CONTENT_PACKAGE -void PlayerConnection::handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> packet) +#ifndef _CONTENT_PACKAGE +void PlayerConnection::handleContainerSetSlot(std::shared_ptr<ContainerSetSlotPacket> packet) { if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_CARRIED ) { @@ -1098,7 +1098,7 @@ void PlayerConnection::handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> { if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_INVENTORY && packet->slot >= 36 && packet->slot < 36 + 9) { - shared_ptr<ItemInstance> lastItem = player->inventoryMenu->getSlot(packet->slot)->getItem(); + std::shared_ptr<ItemInstance> lastItem = player->inventoryMenu->getSlot(packet->slot)->getItem(); if (packet->item != NULL) { if (lastItem == NULL || lastItem->count < packet->item->count) @@ -1124,16 +1124,16 @@ void PlayerConnection::handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> } #endif -void PlayerConnection::handleContainerClick(shared_ptr<ContainerClickPacket> packet) +void PlayerConnection::handleContainerClick(std::shared_ptr<ContainerClickPacket> packet) { if (player->containerMenu->containerId == packet->containerId && player->containerMenu->isSynched(player)) { - shared_ptr<ItemInstance> clicked = player->containerMenu->clicked(packet->slotNum, packet->buttonNum, packet->quickKey?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, player); + std::shared_ptr<ItemInstance> clicked = player->containerMenu->clicked(packet->slotNum, packet->buttonNum, packet->quickKey?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, player); if (ItemInstance::matches(packet->item, clicked)) { // Yep, you sure did click what you claimed to click! - player->connection->send( shared_ptr<ContainerAckPacket>( new ContainerAckPacket(packet->containerId, packet->uid, true) ) ); + player->connection->send( std::shared_ptr<ContainerAckPacket>( new ContainerAckPacket(packet->containerId, packet->uid, true) ) ); player->ignoreSlotUpdateHack = true; player->containerMenu->broadcastChanges(); player->broadcastCarriedItem(); @@ -1143,10 +1143,10 @@ void PlayerConnection::handleContainerClick(shared_ptr<ContainerClickPacket> pac { // No, you clicked the wrong thing! expectedAcks[player->containerMenu->containerId] = packet->uid; - player->connection->send( shared_ptr<ContainerAckPacket>( new ContainerAckPacket(packet->containerId, packet->uid, false) ) ); + player->connection->send( std::shared_ptr<ContainerAckPacket>( new ContainerAckPacket(packet->containerId, packet->uid, false) ) ); player->containerMenu->setSynched(player, false); - vector<shared_ptr<ItemInstance> > items; + vector<std::shared_ptr<ItemInstance> > items; for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++) { items.push_back(player->containerMenu->slots->at(i)->getItem()); @@ -1159,7 +1159,7 @@ void PlayerConnection::handleContainerClick(shared_ptr<ContainerClickPacket> pac } -void PlayerConnection::handleContainerButtonClick(shared_ptr<ContainerButtonClickPacket> packet) +void PlayerConnection::handleContainerButtonClick(std::shared_ptr<ContainerButtonClickPacket> packet) { if (player->containerMenu->containerId == packet->containerId && player->containerMenu->isSynched(player)) { @@ -1168,12 +1168,12 @@ void PlayerConnection::handleContainerButtonClick(shared_ptr<ContainerButtonClic } } -void PlayerConnection::handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotPacket> packet) +void PlayerConnection::handleSetCreativeModeSlot(std::shared_ptr<SetCreativeModeSlotPacket> packet) { if (player->gameMode->isCreative()) { bool drop = packet->slotNum < 0; - shared_ptr<ItemInstance> item = packet->item; + std::shared_ptr<ItemInstance> item = packet->item; if(item != NULL && item->id == Item::map_Id) { @@ -1187,9 +1187,9 @@ void PlayerConnection::handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotP int centreXC = 0; int centreZC = 0; #endif - item->setAuxValue( player->level->getAuxValueForMap(player->getXuid(), player->dimension, centreXC, centreZC, mapScale) ); + item->setAuxValue( player->level->getAuxValueForMap(player->getXuid(), player->dimension, centreXC, centreZC, mapScale) ); - shared_ptr<MapItemSavedData> data = MapItem::getSavedData(item->getAuxValue(), player->level); + std::shared_ptr<MapItemSavedData> data = MapItem::getSavedData(item->getAuxValue(), player->level); // 4J Stu - We only have one map per player per dimension, so don't reset the one that they have // when a new one is created wchar_t buf[64]; @@ -1197,9 +1197,9 @@ void PlayerConnection::handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotP std::wstring id = wstring(buf); if( data == NULL ) { - data = shared_ptr<MapItemSavedData>( new MapItemSavedData(id) ); + data = std::shared_ptr<MapItemSavedData>( new MapItemSavedData(id) ); } - player->level->setSavedData(id, (shared_ptr<SavedData> ) data); + player->level->setSavedData(id, (std::shared_ptr<SavedData> ) data); data->scale = mapScale; // 4J-PB - for Xbox maps, we'll centre them on the origin of the world, since we can fit the whole world in our map @@ -1232,7 +1232,7 @@ void PlayerConnection::handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotP { dropSpamTickCount += SharedConstants::TICKS_PER_SECOND; // drop item - shared_ptr<ItemEntity> dropped = player->drop(item); + std::shared_ptr<ItemEntity> dropped = player->drop(item); if (dropped != NULL) { dropped->setShortLifeTime(); @@ -1244,7 +1244,7 @@ void PlayerConnection::handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotP { // 4J Stu - Maps need to have their aux value update, so the client should always be assumed to be wrong // This is how the Java works, as the client also incorrectly predicts the auxvalue of the mapItem - vector<shared_ptr<ItemInstance> > items; + vector<std::shared_ptr<ItemInstance> > items; for (unsigned int i = 0; i < player->inventoryMenu->slots->size(); i++) { items.push_back(player->inventoryMenu->slots->at(i)->getItem()); @@ -1254,7 +1254,7 @@ void PlayerConnection::handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotP } } -void PlayerConnection::handleContainerAck(shared_ptr<ContainerAckPacket> packet) +void PlayerConnection::handleContainerAck(std::shared_ptr<ContainerAckPacket> packet) { AUTO_VAR(it, expectedAcks.find(player->containerMenu->containerId)); @@ -1264,18 +1264,18 @@ void PlayerConnection::handleContainerAck(shared_ptr<ContainerAckPacket> packet) } } -void PlayerConnection::handleSignUpdate(shared_ptr<SignUpdatePacket> packet) +void PlayerConnection::handleSignUpdate(std::shared_ptr<SignUpdatePacket> packet) { app.DebugPrintf("PlayerConnection::handleSignUpdate\n"); ServerLevel *level = server->getLevel(player->dimension); if (level->hasChunkAt(packet->x, packet->y, packet->z)) { - shared_ptr<TileEntity> te = level->getTileEntity(packet->x, packet->y, packet->z); + std::shared_ptr<TileEntity> te = level->getTileEntity(packet->x, packet->y, packet->z); if (dynamic_pointer_cast<SignTileEntity>(te) != NULL) { - shared_ptr<SignTileEntity> ste = dynamic_pointer_cast<SignTileEntity>(te); + std::shared_ptr<SignTileEntity> ste = dynamic_pointer_cast<SignTileEntity>(te); if (!ste->isEditable()) { server->warn(L"Player " + player->name + L" just tried to change non-editable sign"); @@ -1289,7 +1289,7 @@ void PlayerConnection::handleSignUpdate(shared_ptr<SignUpdatePacket> packet) int x = packet->x; int y = packet->y; int z = packet->z; - shared_ptr<SignTileEntity> ste = dynamic_pointer_cast<SignTileEntity>(te); + std::shared_ptr<SignTileEntity> ste = dynamic_pointer_cast<SignTileEntity>(te); for (int i = 0; i < 4; i++) { wstring lineText = packet->lines[i].substr(0,15); @@ -1303,7 +1303,7 @@ void PlayerConnection::handleSignUpdate(shared_ptr<SignUpdatePacket> packet) } -void PlayerConnection::handleKeepAlive(shared_ptr<KeepAlivePacket> packet) +void PlayerConnection::handleKeepAlive(std::shared_ptr<KeepAlivePacket> packet) { if (packet->id == lastKeepAliveId) { @@ -1312,18 +1312,18 @@ void PlayerConnection::handleKeepAlive(shared_ptr<KeepAlivePacket> packet) } } -void PlayerConnection::handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet) -{ +void PlayerConnection::handlePlayerInfo(std::shared_ptr<PlayerInfoPacket> packet) +{ // Need to check that this player has permission to change each individual setting? INetworkPlayer *networkPlayer = getNetworkPlayer(); if( (networkPlayer != NULL && networkPlayer->IsHost()) || player->isModerator() ) { - shared_ptr<ServerPlayer> serverPlayer; + std::shared_ptr<ServerPlayer> serverPlayer; // Find the player being edited for(AUTO_VAR(it, server->getPlayers()->players.begin()); it != server->getPlayers()->players.end(); ++it) { - shared_ptr<ServerPlayer> checkingPlayer = *it; + std::shared_ptr<ServerPlayer> checkingPlayer = *it; if(checkingPlayer->connection->getNetworkPlayer() != NULL && checkingPlayer->connection->getNetworkPlayer()->GetSmallId() == packet->m_networkSmallId) { serverPlayer = checkingPlayer; @@ -1348,7 +1348,7 @@ void PlayerConnection::handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet) #endif serverPlayer->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_CreativeMode,Player::getPlayerGamePrivilege(packet->m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode) ); serverPlayer->gameMode->setGameModeForPlayer(gameType); - serverPlayer->connection->send( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::CHANGE_GAME_MODE, gameType->getId()) )); + serverPlayer->connection->send( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::CHANGE_GAME_MODE, gameType->getId()) )); } else { @@ -1376,7 +1376,7 @@ void PlayerConnection::handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet) } else { - // Editing someone else + // Editing someone else if(!trustPlayers && !serverPlayer->connection->getNetworkPlayer()->IsHost()) { serverPlayer->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_CannotMine,Player::getPlayerGamePrivilege(packet->m_playerPrivileges,Player::ePlayerGamePrivilege_CannotMine) ); @@ -1400,7 +1400,7 @@ void PlayerConnection::handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet) } } - server->getPlayers()->broadcastAll( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( serverPlayer ) ) ); + server->getPlayers()->broadcastAll( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( serverPlayer ) ) ); } } } @@ -1410,7 +1410,7 @@ bool PlayerConnection::isServerPacketListener() return true; } -void PlayerConnection::handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket) +void PlayerConnection::handlePlayerAbilities(std::shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket) { player->abilities.flying = playerAbilitiesPacket->isFlying() && player->abilities.mayfly; } @@ -1427,19 +1427,19 @@ void PlayerConnection::handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> p // player.connection.send(new ChatAutoCompletePacket(result.toString())); //} -//void handleClientInformation(shared_ptr<ClientInformationPacket> packet) +//void handleClientInformation(std::shared_ptr<ClientInformationPacket> packet) //{ // player->updateOptions(packet); //} -void PlayerConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> customPayloadPacket) +void PlayerConnection::handleCustomPayload(std::shared_ptr<CustomPayloadPacket> customPayloadPacket) { #if 0 if (CustomPayloadPacket.CUSTOM_BOOK_PACKET.equals(customPayloadPacket.identifier)) { ByteArrayInputStream bais(customPayloadPacket->data); DataInputStream input(&bais); - shared_ptr<ItemInstance> sentItem = Packet::readItem(input); + std::shared_ptr<ItemInstance> sentItem = Packet::readItem(input); if (!WritingBookItem.makeSureTagIsValid(sentItem.getTag())) { @@ -1510,13 +1510,13 @@ void PlayerConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo // 4J Added -void PlayerConnection::handleDebugOptions(shared_ptr<DebugOptionsPacket> packet) +void PlayerConnection::handleDebugOptions(std::shared_ptr<DebugOptionsPacket> packet) { //Player player = dynamic_pointer_cast<Player>( player->shared_from_this() ); player->SetDebugOptions(packet->m_uiVal); } -void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet) +void PlayerConnection::handleCraftItem(std::shared_ptr<CraftItemPacket> packet) { int iRecipe = packet->recipe; @@ -1524,7 +1524,7 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet) return; Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray(); - shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + std::shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); if(app.DebugSettingsOn() && (player->GetDebugOptions()&(1L<<eDebugSetting_CraftAnything))) { @@ -1538,9 +1538,9 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet) else { - + // TODO 4J Stu - Assume at the moment that the client can work this out for us... - //if(pRecipeIngredientsRequired[iRecipe].bCanMake) + //if(pRecipeIngredientsRequired[iRecipe].bCanMake) //{ pTempItemInst->onCraftedBy(player->level, dynamic_pointer_cast<Player>( player->shared_from_this() ), pTempItemInst->count ); @@ -1549,7 +1549,7 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet) { for(int j=0;j<pRecipeIngredientsRequired[iRecipe].iIngValA[i];j++) { - shared_ptr<ItemInstance> ingItemInst = nullptr; + std::shared_ptr<ItemInstance> ingItemInst = nullptr; // do we need to remove a specific aux value? if(pRecipeIngredientsRequired[iRecipe].iIngAuxValA[i]!=Recipes::ANY_AUX_VALUE) { @@ -1568,13 +1568,13 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet) if (ingItemInst->getItem()->hasCraftingRemainingItem()) { // replace item with remaining result - player->inventory->add( shared_ptr<ItemInstance>( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); + player->inventory->add( std::shared_ptr<ItemInstance>( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); } } } } - + // 4J Stu - Fix for #13119 - We should add the item after we remove the ingredients if(player->inventory->add(pTempItemInst)==false ) { @@ -1586,7 +1586,7 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet) { // 4J Stu - Maps need to have their aux value update, so the client should always be assumed to be wrong // This is how the Java works, as the client also incorrectly predicts the auxvalue of the mapItem - vector<shared_ptr<ItemInstance> > items; + vector<std::shared_ptr<ItemInstance> > items; for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++) { items.push_back(player->containerMenu->slots->at(i)->getItem()); @@ -1625,7 +1625,7 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet) } -void PlayerConnection::handleTradeItem(shared_ptr<TradeItemPacket> packet) +void PlayerConnection::handleTradeItem(std::shared_ptr<TradeItemPacket> packet) { if (player->containerMenu->containerId == packet->containerId) { @@ -1642,8 +1642,8 @@ void PlayerConnection::handleTradeItem(shared_ptr<TradeItemPacket> packet) if(!activeRecipe->isDeprecated()) { // Do we have the ingredients? - shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem(); - shared_ptr<ItemInstance> buyBItem = activeRecipe->getBuyBItem(); + std::shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem(); + std::shared_ptr<ItemInstance> buyBItem = activeRecipe->getBuyBItem(); int buyAMatches = player->inventory->countMatches(buyAItem); int buyBMatches = player->inventory->countMatches(buyBItem); @@ -1656,8 +1656,8 @@ void PlayerConnection::handleTradeItem(shared_ptr<TradeItemPacket> packet) player->inventory->removeResources(buyBItem); // Add the item we have purchased - shared_ptr<ItemInstance> result = activeRecipe->getSellItem()->copy(); - + std::shared_ptr<ItemInstance> result = activeRecipe->getSellItem()->copy(); + // 4J JEV - Award itemsBought stat. player->awardStat( GenericStats::itemsBought(result->getItem()->id), @@ -1667,7 +1667,7 @@ void PlayerConnection::handleTradeItem(shared_ptr<TradeItemPacket> packet) result->GetCount() ) ); - + if (!player->inventory->add(result)) { player->drop(result); @@ -1687,7 +1687,7 @@ INetworkPlayer *PlayerConnection::getNetworkPlayer() bool PlayerConnection::isLocal() { - if( connection->getSocket() == NULL ) + if( connection->getSocket() == NULL ) { return false; } @@ -1700,7 +1700,7 @@ bool PlayerConnection::isLocal() bool PlayerConnection::isGuest() { - if( connection->getSocket() == NULL ) + if( connection->getSocket() == NULL ) { return false; } diff --git a/Minecraft.Client/PlayerConnection.h b/Minecraft.Client/PlayerConnection.h index d7b56a83..c00ee1c1 100644 --- a/Minecraft.Client/PlayerConnection.h +++ b/Minecraft.Client/PlayerConnection.h @@ -24,7 +24,7 @@ public: private: MinecraftServer *server; - shared_ptr<ServerPlayer> player; + std::shared_ptr<ServerPlayer> player; int tickCount; int aboveGroundTickCount; @@ -39,7 +39,7 @@ private: bool m_bHasClientTickedOnce; public: - PlayerConnection(MinecraftServer *server, Connection *connection, shared_ptr<ServerPlayer> player); + PlayerConnection(MinecraftServer *server, Connection *connection, std::shared_ptr<ServerPlayer> player); ~PlayerConnection(); void tick(); void disconnect(DisconnectPacket::eDisconnectReason reason); @@ -49,32 +49,32 @@ private: bool synched; public: - virtual void handlePlayerInput(shared_ptr<PlayerInputPacket> packet); - virtual void handleMovePlayer(shared_ptr<MovePlayerPacket> packet); + virtual void handlePlayerInput(std::shared_ptr<PlayerInputPacket> packet); + virtual void handleMovePlayer(std::shared_ptr<MovePlayerPacket> packet); void teleport(double x, double y, double z, float yRot, float xRot, bool sendPacket = true); // 4J Added sendPacket param - virtual void handlePlayerAction(shared_ptr<PlayerActionPacket> packet); - virtual void handleUseItem(shared_ptr<UseItemPacket> packet); + virtual void handlePlayerAction(std::shared_ptr<PlayerActionPacket> packet); + virtual void handleUseItem(std::shared_ptr<UseItemPacket> packet); virtual void onDisconnect(DisconnectPacket::eDisconnectReason reason, void *reasonObjects); - virtual void onUnhandledPacket(shared_ptr<Packet> packet); - void send(shared_ptr<Packet> packet); - void queueSend(shared_ptr<Packet> packet); // 4J Added - virtual void handleSetCarriedItem(shared_ptr<SetCarriedItemPacket> packet); - virtual void handleChat(shared_ptr<ChatPacket> packet); + virtual void onUnhandledPacket(std::shared_ptr<Packet> packet); + void send(std::shared_ptr<Packet> packet); + void queueSend(std::shared_ptr<Packet> packet); // 4J Added + virtual void handleSetCarriedItem(std::shared_ptr<SetCarriedItemPacket> packet); + virtual void handleChat(std::shared_ptr<ChatPacket> packet); private: void handleCommand(const wstring& message); public: - virtual void handleAnimate(shared_ptr<AnimatePacket> packet); - virtual void handlePlayerCommand(shared_ptr<PlayerCommandPacket> packet); - virtual void handleDisconnect(shared_ptr<DisconnectPacket> packet); + virtual void handleAnimate(std::shared_ptr<AnimatePacket> packet); + virtual void handlePlayerCommand(std::shared_ptr<PlayerCommandPacket> packet); + virtual void handleDisconnect(std::shared_ptr<DisconnectPacket> packet); int countDelayedPackets(); virtual void info(const wstring& string); virtual void warn(const wstring& string); virtual wstring getConsoleName(); - virtual void handleInteract(shared_ptr<InteractPacket> packet); + virtual void handleInteract(std::shared_ptr<InteractPacket> packet); bool canHandleAsyncPackets(); - virtual void handleClientCommand(shared_ptr<ClientCommandPacket> packet); - virtual void handleRespawn(shared_ptr<RespawnPacket> packet); - virtual void handleContainerClose(shared_ptr<ContainerClosePacket> packet); + virtual void handleClientCommand(std::shared_ptr<ClientCommandPacket> packet); + virtual void handleRespawn(std::shared_ptr<RespawnPacket> packet); + virtual void handleContainerClose(std::shared_ptr<ContainerClosePacket> packet); private: unordered_map<int, short, IntKeyHash, IntKeyEq> expectedAcks; @@ -82,38 +82,38 @@ private: public: // 4J Stu - Handlers only valid in debug mode #ifndef _CONTENT_PACKAGE - virtual void handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> packet); + virtual void handleContainerSetSlot(std::shared_ptr<ContainerSetSlotPacket> packet); #endif - virtual void handleContainerClick(shared_ptr<ContainerClickPacket> packet); - virtual void handleContainerButtonClick(shared_ptr<ContainerButtonClickPacket> packet); - virtual void handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotPacket> packet); - virtual void handleContainerAck(shared_ptr<ContainerAckPacket> packet); - virtual void handleSignUpdate(shared_ptr<SignUpdatePacket> packet); - virtual void handleKeepAlive(shared_ptr<KeepAlivePacket> packet); - virtual void handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet); // 4J Added + virtual void handleContainerClick(std::shared_ptr<ContainerClickPacket> packet); + virtual void handleContainerButtonClick(std::shared_ptr<ContainerButtonClickPacket> packet); + virtual void handleSetCreativeModeSlot(std::shared_ptr<SetCreativeModeSlotPacket> packet); + virtual void handleContainerAck(std::shared_ptr<ContainerAckPacket> packet); + virtual void handleSignUpdate(std::shared_ptr<SignUpdatePacket> packet); + virtual void handleKeepAlive(std::shared_ptr<KeepAlivePacket> packet); + virtual void handlePlayerInfo(std::shared_ptr<PlayerInfoPacket> packet); // 4J Added virtual bool isServerPacketListener(); - virtual void handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket); - virtual void handleCustomPayload(shared_ptr<CustomPayloadPacket> customPayloadPacket); + virtual void handlePlayerAbilities(std::shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket); + virtual void handleCustomPayload(std::shared_ptr<CustomPayloadPacket> customPayloadPacket); // 4J Added - virtual void handleCraftItem(shared_ptr<CraftItemPacket> packet); - virtual void handleTradeItem(shared_ptr<TradeItemPacket> packet); - virtual void handleDebugOptions(shared_ptr<DebugOptionsPacket> packet); - virtual void handleTexture(shared_ptr<TexturePacket> packet); - virtual void handleTextureAndGeometry(shared_ptr<TextureAndGeometryPacket> packet); - virtual void handleTextureChange(shared_ptr<TextureChangePacket> packet); - virtual void handleTextureAndGeometryChange(shared_ptr<TextureAndGeometryChangePacket> packet); - virtual void handleServerSettingsChanged(shared_ptr<ServerSettingsChangedPacket> packet); - virtual void handleKickPlayer(shared_ptr<KickPlayerPacket> packet); - virtual void handleGameCommand(shared_ptr<GameCommandPacket> packet); + virtual void handleCraftItem(std::shared_ptr<CraftItemPacket> packet); + virtual void handleTradeItem(std::shared_ptr<TradeItemPacket> packet); + virtual void handleDebugOptions(std::shared_ptr<DebugOptionsPacket> packet); + virtual void handleTexture(std::shared_ptr<TexturePacket> packet); + virtual void handleTextureAndGeometry(std::shared_ptr<TextureAndGeometryPacket> packet); + virtual void handleTextureChange(std::shared_ptr<TextureChangePacket> packet); + virtual void handleTextureAndGeometryChange(std::shared_ptr<TextureAndGeometryChangePacket> packet); + virtual void handleServerSettingsChanged(std::shared_ptr<ServerSettingsChangedPacket> packet); + virtual void handleKickPlayer(std::shared_ptr<KickPlayerPacket> packet); + virtual void handleGameCommand(std::shared_ptr<GameCommandPacket> packet); INetworkPlayer *getNetworkPlayer(); bool isLocal(); bool isGuest(); // 4J Added as we need to set this from outside sometimes - void setPlayer(shared_ptr<ServerPlayer> player) { this->player = player; } - shared_ptr<ServerPlayer> getPlayer() { return player; } + void setPlayer(std::shared_ptr<ServerPlayer> player) { this->player = player; } + std::shared_ptr<ServerPlayer> getPlayer() { return player; } // 4J Added to signal a disconnect from another thread void closeOnTick() { m_bCloseOnTick = true; } diff --git a/Minecraft.Client/PlayerList.cpp b/Minecraft.Client/PlayerList.cpp index 7921cbf8..9beea76b 100644 --- a/Minecraft.Client/PlayerList.cpp +++ b/Minecraft.Client/PlayerList.cpp @@ -54,7 +54,7 @@ PlayerList::PlayerList(MinecraftServer *server) maxPlayers = server->settings->getInt(L"max-players", 20); doWhiteList = false; - + InitializeCriticalSection(&m_kickPlayersCS); InitializeCriticalSection(&m_closePlayersCS); } @@ -72,7 +72,7 @@ PlayerList::~PlayerList() DeleteCriticalSection(&m_closePlayersCS); } -void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> player, shared_ptr<LoginPacket> packet) +void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptr<ServerPlayer> player, std::shared_ptr<LoginPacket> packet) { bool newPlayer = load(player); player->setLevel(server->getLevel(player->dimension)); @@ -82,7 +82,7 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> INetworkPlayer *networkPlayer = connection->getSocket()->getPlayer(); if(networkPlayer != NULL && networkPlayer->IsHost()) { - player->enableAllPlayerPrivileges(true); + player->enableAllPlayerPrivileges(true); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_HOST,1); } @@ -127,8 +127,8 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> player->setCustomCape( packet->m_playerCapeId ); // 4J-JEV: Moved this here so we can send player-model texture and geometry data. - shared_ptr<PlayerConnection> playerConnection = shared_ptr<PlayerConnection>(new PlayerConnection(server, connection, player)); - //player->connection = playerConnection; // Used to be assigned in PlayerConnection ctor but moved out so we can use shared_ptr + std::shared_ptr<PlayerConnection> playerConnection = std::shared_ptr<PlayerConnection>(new PlayerConnection(server, connection, player)); + //player->connection = playerConnection; // Used to be assigned in PlayerConnection ctor but moved out so we can use std::shared_ptr if(newPlayer) { @@ -143,7 +143,7 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> int centreZC = 0; #endif // 4J Added - Give every player a map the first time they join a server - player->inventory->setItem( 9, shared_ptr<ItemInstance>( new ItemInstance(Item::map_Id, 1, level->getAuxValueForMap(player->getXuid(),0,centreXC, centreZC, mapScale ) ) ) ); + player->inventory->setItem( 9, std::shared_ptr<ItemInstance>( new ItemInstance(Item::map_Id, 1, level->getAuxValueForMap(player->getXuid(),0,centreXC, centreZC, mapScale ) ) ) ); if(app.getGameRuleDefinitions() != NULL) { app.getGameRuleDefinitions()->postProcessPlayer(player); @@ -157,11 +157,11 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> #ifndef _CONTENT_PACKAGE wprintf(L"Sending texture packet to get custom skin %ls from player %ls\n",player->customTextureUrl.c_str(), player->name.c_str()); #endif - playerConnection->send(shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(player->customTextureUrl,NULL,0) ) ); + playerConnection->send(std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(player->customTextureUrl,NULL,0) ) ); } } else if(!player->customTextureUrl.empty() && app.IsFileInMemoryTextures(player->customTextureUrl)) - { + { // Update the ref count on the memory texture data app.AddMemoryTextureFile(player->customTextureUrl,NULL,0); } @@ -173,11 +173,11 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> #ifndef _CONTENT_PACKAGE wprintf(L"Sending texture packet to get custom skin %ls from player %ls\n",player->customTextureUrl2.c_str(), player->name.c_str()); #endif - playerConnection->send(shared_ptr<TexturePacket>( new TexturePacket(player->customTextureUrl2,NULL,0) ) ); + playerConnection->send(std::shared_ptr<TexturePacket>( new TexturePacket(player->customTextureUrl2,NULL,0) ) ); } } else if(!player->customTextureUrl2.empty() && app.IsFileInMemoryTextures(player->customTextureUrl2)) - { + { // Update the ref count on the memory texture data app.AddMemoryTextureFile(player->customTextureUrl2,NULL,0); } @@ -196,8 +196,8 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_CreativeMode,player->gameMode->getGameModeForPlayer()->getId() ); } - //shared_ptr<PlayerConnection> playerConnection = shared_ptr<PlayerConnection>(new PlayerConnection(server, connection, player)); - player->connection = playerConnection; // Used to be assigned in PlayerConnection ctor but moved out so we can use shared_ptr + //std::shared_ptr<PlayerConnection> playerConnection = std::shared_ptr<PlayerConnection>(new PlayerConnection(server, connection, player)); + player->connection = playerConnection; // Used to be assigned in PlayerConnection ctor but moved out so we can use std::shared_ptr // 4J Added to store UGC settings playerConnection->m_friendsOnlyUGC = packet->m_friendsOnlyUGC; @@ -209,19 +209,19 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> addPlayerToReceiving( player ); - playerConnection->send( shared_ptr<LoginPacket>( new LoginPacket(L"", player->entityId, level->getLevelData()->getGenerator(), level->getSeed(), player->gameMode->getGameModeForPlayer()->getId(), + playerConnection->send( std::shared_ptr<LoginPacket>( new LoginPacket(L"", player->entityId, level->getLevelData()->getGenerator(), level->getSeed(), player->gameMode->getGameModeForPlayer()->getId(), (byte) level->dimension->id, (byte) level->getMaxBuildHeight(), (byte) getMaxPlayers(), level->difficulty, TelemetryManager->GetMultiplayerInstanceID(), (BYTE)playerIndex, level->useNewSeaLevel(), player->getAllPlayerGamePrivileges(), level->getLevelData()->getXZSize(), level->getLevelData()->getHellScale() ) ) ); - playerConnection->send( shared_ptr<SetSpawnPositionPacket>( new SetSpawnPositionPacket(spawnPos->x, spawnPos->y, spawnPos->z) ) ); - playerConnection->send( shared_ptr<PlayerAbilitiesPacket>( new PlayerAbilitiesPacket(&player->abilities)) ); + playerConnection->send( std::shared_ptr<SetSpawnPositionPacket>( new SetSpawnPositionPacket(spawnPos->x, spawnPos->y, spawnPos->z) ) ); + playerConnection->send( std::shared_ptr<PlayerAbilitiesPacket>( new PlayerAbilitiesPacket(&player->abilities)) ); delete spawnPos; sendLevelInfo(player, level); // 4J-PB - removed, since it needs to be localised in the language the client is in - //server->players->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(L"§e" + playerEntity->name + L" joined the game.") ) ); - broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerJoinedGame) ) ); + //server->players->broadcastAll( std::shared_ptr<ChatPacket>( new ChatPacket(L"�e" + playerEntity->name + L" joined the game.") ) ); + broadcastAll( std::shared_ptr<ChatPacket>( new ChatPacket(player->name, ChatPacket::e_ChatPlayerJoinedGame) ) ); MemSect(14); add(player); @@ -231,13 +231,13 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> playerConnection->teleport(player->x, player->y, player->z, player->yRot, player->xRot); server->getConnection()->addPlayerConnection(playerConnection); - playerConnection->send( shared_ptr<SetTimePacket>( new SetTimePacket(level->getTime()) ) ); + playerConnection->send( std::shared_ptr<SetTimePacket>( new SetTimePacket(level->getTime()) ) ); AUTO_VAR(activeEffects, player->getActiveEffects()); for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) { MobEffectInstance *effect = *it; - playerConnection->send(shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(player->entityId, effect) ) ); + playerConnection->send(std::shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(player->entityId, effect) ) ); } player->initMenu(); @@ -249,7 +249,7 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> { for(AUTO_VAR(it, players.begin()); it != players.end(); ++it) { - shared_ptr<ServerPlayer> servPlayer = *it; + std::shared_ptr<ServerPlayer> servPlayer = *it; INetworkPlayer *checkPlayer = servPlayer->connection->getNetworkPlayer(); if(thisPlayer != checkPlayer && checkPlayer != NULL && thisPlayer->IsSameSystem( checkPlayer ) && servPlayer->wonGame ) { @@ -265,7 +265,7 @@ void PlayerList::setLevel(ServerLevelArray levels) playerIo = levels[0]->getLevelStorage()->getPlayerIO(); } -void PlayerList::changeDimension(shared_ptr<ServerPlayer> player, ServerLevel *from) +void PlayerList::changeDimension(std::shared_ptr<ServerPlayer> player, ServerLevel *from) { ServerLevel *to = player->getLevel(); @@ -281,12 +281,12 @@ int PlayerList::getMaxRange() } // 4J Changed return val to bool to check if new player or loaded player -bool PlayerList::load(shared_ptr<ServerPlayer> player) +bool PlayerList::load(std::shared_ptr<ServerPlayer> player) { return playerIo->load(player); } -void PlayerList::save(shared_ptr<ServerPlayer> player) +void PlayerList::save(std::shared_ptr<ServerPlayer> player) { playerIo->save(player); } @@ -295,7 +295,7 @@ void PlayerList::save(shared_ptr<ServerPlayer> player) // Add this function to take some of the code from the PlayerList::add function with the fixes // for checking spawn area, especially in the nether. These needed to be done in a different order from before // Fix for #13150 - When a player loads/joins a game after saving/leaving in the nether, sometimes they are spawned on top of the nether and cannot mine down -void PlayerList::validatePlayerSpawnPosition(shared_ptr<ServerPlayer> player) +void PlayerList::validatePlayerSpawnPosition(std::shared_ptr<ServerPlayer> player) { // 4J Stu - Some adjustments to make sure the current players position is correct // Make sure that the player is on the ground, and in the centre x/z of the current column @@ -354,17 +354,17 @@ void PlayerList::validatePlayerSpawnPosition(shared_ptr<ServerPlayer> player) { player->setPos(player->x, player->y + 1, player->z); } - + app.DebugPrintf("Updated pos is %f, %f, %f in dimension %d\n", player->x, player->y, player->z, player->dimension); } } -void PlayerList::add(shared_ptr<ServerPlayer> player) +void PlayerList::add(std::shared_ptr<ServerPlayer> player) { - //broadcastAll(shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket(player->name, true, 1000) ) ); + //broadcastAll(std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket(player->name, true, 1000) ) ); if( player->connection->getNetworkPlayer() ) { - broadcastAll(shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player ) ) ); + broadcastAll(std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player ) ) ); } players.push_back(player); @@ -380,42 +380,42 @@ void PlayerList::add(shared_ptr<ServerPlayer> player) // Some code from here has been moved to the above validatePlayerSpawnPosition function // 4J Stu - Swapped these lines about so that we get the chunk visiblity packet way ahead of all the add tracked entity packets - // Fix for #9169 - ART : Sign text is replaced with the words “Awaiting approval”. + // Fix for #9169 - ART : Sign text is replaced with the words �Awaiting approval�. changeDimension(player, NULL); level->addEntity(player); for (int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> op = players.at(i); - //player->connection->send(shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket(op->name, true, op->latency) ) ); + std::shared_ptr<ServerPlayer> op = players.at(i); + //player->connection->send(std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket(op->name, true, op->latency) ) ); if( op->connection->getNetworkPlayer() ) { - player->connection->send(shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( op ) ) ); + player->connection->send(std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( op ) ) ); } } if(level->isAtLeastOnePlayerSleeping()) { - shared_ptr<ServerPlayer> firstSleepingPlayer = nullptr; + std::shared_ptr<ServerPlayer> firstSleepingPlayer = nullptr; for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> thisPlayer = players[i]; + std::shared_ptr<ServerPlayer> thisPlayer = players[i]; if(thisPlayer->isSleeping()) { - if(firstSleepingPlayer == NULL) firstSleepingPlayer = thisPlayer; - thisPlayer->connection->send(shared_ptr<ChatPacket>( new ChatPacket(thisPlayer->name, ChatPacket::e_ChatBedMeSleep))); + if(firstSleepingPlayer == NULL) firstSleepingPlayer = thisPlayer; + thisPlayer->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(thisPlayer->name, ChatPacket::e_ChatBedMeSleep))); } } - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(firstSleepingPlayer->name, ChatPacket::e_ChatBedPlayerSleep))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(firstSleepingPlayer->name, ChatPacket::e_ChatBedPlayerSleep))); } } -void PlayerList::move(shared_ptr<ServerPlayer> player) +void PlayerList::move(std::shared_ptr<ServerPlayer> player) { player->getLevel()->getChunkMap()->move(player); } -void PlayerList::remove(shared_ptr<ServerPlayer> player) +void PlayerList::remove(std::shared_ptr<ServerPlayer> player) { save(player); //4J Stu - We don't want to save the map data for guests, so when we are sure that the player is gone delete the map @@ -428,7 +428,7 @@ void PlayerList::remove(shared_ptr<ServerPlayer> player) { players.erase(it); } - //broadcastAll(shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket(player->name, false, 9999) ) ); + //broadcastAll(std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket(player->name, false, 9999) ) ); removePlayerFromReceiving(player); player->connection = nullptr; // Must remove reference to connection, or else there is a circular dependency @@ -439,15 +439,15 @@ void PlayerList::remove(shared_ptr<ServerPlayer> player) saveAll(NULL,false); } -shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid) +std::shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid) { if (players.size() >= maxPlayers) { pendingConnection->disconnect(DisconnectPacket::eDisconnect_ServerFull); - return shared_ptr<ServerPlayer>(); + return std::shared_ptr<ServerPlayer>(); } - - shared_ptr<ServerPlayer> player = shared_ptr<ServerPlayer>(new ServerPlayer(server, server->getLevel(0), userName, new ServerPlayerGameMode(server->getLevel(0)) )); + + std::shared_ptr<ServerPlayer> player = std::shared_ptr<ServerPlayer>(new ServerPlayer(server, server->getLevel(0), userName, new ServerPlayerGameMode(server->getLevel(0)) )); player->gameMode->player = player; // 4J added as had to remove this assignment from ServerPlayer ctor player->setXuid( xuid ); // 4J Added player->setOnlineXuid( onlineXuid ); // 4J Added @@ -469,9 +469,9 @@ shared_ptr<ServerPlayer> PlayerList::getPlayerForLogin(PendingConnection *pendin return player; } -shared_ptr<ServerPlayer> PlayerList::respawn(shared_ptr<ServerPlayer> serverPlayer, int targetDimension, bool keepAllPlayerData) +std::shared_ptr<ServerPlayer> PlayerList::respawn(std::shared_ptr<ServerPlayer> serverPlayer, int targetDimension, bool keepAllPlayerData) { - // How we handle the entity tracker depends on whether we are the primary player currently, and whether there will be any player in the same system in the same dimension once we finish respawning. + // How we handle the entity tracker depends on whether we are the primary player currently, and whether there will be any player in the same system in the same dimension once we finish respawning. bool isPrimary = canReceiveAllPackets(serverPlayer); // Is this the primary player in its current dimension? int oldDimension = serverPlayer->dimension; bool isEmptying = ( targetDimension != oldDimension); // We're not emptying this dimension on this machine if this player is going back into the same dimension @@ -483,7 +483,7 @@ shared_ptr<ServerPlayer> PlayerList::respawn(shared_ptr<ServerPlayer> serverPlay for( unsigned int i = 0; i < players.size(); i++ ) { - shared_ptr<ServerPlayer> ep = players[i]; + std::shared_ptr<ServerPlayer> ep = players[i]; if( ep == serverPlayer ) continue; if( ep->dimension != oldDimension ) continue; @@ -539,8 +539,8 @@ shared_ptr<ServerPlayer> PlayerList::respawn(shared_ptr<ServerPlayer> serverPlay PlayerUID playerXuid = serverPlayer->getXuid(); PlayerUID playerOnlineXuid = serverPlayer->getOnlineXuid(); - - shared_ptr<ServerPlayer> player = shared_ptr<ServerPlayer>(new ServerPlayer(server, server->getLevel(serverPlayer->dimension), serverPlayer->name, new ServerPlayerGameMode(server->getLevel(serverPlayer->dimension)))); + + std::shared_ptr<ServerPlayer> player = std::shared_ptr<ServerPlayer>(new ServerPlayer(server, server->getLevel(serverPlayer->dimension), serverPlayer->name, new ServerPlayerGameMode(server->getLevel(serverPlayer->dimension)))); player->restoreFrom(serverPlayer, keepAllPlayerData); if (keepAllPlayerData) { @@ -598,7 +598,7 @@ shared_ptr<ServerPlayer> PlayerList::respawn(shared_ptr<ServerPlayer> serverPlay } else { - player->connection->send( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::NO_RESPAWN_BED_AVAILABLE, 0) ) ); + player->connection->send( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::NO_RESPAWN_BED_AVAILABLE, 0) ) ); } delete bedPosition; } @@ -611,7 +611,7 @@ shared_ptr<ServerPlayer> PlayerList::respawn(shared_ptr<ServerPlayer> serverPlay player->setPos(player->x, player->y + 1, player->z); } - player->connection->send( shared_ptr<RespawnPacket>( new RespawnPacket((char) player->dimension, player->level->getSeed(), player->level->getMaxBuildHeight(), + player->connection->send( std::shared_ptr<RespawnPacket>( new RespawnPacket((char) player->dimension, player->level->getSeed(), player->level->getMaxBuildHeight(), player->gameMode->getGameModeForPlayer(), level->difficulty, level->getLevelData()->getGenerator(), player->level->useNewSeaLevel(), player->entityId, level->getLevelData()->getXZSize(), level->getLevelData()->getHellScale()) ) ); player->connection->teleport(player->x, player->y, player->z, player->yRot, player->xRot); @@ -623,7 +623,7 @@ shared_ptr<ServerPlayer> PlayerList::respawn(shared_ptr<ServerPlayer> serverPlay { MobEffectInstance *effect = *it; - player->connection->send(shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(player->entityId, effect) ) ); + player->connection->send(std::shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(player->entityId, effect) ) ); } delete activeEffects; player->getEntityData()->markDirty(Mob::DATA_EFFECT_COLOR_ID); @@ -639,7 +639,7 @@ shared_ptr<ServerPlayer> PlayerList::respawn(shared_ptr<ServerPlayer> serverPlay // 4J-JEV - Dying before this point in the tutorial is pretty annoying, // making sure to remove health/hunger and give you back your meat. - if( Minecraft::GetInstance()->isTutorial() + if( Minecraft::GetInstance()->isTutorial() && (!Minecraft::GetInstance()->gameMode->getTutorial()->isStateCompleted(e_Tutorial_State_Food_Bar)) ) { app.getGameRuleDefinitions()->postProcessPlayer(player); @@ -654,10 +654,10 @@ shared_ptr<ServerPlayer> PlayerList::respawn(shared_ptr<ServerPlayer> serverPlay } -void PlayerList::toggleDimension(shared_ptr<ServerPlayer> player, int targetDimension) +void PlayerList::toggleDimension(std::shared_ptr<ServerPlayer> player, int targetDimension) { int lastDimension = player->dimension; - // How we handle the entity tracker depends on whether we are the primary player currently, and whether there will be any player in the same system in the same dimension once we finish respawning. + // How we handle the entity tracker depends on whether we are the primary player currently, and whether there will be any player in the same system in the same dimension once we finish respawning. bool isPrimary = canReceiveAllPackets(player); // Is this the primary player in its current dimension? bool isEmptying = true; @@ -666,7 +666,7 @@ void PlayerList::toggleDimension(shared_ptr<ServerPlayer> player, int targetDime for( unsigned int i = 0; i < players.size(); i++ ) { - shared_ptr<ServerPlayer> ep = players[i]; + std::shared_ptr<ServerPlayer> ep = players[i]; if( ep == player ) continue; if( ep->dimension != lastDimension ) continue; @@ -728,7 +728,7 @@ void PlayerList::toggleDimension(shared_ptr<ServerPlayer> player, int targetDime // 4J Stu Added so that we remove entities from the correct level, after the respawn packet we will be in the wrong level player->flushEntitiesToRemove(); - player->connection->send( shared_ptr<RespawnPacket>( new RespawnPacket((char) player->dimension, newLevel->getSeed(), newLevel->getMaxBuildHeight(), + player->connection->send( std::shared_ptr<RespawnPacket>( new RespawnPacket((char) player->dimension, newLevel->getSeed(), newLevel->getMaxBuildHeight(), player->gameMode->getGameModeForPlayer(), newLevel->difficulty, newLevel->getLevelData()->getGenerator(), newLevel->useNewSeaLevel(), player->entityId, newLevel->getLevelData()->getXZSize(), newLevel->getLevelData()->getHellScale()) ) ); @@ -772,7 +772,7 @@ void PlayerList::toggleDimension(shared_ptr<ServerPlayer> player, int targetDime oldLevel->tick(player, false); } } - + removePlayerFromReceiving(player, false, lastDimension); addPlayerToReceiving(player); @@ -807,7 +807,7 @@ void PlayerList::toggleDimension(shared_ptr<ServerPlayer> player, int targetDime // Force sending of the current chunk player->doTick(true, true, true); } - + player->connection->teleport(player->x, player->y, player->z, player->yRot, player->xRot); // 4J Stu - Fix for #64683 - Customer Encountered: TU7: Content: Gameplay: Potion effects are removed after using the Nether Portal @@ -816,7 +816,7 @@ void PlayerList::toggleDimension(shared_ptr<ServerPlayer> player, int targetDime { MobEffectInstance *effect = *it; - player->connection->send(shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(player->entityId, effect) ) ); + player->connection->send(std::shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(player->entityId, effect) ) ); } delete activeEffects; player->getEntityData()->markDirty(Mob::DATA_EFFECT_COLOR_ID); @@ -833,13 +833,13 @@ void PlayerList::tick() sendAllPlayerInfoIn = 0; } - if (sendAllPlayerInfoIn < players.size()) + if (sendAllPlayerInfoIn < players.size()) { - shared_ptr<ServerPlayer> op = players[sendAllPlayerInfoIn]; - //broadcastAll(shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket(op->name, true, op->latency) ) ); + std::shared_ptr<ServerPlayer> op = players[sendAllPlayerInfoIn]; + //broadcastAll(std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket(op->name, true, op->latency) ) ); if( op->connection->getNetworkPlayer() ) { - broadcastAll(shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( op ) ) ); + broadcastAll(std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( op ) ) ); } } @@ -849,11 +849,11 @@ void PlayerList::tick() BYTE smallId = m_smallIdsToClose.front(); m_smallIdsToClose.pop_front(); - shared_ptr<ServerPlayer> player = nullptr; + std::shared_ptr<ServerPlayer> player = nullptr; for(unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> p = players.at(i); + std::shared_ptr<ServerPlayer> p = players.at(i); // 4J Stu - May be being a bit overprotective with all the NULL checks, but adding late in TU7 so want to be safe if (p != NULL && p->connection != NULL && p->connection->connection != NULL && p->connection->connection->getSocket() != NULL && p->connection->connection->getSocket()->getSmallId() == smallId ) { @@ -882,11 +882,11 @@ void PlayerList::tick() //#ifdef _XBOX PlayerUID xuid = selectedPlayer->GetUID(); // Kick this player from the game - shared_ptr<ServerPlayer> player = nullptr; + std::shared_ptr<ServerPlayer> player = nullptr; for(unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> p = players.at(i); + std::shared_ptr<ServerPlayer> p = players.at(i); PlayerUID playersXuid = p->getOnlineXuid(); if (p != NULL && ProfileManager.AreXUIDSEqual(playersXuid, xuid ) ) { @@ -901,7 +901,7 @@ void PlayerList::tick() // 4J Stu - If we have kicked a player, make sure that they have no privileges if they later try to join the world when trust players is off player->enableAllPlayerPrivileges( false ); player->connection->setWasKicked(); - player->connection->send( shared_ptr<DisconnectPacket>( new DisconnectPacket(DisconnectPacket::eDisconnect_Kicked) )); + player->connection->send( std::shared_ptr<DisconnectPacket>( new DisconnectPacket(DisconnectPacket::eDisconnect_Kicked) )); } //#endif } @@ -914,10 +914,10 @@ void PlayerList::tick() { for(unsigned int i = 0; i < receiveAllPlayers[dim].size(); ++i) { - shared_ptr<ServerPlayer> currentPlayer = receiveAllPlayers[dim][i]; + std::shared_ptr<ServerPlayer> currentPlayer = receiveAllPlayers[dim][i]; if(currentPlayer->removed) { - shared_ptr<ServerPlayer> newPlayer = findAlivePlayerOnSystem(currentPlayer); + std::shared_ptr<ServerPlayer> newPlayer = findAlivePlayerOnSystem(currentPlayer); if(newPlayer != NULL) { receiveAllPlayers[dim][i] = newPlayer; @@ -939,20 +939,20 @@ void PlayerList::prioritiseTileChanges(int x, int y, int z, int dimension) server->getLevel(dimension)->getChunkMap()->prioritiseTileChanges(x, y, z); } -void PlayerList::broadcastAll(shared_ptr<Packet> packet) +void PlayerList::broadcastAll(std::shared_ptr<Packet> packet) { for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> player = players[i]; + std::shared_ptr<ServerPlayer> player = players[i]; player->connection->send(packet); } } -void PlayerList::broadcastAll(shared_ptr<Packet> packet, int dimension) +void PlayerList::broadcastAll(std::shared_ptr<Packet> packet, int dimension) { for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> player = players[i]; + std::shared_ptr<ServerPlayer> player = players[i]; if (player->dimension == dimension) player->connection->send(packet); } } @@ -978,7 +978,7 @@ bool PlayerList::isOp(const wstring& name) return false; } -bool PlayerList::isOp(shared_ptr<ServerPlayer> player) +bool PlayerList::isOp(std::shared_ptr<ServerPlayer> player) { bool cheatsEnabled = app.GetGameHostOption(eGameHostOption_CheatsEnabled); #ifdef _DEBUG_MENUS_ENABLED @@ -989,11 +989,11 @@ bool PlayerList::isOp(shared_ptr<ServerPlayer> player) return isOp; } -shared_ptr<ServerPlayer> PlayerList::getPlayer(const wstring& name) +std::shared_ptr<ServerPlayer> PlayerList::getPlayer(const wstring& name) { - for (unsigned int i = 0; i < players.size(); i++) + for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> p = players[i]; + std::shared_ptr<ServerPlayer> p = players[i]; if (p->name == name) // 4J - used to be case insensitive (using equalsIgnoreCase) - imagine we'll be shifting to XUIDs anyway { return p; @@ -1003,11 +1003,11 @@ shared_ptr<ServerPlayer> PlayerList::getPlayer(const wstring& name) } // 4J Added -shared_ptr<ServerPlayer> PlayerList::getPlayer(PlayerUID uid) +std::shared_ptr<ServerPlayer> PlayerList::getPlayer(PlayerUID uid) { - for (unsigned int i = 0; i < players.size(); i++) + for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> p = players[i]; + std::shared_ptr<ServerPlayer> p = players[i]; if (p->getXuid() == uid || p->getOnlineXuid() == uid) // 4J - used to be case insensitive (using equalsIgnoreCase) - imagine we'll be shifting to XUIDs anyway { return p; @@ -1018,23 +1018,23 @@ shared_ptr<ServerPlayer> PlayerList::getPlayer(PlayerUID uid) void PlayerList::sendMessage(const wstring& name, const wstring& message) { - shared_ptr<ServerPlayer> player = getPlayer(name); + std::shared_ptr<ServerPlayer> player = getPlayer(name); if (player != NULL) { - player->connection->send( shared_ptr<ChatPacket>( new ChatPacket(message) ) ); + player->connection->send( std::shared_ptr<ChatPacket>( new ChatPacket(message) ) ); } } -void PlayerList::broadcast(double x, double y, double z, double range, int dimension, shared_ptr<Packet> packet) +void PlayerList::broadcast(double x, double y, double z, double range, int dimension, std::shared_ptr<Packet> packet) { broadcast(nullptr, x, y, z, range, dimension, packet); } -void PlayerList::broadcast(shared_ptr<Player> except, double x, double y, double z, double range, int dimension, shared_ptr<Packet> packet) +void PlayerList::broadcast(std::shared_ptr<Player> except, double x, double y, double z, double range, int dimension, std::shared_ptr<Packet> packet) { // 4J - altered so that we don't send to the same machine more than once. Add the source player to the machines we have "sent" to as it doesn't need to go to that // machine either - vector< shared_ptr<ServerPlayer> > sentTo; + vector< std::shared_ptr<ServerPlayer> > sentTo; if( except != NULL ) { sentTo.push_back(dynamic_pointer_cast<ServerPlayer>(except)); @@ -1042,7 +1042,7 @@ void PlayerList::broadcast(shared_ptr<Player> except, double x, double y, double for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> p = players[i]; + std::shared_ptr<ServerPlayer> p = players[i]; if (p == except) continue; if (p->dimension != dimension) continue; @@ -1057,9 +1057,9 @@ void PlayerList::broadcast(shared_ptr<Player> except, double x, double y, double } else { - for(unsigned int j = 0; j < sentTo.size(); j++ ) + for(unsigned int j = 0; j < sentTo.size(); j++ ) { - shared_ptr<ServerPlayer> player2 = sentTo[j]; + std::shared_ptr<ServerPlayer> player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { @@ -1080,7 +1080,7 @@ void PlayerList::broadcast(shared_ptr<Player> except, double x, double y, double if (xd * xd + yd * yd + zd * zd < range * range) { #if 0 // _DEBUG - shared_ptr<LevelSoundPacket> SoundPacket= dynamic_pointer_cast<LevelSoundPacket>(packet); + std::shared_ptr<LevelSoundPacket> SoundPacket= dynamic_pointer_cast<LevelSoundPacket>(packet); if(SoundPacket) { @@ -1099,10 +1099,10 @@ void PlayerList::broadcast(shared_ptr<Player> except, double x, double y, double void PlayerList::broadcastToAllOps(const wstring& message) { - shared_ptr<Packet> chatPacket = shared_ptr<ChatPacket>( new ChatPacket(message) ); + std::shared_ptr<Packet> chatPacket = std::shared_ptr<ChatPacket>( new ChatPacket(message) ); for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<ServerPlayer> p = players[i]; + std::shared_ptr<ServerPlayer> p = players[i]; if (isOp(p->name)) { p->connection->send(chatPacket); @@ -1110,9 +1110,9 @@ void PlayerList::broadcastToAllOps(const wstring& message) } } -bool PlayerList::sendTo(const wstring& name, shared_ptr<Packet> packet) +bool PlayerList::sendTo(const wstring& name, std::shared_ptr<Packet> packet) { - shared_ptr<ServerPlayer> player = getPlayer(name); + std::shared_ptr<ServerPlayer> player = getPlayer(name); if (player != NULL) { player->connection->send(packet); @@ -1131,7 +1131,7 @@ void PlayerList::saveAll(ProgressListener *progressListener, bool bDeleteGuestMa for (unsigned int i = 0; i < players.size(); i++) { playerIo->save(players[i]); - + //4J Stu - We don't want to save the map data for guests, so when we are sure that the player is gone delete the map if(bDeleteGuestMaps && players[i]->isGuest()) playerIo->deleteMapFilesForPlayer(players[i]); @@ -1154,28 +1154,28 @@ void PlayerList::reloadWhitelist() { } -void PlayerList::sendLevelInfo(shared_ptr<ServerPlayer> player, ServerLevel *level) +void PlayerList::sendLevelInfo(std::shared_ptr<ServerPlayer> player, ServerLevel *level) { - player->connection->send( shared_ptr<SetTimePacket>( new SetTimePacket(level->getTime()) ) ); + player->connection->send( std::shared_ptr<SetTimePacket>( new SetTimePacket(level->getTime()) ) ); if (level->isRaining()) { - player->connection->send( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::START_RAINING, 0) ) ); + player->connection->send( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::START_RAINING, 0) ) ); } else { // 4J Stu - Fix for #44836 - Customer Encountered: Out of Sync Weather [A-10] // If it was raining when the player left the level, and is now not raining we need to make sure that state is updated - player->connection->send( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::STOP_RAINING, 0) ) ); + player->connection->send( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::STOP_RAINING, 0) ) ); } - // send the stronghold position if there is one + // send the stronghold position if there is one if((level->dimension->id==0) && level->getLevelData()->getHasStronghold()) { - player->connection->send( shared_ptr<XZPacket>( new XZPacket(XZPacket::STRONGHOLD,level->getLevelData()->getXStronghold(),level->getLevelData()->getZStronghold()) ) ); + player->connection->send( std::shared_ptr<XZPacket>( new XZPacket(XZPacket::STRONGHOLD,level->getLevelData()->getXStronghold(),level->getLevelData()->getZStronghold()) ) ); } } -void PlayerList::sendAllPlayerInfo(shared_ptr<ServerPlayer> player) +void PlayerList::sendAllPlayerInfo(std::shared_ptr<ServerPlayer> player) { player->refreshContainer(player->inventoryMenu); player->resetSentInfo(); @@ -1218,7 +1218,7 @@ void PlayerList::setOverrideGameMode(GameType *gameMode) this->overrideGameMode = gameMode; } -void PlayerList::updatePlayerGameMode(shared_ptr<ServerPlayer> newPlayer, shared_ptr<ServerPlayer> oldPlayer, Level *level) +void PlayerList::updatePlayerGameMode(std::shared_ptr<ServerPlayer> newPlayer, std::shared_ptr<ServerPlayer> oldPlayer, Level *level) { // reset the player's game mode (first pick from old, then copy level if @@ -1239,7 +1239,7 @@ void PlayerList::setAllowCheatsForAllPlayers(bool allowCommands) this->allowCheatsForAllPlayers = allowCommands; } -shared_ptr<ServerPlayer> PlayerList::findAlivePlayerOnSystem(shared_ptr<ServerPlayer> player) +std::shared_ptr<ServerPlayer> PlayerList::findAlivePlayerOnSystem(std::shared_ptr<ServerPlayer> player) { int dimIndex, playerDim; dimIndex = playerDim = player->dimension; @@ -1251,7 +1251,7 @@ shared_ptr<ServerPlayer> PlayerList::findAlivePlayerOnSystem(shared_ptr<ServerPl { for(AUTO_VAR(itP, players.begin()); itP != players.end(); ++itP) { - shared_ptr<ServerPlayer> newPlayer = *itP; + std::shared_ptr<ServerPlayer> newPlayer = *itP; INetworkPlayer *otherPlayer = newPlayer->connection->getNetworkPlayer(); @@ -1270,7 +1270,7 @@ shared_ptr<ServerPlayer> PlayerList::findAlivePlayerOnSystem(shared_ptr<ServerPl return nullptr; } -void PlayerList::removePlayerFromReceiving(shared_ptr<ServerPlayer> player, bool usePlayerDimension /*= true*/, int dimension /*= 0*/) +void PlayerList::removePlayerFromReceiving(std::shared_ptr<ServerPlayer> player, bool usePlayerDimension /*= true*/, int dimension /*= 0*/) { int dimIndex, playerDim; dimIndex = playerDim = usePlayerDimension ? player->dimension : dimension; @@ -1297,7 +1297,7 @@ void PlayerList::removePlayerFromReceiving(shared_ptr<ServerPlayer> player, bool { for(AUTO_VAR(itP, players.begin()); itP != players.end(); ++itP) { - shared_ptr<ServerPlayer> newPlayer = *itP; + std::shared_ptr<ServerPlayer> newPlayer = *itP; INetworkPlayer *otherPlayer = newPlayer->connection->getNetworkPlayer(); @@ -1324,7 +1324,7 @@ void PlayerList::removePlayerFromReceiving(shared_ptr<ServerPlayer> player, bool // Re-check all active players and make sure they have someone on their system to receive all packets for(AUTO_VAR(itP, players.begin()); itP != players.end(); ++itP) { - shared_ptr<ServerPlayer> newPlayer = *itP; + std::shared_ptr<ServerPlayer> newPlayer = *itP; INetworkPlayer *checkingPlayer = newPlayer->connection->getNetworkPlayer(); if( checkingPlayer != NULL ) @@ -1335,7 +1335,7 @@ void PlayerList::removePlayerFromReceiving(shared_ptr<ServerPlayer> player, bool bool foundPrimary = false; for(AUTO_VAR(it, receiveAllPlayers[newPlayerDim].begin()); it != receiveAllPlayers[newPlayerDim].end(); ++it) { - shared_ptr<ServerPlayer> primaryPlayer = *it; + std::shared_ptr<ServerPlayer> primaryPlayer = *it; INetworkPlayer *primPlayer = primaryPlayer->connection->getNetworkPlayer(); if(primPlayer != NULL && checkingPlayer->IsSameSystem( primPlayer ) ) { @@ -1355,7 +1355,7 @@ void PlayerList::removePlayerFromReceiving(shared_ptr<ServerPlayer> player, bool } } -void PlayerList::addPlayerToReceiving(shared_ptr<ServerPlayer> player) +void PlayerList::addPlayerToReceiving(std::shared_ptr<ServerPlayer> player) { int playerDim = 0; if( player->dimension == -1 ) playerDim = 1; @@ -1380,16 +1380,16 @@ void PlayerList::addPlayerToReceiving(shared_ptr<ServerPlayer> player) { for(AUTO_VAR(it, receiveAllPlayers[playerDim].begin()); it != receiveAllPlayers[playerDim].end(); ++it) { - shared_ptr<ServerPlayer> oldPlayer = *it; + std::shared_ptr<ServerPlayer> oldPlayer = *it; INetworkPlayer *checkingPlayer = oldPlayer->connection->getNetworkPlayer(); - if(checkingPlayer != NULL && checkingPlayer->IsSameSystem( thisPlayer ) ) + if(checkingPlayer != NULL && checkingPlayer->IsSameSystem( thisPlayer ) ) { shouldAddPlayer = false; break; } } } - + if( shouldAddPlayer ) { #ifndef _CONTENT_PACKAGE @@ -1399,14 +1399,14 @@ void PlayerList::addPlayerToReceiving(shared_ptr<ServerPlayer> player) } } -bool PlayerList::canReceiveAllPackets(shared_ptr<ServerPlayer> player) +bool PlayerList::canReceiveAllPackets(std::shared_ptr<ServerPlayer> player) { int playerDim = 0; if( player->dimension == -1 ) playerDim = 1; else if( player->dimension == 1) playerDim = 2; for(AUTO_VAR(it, receiveAllPlayers[playerDim].begin()); it != receiveAllPlayers[playerDim].end(); ++it) { - shared_ptr<ServerPlayer> newPlayer = *it; + std::shared_ptr<ServerPlayer> newPlayer = *it; if(newPlayer == player) { return true; diff --git a/Minecraft.Client/PlayerList.h b/Minecraft.Client/PlayerList.h index 14bd6b2d..23b48f74 100644 --- a/Minecraft.Client/PlayerList.h +++ b/Minecraft.Client/PlayerList.h @@ -22,7 +22,7 @@ private: static const int SEND_PLAYER_INFO_INTERVAL = 20 * 10; // 4J - brought forward from 1.2.3 // public static Logger logger = Logger.getLogger("Minecraft"); public: - vector<shared_ptr<ServerPlayer> > players; + vector<std::shared_ptr<ServerPlayer> > players; private: MinecraftServer *server; @@ -51,60 +51,60 @@ private: int sendAllPlayerInfoIn; // 4J Added to maintain which players in which dimensions can receive all packet types - vector<shared_ptr<ServerPlayer> > receiveAllPlayers[3]; + vector<std::shared_ptr<ServerPlayer> > receiveAllPlayers[3]; private: - shared_ptr<ServerPlayer> findAlivePlayerOnSystem(shared_ptr<ServerPlayer> currentPlayer); + std::shared_ptr<ServerPlayer> findAlivePlayerOnSystem(std::shared_ptr<ServerPlayer> currentPlayer); public: - void removePlayerFromReceiving(shared_ptr<ServerPlayer> player, bool usePlayerDimension = true, int dimension = 0); - void addPlayerToReceiving(shared_ptr<ServerPlayer> player); - bool canReceiveAllPackets(shared_ptr<ServerPlayer> player); + void removePlayerFromReceiving(std::shared_ptr<ServerPlayer> player, bool usePlayerDimension = true, int dimension = 0); + void addPlayerToReceiving(std::shared_ptr<ServerPlayer> player); + bool canReceiveAllPackets(std::shared_ptr<ServerPlayer> player); public: PlayerList(MinecraftServer *server); ~PlayerList(); - void placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> player, shared_ptr<LoginPacket> packet); + void placeNewPlayer(Connection *connection, std::shared_ptr<ServerPlayer> player, std::shared_ptr<LoginPacket> packet); void setLevel(ServerLevelArray levels); - void changeDimension(shared_ptr<ServerPlayer> player, ServerLevel *from); + void changeDimension(std::shared_ptr<ServerPlayer> player, ServerLevel *from); int getMaxRange(); - bool load(shared_ptr<ServerPlayer> player); // 4J Changed return val to bool to check if new player or loaded player + bool load(std::shared_ptr<ServerPlayer> player); // 4J Changed return val to bool to check if new player or loaded player protected: - void save(shared_ptr<ServerPlayer> player); + void save(std::shared_ptr<ServerPlayer> player); public: - void validatePlayerSpawnPosition(shared_ptr<ServerPlayer> player); // 4J Added - void add(shared_ptr<ServerPlayer> player); - void move(shared_ptr<ServerPlayer> player); - void remove(shared_ptr<ServerPlayer> player); - shared_ptr<ServerPlayer> getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID OnlineXuid); - shared_ptr<ServerPlayer> respawn(shared_ptr<ServerPlayer> serverPlayer, int targetDimension, bool keepAllPlayerData); - void toggleDimension(shared_ptr<ServerPlayer> player, int targetDimension); + void validatePlayerSpawnPosition(std::shared_ptr<ServerPlayer> player); // 4J Added + void add(std::shared_ptr<ServerPlayer> player); + void move(std::shared_ptr<ServerPlayer> player); + void remove(std::shared_ptr<ServerPlayer> player); + std::shared_ptr<ServerPlayer> getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID OnlineXuid); + std::shared_ptr<ServerPlayer> respawn(std::shared_ptr<ServerPlayer> serverPlayer, int targetDimension, bool keepAllPlayerData); + void toggleDimension(std::shared_ptr<ServerPlayer> player, int targetDimension); void tick(); bool isTrackingTile(int x, int y, int z, int dimension); // 4J added void prioritiseTileChanges(int x, int y, int z, int dimension); // 4J added - void broadcastAll(shared_ptr<Packet> packet); - void broadcastAll(shared_ptr<Packet> packet, int dimension); + void broadcastAll(std::shared_ptr<Packet> packet); + void broadcastAll(std::shared_ptr<Packet> packet, int dimension); wstring getPlayerNames(); public: bool isWhiteListed(const wstring& name); bool isOp(const wstring& name); - bool isOp(shared_ptr<ServerPlayer> player); // 4J Added - shared_ptr<ServerPlayer> getPlayer(const wstring& name); - shared_ptr<ServerPlayer> getPlayer(PlayerUID uid); + bool isOp(std::shared_ptr<ServerPlayer> player); // 4J Added + std::shared_ptr<ServerPlayer> getPlayer(const wstring& name); + std::shared_ptr<ServerPlayer> getPlayer(PlayerUID uid); void sendMessage(const wstring& name, const wstring& message); - void broadcast(double x, double y, double z, double range, int dimension, shared_ptr<Packet> packet); - void broadcast(shared_ptr<Player> except, double x, double y, double z, double range, int dimension, shared_ptr<Packet> packet); + void broadcast(double x, double y, double z, double range, int dimension, std::shared_ptr<Packet> packet); + void broadcast(std::shared_ptr<Player> except, double x, double y, double z, double range, int dimension, std::shared_ptr<Packet> packet); void broadcastToAllOps(const wstring& message); - bool sendTo(const wstring& name, shared_ptr<Packet> packet); + bool sendTo(const wstring& name, std::shared_ptr<Packet> packet); // 4J Added ProgressListener *progressListener param and bDeleteGuestMaps param void saveAll(ProgressListener *progressListener, bool bDeleteGuestMaps = false); void whiteList(const wstring& playerName); void blackList(const wstring& playerName); // Set<String> getWhiteList(); / 4J removed void reloadWhitelist(); - void sendLevelInfo(shared_ptr<ServerPlayer> player, ServerLevel *level); - void sendAllPlayerInfo(shared_ptr<ServerPlayer> player); + void sendLevelInfo(std::shared_ptr<ServerPlayer> player, ServerLevel *level); + void sendAllPlayerInfo(std::shared_ptr<ServerPlayer> player); int getPlayerCount(); int getPlayerCount(ServerLevel *level); // 4J Added int getMaxPlayers(); @@ -113,7 +113,7 @@ public: void setOverrideGameMode(GameType *gameMode); private: - void updatePlayerGameMode(shared_ptr<ServerPlayer> newPlayer, shared_ptr<ServerPlayer> oldPlayer, Level *level); + void updatePlayerGameMode(std::shared_ptr<ServerPlayer> newPlayer, std::shared_ptr<ServerPlayer> oldPlayer, Level *level); public: void setAllowCheatsForAllPlayers(bool allowCommands); diff --git a/Minecraft.Client/PlayerRenderer.cpp b/Minecraft.Client/PlayerRenderer.cpp index c332b41c..a4455c71 100644 --- a/Minecraft.Client/PlayerRenderer.cpp +++ b/Minecraft.Client/PlayerRenderer.cpp @@ -13,7 +13,7 @@ #include "..\Minecraft.World\net.minecraft.h" #include "..\Minecraft.World\StringHelpers.h" -const unsigned int PlayerRenderer::s_nametagColors[MINECRAFT_NET_MAX_PLAYERS] = +const unsigned int PlayerRenderer::s_nametagColors[MINECRAFT_NET_MAX_PLAYERS] = { 0xff000000, // WHITE (represents the "white" player, but using black as the colour) 0xff33cc33, // GREEN @@ -46,10 +46,10 @@ unsigned int PlayerRenderer::getNametagColour(int index) return 0xFF000000; } -int PlayerRenderer::prepareArmor(shared_ptr<Mob> _player, int layer, float a) +int PlayerRenderer::prepareArmor(std::shared_ptr<Mob> _player, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Player> player = dynamic_pointer_cast<Player>(_player); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(_player); // 4J-PB - need to disable rendering armour for some special skins (Daleks) unsigned int uiAnimOverrideBitmask=player->getAnimOverrideBitmask(); @@ -58,7 +58,7 @@ int PlayerRenderer::prepareArmor(shared_ptr<Mob> _player, int layer, float a) return -1; } - shared_ptr<ItemInstance> itemInstance = player->inventory->getArmor(3 - layer); + std::shared_ptr<ItemInstance> itemInstance = player->inventory->getArmor(3 - layer); if (itemInstance != NULL) { Item *item = itemInstance->getItem(); @@ -108,11 +108,11 @@ int PlayerRenderer::prepareArmor(shared_ptr<Mob> _player, int layer, float a) } -void PlayerRenderer::prepareSecondPassArmor(shared_ptr<Mob> _player, int layer, float a) +void PlayerRenderer::prepareSecondPassArmor(std::shared_ptr<Mob> _player, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Player> player = dynamic_pointer_cast<Player>(_player); - shared_ptr<ItemInstance> itemInstance = player->inventory->getArmor(3 - layer); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(_player); + std::shared_ptr<ItemInstance> itemInstance = player->inventory->getArmor(3 - layer); if (itemInstance != NULL) { Item *item = itemInstance->getItem(); @@ -127,14 +127,14 @@ void PlayerRenderer::prepareSecondPassArmor(shared_ptr<Mob> _player, int layer, } } -void PlayerRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void PlayerRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); + std::shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); if(mob->hasInvisiblePrivilege()) return; - shared_ptr<ItemInstance> item = mob->inventory->getSelected(); + std::shared_ptr<ItemInstance> item = mob->inventory->getSelected(); armorParts1->holdingRightHand = armorParts2->holdingRightHand = humanoidModel->holdingRightHand = item != NULL ? 1 : 0; if (item != NULL) { @@ -228,10 +228,10 @@ void PlayerRenderer::render(shared_ptr<Entity> _mob, double x, double y, double } -void PlayerRenderer::renderName(shared_ptr<Mob> _mob, double x, double y, double z) +void PlayerRenderer::renderName(std::shared_ptr<Mob> _mob, double x, double y, double z) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); + std::shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); if (Minecraft::renderNames() && mob != entityRenderDispatcher->cameraEntity && !mob->isInvisibleTo(Minecraft::GetInstance()->player) ) // 4J-JEV: Todo, move to LivingEntityRenderer. @@ -256,7 +256,7 @@ void PlayerRenderer::renderName(shared_ptr<Mob> _mob, double x, double y, double { if ( app.GetGameSettings(eGameSetting_DisplayHUD)==0 ) { - // 4J-PB - turn off gamertag render + // 4J-PB - turn off gamertag render return; } @@ -316,14 +316,14 @@ void PlayerRenderer::renderName(shared_ptr<Mob> _mob, double x, double y, double } -void PlayerRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) +void PlayerRenderer::additionalRendering(std::shared_ptr<Mob> _mob, float a) { MobRenderer::additionalRendering(_mob,a); // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); + std::shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); - shared_ptr<ItemInstance> headGear = mob->inventory->getArmor(3); + std::shared_ptr<ItemInstance> headGear = mob->inventory->getArmor(3); if (headGear != NULL) { // don't render the pumpkin for the skins @@ -426,9 +426,9 @@ void PlayerRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) humanoidModel->renderCloak(1 / 16.0f,true); glPopMatrix(); } - - shared_ptr<ItemInstance> item = mob->inventory->getSelected(); + + std::shared_ptr<ItemInstance> item = mob->inventory->getSelected(); if (item != NULL) { @@ -438,7 +438,7 @@ void PlayerRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) if (mob->fishing != NULL) { - item = shared_ptr<ItemInstance>( new ItemInstance(Item::stick) ); + item = std::shared_ptr<ItemInstance>( new ItemInstance(Item::stick) ); } UseAnim anim = UseAnim_none;//null; @@ -521,7 +521,7 @@ void PlayerRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) } -void PlayerRenderer::scale(shared_ptr<Mob> player, float a) +void PlayerRenderer::scale(std::shared_ptr<Mob> player, float a) { float s = 15 / 16.0f; glScalef(s, s, s); @@ -540,10 +540,10 @@ void PlayerRenderer::renderHand() } } -void PlayerRenderer::setupPosition(shared_ptr<Mob> _mob, double x, double y, double z) +void PlayerRenderer::setupPosition(std::shared_ptr<Mob> _mob, double x, double y, double z) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); + std::shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); if (mob->isAlive() && mob->isSleeping()) { @@ -556,10 +556,10 @@ void PlayerRenderer::setupPosition(shared_ptr<Mob> _mob, double x, double y, dou } } -void PlayerRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a) +void PlayerRenderer::setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); + std::shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob); if (mob->isAlive() && mob->isSleeping()) { @@ -574,11 +574,11 @@ void PlayerRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyR } // 4J Added override to stop rendering shadow if player is invisible -void PlayerRenderer::renderShadow(shared_ptr<Entity> e, double x, double y, double z, float pow, float a) +void PlayerRenderer::renderShadow(std::shared_ptr<Entity> e, double x, double y, double z, float pow, float a) { if(app.GetGameHostOption(eGameHostOption_HostCanBeInvisible) > 0) { - shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); + std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(e); if(player != NULL && player->hasInvisiblePrivilege()) return; } EntityRenderer::renderShadow(e,x,y,z,pow,a); diff --git a/Minecraft.Client/PlayerRenderer.h b/Minecraft.Client/PlayerRenderer.h index 10564104..0d82fb8f 100644 --- a/Minecraft.Client/PlayerRenderer.h +++ b/Minecraft.Client/PlayerRenderer.h @@ -23,20 +23,20 @@ private: static const wstring MATERIAL_NAMES[5]; protected: - virtual int prepareArmor(shared_ptr<Mob> _player, int layer, float a); - virtual void prepareSecondPassArmor(shared_ptr<Mob> mob, int layer, float a); + virtual int prepareArmor(std::shared_ptr<Mob> _player, int layer, float a); + virtual void prepareSecondPassArmor(std::shared_ptr<Mob> mob, int layer, float a); public: - virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); protected: - virtual void renderName(shared_ptr<Mob> _mob, double x, double y, double z); - virtual void additionalRendering(shared_ptr<Mob> _mob, float a); - virtual void scale(shared_ptr<Mob> _player, float a); + virtual void renderName(std::shared_ptr<Mob> _mob, double x, double y, double z); + virtual void additionalRendering(std::shared_ptr<Mob> _mob, float a); + virtual void scale(std::shared_ptr<Mob> _player, float a); public: void renderHand(); protected: - virtual void setupPosition(shared_ptr<Mob> _mob, double x, double y, double z); - virtual void setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a); + virtual void setupPosition(std::shared_ptr<Mob> _mob, double x, double y, double z); + virtual void setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a); -private: - virtual void renderShadow(shared_ptr<Entity> e, double x, double y, double z, float pow, float a); // 4J Added override +private: + virtual void renderShadow(std::shared_ptr<Entity> e, double x, double y, double z, float pow, float a); // 4J Added override };
\ No newline at end of file diff --git a/Minecraft.Client/QuadrupedModel.cpp b/Minecraft.Client/QuadrupedModel.cpp index fa7e3b4b..f106607d 100644 --- a/Minecraft.Client/QuadrupedModel.cpp +++ b/Minecraft.Client/QuadrupedModel.cpp @@ -41,11 +41,11 @@ QuadrupedModel::QuadrupedModel(int legSize, float g) : Model() leg3->compile(1.0f/16.0f); } -void QuadrupedModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void QuadrupedModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); - if (young) + if (young) { float ss = 2.0f; glPushMatrix(); @@ -61,8 +61,8 @@ void QuadrupedModel::render(shared_ptr<Entity> entity, float time, float r, floa leg2->render(scale, usecompiled); leg3->render(scale, usecompiled); glPopMatrix(); - } - else + } + else { head->render(scale, usecompiled); body->render(scale, usecompiled); @@ -102,7 +102,7 @@ void QuadrupedModel::render(QuadrupedModel *model, float scale, bool usecompiled leg2->xRot = model->leg2->xRot; leg3->xRot = model->leg3->xRot; - if (young) + if (young) { float ss = 2.0f; glPushMatrix(); @@ -118,8 +118,8 @@ void QuadrupedModel::render(QuadrupedModel *model, float scale, bool usecompiled leg2->render(scale, usecompiled); leg3->render(scale, usecompiled); glPopMatrix(); - } - else + } + else { head->render(scale, usecompiled); body->render(scale, usecompiled); diff --git a/Minecraft.Client/QuadrupedModel.h b/Minecraft.Client/QuadrupedModel.h index 47c50599..d1c24de7 100644 --- a/Minecraft.Client/QuadrupedModel.h +++ b/Minecraft.Client/QuadrupedModel.h @@ -7,7 +7,7 @@ public: ModelPart *head, *body, *leg0, *leg1, *leg2, *leg3; QuadrupedModel(int legSize, float g); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); void render(QuadrupedModel *model, float scale, bool usecompiled); };
\ No newline at end of file diff --git a/Minecraft.Client/ReceivingLevelScreen.cpp b/Minecraft.Client/ReceivingLevelScreen.cpp index 0e9fe3ec..1089dc51 100644 --- a/Minecraft.Client/ReceivingLevelScreen.cpp +++ b/Minecraft.Client/ReceivingLevelScreen.cpp @@ -23,7 +23,7 @@ void ReceivingLevelScreen::tick() tickCount++; if (tickCount % 20 == 0) { - connection->send( shared_ptr<KeepAlivePacket>( new KeepAlivePacket() ) ); + connection->send( std::shared_ptr<KeepAlivePacket>( new KeepAlivePacket() ) ); } if (connection != NULL) { diff --git a/Minecraft.Client/RemotePlayer.cpp b/Minecraft.Client/RemotePlayer.cpp index c1b72864..d5deca18 100644 --- a/Minecraft.Client/RemotePlayer.cpp +++ b/Minecraft.Client/RemotePlayer.cpp @@ -66,7 +66,7 @@ void RemotePlayer::tick() if (!hasStartedUsingItem && isUsingItemFlag() && inventory->items[inventory->selected] != NULL) { - shared_ptr<ItemInstance> item = inventory->items[inventory->selected]; + std::shared_ptr<ItemInstance> item = inventory->items[inventory->selected]; startUsingItem(inventory->items[inventory->selected], Item::items[item->id]->getUseDuration(item)); hasStartedUsingItem = true; } @@ -129,7 +129,7 @@ void RemotePlayer::aiStep() } // 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game -void RemotePlayer::setEquippedSlot(int slot, shared_ptr<ItemInstance> item) +void RemotePlayer::setEquippedSlot(int slot, std::shared_ptr<ItemInstance> item) { if (slot == 0) { diff --git a/Minecraft.Client/RemotePlayer.h b/Minecraft.Client/RemotePlayer.h index b55fab16..19076ef6 100644 --- a/Minecraft.Client/RemotePlayer.h +++ b/Minecraft.Client/RemotePlayer.h @@ -26,7 +26,7 @@ public: virtual void tick(); virtual float getShadowHeightOffs(); virtual void aiStep(); - virtual void setEquippedSlot(int slot, shared_ptr<ItemInstance> item);// 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game + virtual void setEquippedSlot(int slot, std::shared_ptr<ItemInstance> item);// 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game virtual void animateRespawn(); virtual float getHeadHeight(); bool hasPermission(EGameCommand command) { return false; } diff --git a/Minecraft.Client/ServerCommandDispatcher.cpp b/Minecraft.Client/ServerCommandDispatcher.cpp index 51dd42fe..af0271fe 100644 --- a/Minecraft.Client/ServerCommandDispatcher.cpp +++ b/Minecraft.Client/ServerCommandDispatcher.cpp @@ -52,13 +52,13 @@ ServerCommandDispatcher::ServerCommandDispatcher() Command::setLogger(this); } -void ServerCommandDispatcher::logAdminCommand(shared_ptr<CommandSender> source, int type, ChatPacket::EChatPacketMessage messageType, const wstring& message, int customData, const wstring& additionalMessage) +void ServerCommandDispatcher::logAdminCommand(std::shared_ptr<CommandSender> source, int type, ChatPacket::EChatPacketMessage messageType, const wstring& message, int customData, const wstring& additionalMessage) { PlayerList *playerList = MinecraftServer::getInstance()->getPlayers(); //for (Player player : MinecraftServer.getInstance().getPlayers().players) for(AUTO_VAR(it, playerList->players.begin()); it != playerList->players.end(); ++it) { - shared_ptr<ServerPlayer> player = *it; + std::shared_ptr<ServerPlayer> player = *it; if (player != source && playerList->isOp(player)) { // TODO: Change chat packet to be able to send more bits of data diff --git a/Minecraft.Client/ServerCommandDispatcher.h b/Minecraft.Client/ServerCommandDispatcher.h index 306d4384..04847fce 100644 --- a/Minecraft.Client/ServerCommandDispatcher.h +++ b/Minecraft.Client/ServerCommandDispatcher.h @@ -7,5 +7,5 @@ class ServerCommandDispatcher : public CommandDispatcher, public AdminLogCommand { public: ServerCommandDispatcher(); - void logAdminCommand(shared_ptr<CommandSender> source, int type, ChatPacket::EChatPacketMessage messageType, const wstring& message = L"", int customData = -1, const wstring& additionalMessage = L""); + void logAdminCommand(std::shared_ptr<CommandSender> source, int type, ChatPacket::EChatPacketMessage messageType, const wstring& message = L"", int customData = -1, const wstring& additionalMessage = L""); };
\ No newline at end of file diff --git a/Minecraft.Client/ServerConnection.cpp b/Minecraft.Client/ServerConnection.cpp index 9880a8c6..064c7b51 100644 --- a/Minecraft.Client/ServerConnection.cpp +++ b/Minecraft.Client/ServerConnection.cpp @@ -26,16 +26,16 @@ ServerConnection::~ServerConnection() // 4J - added to handle incoming connections, to replace thread that original used to have void ServerConnection::NewIncomingSocket(Socket *socket) { - shared_ptr<PendingConnection> unconnectedClient = shared_ptr<PendingConnection>(new PendingConnection(server, socket, L"Connection #" + _toString<int>(connectionCounter++))); - handleConnection(unconnectedClient); + std::shared_ptr<PendingConnection> unconnectedClient = std::shared_ptr<PendingConnection>(new PendingConnection(server, socket, L"Connection #" + _toString<int>(connectionCounter++))); + handleConnection(unconnectedClient); } -void ServerConnection::addPlayerConnection(shared_ptr<PlayerConnection> uc) +void ServerConnection::addPlayerConnection(std::shared_ptr<PlayerConnection> uc) { players.push_back(uc); } -void ServerConnection::handleConnection(shared_ptr<PendingConnection> uc) +void ServerConnection::handleConnection(std::shared_ptr<PendingConnection> uc) { EnterCriticalSection(&pending_cs); pending.push_back(uc); @@ -47,14 +47,14 @@ void ServerConnection::stop() EnterCriticalSection(&pending_cs); for (unsigned int i = 0; i < pending.size(); i++) { - shared_ptr<PendingConnection> uc = pending[i]; + std::shared_ptr<PendingConnection> uc = pending[i]; uc->connection->close(DisconnectPacket::eDisconnect_Closed); } LeaveCriticalSection(&pending_cs); for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<PlayerConnection> player = players[i]; + std::shared_ptr<PlayerConnection> player = players[i]; player->connection->close(DisconnectPacket::eDisconnect_Closed); } } @@ -64,12 +64,12 @@ void ServerConnection::tick() { // MGH - changed this so that the the CS lock doesn't cover the tick (was causing a lockup when 2 players tried to join) EnterCriticalSection(&pending_cs); - vector< shared_ptr<PendingConnection> > tempPending = pending; + vector< std::shared_ptr<PendingConnection> > tempPending = pending; LeaveCriticalSection(&pending_cs); for (unsigned int i = 0; i < tempPending.size(); i++) { - shared_ptr<PendingConnection> uc = tempPending[i]; + std::shared_ptr<PendingConnection> uc = tempPending[i]; // try { // 4J - removed try/catch uc->tick(); // } catch (Exception e) { @@ -92,8 +92,8 @@ void ServerConnection::tick() for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<PlayerConnection> player = players[i]; - shared_ptr<ServerPlayer> serverPlayer = player->getPlayer(); + std::shared_ptr<PlayerConnection> player = players[i]; + std::shared_ptr<ServerPlayer> serverPlayer = player->getPlayer(); if( serverPlayer ) { serverPlayer->doChunkSendingTick(false); @@ -138,7 +138,7 @@ void ServerConnection::handleTextureReceived(const wstring &textureName) } for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<PlayerConnection> player = players[i]; + std::shared_ptr<PlayerConnection> player = players[i]; if (!player->done) { player->handleTextureReceived(textureName); @@ -155,7 +155,7 @@ void ServerConnection::handleTextureAndGeometryReceived(const wstring &textureNa } for (unsigned int i = 0; i < players.size(); i++) { - shared_ptr<PlayerConnection> player = players[i]; + std::shared_ptr<PlayerConnection> player = players[i]; if (!player->done) { player->handleTextureAndGeometryReceived(textureName); @@ -163,7 +163,7 @@ void ServerConnection::handleTextureAndGeometryReceived(const wstring &textureNa } } -void ServerConnection::handleServerSettingsChanged(shared_ptr<ServerSettingsChangedPacket> packet) +void ServerConnection::handleServerSettingsChanged(std::shared_ptr<ServerSettingsChangedPacket> packet) { Minecraft *pMinecraft = Minecraft::GetInstance(); @@ -176,7 +176,7 @@ void ServerConnection::handleServerSettingsChanged(shared_ptr<ServerSettingsChan app.DebugPrintf("ClientConnection::handleServerSettingsChanged - Difficulty = %d",packet->data); pMinecraft->levels[i]->difficulty = packet->data; } - } + } } // else if(packet->action==ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS)// options // { @@ -194,11 +194,11 @@ void ServerConnection::handleServerSettingsChanged(shared_ptr<ServerSettingsChan // { // pMinecraft->options->SetGamertagSetting(false); // } -// +// // for (unsigned int i = 0; i < players.size(); i++) // { -// shared_ptr<PlayerConnection> playerconnection = players[i]; -// playerconnection->setShowOnMaps(pMinecraft->options->GetGamertagSetting()); +// std::shared_ptr<PlayerConnection> playerconnection = players[i]; +// playerconnection->setShowOnMaps(pMinecraft->options->GetGamertagSetting()); // } // } }
\ No newline at end of file diff --git a/Minecraft.Client/ServerConnection.h b/Minecraft.Client/ServerConnection.h index 56c5d39e..e4105675 100644 --- a/Minecraft.Client/ServerConnection.h +++ b/Minecraft.Client/ServerConnection.h @@ -20,8 +20,8 @@ private: int connectionCounter; private: CRITICAL_SECTION pending_cs; // 4J added - vector< shared_ptr<PendingConnection> > pending; - vector< shared_ptr<PlayerConnection> > players; + vector< std::shared_ptr<PendingConnection> > pending; + vector< std::shared_ptr<PlayerConnection> > players; // 4J - When the server requests a texture, it should add it to here while we are waiting for it vector<wstring> m_pendingTextureRequests; @@ -34,9 +34,9 @@ public: void NewIncomingSocket(Socket *socket); // 4J - added void removeSpamProtection(Socket *socket) { }// 4J Stu - Not implemented as not required - void addPlayerConnection(shared_ptr<PlayerConnection> uc); + void addPlayerConnection(std::shared_ptr<PlayerConnection> uc); private: - void handleConnection(shared_ptr<PendingConnection> uc); + void handleConnection(std::shared_ptr<PendingConnection> uc); public: void stop(); void tick(); @@ -45,5 +45,5 @@ public: bool addPendingTextureRequest(const wstring &textureName); void handleTextureReceived(const wstring &textureName); void handleTextureAndGeometryReceived(const wstring &textureName); - void handleServerSettingsChanged(shared_ptr<ServerSettingsChangedPacket> packet); + void handleServerSettingsChanged(std::shared_ptr<ServerSettingsChangedPacket> packet); }; diff --git a/Minecraft.Client/ServerLevel.cpp b/Minecraft.Client/ServerLevel.cpp index 05566ad8..c416bb85 100644 --- a/Minecraft.Client/ServerLevel.cpp +++ b/Minecraft.Client/ServerLevel.cpp @@ -91,7 +91,7 @@ void ServerLevel::staticCtor() }; -ServerLevel::ServerLevel(MinecraftServer *server, shared_ptr<LevelStorage>levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings) : Level(levelStorage, levelName, levelSettings, Dimension::getNew(dimension), false) +ServerLevel::ServerLevel(MinecraftServer *server, std::shared_ptr<LevelStorage>levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings) : Level(levelStorage, levelName, levelSettings, Dimension::getNew(dimension), false) { InitializeCriticalSection(&m_limiterCS); InitializeCriticalSection(&m_tickNextTickCS); @@ -289,7 +289,7 @@ void ServerLevel::updateSleepingPlayerList() m_bAtLeastOnePlayerSleeping = false; AUTO_VAR(itEnd, players.end()); - for (vector<shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++) + for (vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++) { if (!(*it)->isSleeping()) { @@ -310,7 +310,7 @@ void ServerLevel::awakenAllPlayers() m_bAtLeastOnePlayerSleeping = false; AUTO_VAR(itEnd, players.end()); - for (vector<shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++) + for (vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++) { if ((*it)->isSleeping()) { @@ -335,7 +335,7 @@ bool ServerLevel::allPlayersAreSleeping() { // all players are sleeping, but have they slept long enough? AUTO_VAR(itEnd, players.end()); - for (vector<shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++ ) + for (vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++ ) { // System.out.println(player->entityId + ": " + player->getSleepTimer()); if (! (*it)->isSleepingLongEnough()) @@ -467,7 +467,7 @@ void ServerLevel::tickTiles() if (isRainingAt(x, y, z)) { - addGlobalEntity( shared_ptr<LightningBolt>( new LightningBolt(this, x, y, z) ) ); + addGlobalEntity( std::shared_ptr<LightningBolt>( new LightningBolt(this, x, y, z) ) ); lightningTime = 2; } } @@ -665,7 +665,7 @@ vector<TickNextTickData> *ServerLevel::fetchTicksInChunk(LevelChunk *chunk, bool return results; } -void ServerLevel::tick(shared_ptr<Entity> e, bool actual) +void ServerLevel::tick(std::shared_ptr<Entity> e, bool actual) { if (!server->isAnimals() && ((e->GetType() & eTYPE_ANIMAL) || (e->GetType() & eTYPE_WATERANIMAL))) { @@ -681,7 +681,7 @@ void ServerLevel::tick(shared_ptr<Entity> e, bool actual) } } -void ServerLevel::forceTick(shared_ptr<Entity> e, bool actual) +void ServerLevel::forceTick(std::shared_ptr<Entity> e, bool actual) { Level::tick(e, actual); } @@ -693,12 +693,12 @@ ChunkSource *ServerLevel::createChunkSource() return cache; } -vector<shared_ptr<TileEntity> > *ServerLevel::getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1) +vector<std::shared_ptr<TileEntity> > *ServerLevel::getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1) { - vector<shared_ptr<TileEntity> > *result = new vector<shared_ptr<TileEntity> >; + vector<std::shared_ptr<TileEntity> > *result = new vector<std::shared_ptr<TileEntity> >; for (unsigned int i = 0; i < tileEntityList.size(); i++) { - shared_ptr<TileEntity> te = tileEntityList[i]; + std::shared_ptr<TileEntity> te = tileEntityList[i]; if (te->x >= x0 && te->y >= y0 && te->z >= z0 && te->x < x1 && te->y < y1 && te->z < z1) { result->push_back(te); @@ -707,7 +707,7 @@ vector<shared_ptr<TileEntity> > *ServerLevel::getTileEntitiesInRegion(int x0, in return result; } -bool ServerLevel::mayInteract(shared_ptr<Player> player, int xt, int yt, int zt, int content) +bool ServerLevel::mayInteract(std::shared_ptr<Player> player, int xt, int yt, int zt, int content) { // 4J-PB - This will look like a bug to players, and we really should have a message to explain why we're not allowing lava to be placed at or near a spawn point // We'll need to do this in a future update @@ -814,7 +814,7 @@ void ServerLevel::generateBonusItemsNearSpawn() if( getTile( x, y, z ) == Tile::chest_Id ) { - shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(getTileEntity(x, y, z)); + std::shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(getTileEntity(x, y, z)); if (chest != NULL) { if( chest->isBonusChest ) @@ -948,11 +948,11 @@ void ServerLevel::saveLevelData() savedDataStorage->save(); } -void ServerLevel::entityAdded(shared_ptr<Entity> e) +void ServerLevel::entityAdded(std::shared_ptr<Entity> e) { Level::entityAdded(e); entitiesById[e->entityId] = e; - vector<shared_ptr<Entity> > *es = e->getSubEntities(); + vector<std::shared_ptr<Entity> > *es = e->getSubEntities(); if (es != NULL) { //for (int i = 0; i < es.length; i++) @@ -964,11 +964,11 @@ void ServerLevel::entityAdded(shared_ptr<Entity> e) entityAddedExtra(e); // 4J added } -void ServerLevel::entityRemoved(shared_ptr<Entity> e) +void ServerLevel::entityRemoved(std::shared_ptr<Entity> e) { Level::entityRemoved(e); entitiesById.erase(e->entityId); - vector<shared_ptr<Entity> > *es = e->getSubEntities(); + vector<std::shared_ptr<Entity> > *es = e->getSubEntities(); if (es != NULL) { //for (int i = 0; i < es.length; i++) @@ -980,32 +980,32 @@ void ServerLevel::entityRemoved(shared_ptr<Entity> e) entityRemovedExtra(e); // 4J added } -shared_ptr<Entity> ServerLevel::getEntity(int id) +std::shared_ptr<Entity> ServerLevel::getEntity(int id) { return entitiesById[id]; } -bool ServerLevel::addGlobalEntity(shared_ptr<Entity> e) +bool ServerLevel::addGlobalEntity(std::shared_ptr<Entity> e) { if (Level::addGlobalEntity(e)) { - server->getPlayers()->broadcast(e->x, e->y, e->z, 512, dimension->id, shared_ptr<AddGlobalEntityPacket>( new AddGlobalEntityPacket(e) ) ); + server->getPlayers()->broadcast(e->x, e->y, e->z, 512, dimension->id, std::shared_ptr<AddGlobalEntityPacket>( new AddGlobalEntityPacket(e) ) ); return true; } return false; } -void ServerLevel::broadcastEntityEvent(shared_ptr<Entity> e, byte event) +void ServerLevel::broadcastEntityEvent(std::shared_ptr<Entity> e, byte event) { - shared_ptr<Packet> p = shared_ptr<EntityEventPacket>( new EntityEventPacket(e->entityId, event) ); + std::shared_ptr<Packet> p = std::shared_ptr<EntityEventPacket>( new EntityEventPacket(e->entityId, event) ); server->getLevel(dimension->id)->getTracker()->broadcastAndSend(e, p); } -shared_ptr<Explosion> ServerLevel::explode(shared_ptr<Entity> source, double x, double y, double z, float r, bool fire, bool destroyBlocks) +std::shared_ptr<Explosion> ServerLevel::explode(std::shared_ptr<Entity> source, double x, double y, double z, float r, bool fire, bool destroyBlocks) { // instead of calling super, we run the same explosion code here except // we don't generate any particles - shared_ptr<Explosion> explosion = shared_ptr<Explosion>( new Explosion(this, source, x, y, z, r) ); + std::shared_ptr<Explosion> explosion = std::shared_ptr<Explosion>( new Explosion(this, source, x, y, z, r) ); explosion->fire = fire; explosion->destroyBlocks = destroyBlocks; explosion->explode(); @@ -1016,10 +1016,10 @@ shared_ptr<Explosion> ServerLevel::explode(shared_ptr<Entity> source, double x, explosion->toBlow.clear(); } - vector<shared_ptr<ServerPlayer> > sentTo; + vector<std::shared_ptr<ServerPlayer> > sentTo; for(AUTO_VAR(it, players.begin()); it != players.end(); ++it) { - shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(*it); + std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(*it); if (player->dimension != dimension->id) continue; bool knockbackOnly = false; @@ -1034,7 +1034,7 @@ shared_ptr<Explosion> ServerLevel::explode(shared_ptr<Entity> source, double x, { for(unsigned int j = 0; j < sentTo.size(); j++ ) { - shared_ptr<ServerPlayer> player2 = sentTo[j]; + std::shared_ptr<ServerPlayer> player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { @@ -1049,7 +1049,7 @@ shared_ptr<Explosion> ServerLevel::explode(shared_ptr<Entity> source, double x, Vec3 *knockbackVec = explosion->getHitPlayerKnockback(player); //app.DebugPrintf("Sending %s with knockback (%f,%f,%f)\n", knockbackOnly?"knockbackOnly":"allExplosion",knockbackVec->x,knockbackVec->y,knockbackVec->z); // If the player is not the primary on the system, then we only want to send info for the knockback - player->connection->send( shared_ptr<ExplodePacket>( new ExplodePacket(x, y, z, r, &explosion->toBlow, knockbackVec, knockbackOnly))); + player->connection->send( std::shared_ptr<ExplodePacket>( new ExplodePacket(x, y, z, r, &explosion->toBlow, knockbackVec, knockbackOnly))); sentTo.push_back( player ); } } @@ -1088,7 +1088,7 @@ void ServerLevel::runTileEvents() if (doTileEvent(&(*it))) { TileEventData te = *it; - server->getPlayers()->broadcast(te.getX(), te.getY(), te.getZ(), 64, dimension->id, shared_ptr<TileEventPacket>( new TileEventPacket(te.getX(), te.getY(), te.getZ(), te.getTile(), te.getParamA(), te.getParamB()))); + server->getPlayers()->broadcast(te.getX(), te.getY(), te.getZ(), 64, dimension->id, std::shared_ptr<TileEventPacket>( new TileEventPacket(te.getX(), te.getY(), te.getZ(), te.getTile(), te.getParamA(), te.getParamB()))); } } tileEvents[runList].clear(); @@ -1119,11 +1119,11 @@ void ServerLevel::tickWeather() { if (wasRaining) { - server->getPlayers()->broadcastAll( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::STOP_RAINING, 0) ) ); + server->getPlayers()->broadcastAll( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::STOP_RAINING, 0) ) ); } else { - server->getPlayers()->broadcastAll( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::START_RAINING, 0) ) ); + server->getPlayers()->broadcastAll( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::START_RAINING, 0) ) ); } } @@ -1185,7 +1185,7 @@ void ServerLevel::runQueuedSendTileUpdates() } // 4J - added special versions of addEntity and extra processing on entity removed and added so we can limit the number of itementities created -bool ServerLevel::addEntity(shared_ptr<Entity> e) +bool ServerLevel::addEntity(std::shared_ptr<Entity> e) { // If its an item entity, and we've got to our capacity, delete the oldest if( dynamic_pointer_cast<ItemEntity>(e) != NULL ) @@ -1244,7 +1244,7 @@ bool ServerLevel::addEntity(shared_ptr<Entity> e) } // Maintain a cound of primed tnt & falling tiles in this level -void ServerLevel::entityAddedExtra(shared_ptr<Entity> e) +void ServerLevel::entityAddedExtra(std::shared_ptr<Entity> e) { if( dynamic_pointer_cast<ItemEntity>(e) != NULL ) { @@ -1289,7 +1289,7 @@ void ServerLevel::entityAddedExtra(shared_ptr<Entity> e) } // Maintain a cound of primed tnt & falling tiles in this level, and remove any item entities from our list -void ServerLevel::entityRemovedExtra(shared_ptr<Entity> e) +void ServerLevel::entityRemovedExtra(std::shared_ptr<Entity> e) { if( dynamic_pointer_cast<ItemEntity>(e) != NULL ) { diff --git a/Minecraft.Client/ServerLevel.h b/Minecraft.Client/ServerLevel.h index ae413d11..82c5400e 100644 --- a/Minecraft.Client/ServerLevel.h +++ b/Minecraft.Client/ServerLevel.h @@ -41,7 +41,7 @@ private: int activeTileEventsList; public: static void staticCtor(); - ServerLevel(MinecraftServer *server, shared_ptr<LevelStorage>levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings); + ServerLevel(MinecraftServer *server, std::shared_ptr<LevelStorage>levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings); ~ServerLevel(); void tick(); Biome::MobSpawnerData *getRandomMobSpawnAt(MobCategory *mobCategory, int x, int y, int z); @@ -65,15 +65,15 @@ public: void tickEntities(); bool tickPendingTicks(bool force); vector<TickNextTickData> *fetchTicksInChunk(LevelChunk *chunk, bool remove); - virtual void tick(shared_ptr<Entity> e, bool actual); - void forceTick(shared_ptr<Entity> e, bool actual); + virtual void tick(std::shared_ptr<Entity> e, bool actual); + void forceTick(std::shared_ptr<Entity> e, bool actual); bool AllPlayersAreSleeping() { return allPlayersSleeping;} // 4J added for a message to other players bool isAtLeastOnePlayerSleeping() { return m_bAtLeastOnePlayerSleeping;} protected: ChunkSource *createChunkSource(); // 4J - was virtual, but was called from parent ctor public: - vector<shared_ptr<TileEntity> > *getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1); - virtual bool mayInteract(shared_ptr<Player> player, int xt, int yt, int zt, int id); + vector<std::shared_ptr<TileEntity> > *getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1); + virtual bool mayInteract(std::shared_ptr<Player> player, int xt, int yt, int zt, int id); protected: virtual void initializeLevel(LevelSettings *settings); virtual void setInitialSpawn(LevelSettings *settings); @@ -90,16 +90,16 @@ public: private: void saveLevelData(); - typedef unordered_map<int, shared_ptr<Entity> , IntKeyHash2, IntKeyEq> intEntityMap; + typedef unordered_map<int, std::shared_ptr<Entity> , IntKeyHash2, IntKeyEq> intEntityMap; intEntityMap entitiesById; // 4J - was IntHashMap, using same hashing function as this uses protected: - virtual void entityAdded(shared_ptr<Entity> e); - virtual void entityRemoved(shared_ptr<Entity> e); + virtual void entityAdded(std::shared_ptr<Entity> e); + virtual void entityRemoved(std::shared_ptr<Entity> e); public: - shared_ptr<Entity> getEntity(int id); - virtual bool addGlobalEntity(shared_ptr<Entity> e); - void broadcastEntityEvent(shared_ptr<Entity> e, byte event); - virtual shared_ptr<Explosion> explode(shared_ptr<Entity> source, double x, double y, double z, float r, bool fire, bool destroyBlocks); + std::shared_ptr<Entity> getEntity(int id); + virtual bool addGlobalEntity(std::shared_ptr<Entity> e); + void broadcastEntityEvent(std::shared_ptr<Entity> e, byte event); + virtual std::shared_ptr<Explosion> explode(std::shared_ptr<Entity> source, double x, double y, double z, float r, bool fire, bool destroyBlocks); virtual void tileEvent(int x, int y, int z, int tile, int b0, int b1); private: @@ -134,14 +134,14 @@ public: int m_primedTntCount; int m_fallingTileCount; CRITICAL_SECTION m_limiterCS; - list< shared_ptr<Entity> > m_itemEntities; - list< shared_ptr<Entity> > m_hangingEntities; - list< shared_ptr<Entity> > m_arrowEntities; - list< shared_ptr<Entity> > m_experienceOrbEntities; - - virtual bool addEntity(shared_ptr<Entity> e); - void entityAddedExtra(shared_ptr<Entity> e); - void entityRemovedExtra(shared_ptr<Entity> e); + list< std::shared_ptr<Entity> > m_itemEntities; + list< std::shared_ptr<Entity> > m_hangingEntities; + list< std::shared_ptr<Entity> > m_arrowEntities; + list< std::shared_ptr<Entity> > m_experienceOrbEntities; + + virtual bool addEntity(std::shared_ptr<Entity> e); + void entityAddedExtra(std::shared_ptr<Entity> e); + void entityRemovedExtra(std::shared_ptr<Entity> e); virtual bool newPrimedTntAllowed(); virtual bool newFallingTileAllowed(); diff --git a/Minecraft.Client/ServerLevelListener.cpp b/Minecraft.Client/ServerLevelListener.cpp index 3b12630f..6bcf5d28 100644 --- a/Minecraft.Client/ServerLevelListener.cpp +++ b/Minecraft.Client/ServerLevelListener.cpp @@ -18,7 +18,7 @@ ServerLevelListener::ServerLevelListener(MinecraftServer *server, ServerLevel *l this->level = level; } -// 4J removed - +// 4J removed - /* void ServerLevelListener::addParticle(const wstring& name, double x, double y, double z, double xa, double ya, double za) { @@ -33,22 +33,22 @@ void ServerLevelListener::allChanged() { } -void ServerLevelListener::entityAdded(shared_ptr<Entity> entity) +void ServerLevelListener::entityAdded(std::shared_ptr<Entity> entity) { MemSect(10); level->getTracker()->addEntity(entity); MemSect(0); } -void ServerLevelListener::entityRemoved(shared_ptr<Entity> entity) +void ServerLevelListener::entityRemoved(std::shared_ptr<Entity> entity) { level->getTracker()->removeEntity(entity); } // 4J added -void ServerLevelListener::playerRemoved(shared_ptr<Entity> entity) +void ServerLevelListener::playerRemoved(std::shared_ptr<Entity> entity) { - shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(entity); + std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(entity); player->getLevel()->getTracker()->removePlayer(entity); } @@ -59,25 +59,25 @@ void ServerLevelListener::playSound(int iSound, double x, double y, double z, fl app.DebugPrintf("ServerLevelListener received request for sound less than 0, so ignoring\n"); } else - { + { // 4J-PB - I don't want to broadcast player sounds to my local machine, since we're already playing these in the LevelRenderer::playSound. // The PC version does seem to do this and the result is I can stop walking , and then I'll hear my footstep sound with a delay - server->getPlayers()->broadcast(x, y, z, volume > 1 ? 16 * volume : 16, level->dimension->id, shared_ptr<LevelSoundPacket>(new LevelSoundPacket(iSound, x, y, z, volume, pitch))); + server->getPlayers()->broadcast(x, y, z, volume > 1 ? 16 * volume : 16, level->dimension->id, std::shared_ptr<LevelSoundPacket>(new LevelSoundPacket(iSound, x, y, z, volume, pitch))); } } -void ServerLevelListener::playSound(shared_ptr<Entity> entity,int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist) +void ServerLevelListener::playSound(std::shared_ptr<Entity> entity,int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist) { if(iSound < 0) { app.DebugPrintf("ServerLevelListener received request for sound less than 0, so ignoring\n"); } else - { + { // 4J-PB - I don't want to broadcast player sounds to my local machine, since we're already playing these in the LevelRenderer::playSound. // The PC version does seem to do this and the result is I can stop walking , and then I'll hear my footstep sound with a delay - shared_ptr<Player> player= dynamic_pointer_cast<Player>(entity); - server->getPlayers()->broadcast(player,x, y, z, volume > 1 ? 16 * volume : 16, level->dimension->id, shared_ptr<LevelSoundPacket>(new LevelSoundPacket(iSound, x, y, z, volume, pitch))); + std::shared_ptr<Player> player= dynamic_pointer_cast<Player>(entity); + server->getPlayers()->broadcast(player,x, y, z, volume > 1 ? 16 * volume : 16, level->dimension->id, std::shared_ptr<LevelSoundPacket>(new LevelSoundPacket(iSound, x, y, z, volume, pitch))); } } @@ -102,9 +102,9 @@ void ServerLevelListener::playStreamingMusic(const wstring& name, int x, int y, { } -void ServerLevelListener::levelEvent(shared_ptr<Player> source, int type, int x, int y, int z, int data) +void ServerLevelListener::levelEvent(std::shared_ptr<Player> source, int type, int x, int y, int z, int data) { - server->getPlayers()->broadcast(source, x, y, z, 64, level->dimension->id, shared_ptr<LevelEventPacket>( new LevelEventPacket(type, x, y, z, data) ) ); + server->getPlayers()->broadcast(source, x, y, z, 64, level->dimension->id, std::shared_ptr<LevelEventPacket>( new LevelEventPacket(type, x, y, z, data) ) ); } void ServerLevelListener::destroyTileProgress(int id, int x, int y, int z, int progress) @@ -112,7 +112,7 @@ void ServerLevelListener::destroyTileProgress(int id, int x, int y, int z, int p //for (ServerPlayer p : server->getPlayers()->players) for(AUTO_VAR(it, server->getPlayers()->players.begin()); it != server->getPlayers()->players.end(); ++it) { - shared_ptr<ServerPlayer> p = *it; + std::shared_ptr<ServerPlayer> p = *it; if (p == NULL || p->level != level || p->entityId == id) continue; double xd = (double) x - p->x; double yd = (double) y - p->y; @@ -120,7 +120,7 @@ void ServerLevelListener::destroyTileProgress(int id, int x, int y, int z, int p if (xd * xd + yd * yd + zd * zd < 32 * 32) { - p->connection->send(shared_ptr<TileDestructionPacket>(new TileDestructionPacket(id, x, y, z, progress))); + p->connection->send(std::shared_ptr<TileDestructionPacket>(new TileDestructionPacket(id, x, y, z, progress))); } } }
\ No newline at end of file diff --git a/Minecraft.Client/ServerLevelListener.h b/Minecraft.Client/ServerLevelListener.h index 1886a89d..562aa013 100644 --- a/Minecraft.Client/ServerLevelListener.h +++ b/Minecraft.Client/ServerLevelListener.h @@ -18,16 +18,16 @@ public: // 4J removed - virtual void addParticle(const wstring& name, double x, double y, double z, double xa, double ya, double za); virtual void addParticle(ePARTICLE_TYPE name, double x, double y, double z, double xa, double ya, double za); // 4J added virtual void allChanged(); - virtual void entityAdded(shared_ptr<Entity> entity); - virtual void entityRemoved(shared_ptr<Entity> entity); - virtual void playerRemoved(shared_ptr<Entity> entity); // 4J added - for when a player is removed from the level's player array, not just the entity storage + virtual void entityAdded(std::shared_ptr<Entity> entity); + virtual void entityRemoved(std::shared_ptr<Entity> entity); + virtual void playerRemoved(std::shared_ptr<Entity> entity); // 4J added - for when a player is removed from the level's player array, not just the entity storage virtual void playSound(int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist); - virtual void playSound(shared_ptr<Entity> entity,int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist); + virtual void playSound(std::shared_ptr<Entity> entity,int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist); virtual void setTilesDirty(int x0, int y0, int z0, int x1, int y1, int z1, Level *level); // 4J - added level param virtual void skyColorChanged(); virtual void tileChanged(int x, int y, int z); virtual void tileLightChanged(int x, int y, int z); virtual void playStreamingMusic(const wstring& name, int x, int y, int z); - virtual void levelEvent(shared_ptr<Player> source, int type, int x, int y, int z, int data); + virtual void levelEvent(std::shared_ptr<Player> source, int type, int x, int y, int z, int data); virtual void destroyTileProgress(int id, int x, int y, int z, int progress); }; diff --git a/Minecraft.Client/ServerPlayer.cpp b/Minecraft.Client/ServerPlayer.cpp index eebab435..0f85998c 100644 --- a/Minecraft.Client/ServerPlayer.cpp +++ b/Minecraft.Client/ServerPlayer.cpp @@ -236,10 +236,10 @@ void ServerPlayer::tick() for (int i = 0; i < 5; i++) { - shared_ptr<ItemInstance> currentCarried = getCarried(i); + std::shared_ptr<ItemInstance> currentCarried = getCarried(i); if (currentCarried != lastCarried[i]) { - getLevel()->getTracker()->broadcast(shared_from_this(), shared_ptr<SetEquippedItemPacket>( new SetEquippedItemPacket(this->entityId, i, currentCarried) ) ); + getLevel()->getTracker()->broadcast(shared_from_this(), std::shared_ptr<SetEquippedItemPacket>( new SetEquippedItemPacket(this->entityId, i, currentCarried) ) ); lastCarried[i] = currentCarried; } } @@ -264,7 +264,7 @@ void ServerPlayer::flushEntitiesToRemove() it = entitiesToRemove.erase(it); } - connection->send(shared_ptr<RemoveEntitiesPacket>(new RemoveEntitiesPacket(ids))); + connection->send(std::shared_ptr<RemoveEntitiesPacket>(new RemoveEntitiesPacket(ids))); } } @@ -286,14 +286,14 @@ void ServerPlayer::doTickA() for (unsigned int i = 0; i < inventory->getContainerSize(); i++) { - shared_ptr<ItemInstance> ie = inventory->getItem(i); + std::shared_ptr<ItemInstance> ie = inventory->getItem(i); if (ie != NULL) { // 4J - removed condition. These were getting lower priority than tile update packets etc. on the slow outbound queue, and so were extremely slow to send sometimes, // particularly at the start of a game. They don't typically seem to be massive and shouldn't be send when there isn't actually any updating to do. if (Item::items[ie->id]->isComplex() ) // && connection->countDelayedPackets() <= 2) { - shared_ptr<Packet> packet = (dynamic_cast<ComplexItem *>(Item::items[ie->id])->getUpdatePacket(ie, level, dynamic_pointer_cast<Player>( shared_from_this() ) ) ); + std::shared_ptr<Packet> packet = (dynamic_cast<ComplexItem *>(Item::items[ie->id])->getUpdatePacket(ie, level, dynamic_pointer_cast<Player>( shared_from_this() ) ) ); if (packet != NULL) { connection->send(packet); @@ -402,7 +402,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) { // app.DebugPrintf("Creating BRUP for %d %d\n",nearest.x, nearest.z); PIXBeginNamedEvent(0,"Creation BRUP for sending\n"); - shared_ptr<BlockRegionUpdatePacket> packet = shared_ptr<BlockRegionUpdatePacket>( new BlockRegionUpdatePacket(nearest.x * 16, 0, nearest.z * 16, 16, Level::maxBuildHeight, 16, level) ); + std::shared_ptr<BlockRegionUpdatePacket> packet = std::shared_ptr<BlockRegionUpdatePacket>( new BlockRegionUpdatePacket(nearest.x * 16, 0, nearest.z * 16, 16, Level::maxBuildHeight, 16, level) ); PIXEndNamedEvent(); if( dontDelayChunks ) packet->shouldDelay = false; @@ -441,7 +441,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) // Don't send TileEntity data until we have sent the block data if( connection->isLocal() || chunkDataSent) { - vector<shared_ptr<TileEntity> > *tes = level->getTileEntitiesInRegion(nearest.x * 16, 0, nearest.z * 16, nearest.x * 16 + 16, Level::maxBuildHeight, nearest.z * 16 + 16); + vector<std::shared_ptr<TileEntity> > *tes = level->getTileEntitiesInRegion(nearest.x * 16, 0, nearest.z * 16, nearest.x * 16 + 16, Level::maxBuildHeight, nearest.z * 16 + 16); for (unsigned int i = 0; i < tes->size(); i++) { // 4J Stu - Added delay param to ensure that these arrive after the BRUPs from above @@ -541,7 +541,7 @@ void ServerPlayer::doTickB(bool ignorePortal) if (getHealth() != lastSentHealth || lastSentFood != foodData.getFoodLevel() || ((foodData.getSaturationLevel() == 0) != lastFoodSaturationZero)) { // 4J Stu - Added m_lastDamageSource for telemetry - connection->send( shared_ptr<SetHealthPacket>( new SetHealthPacket(getHealth(), foodData.getFoodLevel(), foodData.getSaturationLevel(), m_lastDamageSource) ) ); + connection->send( std::shared_ptr<SetHealthPacket>( new SetHealthPacket(getHealth(), foodData.getFoodLevel(), foodData.getSaturationLevel(), m_lastDamageSource) ) ); lastSentHealth = getHealth(); lastSentFood = foodData.getFoodLevel(); lastFoodSaturationZero = foodData.getSaturationLevel() == 0; @@ -550,12 +550,12 @@ void ServerPlayer::doTickB(bool ignorePortal) if (totalExperience != lastSentExp) { lastSentExp = totalExperience; - connection->send( shared_ptr<SetExperiencePacket>( new SetExperiencePacket(experienceProgress, totalExperience, experienceLevel) ) ); + connection->send( std::shared_ptr<SetExperiencePacket>( new SetExperiencePacket(experienceProgress, totalExperience, experienceLevel) ) ); } } -shared_ptr<ItemInstance> ServerPlayer::getCarried(int slot) +std::shared_ptr<ItemInstance> ServerPlayer::getCarried(int slot) { if (slot == 0) return inventory->getSelected(); return inventory->armor[slot - 1]; @@ -575,7 +575,7 @@ bool ServerPlayer::hurt(DamageSource *dmgSource, int dmg) { // 4J Stu - Fix for #46422 - TU5: Crash: Gameplay: Crash when being hit by a trap using a dispenser // getEntity returns the owner of projectiles, and this would never be the arrow. The owner is sometimes NULL. - shared_ptr<Entity> source = dmgSource->getDirectEntity(); + std::shared_ptr<Entity> source = dmgSource->getDirectEntity(); if (dynamic_pointer_cast<Player>(source) != NULL && (!server->pvp || !dynamic_pointer_cast<Player>(source)->isAllowedToAttackPlayers()) ) @@ -585,7 +585,7 @@ bool ServerPlayer::hurt(DamageSource *dmgSource, int dmg) if (source != NULL && source->GetType() == eTYPE_ARROW) { - shared_ptr<Arrow> arrow = dynamic_pointer_cast<Arrow>(source); + std::shared_ptr<Arrow> arrow = dynamic_pointer_cast<Arrow>(source); if (dynamic_pointer_cast<Player>(arrow->owner) != NULL && (!server->pvp || !dynamic_pointer_cast<Player>(arrow->owner)->isAllowedToAttackPlayers()) ) { return false; @@ -608,7 +608,7 @@ bool ServerPlayer::hurt(DamageSource *dmgSource, int dmg) else if(dmgSource == DamageSource::cactus) m_lastDamageSource = eTelemetryPlayerDeathSource_Cactus; else { - shared_ptr<Entity> source = dmgSource->getEntity(); + std::shared_ptr<Entity> source = dmgSource->getEntity(); if( source != NULL ) { switch(source->GetType()) @@ -647,7 +647,7 @@ bool ServerPlayer::hurt(DamageSource *dmgSource, int dmg) case eTYPE_ARROW: if ((dynamic_pointer_cast<Arrow>(source))->owner != NULL) { - shared_ptr<Entity> attacker = (dynamic_pointer_cast<Arrow>(source))->owner; + std::shared_ptr<Entity> attacker = (dynamic_pointer_cast<Arrow>(source))->owner; if (attacker != NULL) { switch(attacker->GetType()) @@ -696,19 +696,19 @@ void ServerPlayer::changeDimension(int i) level->removeEntity(shared_from_this()); wonGame = true; m_enteredEndExitPortal = true; // We only flag this for the player in the portal - connection->send( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::WIN_GAME, thisPlayer->GetUserIndex()) ) ); + connection->send( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::WIN_GAME, thisPlayer->GetUserIndex()) ) ); app.DebugPrintf("Sending packet to %d\n", thisPlayer->GetUserIndex()); } if(thisPlayer != NULL) { for(AUTO_VAR(it, MinecraftServer::getInstance()->getPlayers()->players.begin()); it != MinecraftServer::getInstance()->getPlayers()->players.end(); ++it) { - shared_ptr<ServerPlayer> servPlayer = *it; + std::shared_ptr<ServerPlayer> servPlayer = *it; INetworkPlayer *checkPlayer = servPlayer->connection->getNetworkPlayer(); if(thisPlayer != checkPlayer && checkPlayer != NULL && thisPlayer->IsSameSystem( checkPlayer ) && !servPlayer->wonGame ) { servPlayer->wonGame = true; - servPlayer->connection->send( shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::WIN_GAME, thisPlayer->GetUserIndex() ) ) ); + servPlayer->connection->send( std::shared_ptr<GameEventPacket>( new GameEventPacket(GameEventPacket::WIN_GAME, thisPlayer->GetUserIndex() ) ) ); app.DebugPrintf("Sending packet to %d\n", thisPlayer->GetUserIndex()); } } @@ -733,11 +733,11 @@ void ServerPlayer::changeDimension(int i) } // 4J Added delay param -void ServerPlayer::broadcast(shared_ptr<TileEntity> te, bool delay /*= false*/) +void ServerPlayer::broadcast(std::shared_ptr<TileEntity> te, bool delay /*= false*/) { if (te != NULL) { - shared_ptr<Packet> p = te->getUpdatePacket(); + std::shared_ptr<Packet> p = te->getUpdatePacket(); if (p != NULL) { p->shouldDelay = delay; @@ -747,22 +747,22 @@ void ServerPlayer::broadcast(shared_ptr<TileEntity> te, bool delay /*= false*/) } } -void ServerPlayer::take(shared_ptr<Entity> e, int orgCount) +void ServerPlayer::take(std::shared_ptr<Entity> e, int orgCount) { if (!e->removed) { EntityTracker *entityTracker = getLevel()->getTracker(); if (e->GetType() == eTYPE_ITEMENTITY) { - entityTracker->broadcast(e, shared_ptr<TakeItemEntityPacket>( new TakeItemEntityPacket(e->entityId, entityId) ) ); + entityTracker->broadcast(e, std::shared_ptr<TakeItemEntityPacket>( new TakeItemEntityPacket(e->entityId, entityId) ) ); } if (e->GetType() == eTYPE_ARROW) { - entityTracker->broadcast(e, shared_ptr<TakeItemEntityPacket>( new TakeItemEntityPacket(e->entityId, entityId) ) ); + entityTracker->broadcast(e, std::shared_ptr<TakeItemEntityPacket>( new TakeItemEntityPacket(e->entityId, entityId) ) ); } if (e->GetType() == eTYPE_EXPERIENCEORB) { - entityTracker->broadcast(e, shared_ptr<TakeItemEntityPacket>( new TakeItemEntityPacket(e->entityId, entityId) ) ); + entityTracker->broadcast(e, std::shared_ptr<TakeItemEntityPacket>( new TakeItemEntityPacket(e->entityId, entityId) ) ); } } Player::take(e, orgCount); @@ -775,7 +775,7 @@ void ServerPlayer::swing() { swingTime = -1; swinging = true; - getLevel()->getTracker()->broadcast(shared_from_this(), shared_ptr<AnimatePacket>( new AnimatePacket(shared_from_this(), AnimatePacket::SWING) ) ); + getLevel()->getTracker()->broadcast(shared_from_this(), std::shared_ptr<AnimatePacket>( new AnimatePacket(shared_from_this(), AnimatePacket::SWING) ) ); } } @@ -784,7 +784,7 @@ Player::BedSleepingResult ServerPlayer::startSleepInBed(int x, int y, int z, boo BedSleepingResult result = Player::startSleepInBed(x, y, z, bTestUse); if (result == OK) { - shared_ptr<Packet> p = shared_ptr<EntityActionAtPositionPacket>( new EntityActionAtPositionPacket(shared_from_this(), EntityActionAtPositionPacket::START_SLEEP, x, y, z) ); + std::shared_ptr<Packet> p = std::shared_ptr<EntityActionAtPositionPacket>( new EntityActionAtPositionPacket(shared_from_this(), EntityActionAtPositionPacket::START_SLEEP, x, y, z) ); getLevel()->getTracker()->broadcast(shared_from_this(), p); connection->teleport(this->x, this->y, this->z, yRot, xRot); connection->send(p); @@ -796,16 +796,16 @@ void ServerPlayer::stopSleepInBed(bool forcefulWakeUp, bool updateLevelList, boo { if (isSleeping()) { - getLevel()->getTracker()->broadcastAndSend(shared_from_this(), shared_ptr<AnimatePacket>( new AnimatePacket(shared_from_this(), AnimatePacket::WAKE_UP) ) ); + getLevel()->getTracker()->broadcastAndSend(shared_from_this(), std::shared_ptr<AnimatePacket>( new AnimatePacket(shared_from_this(), AnimatePacket::WAKE_UP) ) ); } Player::stopSleepInBed(forcefulWakeUp, updateLevelList, saveRespawnPoint); if (connection != NULL) connection->teleport(x, y, z, yRot, xRot); } -void ServerPlayer::ride(shared_ptr<Entity> e) +void ServerPlayer::ride(std::shared_ptr<Entity> e) { Player::ride(e); - connection->send( shared_ptr<SetRidingPacket>( new SetRidingPacket(shared_from_this(), riding) ) ); + connection->send( std::shared_ptr<SetRidingPacket>( new SetRidingPacket(shared_from_this(), riding) ) ); // 4J Removed this - The act of riding will be handled on the client and will change the position // of the player. If we also teleport it then we can end up with a repeating movements, e.g. bouncing @@ -832,7 +832,7 @@ bool ServerPlayer::startCrafting(int x, int y, int z) if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send( shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::WORKBENCH, 0, 9) ) ); + connection->send( std::shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::WORKBENCH, 0, 9) ) ); containerMenu = new CraftingMenu(inventory, level, x, y, z); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -850,7 +850,7 @@ bool ServerPlayer::startEnchanting(int x, int y, int z) if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send(shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::ENCHANTMENT, 0, 9) )); + connection->send(std::shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::ENCHANTMENT, 0, 9) )); containerMenu = new EnchantmentMenu(inventory, level, x, y, z); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -868,7 +868,7 @@ bool ServerPlayer::startRepairing(int x, int y, int z) if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send(shared_ptr<ContainerOpenPacket> ( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::REPAIR_TABLE, 0, 9)) ); + connection->send(std::shared_ptr<ContainerOpenPacket> ( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::REPAIR_TABLE, 0, 9)) ); containerMenu = new RepairMenu(inventory, level, x, y, z, dynamic_pointer_cast<Player>(shared_from_this())); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -881,12 +881,12 @@ bool ServerPlayer::startRepairing(int x, int y, int z) return true; } -bool ServerPlayer::openContainer(shared_ptr<Container> container) +bool ServerPlayer::openContainer(std::shared_ptr<Container> container) { if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send( shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::CONTAINER, container->getName(), container->getContainerSize()) ) ); + connection->send( std::shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::CONTAINER, container->getName(), container->getContainerSize()) ) ); containerMenu = new ContainerMenu(inventory, container); containerMenu->containerId = containerCounter; @@ -900,12 +900,12 @@ bool ServerPlayer::openContainer(shared_ptr<Container> container) return true; } -bool ServerPlayer::openFurnace(shared_ptr<FurnaceTileEntity> furnace) +bool ServerPlayer::openFurnace(std::shared_ptr<FurnaceTileEntity> furnace) { if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send( shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::FURNACE, 0, furnace->getContainerSize()) ) ); + connection->send( std::shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::FURNACE, 0, furnace->getContainerSize()) ) ); containerMenu = new FurnaceMenu(inventory, furnace); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -918,12 +918,12 @@ bool ServerPlayer::openFurnace(shared_ptr<FurnaceTileEntity> furnace) return true; } -bool ServerPlayer::openTrap(shared_ptr<DispenserTileEntity> trap) +bool ServerPlayer::openTrap(std::shared_ptr<DispenserTileEntity> trap) { if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send( shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::TRAP, 0, trap->getContainerSize()) ) ); + connection->send( std::shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::TRAP, 0, trap->getContainerSize()) ) ); containerMenu = new TrapMenu(inventory, trap); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -936,12 +936,12 @@ bool ServerPlayer::openTrap(shared_ptr<DispenserTileEntity> trap) return true; } -bool ServerPlayer::openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingStand) +bool ServerPlayer::openBrewingStand(std::shared_ptr<BrewingStandTileEntity> brewingStand) { if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send(shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::BREWING_STAND, 0, brewingStand->getContainerSize()))); + connection->send(std::shared_ptr<ContainerOpenPacket>( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::BREWING_STAND, 0, brewingStand->getContainerSize()))); containerMenu = new BrewingStandMenu(inventory, brewingStand); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -954,7 +954,7 @@ bool ServerPlayer::openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingSt return true; } -bool ServerPlayer::openTrading(shared_ptr<Merchant> traderTarget) +bool ServerPlayer::openTrading(std::shared_ptr<Merchant> traderTarget) { if(containerMenu == inventoryMenu) { @@ -962,9 +962,9 @@ bool ServerPlayer::openTrading(shared_ptr<Merchant> traderTarget) containerMenu = new MerchantMenu(inventory, traderTarget, level); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); - shared_ptr<Container> container = ((MerchantMenu *) containerMenu)->getTradeContainer(); + std::shared_ptr<Container> container = ((MerchantMenu *) containerMenu)->getTradeContainer(); - connection->send(shared_ptr<ContainerOpenPacket>(new ContainerOpenPacket(containerCounter, ContainerOpenPacket::TRADER_NPC, container->getName(), container->getContainerSize()))); + connection->send(std::shared_ptr<ContainerOpenPacket>(new ContainerOpenPacket(containerCounter, ContainerOpenPacket::TRADER_NPC, container->getName(), container->getContainerSize()))); MerchantRecipeList *offers = traderTarget->getOffers(dynamic_pointer_cast<Player>(shared_from_this())); if (offers != NULL) @@ -976,7 +976,7 @@ bool ServerPlayer::openTrading(shared_ptr<Merchant> traderTarget) output.writeInt(containerCounter); offers->writeToStream(&output); - connection->send(shared_ptr<CustomPayloadPacket>( new CustomPayloadPacket(CustomPayloadPacket::TRADER_LIST_PACKET, rawOutput.toByteArray()))); + connection->send(std::shared_ptr<CustomPayloadPacket>( new CustomPayloadPacket(CustomPayloadPacket::TRADER_LIST_PACKET, rawOutput.toByteArray()))); } } else @@ -987,7 +987,7 @@ bool ServerPlayer::openTrading(shared_ptr<Merchant> traderTarget) return true; } -void ServerPlayer::slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr<ItemInstance> item) +void ServerPlayer::slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr<ItemInstance> item) { if (dynamic_cast<ResultSlot *>(container->getSlot(slotIndex))) { @@ -1004,21 +1004,21 @@ void ServerPlayer::slotChanged(AbstractContainerMenu *container, int slotIndex, return; } - connection->send( shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(container->containerId, slotIndex, item) ) ); + connection->send( std::shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(container->containerId, slotIndex, item) ) ); } void ServerPlayer::refreshContainer(AbstractContainerMenu *menu) { - vector<shared_ptr<ItemInstance> > *items = menu->getItems(); + vector<std::shared_ptr<ItemInstance> > *items = menu->getItems(); refreshContainer(menu, items); delete items; } -void ServerPlayer::refreshContainer(AbstractContainerMenu *container, vector<shared_ptr<ItemInstance> > *items) +void ServerPlayer::refreshContainer(AbstractContainerMenu *container, vector<std::shared_ptr<ItemInstance> > *items) { - connection->send( shared_ptr<ContainerSetContentPacket>( new ContainerSetContentPacket(container->containerId, items) ) ); - connection->send( shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); + connection->send( std::shared_ptr<ContainerSetContentPacket>( new ContainerSetContentPacket(container->containerId, items) ) ); + connection->send( std::shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); } void ServerPlayer::setContainerData(AbstractContainerMenu *container, int id, int value) @@ -1033,12 +1033,12 @@ void ServerPlayer::setContainerData(AbstractContainerMenu *container, int id, in // client again. return; } - connection->send( shared_ptr<ContainerSetDataPacket>( new ContainerSetDataPacket(container->containerId, id, value) ) ); + connection->send( std::shared_ptr<ContainerSetDataPacket>( new ContainerSetDataPacket(container->containerId, id, value) ) ); } void ServerPlayer::closeContainer() { - connection->send( shared_ptr<ContainerClosePacket>( new ContainerClosePacket(containerMenu->containerId) ) ); + connection->send( std::shared_ptr<ContainerClosePacket>( new ContainerClosePacket(containerMenu->containerId) ) ); doCloseContainer(); } @@ -1052,7 +1052,7 @@ void ServerPlayer::broadcastCarriedItem() // client again. return; } - connection->send( shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); + connection->send( std::shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); } void ServerPlayer::doCloseContainer() @@ -1087,12 +1087,12 @@ void ServerPlayer::awardStat(Stat *stat, byteArray param) while (count > 100) { - connection->send( shared_ptr<AwardStatPacket>( new AwardStatPacket(stat->id, 100) ) ); + connection->send( std::shared_ptr<AwardStatPacket>( new AwardStatPacket(stat->id, 100) ) ); count -= 100; } - connection->send( shared_ptr<AwardStatPacket>( new AwardStatPacket(stat->id, count) ) ); + connection->send( std::shared_ptr<AwardStatPacket>( new AwardStatPacket(stat->id, count) ) ); #else - connection->send( shared_ptr<AwardStatPacket>( new AwardStatPacket(stat->id, param) ) ); + connection->send( std::shared_ptr<AwardStatPacket>( new AwardStatPacket(stat->id, param) ) ); // byteArray deleted in AwardStatPacket destructor. #endif } @@ -1122,33 +1122,33 @@ void ServerPlayer::displayClientMessage(int messageId) { case IDS_TILE_BED_OCCUPIED: messageType = ChatPacket::e_ChatBedOccupied; - connection->send( shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); + connection->send( std::shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); break; case IDS_TILE_BED_NO_SLEEP: messageType = ChatPacket::e_ChatBedNoSleep; - connection->send( shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); + connection->send( std::shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); break; case IDS_TILE_BED_NOT_VALID: messageType = ChatPacket::e_ChatBedNotValid; - connection->send( shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); + connection->send( std::shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); break; case IDS_TILE_BED_NOTSAFE: messageType = ChatPacket::e_ChatBedNotSafe; - connection->send( shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); + connection->send( std::shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); break; case IDS_TILE_BED_PLAYERSLEEP: messageType = ChatPacket::e_ChatBedPlayerSleep; // broadcast to all the other players in the game for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()!=player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatBedPlayerSleep))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatBedPlayerSleep))); } else { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatBedMeSleep))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatBedMeSleep))); } } return; @@ -1156,85 +1156,85 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_PLAYER_ENTERED_END: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()!=player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerEnteredEnd))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerEnteredEnd))); } } break; case IDS_PLAYER_LEFT_END: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()!=player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerLeftEnd))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerLeftEnd))); } } break; case IDS_TILE_BED_MESLEEP: messageType = ChatPacket::e_ChatBedMeSleep; - connection->send( shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); + connection->send( std::shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); break; case IDS_MAX_PIGS_SHEEP_COWS_CATS_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxPigsSheepCows))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxPigsSheepCows))); } } break; case IDS_MAX_CHICKENS_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxChickens))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxChickens))); } } break; case IDS_MAX_SQUID_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxSquid))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxSquid))); } } break; case IDS_MAX_WOLVES_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxWolves))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxWolves))); } } break; case IDS_MAX_MOOSHROOMS_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxMooshrooms))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxMooshrooms))); } } break; case IDS_MAX_ENEMIES_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxEnemies))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxEnemies))); } } break; @@ -1242,40 +1242,40 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_MAX_VILLAGERS_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxVillagers))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxVillagers))); } } break; case IDS_MAX_PIGS_SHEEP_COWS_CATS_BRED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredPigsSheepCows))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredPigsSheepCows))); } } break; case IDS_MAX_CHICKENS_BRED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredChickens))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredChickens))); } } break; case IDS_MAX_MUSHROOMCOWS_BRED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredMooshrooms))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredMooshrooms))); } } break; @@ -1283,10 +1283,10 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_MAX_WOLVES_BRED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredWolves))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredWolves))); } } break; @@ -1294,10 +1294,10 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_CANT_SHEAR_MOOSHROOM: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerCantShearMooshroom))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerCantShearMooshroom))); } } break; @@ -1306,20 +1306,20 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_MAX_HANGINGENTITIES: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxHangingEntities))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxHangingEntities))); } } break; case IDS_CANT_SPAWN_IN_PEACEFUL: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerCantSpawnInPeaceful))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerCantSpawnInPeaceful))); } } break; @@ -1327,10 +1327,10 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_MAX_BOATS: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBoats))); + player->connection->send(std::shared_ptr<ChatPacket>( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBoats))); } } break; @@ -1343,26 +1343,26 @@ void ServerPlayer::displayClientMessage(int messageId) //Language *language = Language::getInstance(); //wstring languageString = app.GetString(messageId);//language->getElement(messageId); - //connection->send( shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); + //connection->send( std::shared_ptr<ChatPacket>( new ChatPacket(L"", messageType) ) ); } void ServerPlayer::completeUsingItem() { - connection->send(shared_ptr<EntityEventPacket>( new EntityEventPacket(entityId, EntityEvent::USE_ITEM_COMPLETE) ) ); + connection->send(std::shared_ptr<EntityEventPacket>( new EntityEventPacket(entityId, EntityEvent::USE_ITEM_COMPLETE) ) ); Player::completeUsingItem(); } -void ServerPlayer::startUsingItem(shared_ptr<ItemInstance> instance, int duration) +void ServerPlayer::startUsingItem(std::shared_ptr<ItemInstance> instance, int duration) { Player::startUsingItem(instance, duration); if (instance != NULL && instance->getItem() != NULL && instance->getItem()->getUseAnimation(instance) == UseAnim_eat) { - getLevel()->getTracker()->broadcastAndSend(shared_from_this(), shared_ptr<AnimatePacket>( new AnimatePacket(shared_from_this(), AnimatePacket::EAT) ) ); + getLevel()->getTracker()->broadcastAndSend(shared_from_this(), std::shared_ptr<AnimatePacket>( new AnimatePacket(shared_from_this(), AnimatePacket::EAT) ) ); } } -void ServerPlayer::restoreFrom(shared_ptr<Player> oldPlayer, bool restoreAll) +void ServerPlayer::restoreFrom(std::shared_ptr<Player> oldPlayer, bool restoreAll) { Player::restoreFrom(oldPlayer, restoreAll); lastSentExp = -1; @@ -1374,21 +1374,21 @@ void ServerPlayer::restoreFrom(shared_ptr<Player> oldPlayer, bool restoreAll) void ServerPlayer::onEffectAdded(MobEffectInstance *effect) { Player::onEffectAdded(effect); - connection->send(shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(entityId, effect) ) ); + connection->send(std::shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(entityId, effect) ) ); } void ServerPlayer::onEffectUpdated(MobEffectInstance *effect) { Player::onEffectUpdated(effect); - connection->send(shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(entityId, effect) ) ); + connection->send(std::shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(entityId, effect) ) ); } void ServerPlayer::onEffectRemoved(MobEffectInstance *effect) { Player::onEffectRemoved(effect); - connection->send(shared_ptr<RemoveMobEffectPacket>( new RemoveMobEffectPacket(entityId, effect) ) ); + connection->send(std::shared_ptr<RemoveMobEffectPacket>( new RemoveMobEffectPacket(entityId, effect) ) ); } void ServerPlayer::teleportTo(double x, double y, double z) @@ -1396,20 +1396,20 @@ void ServerPlayer::teleportTo(double x, double y, double z) connection->teleport(x, y, z, yRot, xRot); } -void ServerPlayer::crit(shared_ptr<Entity> entity) +void ServerPlayer::crit(std::shared_ptr<Entity> entity) { - getLevel()->getTracker()->broadcastAndSend(shared_from_this(), shared_ptr<AnimatePacket>( new AnimatePacket(entity, AnimatePacket::CRITICAL_HIT) )); + getLevel()->getTracker()->broadcastAndSend(shared_from_this(), std::shared_ptr<AnimatePacket>( new AnimatePacket(entity, AnimatePacket::CRITICAL_HIT) )); } -void ServerPlayer::magicCrit(shared_ptr<Entity> entity) +void ServerPlayer::magicCrit(std::shared_ptr<Entity> entity) { - getLevel()->getTracker()->broadcastAndSend(shared_from_this(), shared_ptr<AnimatePacket>( new AnimatePacket(entity, AnimatePacket::MAGIC_CRITICAL_HIT) )); + getLevel()->getTracker()->broadcastAndSend(shared_from_this(), std::shared_ptr<AnimatePacket>( new AnimatePacket(entity, AnimatePacket::MAGIC_CRITICAL_HIT) )); } void ServerPlayer::onUpdateAbilities() { if (connection == NULL) return; - connection->send(shared_ptr<PlayerAbilitiesPacket>(new PlayerAbilitiesPacket(&abilities))); + connection->send(std::shared_ptr<PlayerAbilitiesPacket>(new PlayerAbilitiesPacket(&abilities))); } ServerLevel *ServerPlayer::getLevel() @@ -1420,12 +1420,12 @@ ServerLevel *ServerPlayer::getLevel() void ServerPlayer::setGameMode(GameType *mode) { gameMode->setGameModeForPlayer(mode); - connection->send(shared_ptr<GameEventPacket>(new GameEventPacket(GameEventPacket::CHANGE_GAME_MODE, mode->getId()))); + connection->send(std::shared_ptr<GameEventPacket>(new GameEventPacket(GameEventPacket::CHANGE_GAME_MODE, mode->getId()))); } void ServerPlayer::sendMessage(const wstring& message, ChatPacket::EChatPacketMessage type /*= e_ChatCustom*/, int customData /*= -1*/, const wstring& additionalMessage /*= L""*/) { - connection->send(shared_ptr<ChatPacket>(new ChatPacket(message,type,customData,additionalMessage))); + connection->send(std::shared_ptr<ChatPacket>(new ChatPacket(message,type,customData,additionalMessage))); } bool ServerPlayer::hasPermission(EGameCommand command) @@ -1434,7 +1434,7 @@ bool ServerPlayer::hasPermission(EGameCommand command) } // 4J - Don't use -//void ServerPlayer::updateOptions(shared_ptr<ClientInformationPacket> packet) +//void ServerPlayer::updateOptions(std::shared_ptr<ClientInformationPacket> packet) //{ // // 4J - Don't need // //if (language.getLanguageList().containsKey(packet.getLanguage())) @@ -1502,7 +1502,7 @@ int ServerPlayer::getPlayerViewDistanceModifier() return value; } -void ServerPlayer::handleCollectItem(shared_ptr<ItemInstance> item) +void ServerPlayer::handleCollectItem(std::shared_ptr<ItemInstance> item) { if(gameMode->getGameRules() != NULL) gameMode->getGameRules()->onCollectItem(item); } diff --git a/Minecraft.Client/ServerPlayer.h b/Minecraft.Client/ServerPlayer.h index a9b37594..1e896ec0 100644 --- a/Minecraft.Client/ServerPlayer.h +++ b/Minecraft.Client/ServerPlayer.h @@ -17,7 +17,7 @@ class ServerPlayer : public Player, public net_minecraft_world_inventory::Contai { public: eINSTANCEOF GetType() { return eTYPE_SERVERPLAYER; } - shared_ptr<PlayerConnection> connection; + std::shared_ptr<PlayerConnection> connection; MinecraftServer *server; ServerPlayerGameMode *gameMode; double lastMoveX, lastMoveZ; @@ -59,7 +59,7 @@ public: virtual float getHeadHeight(); virtual void tick(); void flushEntitiesToRemove(); - virtual shared_ptr<ItemInstance> getCarried(int slot); + virtual std::shared_ptr<ItemInstance> getCarried(int slot); virtual void die(DamageSource *source); virtual bool hurt(DamageSource *dmgSource, int dmg); virtual bool isPlayerVersusPlayer(); @@ -69,15 +69,15 @@ public: void doTickB(bool ignorePortal); virtual void changeDimension(int i); private: - void broadcast(shared_ptr<TileEntity> te, bool delay = false); + void broadcast(std::shared_ptr<TileEntity> te, bool delay = false); public: - virtual void take(shared_ptr<Entity> e, int orgCount); + virtual void take(std::shared_ptr<Entity> e, int orgCount); virtual void swing(); virtual BedSleepingResult startSleepInBed(int x, int y, int z, bool bTestUse = false); public: virtual void stopSleepInBed(bool forcefulWakeUp, bool updateLevelList, bool saveRespawnPoint); - virtual void ride(shared_ptr<Entity> e); + virtual void ride(std::shared_ptr<Entity> e); protected: virtual void checkFallDamage(double ya, bool onGround); public: @@ -97,14 +97,14 @@ public: virtual bool startCrafting(int x, int y, int z); // 4J added bool return virtual bool startEnchanting(int x, int y, int z); // 4J added bool return virtual bool startRepairing(int x, int y, int z); // 4J added bool return - virtual bool openContainer(shared_ptr<Container> container); // 4J added bool return - virtual bool openFurnace(shared_ptr<FurnaceTileEntity> furnace); // 4J added bool return - virtual bool openTrap(shared_ptr<DispenserTileEntity> trap); // 4J added bool return - virtual bool openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingStand); // 4J added bool return - virtual bool openTrading(shared_ptr<Merchant> traderTarget); // 4J added bool return - virtual void slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr<ItemInstance> item); + virtual bool openContainer(std::shared_ptr<Container> container); // 4J added bool return + virtual bool openFurnace(std::shared_ptr<FurnaceTileEntity> furnace); // 4J added bool return + virtual bool openTrap(std::shared_ptr<DispenserTileEntity> trap); // 4J added bool return + virtual bool openBrewingStand(std::shared_ptr<BrewingStandTileEntity> brewingStand); // 4J added bool return + virtual bool openTrading(std::shared_ptr<Merchant> traderTarget); // 4J added bool return + virtual void slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr<ItemInstance> item); void refreshContainer(AbstractContainerMenu *menu); - virtual void refreshContainer(AbstractContainerMenu *container, vector<shared_ptr<ItemInstance> > *items); + virtual void refreshContainer(AbstractContainerMenu *container, vector<std::shared_ptr<ItemInstance> > *items); virtual void setContainerData(AbstractContainerMenu *container, int id, int value); virtual void closeContainer(); void broadcastCarriedItem(); @@ -121,8 +121,8 @@ protected: virtual void completeUsingItem(); public: - virtual void startUsingItem(shared_ptr<ItemInstance> instance, int duration); - virtual void restoreFrom(shared_ptr<Player> oldPlayer, bool restoreAll); + virtual void startUsingItem(std::shared_ptr<ItemInstance> instance, int duration); + virtual void restoreFrom(std::shared_ptr<Player> oldPlayer, bool restoreAll); protected: virtual void onEffectAdded(MobEffectInstance *effect); @@ -131,8 +131,8 @@ protected: public: virtual void teleportTo(double x, double y, double z); - virtual void crit(shared_ptr<Entity> entity); - virtual void magicCrit(shared_ptr<Entity> entity); + virtual void crit(std::shared_ptr<Entity> entity); + virtual void magicCrit(std::shared_ptr<Entity> entity); void onUpdateAbilities(); ServerLevel *getLevel(); @@ -140,7 +140,7 @@ public: void sendMessage(const wstring& message, ChatPacket::EChatPacketMessage type = ChatPacket::e_ChatCustom, int customData = -1, const wstring& additionalMessage = L""); bool hasPermission(EGameCommand command); // 4J - Don't use - //void updateOptions(shared_ptr<ClientInformationPacket> packet); + //void updateOptions(std::shared_ptr<ClientInformationPacket> packet); int getViewDistance(); //bool canChatInColor(); //int getChatVisibility(); @@ -152,7 +152,7 @@ public: public: // 4J Stu - Added hooks for the game rules - virtual void handleCollectItem(shared_ptr<ItemInstance> item); + virtual void handleCollectItem(std::shared_ptr<ItemInstance> item); #ifndef _CONTENT_PACKAGE void debug_setPosition(double,double,double,double,double); @@ -160,5 +160,5 @@ public: protected: // 4J Added to record telemetry of player deaths, this should store the last source of damage - ETelemetryChallenges m_lastDamageSource; + ETelemetryChallenges m_lastDamageSource; }; diff --git a/Minecraft.Client/ServerPlayerGameMode.cpp b/Minecraft.Client/ServerPlayerGameMode.cpp index 9b31df0d..3bd69310 100644 --- a/Minecraft.Client/ServerPlayerGameMode.cpp +++ b/Minecraft.Client/ServerPlayerGameMode.cpp @@ -235,9 +235,9 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z) int t = level->getTile(x, y, z); int data = level->getData(x, y, z); - + level->levelEvent(player, LevelEvent::PARTICLES_DESTROY_BLOCK, x, y, z, t + (level->getData(x, y, z) << Tile::TILE_NUM_SHIFT)); - + // 4J - In creative mode, the point where we need to tell the renderer that we are about to destroy a tile via destroyingTileAt is quite complicated. // If the player being told is remote, then we always want the client to do it as it does the final update. If the player being told is local, // then we need to update the renderer Here if we are sharing data between host & client as this is the final point where the original data is still intact. @@ -272,7 +272,7 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z) if (isCreative()) { - shared_ptr<TileUpdatePacket> tup = shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ); + std::shared_ptr<TileUpdatePacket> tup = std::shared_ptr<TileUpdatePacket>( new TileUpdatePacket(x, y, z, level) ); // 4J - a bit of a hack here, but if we want to tell the client that it needs to inform the renderer of a block being destroyed, then send a block 255 instead of a 0. This is handled in ClientConnection::handleTileUpdate if( tup->block == 0 ) { @@ -280,9 +280,9 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z) } player->connection->send( tup ); } - else + else { - shared_ptr<ItemInstance> item = player->getSelectedItem(); + std::shared_ptr<ItemInstance> item = player->getSelectedItem(); bool canDestroy = player->canDestroy(Tile::tiles[t]); if (item != NULL) { @@ -301,13 +301,13 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z) } -bool ServerPlayerGameMode::useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, bool bTestUseOnly) +bool ServerPlayerGameMode::useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, bool bTestUseOnly) { if(!player->isAllowedToUse(item)) return false; int oldCount = item->count; int oldAux = item->getAuxValue(); - shared_ptr<ItemInstance> itemInstance = item->use(level, player); + std::shared_ptr<ItemInstance> itemInstance = item->use(level, player); if ((itemInstance != NULL && itemInstance != item) || (itemInstance != NULL && itemInstance->count != oldCount) || (itemInstance != NULL && itemInstance->getUseDuration() > 0)) { player->inventory->items[player->inventory->selected] = itemInstance; @@ -326,7 +326,7 @@ bool ServerPlayerGameMode::useItem(shared_ptr<Player> player, Level *level, shar } -bool ServerPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly, bool *pbUsedItem) +bool ServerPlayerGameMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly, bool *pbUsedItem) { // 4J-PB - Adding a test only version to allow tooltips to be displayed int t = level->getTile(x, y, z); @@ -336,7 +336,7 @@ bool ServerPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, sh { if (Tile::tiles[t]->TestUse()) return true; } - else + else { if (Tile::tiles[t]->use(level, x, y, z, player, face, clickX, clickY, clickZ)) { @@ -345,7 +345,7 @@ bool ServerPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, sh } } } - + if (item == NULL || !player->isAllowedToUse(item)) return false; if (isCreative()) { diff --git a/Minecraft.Client/ServerPlayerGameMode.h b/Minecraft.Client/ServerPlayerGameMode.h index 89b9e9b4..c590f11e 100644 --- a/Minecraft.Client/ServerPlayerGameMode.h +++ b/Minecraft.Client/ServerPlayerGameMode.h @@ -10,7 +10,7 @@ class ServerPlayerGameMode { public: Level *level; - shared_ptr<ServerPlayer> player; + std::shared_ptr<ServerPlayer> player; private: GameType *gameModeForPlayer; @@ -53,8 +53,8 @@ private: public: bool destroyBlock(int x, int y, int z); - bool useItem(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, bool bTestUseOnly=false); - bool useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false, bool *pbUsedItem=NULL); + bool useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, bool bTestUseOnly=false); + bool useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false, bool *pbUsedItem=NULL); void setLevel(ServerLevel *newLevel); };
\ No newline at end of file diff --git a/Minecraft.Client/SheepFurModel.cpp b/Minecraft.Client/SheepFurModel.cpp index bb84e80d..2e8b494d 100644 --- a/Minecraft.Client/SheepFurModel.cpp +++ b/Minecraft.Client/SheepFurModel.cpp @@ -41,11 +41,11 @@ SheepFurModel::SheepFurModel() : QuadrupedModel(12, 0) leg3->compile(1.0f/16.0f); } -void SheepFurModel::prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) +void SheepFurModel::prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) { QuadrupedModel::prepareMobModel(mob, time, r, a); - shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(mob); + std::shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(mob); head->y = 6 + sheep->getHeadEatPositionScale(a) * 9.0f; headXRot = sheep->getHeadEatAngleScale(a); } diff --git a/Minecraft.Client/SheepFurModel.h b/Minecraft.Client/SheepFurModel.h index c614765e..65bb913e 100644 --- a/Minecraft.Client/SheepFurModel.h +++ b/Minecraft.Client/SheepFurModel.h @@ -8,6 +8,6 @@ private: public: SheepFurModel(); - virtual void prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a); + virtual void prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); };
\ No newline at end of file diff --git a/Minecraft.Client/SheepModel.cpp b/Minecraft.Client/SheepModel.cpp index 7d093353..9c161c33 100644 --- a/Minecraft.Client/SheepModel.cpp +++ b/Minecraft.Client/SheepModel.cpp @@ -10,7 +10,7 @@ SheepModel::SheepModel() : QuadrupedModel(12, 0) head = new ModelPart(this, 0, 0); head->addBox(-3, -4, -6, 6, 6, 8, 0); // Head head->setPos(0, 12-6, -8); - + body = new ModelPart(this, 28, 8); body->addBox(-4, -10, -7, 8, 16, 6, 0); // Body body->setPos(0, 11+6-12, 2); @@ -20,11 +20,11 @@ SheepModel::SheepModel() : QuadrupedModel(12, 0) body->compile(1.0f/16.0f); } -void SheepModel::prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) +void SheepModel::prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) { QuadrupedModel::prepareMobModel(mob, time, r, a); - shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(mob); + std::shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(mob); head->y = 6 + sheep->getHeadEatPositionScale(a) * 9.0f; headXRot = sheep->getHeadEatAngleScale(a); } diff --git a/Minecraft.Client/SheepModel.h b/Minecraft.Client/SheepModel.h index d4136c25..78c3b7c8 100644 --- a/Minecraft.Client/SheepModel.h +++ b/Minecraft.Client/SheepModel.h @@ -8,6 +8,6 @@ private: public: SheepModel(); - virtual void prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a); + virtual void prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); };
\ No newline at end of file diff --git a/Minecraft.Client/SheepRenderer.cpp b/Minecraft.Client/SheepRenderer.cpp index 4af155d3..0aab6c7c 100644 --- a/Minecraft.Client/SheepRenderer.cpp +++ b/Minecraft.Client/SheepRenderer.cpp @@ -8,10 +8,10 @@ SheepRenderer::SheepRenderer(Model *model, Model *armor, float shadow) : MobRend setArmor(armor); } -int SheepRenderer::prepareArmor(shared_ptr<Mob> _sheep, int layer, float a) +int SheepRenderer::prepareArmor(std::shared_ptr<Mob> _sheep, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(_sheep); + std::shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(_sheep); if (layer == 0 && !sheep->isSheared() && !sheep->isInvisibleTo(Minecraft::GetInstance()->player)) // 4J-JEV: Todo, merge with java fix (for invisible sheep armour) in '1.7.5'. @@ -28,7 +28,7 @@ int SheepRenderer::prepareArmor(shared_ptr<Mob> _sheep, int layer, float a) return -1; } -void SheepRenderer::render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) +void SheepRenderer::render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); -} +} diff --git a/Minecraft.Client/SheepRenderer.h b/Minecraft.Client/SheepRenderer.h index c0dea04f..637c53d0 100644 --- a/Minecraft.Client/SheepRenderer.h +++ b/Minecraft.Client/SheepRenderer.h @@ -7,8 +7,8 @@ public: SheepRenderer(Model *model, Model *armor, float shadow); protected: - virtual int prepareArmor(shared_ptr<Mob> _sheep, int layer, float a); + virtual int prepareArmor(std::shared_ptr<Mob> _sheep, int layer, float a); public: - virtual void render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/SignRenderer.cpp b/Minecraft.Client/SignRenderer.cpp index 97eff4bd..b4457f9b 100644 --- a/Minecraft.Client/SignRenderer.cpp +++ b/Minecraft.Client/SignRenderer.cpp @@ -13,10 +13,10 @@ SignRenderer::SignRenderer() signModel = new SignModel(); } -void SignRenderer::render(shared_ptr<TileEntity> _sign, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void SignRenderer::render(std::shared_ptr<TileEntity> _sign, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<SignTileEntity> sign = dynamic_pointer_cast<SignTileEntity>(_sign); + std::shared_ptr<SignTileEntity> sign = dynamic_pointer_cast<SignTileEntity>(_sign); Tile *tile = sign->getTile(); @@ -73,10 +73,10 @@ void SignRenderer::render(shared_ptr<TileEntity> _sign, double x, double y, doub { switch(dwLanguage) { - case XC_LANGUAGE_KOREAN: + case XC_LANGUAGE_KOREAN: case XC_LANGUAGE_JAPANESE: case XC_LANGUAGE_TCHINESE: - msg = L"Censored";// In-game font, so English only + msg = L"Censored";// In-game font, so English only break; default: msg = app.GetString(IDS_STRINGVERIFY_CENSORED); @@ -92,16 +92,16 @@ void SignRenderer::render(shared_ptr<TileEntity> _sign, double x, double y, doub { switch(dwLanguage) { - case XC_LANGUAGE_KOREAN: + case XC_LANGUAGE_KOREAN: case XC_LANGUAGE_JAPANESE: case XC_LANGUAGE_TCHINESE: - msg = L"Awaiting Approval";// In-game font, so English only + msg = L"Awaiting Approval";// In-game font, so English only break; default: msg = app.GetString(IDS_STRINGVERIFY_AWAITING_APPROVAL); break; } - } + } if (i == sign->GetSelectedLine()) { diff --git a/Minecraft.Client/SignRenderer.h b/Minecraft.Client/SignRenderer.h index 48d4d954..d7411af4 100644 --- a/Minecraft.Client/SignRenderer.h +++ b/Minecraft.Client/SignRenderer.h @@ -8,5 +8,5 @@ private: SignModel *signModel; public: SignRenderer(); // 4J - added - virtual void render(shared_ptr<TileEntity> sign, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + virtual void render(std::shared_ptr<TileEntity> sign, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/SilverfishModel.cpp b/Minecraft.Client/SilverfishModel.cpp index 128a7e79..a7a14629 100644 --- a/Minecraft.Client/SilverfishModel.cpp +++ b/Minecraft.Client/SilverfishModel.cpp @@ -82,7 +82,7 @@ int SilverfishModel::modelVersion() return 38; } -void SilverfishModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SilverfishModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SilverfishModel.h b/Minecraft.Client/SilverfishModel.h index d6be3059..4ce0e16e 100644 --- a/Minecraft.Client/SilverfishModel.h +++ b/Minecraft.Client/SilverfishModel.h @@ -21,6 +21,6 @@ public: SilverfishModel(); int modelVersion(); - void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); };
\ No newline at end of file diff --git a/Minecraft.Client/SilverfishRenderer.cpp b/Minecraft.Client/SilverfishRenderer.cpp index 9ed194ca..714cab8b 100644 --- a/Minecraft.Client/SilverfishRenderer.cpp +++ b/Minecraft.Client/SilverfishRenderer.cpp @@ -7,17 +7,17 @@ SilverfishRenderer::SilverfishRenderer() : MobRenderer(new SilverfishModel(), 0. { } -float SilverfishRenderer::getFlipDegrees(shared_ptr<Silverfish> spider) +float SilverfishRenderer::getFlipDegrees(std::shared_ptr<Silverfish> spider) { return 180; } -void SilverfishRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void SilverfishRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { MobRenderer::render(_mob, x, y, z, rot, a); } -int SilverfishRenderer::prepareArmor(shared_ptr<Mob> _silverfish, int layer, float a) +int SilverfishRenderer::prepareArmor(std::shared_ptr<Mob> _silverfish, int layer, float a) { return -1; }
\ No newline at end of file diff --git a/Minecraft.Client/SilverfishRenderer.h b/Minecraft.Client/SilverfishRenderer.h index c1df4505..91ff2e45 100644 --- a/Minecraft.Client/SilverfishRenderer.h +++ b/Minecraft.Client/SilverfishRenderer.h @@ -13,11 +13,11 @@ public: SilverfishRenderer(); protected: - float getFlipDegrees(shared_ptr<Silverfish> spider); + float getFlipDegrees(std::shared_ptr<Silverfish> spider); public: - void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); protected: - int prepareArmor(shared_ptr<Mob> _silverfish, int layer, float a); + int prepareArmor(std::shared_ptr<Mob> _silverfish, int layer, float a); }; diff --git a/Minecraft.Client/SkeletonHeadModel.cpp b/Minecraft.Client/SkeletonHeadModel.cpp index 340047fe..4fb15b31 100644 --- a/Minecraft.Client/SkeletonHeadModel.cpp +++ b/Minecraft.Client/SkeletonHeadModel.cpp @@ -27,7 +27,7 @@ SkeletonHeadModel::SkeletonHeadModel(int u, int v, int tw, int th) _init(u,v,tw,th); } -void SkeletonHeadModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SkeletonHeadModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SkeletonHeadModel.h b/Minecraft.Client/SkeletonHeadModel.h index 6f136c46..aa045571 100644 --- a/Minecraft.Client/SkeletonHeadModel.h +++ b/Minecraft.Client/SkeletonHeadModel.h @@ -14,6 +14,6 @@ public: SkeletonHeadModel(); SkeletonHeadModel(int u, int v, int tw, int th); - void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); };
\ No newline at end of file diff --git a/Minecraft.Client/SkullTileRenderer.cpp b/Minecraft.Client/SkullTileRenderer.cpp index 641a7a02..129e21a5 100644 --- a/Minecraft.Client/SkullTileRenderer.cpp +++ b/Minecraft.Client/SkullTileRenderer.cpp @@ -19,9 +19,9 @@ SkullTileRenderer::~SkullTileRenderer() delete zombieModel; } -void SkullTileRenderer::render(shared_ptr<TileEntity> _skull, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void SkullTileRenderer::render(std::shared_ptr<TileEntity> _skull, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { - shared_ptr<SkullTileEntity> skull = dynamic_pointer_cast<SkullTileEntity>(_skull); + std::shared_ptr<SkullTileEntity> skull = dynamic_pointer_cast<SkullTileEntity>(_skull); renderSkull((float) x, (float) y, (float) z, skull->getData() & SkullTile::PLACEMENT_MASK, skull->getRotation() * 360 / 16.0f, skull->getSkullType(), skull->getExtraType()); } diff --git a/Minecraft.Client/SkullTileRenderer.h b/Minecraft.Client/SkullTileRenderer.h index 09c83f9d..e9d2bf0f 100644 --- a/Minecraft.Client/SkullTileRenderer.h +++ b/Minecraft.Client/SkullTileRenderer.h @@ -18,7 +18,7 @@ public: SkullTileRenderer(); ~SkullTileRenderer(); - void render(shared_ptr<TileEntity> skull, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled = true); + void render(std::shared_ptr<TileEntity> skull, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled = true); void init(TileEntityRenderDispatcher *tileEntityRenderDispatcher); void renderSkull(float x, float y, float z, int face, float rot, int type, const wstring &extra); }; diff --git a/Minecraft.Client/SlimeModel.cpp b/Minecraft.Client/SlimeModel.cpp index 1dafc2fb..df0ae37d 100644 --- a/Minecraft.Client/SlimeModel.cpp +++ b/Minecraft.Client/SlimeModel.cpp @@ -34,7 +34,7 @@ SlimeModel::SlimeModel(int vOffs) cube->compile(1.0f/16.0f); } -void SlimeModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SlimeModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SlimeModel.h b/Minecraft.Client/SlimeModel.h index 9eee5eb1..fe2a4fc2 100644 --- a/Minecraft.Client/SlimeModel.h +++ b/Minecraft.Client/SlimeModel.h @@ -9,5 +9,5 @@ public: SlimeModel(int vOffs); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); };
\ No newline at end of file diff --git a/Minecraft.Client/SlimeRenderer.cpp b/Minecraft.Client/SlimeRenderer.cpp index 23c9c16e..dbad3d26 100644 --- a/Minecraft.Client/SlimeRenderer.cpp +++ b/Minecraft.Client/SlimeRenderer.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" -#include "SlimeRenderer.h" +#include "SlimeRenderer.h" #include "..\Minecraft.World\net.minecraft.world.entity.monster.h" SlimeRenderer::SlimeRenderer(Model *model, Model *armor, float shadow) : MobRenderer(model, shadow) @@ -7,10 +7,10 @@ SlimeRenderer::SlimeRenderer(Model *model, Model *armor, float shadow) : MobRend this->armor = armor; } -int SlimeRenderer::prepareArmor(shared_ptr<Mob> _slime, int layer, float a) +int SlimeRenderer::prepareArmor(std::shared_ptr<Mob> _slime, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Slime> slime = dynamic_pointer_cast<Slime>(_slime); + std::shared_ptr<Slime> slime = dynamic_pointer_cast<Slime>(_slime); if (slime->isInvisible()) return 0; @@ -32,10 +32,10 @@ int SlimeRenderer::prepareArmor(shared_ptr<Mob> _slime, int layer, float a) return -1; } -void SlimeRenderer::scale(shared_ptr<Mob> _slime, float a) +void SlimeRenderer::scale(std::shared_ptr<Mob> _slime, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Slime> slime = dynamic_pointer_cast<Slime>(_slime); + std::shared_ptr<Slime> slime = dynamic_pointer_cast<Slime>(_slime); float size = (float) slime->getSize(); float ss = (slime->oSquish + (slime->squish - slime->oSquish) * a) / (size * 0.5f + 1); diff --git a/Minecraft.Client/SlimeRenderer.h b/Minecraft.Client/SlimeRenderer.h index 58f510aa..86de3a76 100644 --- a/Minecraft.Client/SlimeRenderer.h +++ b/Minecraft.Client/SlimeRenderer.h @@ -8,6 +8,6 @@ private: public: SlimeRenderer(Model *model, Model *armor, float shadow); protected: - virtual int prepareArmor(shared_ptr<Mob> _slime, int layer, float a); - virtual void scale(shared_ptr<Mob> _slime, float a); + virtual int prepareArmor(std::shared_ptr<Mob> _slime, int layer, float a); + virtual void scale(std::shared_ptr<Mob> _slime, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/SnowManModel.cpp b/Minecraft.Client/SnowManModel.cpp index 4344a17a..9380cce0 100644 --- a/Minecraft.Client/SnowManModel.cpp +++ b/Minecraft.Client/SnowManModel.cpp @@ -26,7 +26,7 @@ SnowManModel::SnowManModel() : Model() piece2 = (new ModelPart(this, 0, 36))->setTexSize(64, 64); piece2->addBox(-6, -12, -6, 12, 12, 12, g - 0.5f); // lower body - piece2->setPos(0, 0 + yOffset + 20, 0); + piece2->setPos(0, 0 + yOffset + 20, 0); // 4J added - compile now to avoid random performance hit first time cubes are rendered head->compile(1.0f/16.0f); @@ -53,12 +53,12 @@ void SnowManModel::setupAnim(float time, float r, float bob, float yRot, float x arm1->x = (c) * 5; arm1->z = (-s) * 5; - + arm2->x = (-c) * 5; arm2->z = (s) * 5; } -void SnowManModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SnowManModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SnowManModel.h b/Minecraft.Client/SnowManModel.h index eb31e503..5f2d64c5 100644 --- a/Minecraft.Client/SnowManModel.h +++ b/Minecraft.Client/SnowManModel.h @@ -1,7 +1,7 @@ #pragma once #include "Model.h" -class SnowManModel : public Model +class SnowManModel : public Model { public: ModelPart *piece1, *piece2, *head; @@ -9,5 +9,5 @@ public: SnowManModel() ; virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; diff --git a/Minecraft.Client/SnowManRenderer.cpp b/Minecraft.Client/SnowManRenderer.cpp index 83edb3f5..cd08e5ce 100644 --- a/Minecraft.Client/SnowManRenderer.cpp +++ b/Minecraft.Client/SnowManRenderer.cpp @@ -13,14 +13,14 @@ SnowManRenderer::SnowManRenderer() : MobRenderer(new SnowManModel(), 0.5f) this->setArmor(model); } -void SnowManRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) +void SnowManRenderer::additionalRendering(std::shared_ptr<Mob> _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type SnowMan rather than shared_ptr<Mob> we have here - + // 4J - original version used generics and thus had an input parameter of type SnowMan rather than std::shared_ptr<Mob> we have here - // do some casting around instead - shared_ptr<SnowMan> mob = dynamic_pointer_cast<SnowMan>(_mob); + std::shared_ptr<SnowMan> mob = dynamic_pointer_cast<SnowMan>(_mob); MobRenderer::additionalRendering(mob, a); - shared_ptr<ItemInstance> headGear = shared_ptr<ItemInstance>( new ItemInstance(Tile::pumpkin, 1) ); + std::shared_ptr<ItemInstance> headGear = std::shared_ptr<ItemInstance>( new ItemInstance(Tile::pumpkin, 1) ); if (headGear != NULL && headGear->getItem()->id < 256) { glPushMatrix(); diff --git a/Minecraft.Client/SnowManRenderer.h b/Minecraft.Client/SnowManRenderer.h index 9bdecb4d..ab003fe6 100644 --- a/Minecraft.Client/SnowManRenderer.h +++ b/Minecraft.Client/SnowManRenderer.h @@ -13,5 +13,5 @@ public: SnowManRenderer(); protected: - virtual void additionalRendering(shared_ptr<Mob> _mob, float a); + virtual void additionalRendering(std::shared_ptr<Mob> _mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/SpiderModel.cpp b/Minecraft.Client/SpiderModel.cpp index 35c51d3e..83ff82a4 100644 --- a/Minecraft.Client/SpiderModel.cpp +++ b/Minecraft.Client/SpiderModel.cpp @@ -6,7 +6,7 @@ SpiderModel::SpiderModel() : Model() { float g = 0; - + int yo = 18+6-9; head = new ModelPart(this, 32, 4); @@ -68,7 +68,7 @@ SpiderModel::SpiderModel() : Model() leg7->compile(1.0f/16.0f); } -void SpiderModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SpiderModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); @@ -93,13 +93,13 @@ void SpiderModel::setupAnim(float time, float r, float bob, float yRot, float xR float sr = (float) PI / 4.0f; leg0->zRot = -sr; leg1->zRot = sr; - + leg2->zRot = -sr * 0.74f; leg3->zRot = sr * 0.74f; - + leg4->zRot = -sr * 0.74f; leg5->zRot = sr * 0.74f; - + leg6->zRot = -sr; leg7->zRot = sr; diff --git a/Minecraft.Client/SpiderModel.h b/Minecraft.Client/SpiderModel.h index 61666983..2d9d1527 100644 --- a/Minecraft.Client/SpiderModel.h +++ b/Minecraft.Client/SpiderModel.h @@ -7,6 +7,6 @@ public: ModelPart *head, *body0, *body1, *leg0, *leg1, *leg2, *leg3, *leg4, *leg5, *leg6, *leg7; SpiderModel(); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); };
\ No newline at end of file diff --git a/Minecraft.Client/SpiderRenderer.cpp b/Minecraft.Client/SpiderRenderer.cpp index 9c31eb9e..d19472c5 100644 --- a/Minecraft.Client/SpiderRenderer.cpp +++ b/Minecraft.Client/SpiderRenderer.cpp @@ -8,15 +8,15 @@ SpiderRenderer::SpiderRenderer() : MobRenderer(new SpiderModel(), 1.0f) this->setArmor(new SpiderModel()); } -float SpiderRenderer::getFlipDegrees(shared_ptr<Mob> spider) +float SpiderRenderer::getFlipDegrees(std::shared_ptr<Mob> spider) { return 180; } -int SpiderRenderer::prepareArmor(shared_ptr<Mob> _spider, int layer, float a) +int SpiderRenderer::prepareArmor(std::shared_ptr<Mob> _spider, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Spider> spider = dynamic_pointer_cast<Spider>(_spider); + std::shared_ptr<Spider> spider = dynamic_pointer_cast<Spider>(_spider); if (layer!=0) return -1; MemSect(31); @@ -40,7 +40,7 @@ int SpiderRenderer::prepareArmor(shared_ptr<Mob> _spider, int layer, float a) { // 4J - was 0xf0f0 but that looks like it is a mistake - maybe meant to be 0xf000f0 to enable both sky & block lighting? choosing 0x00f0 here instead // as most likely replicates what the java game does, without breaking our lighting (which doesn't like UVs out of the 0 to 255 range) - int col = 0x00f0; + int col = 0x00f0; int u = col % 65536; int v = col / 65536; @@ -52,10 +52,10 @@ int SpiderRenderer::prepareArmor(shared_ptr<Mob> _spider, int layer, float a) return 1; } -void SpiderRenderer::scale(shared_ptr<Mob> _mob, float a) +void SpiderRenderer::scale(std::shared_ptr<Mob> _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Spider> mob = dynamic_pointer_cast<Spider>(_mob); + std::shared_ptr<Spider> mob = dynamic_pointer_cast<Spider>(_mob); float scale = mob->getModelScale(); glScalef(scale, scale, scale); }
\ No newline at end of file diff --git a/Minecraft.Client/SpiderRenderer.h b/Minecraft.Client/SpiderRenderer.h index 3b937458..7946ed46 100644 --- a/Minecraft.Client/SpiderRenderer.h +++ b/Minecraft.Client/SpiderRenderer.h @@ -6,7 +6,7 @@ class SpiderRenderer : public MobRenderer public: SpiderRenderer(); protected: - virtual float getFlipDegrees(shared_ptr<Mob> spider); - virtual int prepareArmor(shared_ptr<Mob> _spider, int layer, float a); - void scale(shared_ptr<Mob> _mob, float a); + virtual float getFlipDegrees(std::shared_ptr<Mob> spider); + virtual int prepareArmor(std::shared_ptr<Mob> _spider, int layer, float a); + void scale(std::shared_ptr<Mob> _mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/SquidModel.cpp b/Minecraft.Client/SquidModel.cpp index 8ad20f8e..6f87cbde 100644 --- a/Minecraft.Client/SquidModel.cpp +++ b/Minecraft.Client/SquidModel.cpp @@ -43,7 +43,7 @@ void SquidModel::setupAnim(float time, float r, float bob, float yRot, float xRo } } -void SquidModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SquidModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SquidModel.h b/Minecraft.Client/SquidModel.h index 8f43950f..0b7948a8 100644 --- a/Minecraft.Client/SquidModel.h +++ b/Minecraft.Client/SquidModel.h @@ -10,5 +10,5 @@ public: SquidModel(); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); };
\ No newline at end of file diff --git a/Minecraft.Client/SquidRenderer.cpp b/Minecraft.Client/SquidRenderer.cpp index 135f6d9b..3ee79eb1 100644 --- a/Minecraft.Client/SquidRenderer.cpp +++ b/Minecraft.Client/SquidRenderer.cpp @@ -6,15 +6,15 @@ SquidRenderer::SquidRenderer(Model *model, float shadow) : MobRenderer(model, sh { } -void SquidRenderer::render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) +void SquidRenderer::render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); } -void SquidRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a) +void SquidRenderer::setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Squid> mob = dynamic_pointer_cast<Squid>(_mob); + std::shared_ptr<Squid> mob = dynamic_pointer_cast<Squid>(_mob); float bodyXRot = (mob->xBodyRotO + (mob->xBodyRot - mob->xBodyRotO) * a); float bodyZRot = (mob->zBodyRotO + (mob->zBodyRot - mob->zBodyRotO) * a); @@ -26,10 +26,10 @@ void SquidRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRo glTranslatef(0, -1.2f, 0); } -float SquidRenderer::getBob(shared_ptr<Mob> _mob, float a) +float SquidRenderer::getBob(std::shared_ptr<Mob> _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Squid> mob = dynamic_pointer_cast<Squid>(_mob); + std::shared_ptr<Squid> mob = dynamic_pointer_cast<Squid>(_mob); return mob->oldTentacleAngle + (mob->tentacleAngle - mob->oldTentacleAngle) * a; }
\ No newline at end of file diff --git a/Minecraft.Client/SquidRenderer.h b/Minecraft.Client/SquidRenderer.h index ccc81944..13270b5f 100644 --- a/Minecraft.Client/SquidRenderer.h +++ b/Minecraft.Client/SquidRenderer.h @@ -7,9 +7,9 @@ public: SquidRenderer(Model *model, float shadow); public: - virtual void render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); protected: - virtual void setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a); - virtual float getBob(shared_ptr<Mob> _mob, float a); + virtual void setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a); + virtual float getBob(std::shared_ptr<Mob> _mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/SurvivalMode.cpp b/Minecraft.Client/SurvivalMode.cpp index 27a992df..b1b727a4 100644 --- a/Minecraft.Client/SurvivalMode.cpp +++ b/Minecraft.Client/SurvivalMode.cpp @@ -43,7 +43,7 @@ SurvivalMode::SurvivalMode(SurvivalMode *copy) : GameMode( copy->minecraft ) destroyDelay = copy->destroyDelay; } -void SurvivalMode::initPlayer(shared_ptr<Player> player) +void SurvivalMode::initPlayer(std::shared_ptr<Player> player) { player->yRot = -180; } @@ -63,7 +63,7 @@ bool SurvivalMode::destroyBlock(int x, int y, int z, int face) int data = minecraft->level->getData(x, y, z); bool changed = GameMode::destroyBlock(x, y, z, face); - shared_ptr<ItemInstance> item = minecraft->player->getSelectedItem(); + std::shared_ptr<ItemInstance> item = minecraft->player->getSelectedItem(); bool couldDestroy = minecraft->player->canDestroy(Tile::tiles[t]); if (item != NULL) { @@ -73,7 +73,7 @@ bool SurvivalMode::destroyBlock(int x, int y, int z, int face) minecraft->player->removeSelectedItem(); } } - if (changed && couldDestroy) + if (changed && couldDestroy) { Tile::tiles[t]->playerDestroy(minecraft->level, minecraft->player, x, y, z, data); } @@ -171,9 +171,9 @@ void SurvivalMode::initLevel(Level *level) GameMode::initLevel(level); } -shared_ptr<Player> SurvivalMode::createPlayer(Level *level) +std::shared_ptr<Player> SurvivalMode::createPlayer(Level *level) { - shared_ptr<Player> player = GameMode::createPlayer(level); + std::shared_ptr<Player> player = GameMode::createPlayer(level); // player.inventory.add(new ItemInstance(Item.pickAxe_diamond)); // player.inventory.add(new ItemInstance(Item.hatchet_diamond)); // player.inventory.add(new ItemInstance(Tile.torch, 64)); @@ -189,7 +189,7 @@ void SurvivalMode::tick() //minecraft->soundEngine->playMusicTick(); } -bool SurvivalMode::useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly, bool *pbUsedItem) +bool SurvivalMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly, bool *pbUsedItem) { int t = level->getTile(x, y, z); if (t > 0) diff --git a/Minecraft.Client/SurvivalMode.h b/Minecraft.Client/SurvivalMode.h index b4ce5e6d..643e50d1 100644 --- a/Minecraft.Client/SurvivalMode.h +++ b/Minecraft.Client/SurvivalMode.h @@ -15,7 +15,7 @@ private: public: SurvivalMode(Minecraft *minecraft); SurvivalMode(SurvivalMode *copy); - virtual void initPlayer(shared_ptr<Player> player); + virtual void initPlayer(std::shared_ptr<Player> player); virtual void init(); virtual bool canHurtPlayer(); virtual bool destroyBlock(int x, int y, int z, int face); @@ -25,8 +25,8 @@ public: virtual void render(float a); virtual float getPickRange(); virtual void initLevel(Level *level); - virtual shared_ptr<Player> createPlayer(Level *level); + virtual std::shared_ptr<Player> createPlayer(Level *level); virtual void tick(); - virtual bool useItemOn(shared_ptr<Player> player, Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem=NULL); + virtual bool useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem=NULL); virtual bool hasExperience(); };
\ No newline at end of file diff --git a/Minecraft.Client/TakeAnimationParticle.cpp b/Minecraft.Client/TakeAnimationParticle.cpp index c9530b0a..3f00c004 100644 --- a/Minecraft.Client/TakeAnimationParticle.cpp +++ b/Minecraft.Client/TakeAnimationParticle.cpp @@ -5,7 +5,7 @@ #include "..\Minecraft.World\net.minecraft.world.level.h" #include "..\Minecraft.World\Mth.h" -TakeAnimationParticle::TakeAnimationParticle(Level *level, shared_ptr<Entity> item, shared_ptr<Entity> target, float yOffs) : Particle(level, item->x, item->y, item->z, item->xd, item->yd, item->zd) +TakeAnimationParticle::TakeAnimationParticle(Level *level, std::shared_ptr<Entity> item, std::shared_ptr<Entity> target, float yOffs) : Particle(level, item->x, item->y, item->z, item->xd, item->yd, item->zd) { // 4J - added initialisers life = 0; @@ -39,7 +39,7 @@ void TakeAnimationParticle::render(Tesselator *t, float a, float xa, float ya, f double xx = xo + (xt - xo) * time; double yy = yo + (yt - yo) * time; double zz = zo + (zt - zo) * time; - + int xTile = Mth::floor(xx); int yTile = Mth::floor(yy + heightOffset / 2.0f); int zTile = Mth::floor(zz); @@ -58,12 +58,12 @@ void TakeAnimationParticle::render(Tesselator *t, float a, float xa, float ya, f float br = level->getBrightness(xTile, yTile, zTile); glColor4f(br, br, br, 1); } - + xx-=xOff; yy-=yOff; zz-=zOff; - - + + EntityRenderDispatcher::instance->render(item, (float)xx, (float)yy, (float)zz, item->yRot, a); } diff --git a/Minecraft.Client/TakeAnimationParticle.h b/Minecraft.Client/TakeAnimationParticle.h index 10026fda..33c4535f 100644 --- a/Minecraft.Client/TakeAnimationParticle.h +++ b/Minecraft.Client/TakeAnimationParticle.h @@ -7,14 +7,14 @@ class TakeAnimationParticle : public Particle public: virtual eINSTANCEOF GetType() { return eType_TAKEANIMATIONPARTICLE; } private: - shared_ptr<Entity> item; - shared_ptr<Entity> target; + std::shared_ptr<Entity> item; + std::shared_ptr<Entity> target; int life; int lifeTime; float yOffs; public: - TakeAnimationParticle(Level *level, shared_ptr<Entity> item, shared_ptr<Entity> target, float yOffs); + TakeAnimationParticle(Level *level, std::shared_ptr<Entity> item, std::shared_ptr<Entity> target, float yOffs); ~TakeAnimationParticle(); virtual void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); virtual void tick(); diff --git a/Minecraft.Client/TeleportCommand.cpp b/Minecraft.Client/TeleportCommand.cpp index 2132cfd4..d80baca9 100644 --- a/Minecraft.Client/TeleportCommand.cpp +++ b/Minecraft.Client/TeleportCommand.cpp @@ -14,20 +14,20 @@ EGameCommand TeleportCommand::getId() return eGameCommand_Teleport; } -void TeleportCommand::execute(shared_ptr<CommandSender> source, byteArray commandData) +void TeleportCommand::execute(std::shared_ptr<CommandSender> source, byteArray commandData) { ByteArrayInputStream bais(commandData); DataInputStream dis(&bais); PlayerUID subjectID = dis.readPlayerUID(); PlayerUID destinationID = dis.readPlayerUID(); - + bais.reset(); PlayerList *players = MinecraftServer::getInstance()->getPlayerList(); - shared_ptr<ServerPlayer> subject = players->getPlayer(subjectID); - shared_ptr<ServerPlayer> destination = players->getPlayer(destinationID); + std::shared_ptr<ServerPlayer> subject = players->getPlayer(subjectID); + std::shared_ptr<ServerPlayer> destination = players->getPlayer(destinationID); if(subject != NULL && destination != NULL && subject->level->dimension->id == destination->level->dimension->id && subject->isAlive() ) { @@ -78,7 +78,7 @@ void TeleportCommand::execute(shared_ptr<CommandSender> source, byteArray comman //} } -shared_ptr<GameCommandPacket> TeleportCommand::preparePacket(PlayerUID subject, PlayerUID destination) +std::shared_ptr<GameCommandPacket> TeleportCommand::preparePacket(PlayerUID subject, PlayerUID destination) { ByteArrayOutputStream baos; DataOutputStream dos(&baos); @@ -86,5 +86,5 @@ shared_ptr<GameCommandPacket> TeleportCommand::preparePacket(PlayerUID subject, dos.writePlayerUID(subject); dos.writePlayerUID(destination); - return shared_ptr<GameCommandPacket>( new GameCommandPacket(eGameCommand_Teleport, baos.toByteArray() )); + return std::shared_ptr<GameCommandPacket>( new GameCommandPacket(eGameCommand_Teleport, baos.toByteArray() )); }
\ No newline at end of file diff --git a/Minecraft.Client/TeleportCommand.h b/Minecraft.Client/TeleportCommand.h index 9015a52d..b6f3b742 100644 --- a/Minecraft.Client/TeleportCommand.h +++ b/Minecraft.Client/TeleportCommand.h @@ -6,7 +6,7 @@ class TeleportCommand : public Command { public: virtual EGameCommand getId(); - virtual void execute(shared_ptr<CommandSender> source, byteArray commandData); + virtual void execute(std::shared_ptr<CommandSender> source, byteArray commandData); - static shared_ptr<GameCommandPacket> preparePacket(PlayerUID subject, PlayerUID destination); + static std::shared_ptr<GameCommandPacket> preparePacket(PlayerUID subject, PlayerUID destination); };
\ No newline at end of file diff --git a/Minecraft.Client/TerrainParticle.cpp b/Minecraft.Client/TerrainParticle.cpp index 811ba840..5d2efbdc 100644 --- a/Minecraft.Client/TerrainParticle.cpp +++ b/Minecraft.Client/TerrainParticle.cpp @@ -14,7 +14,7 @@ TerrainParticle::TerrainParticle(Level *level, double x, double y, double z, dou size /= 2; } -shared_ptr<TerrainParticle> TerrainParticle::init(int x, int y, int z, int data) // 4J - added data parameter +std::shared_ptr<TerrainParticle> TerrainParticle::init(int x, int y, int z, int data) // 4J - added data parameter { if (tile == Tile::grass) return dynamic_pointer_cast<TerrainParticle>( shared_from_this() ); int col = tile->getColor(level, x, y, z, data); // 4J - added data parameter @@ -24,7 +24,7 @@ shared_ptr<TerrainParticle> TerrainParticle::init(int x, int y, int z, int data) return dynamic_pointer_cast<TerrainParticle>( shared_from_this() ); } -shared_ptr<TerrainParticle> TerrainParticle::init(int data) +std::shared_ptr<TerrainParticle> TerrainParticle::init(int data) { if (tile == Tile::grass) return dynamic_pointer_cast<TerrainParticle>( shared_from_this() ); int col = tile->getColor(data); @@ -59,7 +59,7 @@ void TerrainParticle::render(Tesselator *t, float a, float xa, float ya, float z float y = (float) (yo + (this->y - yo) * a - yOff); float z = (float) (zo + (this->z - zo) * a - zOff); - // 4J - don't render terrain particles that are less than a metre away, to try and avoid large particles that are causing us problems with + // 4J - don't render terrain particles that are less than a metre away, to try and avoid large particles that are causing us problems with // photosensitivity testing float distSq = (x*x + y*y + z*z); if( distSq < 1.0f ) return; diff --git a/Minecraft.Client/TerrainParticle.h b/Minecraft.Client/TerrainParticle.h index 5d4a743f..df9ca42f 100644 --- a/Minecraft.Client/TerrainParticle.h +++ b/Minecraft.Client/TerrainParticle.h @@ -11,8 +11,8 @@ private: public: TerrainParticle(Level *level, double x, double y, double z, double xa, double ya, double za, Tile *tile, int face, int data, Textures *textures); - shared_ptr<TerrainParticle> init(int x, int y, int z, int data); // 4J - added data parameter - shared_ptr<TerrainParticle> init(int data); + std::shared_ptr<TerrainParticle> init(int x, int y, int z, int data); // 4J - added data parameter + std::shared_ptr<TerrainParticle> init(int data); virtual int getParticleTexture(); virtual void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); };
\ No newline at end of file diff --git a/Minecraft.Client/TextEditScreen.cpp b/Minecraft.Client/TextEditScreen.cpp index 9537b969..24f86a4a 100644 --- a/Minecraft.Client/TextEditScreen.cpp +++ b/Minecraft.Client/TextEditScreen.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" -#include "TextEditScreen.h" +#include "TextEditScreen.h" #include "Button.h" #include "TileEntityRenderDispatcher.h" #include "ClientConnection.h" @@ -13,7 +13,7 @@ const wstring TextEditScreen::allowedChars = SharedConstants::acceptableLetters;; -TextEditScreen::TextEditScreen(shared_ptr<SignTileEntity> sign) +TextEditScreen::TextEditScreen(std::shared_ptr<SignTileEntity> sign) { // 4J - added initialisers line = 0; @@ -35,7 +35,7 @@ void TextEditScreen::removed() Keyboard::enableRepeatEvents(false); if (minecraft->level->isClientSide) { - minecraft->getConnection(0)->send( shared_ptr<SignUpdatePacket>( new SignUpdatePacket(sign->x, sign->y, sign->z, sign->IsVerified(), sign->IsCensored(), sign->GetMessages()) ) ); + minecraft->getConnection(0)->send( std::shared_ptr<SignUpdatePacket>( new SignUpdatePacket(sign->x, sign->y, sign->z, sign->IsVerified(), sign->IsCensored(), sign->GetMessages()) ) ); } } diff --git a/Minecraft.Client/TextEditScreen.h b/Minecraft.Client/TextEditScreen.h index aad6ebc8..b089f998 100644 --- a/Minecraft.Client/TextEditScreen.h +++ b/Minecraft.Client/TextEditScreen.h @@ -8,12 +8,12 @@ class TextEditScreen : public Screen protected: wstring title; private: - shared_ptr<SignTileEntity> sign; + std::shared_ptr<SignTileEntity> sign; int frame; int line; public: - TextEditScreen(shared_ptr<SignTileEntity> sign); + TextEditScreen(std::shared_ptr<SignTileEntity> sign); virtual void init(); virtual void removed(); virtual void tick(); diff --git a/Minecraft.Client/TheEndPortalRenderer.cpp b/Minecraft.Client/TheEndPortalRenderer.cpp index 52581579..7837a4fa 100644 --- a/Minecraft.Client/TheEndPortalRenderer.cpp +++ b/Minecraft.Client/TheEndPortalRenderer.cpp @@ -7,10 +7,10 @@ #include "..\Minecraft.World\FloatBuffer.h" #include "TheEndPortalRenderer.h" -void TheEndPortalRenderer::render(shared_ptr<TileEntity> _table, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void TheEndPortalRenderer::render(std::shared_ptr<TileEntity> _table, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J Convert as we aren't using a templated class - shared_ptr<TheEndPortalTileEntity> table = dynamic_pointer_cast<TheEndPortalTileEntity>(_table); + std::shared_ptr<TheEndPortalTileEntity> table = dynamic_pointer_cast<TheEndPortalTileEntity>(_table); float xx = (float) (tileEntityRenderDispatcher->xPlayer); float yy = (float) (tileEntityRenderDispatcher->yPlayer); float zz = (float) (tileEntityRenderDispatcher->zPlayer); diff --git a/Minecraft.Client/TheEndPortalRenderer.h b/Minecraft.Client/TheEndPortalRenderer.h index 1e4ca546..fe489275 100644 --- a/Minecraft.Client/TheEndPortalRenderer.h +++ b/Minecraft.Client/TheEndPortalRenderer.h @@ -5,7 +5,7 @@ class TheEndPortalRenderer : public TileEntityRenderer { public: - virtual void render(shared_ptr<TileEntity> _table, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); + virtual void render(std::shared_ptr<TileEntity> _table, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); FloatBuffer *lb; diff --git a/Minecraft.Client/TileEntityRenderDispatcher.cpp b/Minecraft.Client/TileEntityRenderDispatcher.cpp index 1708d215..43111e6e 100644 --- a/Minecraft.Client/TileEntityRenderDispatcher.cpp +++ b/Minecraft.Client/TileEntityRenderDispatcher.cpp @@ -80,18 +80,18 @@ TileEntityRenderer *TileEntityRenderDispatcher::getRenderer(eINSTANCEOF e) return it->second; } -bool TileEntityRenderDispatcher::hasRenderer(shared_ptr<TileEntity> e) +bool TileEntityRenderDispatcher::hasRenderer(std::shared_ptr<TileEntity> e) { return getRenderer(e) != NULL; } -TileEntityRenderer *TileEntityRenderDispatcher::getRenderer(shared_ptr<TileEntity> e) +TileEntityRenderer *TileEntityRenderDispatcher::getRenderer(std::shared_ptr<TileEntity> e) { if (e == NULL) return NULL; return getRenderer(e->GetType()); } -void TileEntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *font, shared_ptr<Mob> player, float a) +void TileEntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *font, std::shared_ptr<Mob> player, float a) { if( this->level != level ) { @@ -109,7 +109,7 @@ void TileEntityRenderDispatcher::prepare(Level *level, Textures *textures, Font zPlayer = player->zOld + (player->z - player->zOld) * a; } -void TileEntityRenderDispatcher::render(shared_ptr<TileEntity> e, float a, bool setColor/*=true*/) +void TileEntityRenderDispatcher::render(std::shared_ptr<TileEntity> e, float a, bool setColor/*=true*/) { if (e->distanceToSqr(xPlayer, yPlayer, zPlayer) < 64 * 64) { @@ -131,7 +131,7 @@ void TileEntityRenderDispatcher::render(shared_ptr<TileEntity> e, float a, bool } } -void TileEntityRenderDispatcher::render(shared_ptr<TileEntity> entity, double x, double y, double z, float a, bool setColor/*=true*/, float alpha, bool useCompiled) +void TileEntityRenderDispatcher::render(std::shared_ptr<TileEntity> entity, double x, double y, double z, float a, bool setColor/*=true*/, float alpha, bool useCompiled) { TileEntityRenderer *renderer = getRenderer(entity); if (renderer != NULL) diff --git a/Minecraft.Client/TileEntityRenderDispatcher.h b/Minecraft.Client/TileEntityRenderDispatcher.h index d86ddb01..de006bcf 100644 --- a/Minecraft.Client/TileEntityRenderDispatcher.h +++ b/Minecraft.Client/TileEntityRenderDispatcher.h @@ -25,7 +25,7 @@ public: Textures *textures; Level *level; - shared_ptr<Mob> cameraEntity; + std::shared_ptr<Mob> cameraEntity; float playerRotY; float playerRotX; double xPlayer, yPlayer, zPlayer; @@ -35,11 +35,11 @@ private: public: TileEntityRenderer *getRenderer(eINSTANCEOF e); - bool hasRenderer(shared_ptr<TileEntity> e); - TileEntityRenderer * getRenderer(shared_ptr<TileEntity> e); - void prepare(Level *level, Textures *textures, Font *font, shared_ptr<Mob> player, float a); - void render(shared_ptr<TileEntity> e, float a, bool setColor = true); - void render(shared_ptr<TileEntity> entity, double x, double y, double z, float a, bool setColor = true, float alpha=1.0f, bool useCompiled = true); // 4J Added useCompiled + bool hasRenderer(std::shared_ptr<TileEntity> e); + TileEntityRenderer * getRenderer(std::shared_ptr<TileEntity> e); + void prepare(Level *level, Textures *textures, Font *font, std::shared_ptr<Mob> player, float a); + void render(std::shared_ptr<TileEntity> e, float a, bool setColor = true); + void render(std::shared_ptr<TileEntity> entity, double x, double y, double z, float a, bool setColor = true, float alpha=1.0f, bool useCompiled = true); // 4J Added useCompiled void setLevel(Level *level); double distanceToSqr(double x, double y, double z); Font *getFont(); diff --git a/Minecraft.Client/TileEntityRenderer.h b/Minecraft.Client/TileEntityRenderer.h index b7d08b86..292e1d00 100644 --- a/Minecraft.Client/TileEntityRenderer.h +++ b/Minecraft.Client/TileEntityRenderer.h @@ -10,7 +10,7 @@ class TileEntityRenderer protected: TileEntityRenderDispatcher *tileEntityRenderDispatcher; public: - virtual void render(shared_ptr<TileEntity> entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) = 0; // 4J added setColor param and alpha and useCompiled + virtual void render(std::shared_ptr<TileEntity> entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) = 0; // 4J added setColor param and alpha and useCompiled virtual void onNewLevel(Level *level) {} protected: void bindTexture(int resourceName); // 4J - changed from wstring to int diff --git a/Minecraft.Client/TileRenderer.cpp b/Minecraft.Client/TileRenderer.cpp index 3962cc71..cb9b02f6 100644 --- a/Minecraft.Client/TileRenderer.cpp +++ b/Minecraft.Client/TileRenderer.cpp @@ -244,7 +244,7 @@ void TileRenderer::tesselateInWorldFixedTexture( Tile* tile, int x, int y, int z } void TileRenderer::tesselateInWorldNoCulling( Tile* tile, int x, int y, int z, int forceData, - shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param + std::shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param { noCulling = true; tesselateInWorld( tile, x, y, z, forceData ); @@ -252,7 +252,7 @@ void TileRenderer::tesselateInWorldNoCulling( Tile* tile, int x, int y, int z, i } bool TileRenderer::tesselateInWorld( Tile* tt, int x, int y, int z, int forceData, - shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param + std::shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param { Tesselator* t = Tesselator::getInstance(); int shape = tt->getRenderShape(); diff --git a/Minecraft.Client/TileRenderer.h b/Minecraft.Client/TileRenderer.h index 4045ece2..ec369939 100644 --- a/Minecraft.Client/TileRenderer.h +++ b/Minecraft.Client/TileRenderer.h @@ -79,9 +79,9 @@ public: void tesselateInWorldFixedTexture( Tile* tile, int x, int y, int z, Icon *fixedTexture ); // 4J renamed to differentiate from tesselateInWorld void tesselateInWorldNoCulling( Tile* tile, int x, int y, int z, int forceData = -1, - shared_ptr< TileEntity > forceEntity = shared_ptr< TileEntity >() ); // 4J added forceData, forceEntity param - bool tesselateInWorld( Tile* tt, int x, int y, int z, int forceData = -1, shared_ptr< TileEntity > forceEntity = - shared_ptr< TileEntity >() ); // 4J added forceData, forceEntity param + std::shared_ptr< TileEntity > forceEntity = std::shared_ptr< TileEntity >() ); // 4J added forceData, forceEntity param + bool tesselateInWorld( Tile* tt, int x, int y, int z, int forceData = -1, std::shared_ptr< TileEntity > forceEntity = + std::shared_ptr< TileEntity >() ); // 4J added forceData, forceEntity param private: bool tesselateAirPortalFrameInWorld(TheEndPortalFrameTile *tt, int x, int y, int z); diff --git a/Minecraft.Client/TntRenderer.cpp b/Minecraft.Client/TntRenderer.cpp index 3bb7484f..755abea4 100644 --- a/Minecraft.Client/TntRenderer.cpp +++ b/Minecraft.Client/TntRenderer.cpp @@ -10,10 +10,10 @@ TntRenderer::TntRenderer() this->shadowRadius = 0.5f; } -void TntRenderer::render(shared_ptr<Entity> _tnt, double x, double y, double z, float rot, float a) +void TntRenderer::render(std::shared_ptr<Entity> _tnt, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<PrimedTnt> tnt = dynamic_pointer_cast<PrimedTnt>(_tnt); + std::shared_ptr<PrimedTnt> tnt = dynamic_pointer_cast<PrimedTnt>(_tnt); glPushMatrix(); glTranslatef((float) x, (float) y, (float) z); diff --git a/Minecraft.Client/TntRenderer.h b/Minecraft.Client/TntRenderer.h index 4d9c029c..1f70c8da 100644 --- a/Minecraft.Client/TntRenderer.h +++ b/Minecraft.Client/TntRenderer.h @@ -8,5 +8,5 @@ private: public: TntRenderer(); - virtual void render(shared_ptr<Entity> _tnt, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> _tnt, double x, double y, double z, float rot, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/TrackedEntity.cpp b/Minecraft.Client/TrackedEntity.cpp index 70f25c93..c372bdaf 100644 --- a/Minecraft.Client/TrackedEntity.cpp +++ b/Minecraft.Client/TrackedEntity.cpp @@ -20,7 +20,7 @@ #include "PlayerChunkMap.h" #include <qnet.h> -TrackedEntity::TrackedEntity(shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta) +TrackedEntity::TrackedEntity(std::shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta) { // 4J added initialisers xap = yap = zap = 0; @@ -29,7 +29,7 @@ TrackedEntity::TrackedEntity(shared_ptr<Entity> e, int range, int updateInterval updatedPlayerVisibility = false; teleportDelay = 0; moved = false; - + this->e = e; this->range = range; this->updateInterval = updateInterval; @@ -46,7 +46,7 @@ TrackedEntity::TrackedEntity(shared_ptr<Entity> e, int range, int updateInterval int c0a = 0, c0b = 0, c1a = 0, c1b = 0, c1c = 0, c2a = 0, c2b = 0; -void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *players) +void TrackedEntity::tick(EntityTracker *tracker, vector<std::shared_ptr<Player> > *players) { moved = false; if (!updatedPlayerVisibility || e->distanceToSqr(xpu, ypu, zpu) > 4 * 4) @@ -62,35 +62,35 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl if (wasRiding != e->riding) { wasRiding = e->riding; - broadcast(shared_ptr<SetRidingPacket>(new SetRidingPacket(e, e->riding))); + broadcast(std::shared_ptr<SetRidingPacket>(new SetRidingPacket(e, e->riding))); } // Moving forward special case for item frames - if (e->GetType()== eTYPE_ITEM_FRAME && tickCount % 10 == 0) + if (e->GetType()== eTYPE_ITEM_FRAME && tickCount % 10 == 0) { - shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame> (e); - shared_ptr<ItemInstance> item = frame->getItem(); + std::shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame> (e); + std::shared_ptr<ItemInstance> item = frame->getItem(); - if (item != NULL && item->getItem()->id == Item::map_Id && !e->removed) + if (item != NULL && item->getItem()->id == Item::map_Id && !e->removed) { - shared_ptr<MapItemSavedData> data = Item::map->getSavedData(item, e->level); + std::shared_ptr<MapItemSavedData> data = Item::map->getSavedData(item, e->level); for (AUTO_VAR(it,players->begin() ); it != players->end(); ++it) { - shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(*it); + std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(*it); data->tickCarriedBy(player, item); - - if (!player->removed && player->connection && player->connection->countDelayedPackets() <= 5) + + if (!player->removed && player->connection && player->connection->countDelayedPackets() <= 5) { - shared_ptr<Packet> packet = Item::map->getUpdatePacket(item, e->level, player); + std::shared_ptr<Packet> packet = Item::map->getUpdatePacket(item, e->level, player); if (packet != NULL) player->connection->send(packet); } } } - shared_ptr<SynchedEntityData> entityData = e->getEntityData(); - if (entityData->isDirty()) + std::shared_ptr<SynchedEntityData> entityData = e->getEntityData(); + if (entityData->isDirty()) { - broadcastAndSend( shared_ptr<SetEntityDataPacket>( new SetEntityDataPacket(e->entityId, entityData, false) ) ); + broadcastAndSend( std::shared_ptr<SetEntityDataPacket>( new SetEntityDataPacket(e->entityId, entityData, false) ) ); } } else @@ -111,14 +111,14 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl int ya = yn - yp; int za = zn - zp; - shared_ptr<Packet> packet = nullptr; + std::shared_ptr<Packet> packet = nullptr; // 4J - this pos flag used to be set based on abs(xn) etc. but that just seems wrong bool pos = abs(xa) >= TOLERANCE_LEVEL || abs(ya) >= TOLERANCE_LEVEL || abs(za) >= TOLERANCE_LEVEL; // 4J - changed rotation to be generally sent as a delta as well as position int yRota = yRotn - yRotp; int xRota = xRotn - xRotp; - // Keep rotation deltas in +/- 180 degree range + // Keep rotation deltas in +/- 180 degree range while( yRota > 127 ) yRota -= 256; while( yRota < -128 ) yRota += 256; while( xRota > 127 ) xRota -= 256; @@ -134,7 +134,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl ) { teleportDelay = 0; - packet = shared_ptr<TeleportEntityPacket>( new TeleportEntityPacket(e->entityId, xn, yn, zn, (byte) yRotn, (byte) xRotn) ); + packet = std::shared_ptr<TeleportEntityPacket>( new TeleportEntityPacket(e->entityId, xn, yn, zn, (byte) yRotn, (byte) xRotn) ); // printf("%d: New teleport rot %d\n",e->entityId,yRotn); yRotp = yRotn; xRotp = xRotn; @@ -161,12 +161,12 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl yRotn = yRotp + yRota; } // 5 bits each for x & z, and 6 for y - packet = shared_ptr<MoveEntityPacketSmall>( new MoveEntityPacketSmall::PosRot(e->entityId, (char) xa, (char) ya, (char) za, (char) yRota, 0 ) ); + packet = std::shared_ptr<MoveEntityPacketSmall>( new MoveEntityPacketSmall::PosRot(e->entityId, (char) xa, (char) ya, (char) za, (char) yRota, 0 ) ); c0a++; } else { - packet = shared_ptr<MoveEntityPacket>( new MoveEntityPacket::PosRot(e->entityId, (char) xa, (char) ya, (char) za, (char) yRota, (char) xRota) ); + packet = std::shared_ptr<MoveEntityPacket>( new MoveEntityPacket::PosRot(e->entityId, (char) xa, (char) ya, (char) za, (char) yRota, (char) xRota) ); // printf("%d: New posrot %d + %d = %d\n",e->entityId,yRotp,yRota,yRotn); c0b++; } @@ -179,7 +179,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl ( ya >= -16 ) && ( ya <= 15 ) ) { // 4 bits each for x & z, and 5 for y - packet = shared_ptr<MoveEntityPacketSmall>( new MoveEntityPacketSmall::Pos(e->entityId, (char) xa, (char) ya, (char) za) ); + packet = std::shared_ptr<MoveEntityPacketSmall>( new MoveEntityPacketSmall::Pos(e->entityId, (char) xa, (char) ya, (char) za) ); c1a++; } @@ -188,12 +188,12 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl ( ya >= -32 ) && ( ya <= 31 ) ) { // use the packet with small packet with rotation if we can - 5 bits each for x & z, and 6 for y - still a byte less than the alternative - packet = shared_ptr<MoveEntityPacketSmall>( new MoveEntityPacketSmall::PosRot(e->entityId, (char) xa, (char) ya, (char) za, 0, 0 )); + packet = std::shared_ptr<MoveEntityPacketSmall>( new MoveEntityPacketSmall::PosRot(e->entityId, (char) xa, (char) ya, (char) za, 0, 0 )); c1b++; } else { - packet = shared_ptr<MoveEntityPacket>( new MoveEntityPacket::Pos(e->entityId, (char) xa, (char) ya, (char) za) ); + packet = std::shared_ptr<MoveEntityPacket>( new MoveEntityPacket::Pos(e->entityId, (char) xa, (char) ya, (char) za) ); c1c++; } } @@ -213,13 +213,13 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl yRota = 15; yRotn = yRotp + yRota; } - packet = shared_ptr<MoveEntityPacketSmall>( new MoveEntityPacketSmall::Rot(e->entityId, (char) yRota, 0) ); + packet = std::shared_ptr<MoveEntityPacketSmall>( new MoveEntityPacketSmall::Rot(e->entityId, (char) yRota, 0) ); c2a++; } else { // printf("%d: New rot %d + %d = %d\n",e->entityId,yRotp,yRota,yRotn); - packet = shared_ptr<MoveEntityPacket>( new MoveEntityPacket::Rot(e->entityId, (char) yRota, (char) xRota) ); + packet = std::shared_ptr<MoveEntityPacket>( new MoveEntityPacket::Rot(e->entityId, (char) yRota, (char) xRota) ); c2b++; } } @@ -240,7 +240,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl xap = e->xd; yap = e->yd; zap = e->zd; - broadcast( shared_ptr<SetEntityMotionPacket>( new SetEntityMotionPacket(e->entityId, xap, yap, zap) ) ); + broadcast( std::shared_ptr<SetEntityMotionPacket>( new SetEntityMotionPacket(e->entityId, xap, yap, zap) ) ); } } @@ -250,17 +250,17 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl broadcast(packet); } - shared_ptr<SynchedEntityData> entityData = e->getEntityData(); + std::shared_ptr<SynchedEntityData> entityData = e->getEntityData(); if (entityData->isDirty()) { - broadcastAndSend( shared_ptr<SetEntityDataPacket>( new SetEntityDataPacket(e->entityId, entityData, false) ) ); + broadcastAndSend( std::shared_ptr<SetEntityDataPacket>( new SetEntityDataPacket(e->entityId, entityData, false) ) ); } int yHeadRot = Mth::floor(e->getYHeadRot() * 256 / 360); if (abs(yHeadRot - yHeadRotp) >= TOLERANCE_LEVEL) { - broadcast(shared_ptr<RotateHeadPacket>(new RotateHeadPacket(e->entityId, (byte) yHeadRot))); + broadcast(std::shared_ptr<RotateHeadPacket>(new RotateHeadPacket(e->entityId, (byte) yHeadRot))); yHeadRotp = yHeadRot; } @@ -281,13 +281,13 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl // printf("%d: %d + %d = %d (%f)\n",e->entityId,xRotp,xRota,xRotn,e->xRot); // } } - + } else // 4J-JEV: Added: Mobs in minecarts weren't synching their invisibility. { - shared_ptr<SynchedEntityData> entityData = e->getEntityData(); + std::shared_ptr<SynchedEntityData> entityData = e->getEntityData(); if (entityData->isDirty()) - broadcastAndSend( shared_ptr<SetEntityDataPacket>( new SetEntityDataPacket(e->entityId, entityData, false) ) ); + broadcastAndSend( std::shared_ptr<SetEntityDataPacket>( new SetEntityDataPacket(e->entityId, entityData, false) ) ); } e->hasImpulse = false; } @@ -295,20 +295,20 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl if (e->hurtMarked) { // broadcast(new AnimatePacket(e, AnimatePacket.HURT)); - broadcastAndSend( shared_ptr<SetEntityMotionPacket>( new SetEntityMotionPacket(e) ) ); + broadcastAndSend( std::shared_ptr<SetEntityMotionPacket>( new SetEntityMotionPacket(e) ) ); e->hurtMarked = false; } } -void TrackedEntity::broadcast(shared_ptr<Packet> packet) +void TrackedEntity::broadcast(std::shared_ptr<Packet> packet) { if( Packet::canSendToAnyClient( packet ) ) { // 4J-PB - due to the knockback on a player being hit, we need to send to all players, but limit the network traffic here to players that have not already had it sent to their system - vector< shared_ptr<ServerPlayer> > sentTo; + vector< std::shared_ptr<ServerPlayer> > sentTo; - // 4J - don't send to a player we've already sent this data to that shares the same machine. + // 4J - don't send to a player we've already sent this data to that shares the same machine. // EntityMotionPacket used to limit themselves to sending once to each machine // by only sending to the primary player on each machine. This was causing trouble for split screen // as only the primary player would get a knockback velocity. Now these packets can be sent to any @@ -316,7 +316,7 @@ void TrackedEntity::broadcast(shared_ptr<Packet> packet) for( AUTO_VAR(it, seenBy.begin()); it != seenBy.end(); it++ ) { - shared_ptr<ServerPlayer> player = *it; + std::shared_ptr<ServerPlayer> player = *it; bool dontSend = false; if( sentTo.size() ) { @@ -327,15 +327,15 @@ void TrackedEntity::broadcast(shared_ptr<Packet> packet) } else { - for(unsigned int j = 0; j < sentTo.size(); j++ ) + for(unsigned int j = 0; j < sentTo.size(); j++ ) { - shared_ptr<ServerPlayer> player2 = sentTo[j]; + std::shared_ptr<ServerPlayer> player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { dontSend = true; // #ifdef _DEBUG - // shared_ptr<SetEntityMotionPacket> emp= dynamic_pointer_cast<SetEntityMotionPacket> (packet); + // std::shared_ptr<SetEntityMotionPacket> emp= dynamic_pointer_cast<SetEntityMotionPacket> (packet); // if(emp!=NULL) // { // app.DebugPrintf("Not sending this SetEntityMotionPacket to player - it's already been sent to a player on their console\n"); @@ -366,11 +366,11 @@ void TrackedEntity::broadcast(shared_ptr<Packet> packet) } } -void TrackedEntity::broadcastAndSend(shared_ptr<Packet> packet) +void TrackedEntity::broadcastAndSend(std::shared_ptr<Packet> packet) { - vector< shared_ptr<ServerPlayer> > sentTo; + vector< std::shared_ptr<ServerPlayer> > sentTo; broadcast(packet); - shared_ptr<ServerPlayer> sp = dynamic_pointer_cast<ServerPlayer>(e); + std::shared_ptr<ServerPlayer> sp = dynamic_pointer_cast<ServerPlayer>(e); if (sp != NULL && sp->connection) { sp->connection->send(packet); @@ -385,7 +385,7 @@ void TrackedEntity::broadcastRemoved() } } -void TrackedEntity::removePlayer(shared_ptr<ServerPlayer> sp) +void TrackedEntity::removePlayer(std::shared_ptr<ServerPlayer> sp) { AUTO_VAR(it, seenBy.find( sp )); if( it != seenBy.end() ) @@ -395,7 +395,7 @@ void TrackedEntity::removePlayer(shared_ptr<ServerPlayer> sp) } // 4J-JEV: Added for code reuse. -TrackedEntity::eVisibility TrackedEntity::isVisible(EntityTracker *tracker, shared_ptr<ServerPlayer> sp, bool forRider) +TrackedEntity::eVisibility TrackedEntity::isVisible(EntityTracker *tracker, std::shared_ptr<ServerPlayer> sp, bool forRider) { // 4J Stu - We call update players when the entity has moved more than a certain amount at the start of it's tick // Before this call we set xpu, ypu and zpu to the entities new position, but xp,yp and zp are the old position until later in the tick. @@ -424,7 +424,7 @@ TrackedEntity::eVisibility TrackedEntity::isVisible(EntityTracker *tracker, shar for( unsigned int i = 0; i < server->getPlayers()->players.size(); i++ ) { // Consider extra players, but not if they are the entity we are tracking, or the player we've been passed as input, or in another dimension - shared_ptr<ServerPlayer> ep = server->getPlayers()->players[i]; + std::shared_ptr<ServerPlayer> ep = server->getPlayers()->players[i]; if( ep == sp ) continue; if( ep == e ) continue; if( ep->dimension != sp->dimension ) continue; @@ -461,24 +461,24 @@ TrackedEntity::eVisibility TrackedEntity::isVisible(EntityTracker *tracker, shar else return eVisibility_NotVisible; } -void TrackedEntity::updatePlayer(EntityTracker *tracker, shared_ptr<ServerPlayer> sp) +void TrackedEntity::updatePlayer(EntityTracker *tracker, std::shared_ptr<ServerPlayer> sp) { if (sp == e) return; eVisibility visibility = this->isVisible(tracker, sp); - + if ( visibility == eVisibility_SeenAndVisible && seenBy.find(sp) == seenBy.end() ) { seenBy.insert(sp); - shared_ptr<Packet> packet = getAddEntityPacket(); + std::shared_ptr<Packet> packet = getAddEntityPacket(); sp->connection->send(packet); xap = e->xd; yap = e->yd; zap = e->zd; - shared_ptr<Player> plr = dynamic_pointer_cast<Player>(e); + std::shared_ptr<Player> plr = dynamic_pointer_cast<Player>(e); if (plr != NULL) { app.DebugPrintf( "TrackedEntity:: Player '%ls' is now visible to player '%ls', %s.\n", @@ -490,17 +490,17 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, shared_ptr<ServerPlayer // 4J Stu brought forward to fix when Item Frames if (!e->getEntityData()->isEmpty() && !(dynamic_pointer_cast<AddMobPacket>(packet))) { - sp->connection->send(shared_ptr<SetEntityDataPacket>( new SetEntityDataPacket(e->entityId, e->getEntityData(), true))); + sp->connection->send(std::shared_ptr<SetEntityDataPacket>( new SetEntityDataPacket(e->entityId, e->getEntityData(), true))); } if (this->trackDelta) { - sp->connection->send( shared_ptr<SetEntityMotionPacket>( new SetEntityMotionPacket(e->entityId, e->xd, e->yd, e->zd) ) ); + sp->connection->send( std::shared_ptr<SetEntityMotionPacket>( new SetEntityMotionPacket(e->entityId, e->xd, e->yd, e->zd) ) ); } if (e->riding != NULL) { - sp->connection->send(shared_ptr<SetRidingPacket>(new SetRidingPacket(e, e->riding))); + sp->connection->send(std::shared_ptr<SetRidingPacket>(new SetRidingPacket(e, e->riding))); } ItemInstanceArray equipped = e->getEquipmentSlots(); @@ -508,28 +508,28 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, shared_ptr<ServerPlayer { for (unsigned int i = 0; i < equipped.length; i++) { - sp->connection->send( shared_ptr<SetEquippedItemPacket>( new SetEquippedItemPacket(e->entityId, i, equipped[i]) ) ); + sp->connection->send( std::shared_ptr<SetEquippedItemPacket>( new SetEquippedItemPacket(e->entityId, i, equipped[i]) ) ); } } if (dynamic_pointer_cast<Player>(e) != NULL) { - shared_ptr<Player> spe = dynamic_pointer_cast<Player>(e); + std::shared_ptr<Player> spe = dynamic_pointer_cast<Player>(e); if (spe->isSleeping()) { - sp->connection->send( shared_ptr<EntityActionAtPositionPacket>( new EntityActionAtPositionPacket(e, EntityActionAtPositionPacket::START_SLEEP, Mth::floor(e->x), Mth::floor(e->y), Mth::floor(e->z)) ) ); + sp->connection->send( std::shared_ptr<EntityActionAtPositionPacket>( new EntityActionAtPositionPacket(e, EntityActionAtPositionPacket::START_SLEEP, Mth::floor(e->x), Mth::floor(e->y), Mth::floor(e->z)) ) ); } } if (dynamic_pointer_cast<Mob>(e) != NULL) { - shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(e); + std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(e); vector<MobEffectInstance *> *activeEffects = mob->getActiveEffects(); for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) { MobEffectInstance *effect = *it; - sp->connection->send(shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(e->entityId, effect) ) ); + sp->connection->send(std::shared_ptr<UpdateMobEffectPacket>( new UpdateMobEffectPacket(e->entityId, effect) ) ); } delete activeEffects; } @@ -546,7 +546,7 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, shared_ptr<ServerPlayer } -bool TrackedEntity::canBySeenBy(shared_ptr<ServerPlayer> player) +bool TrackedEntity::canBySeenBy(std::shared_ptr<ServerPlayer> player) { // 4J - for some reason this isn't currently working, and is causing players to not appear until we are really close to them. Not sure // what the conflict is between the java & our version, but removing for now as it is causing issues and we shouldn't *really* need it @@ -556,7 +556,7 @@ bool TrackedEntity::canBySeenBy(shared_ptr<ServerPlayer> player) // return player->getLevel()->getChunkMap()->isPlayerIn(player, e->xChunk, e->zChunk); } -void TrackedEntity::updatePlayers(EntityTracker *tracker, vector<shared_ptr<Player> > *players) +void TrackedEntity::updatePlayers(EntityTracker *tracker, vector<std::shared_ptr<Player> > *players) { for (unsigned int i = 0; i < players->size(); i++) { @@ -564,7 +564,7 @@ void TrackedEntity::updatePlayers(EntityTracker *tracker, vector<shared_ptr<Play } } -shared_ptr<Packet> TrackedEntity::getAddEntityPacket() +std::shared_ptr<Packet> TrackedEntity::getAddEntityPacket() { if (e->removed) { @@ -575,20 +575,20 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() if (dynamic_pointer_cast<Creature>(e) != NULL) { yHeadRotp = Mth::floor(e->getYHeadRot() * 256 / 360); - return shared_ptr<AddMobPacket>( new AddMobPacket(dynamic_pointer_cast<Mob>(e), yRotp, xRotp, xp, yp, zp, yHeadRotp) ); + return std::shared_ptr<AddMobPacket>( new AddMobPacket(dynamic_pointer_cast<Mob>(e), yRotp, xRotp, xp, yp, zp, yHeadRotp) ); } switch(e->GetType()) { case eTYPE_ITEMENTITY: { - shared_ptr<AddEntityPacket> packet = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ITEM, 1, yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<AddEntityPacket> packet = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ITEM, 1, yRotp, xRotp, xp, yp, zp) ); return packet; } break; case eTYPE_SERVERPLAYER: { - shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(e); + std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(e); PlayerUID xuid = INVALID_XUID; PlayerUID OnlineXuid = INVALID_XUID; if( player != NULL ) @@ -597,76 +597,76 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() OnlineXuid = player->getOnlineXuid(); } // 4J Added yHeadRotp param to fix #102563 - TU12: Content: Gameplay: When one of the Players is idle for a few minutes his head turns 180 degrees. - return shared_ptr<AddPlayerPacket>( new AddPlayerPacket(dynamic_pointer_cast<Player>(e), xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp, yHeadRotp ) ); + return std::shared_ptr<AddPlayerPacket>( new AddPlayerPacket(dynamic_pointer_cast<Player>(e), xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp, yHeadRotp ) ); } break; case eTYPE_MINECART: { - shared_ptr<Minecart> minecart = dynamic_pointer_cast<Minecart>(e); - if (minecart->type == Minecart::RIDEABLE) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_RIDEABLE, yRotp, xRotp, xp, yp, zp) ); - if (minecart->type == Minecart::CHEST) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_CHEST, yRotp, xRotp, xp, yp, zp) ); - if (minecart->type == Minecart::FURNACE) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_FURNACE, yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<Minecart> minecart = dynamic_pointer_cast<Minecart>(e); + if (minecart->type == Minecart::RIDEABLE) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_RIDEABLE, yRotp, xRotp, xp, yp, zp) ); + if (minecart->type == Minecart::CHEST) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_CHEST, yRotp, xRotp, xp, yp, zp) ); + if (minecart->type == Minecart::FURNACE) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_FURNACE, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_BOAT: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_ENDERDRAGON: { yHeadRotp = Mth::floor(e->getYHeadRot() * 256 / 360); - return shared_ptr<AddMobPacket>( new AddMobPacket(dynamic_pointer_cast<Mob>(e), yRotp, xRotp, xp, yp, zp, yHeadRotp ) ); + return std::shared_ptr<AddMobPacket>( new AddMobPacket(dynamic_pointer_cast<Mob>(e), yRotp, xRotp, xp, yp, zp, yHeadRotp ) ); } break; case eTYPE_FISHINGHOOK: { - shared_ptr<Entity> owner = dynamic_pointer_cast<FishingHook>(e)->owner; - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FISH_HOOK, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<Entity> owner = dynamic_pointer_cast<FishingHook>(e)->owner; + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FISH_HOOK, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_ARROW: { - shared_ptr<Entity> owner = (dynamic_pointer_cast<Arrow>(e))->owner; - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ARROW, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<Entity> owner = (dynamic_pointer_cast<Arrow>(e))->owner; + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ARROW, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_SNOWBALL: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_THROWNPOTION: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_POTION, ((dynamic_pointer_cast<ThrownPotion>(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp)); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_POTION, ((dynamic_pointer_cast<ThrownPotion>(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp)); } break; case eTYPE_THROWNEXPBOTTLE: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_THROWNENDERPEARL: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_EYEOFENDERSIGNAL: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_SMALL_FIREBALL: { - shared_ptr<SmallFireball> fb = dynamic_pointer_cast<SmallFireball>(e); - shared_ptr<AddEntityPacket> aep = nullptr; + std::shared_ptr<SmallFireball> fb = dynamic_pointer_cast<SmallFireball>(e); + std::shared_ptr<AddEntityPacket> aep = nullptr; if (fb->owner != NULL) { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -676,15 +676,15 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() break; case eTYPE_DRAGON_FIREBALL: { - shared_ptr<DragonFireball> fb = dynamic_pointer_cast<DragonFireball>(e); - shared_ptr<AddEntityPacket> aep = nullptr; + std::shared_ptr<DragonFireball> fb = dynamic_pointer_cast<DragonFireball>(e); + std::shared_ptr<AddEntityPacket> aep = nullptr; if (fb->owner != NULL) { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::DRAGON_FIRE_BALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::DRAGON_FIRE_BALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::DRAGON_FIRE_BALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::DRAGON_FIRE_BALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -694,15 +694,15 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() break; case eTYPE_FIREBALL: { - shared_ptr<Fireball> fb = dynamic_pointer_cast<Fireball>(e); - shared_ptr<AddEntityPacket> aep = nullptr; + std::shared_ptr<Fireball> fb = dynamic_pointer_cast<Fireball>(e); + std::shared_ptr<AddEntityPacket> aep = nullptr; if (fb->owner != NULL) { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -712,33 +712,33 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() break; case eTYPE_THROWNEGG: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_PRIMEDTNT: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_ENDER_CRYSTAL: { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_FALLINGTILE: { - shared_ptr<FallingTile> ft = dynamic_pointer_cast<FallingTile>(e); - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FALLING, ft->tile | (ft->data << 16), yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<FallingTile> ft = dynamic_pointer_cast<FallingTile>(e); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FALLING, ft->tile | (ft->data << 16), yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_PAINTING: { - return shared_ptr<AddPaintingPacket>( new AddPaintingPacket(dynamic_pointer_cast<Painting>(e)) ); + return std::shared_ptr<AddPaintingPacket>( new AddPaintingPacket(dynamic_pointer_cast<Painting>(e)) ); } break; case eTYPE_ITEM_FRAME: { - shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e); + std::shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e); { int ix= (int)frame->xTile; @@ -747,7 +747,7 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() app.DebugPrintf("eTYPE_ITEM_FRAME xyz %d,%d,%d\n",ix,iy,iz); } - shared_ptr<AddEntityPacket> packet = shared_ptr<AddEntityPacket>(new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp)); + std::shared_ptr<AddEntityPacket> packet = std::shared_ptr<AddEntityPacket>(new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp)); packet->x = Mth::floor(frame->xTile * 32.0f); packet->y = Mth::floor(frame->yTile * 32.0f); packet->z = Mth::floor(frame->zTile * 32.0f); @@ -756,18 +756,18 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() break; case eTYPE_EXPERIENCEORB: { - return shared_ptr<AddExperienceOrbPacket>( new AddExperienceOrbPacket(dynamic_pointer_cast<ExperienceOrb>(e)) ); + return std::shared_ptr<AddExperienceOrbPacket>( new AddExperienceOrbPacket(dynamic_pointer_cast<ExperienceOrb>(e)) ); } break; default: assert(false); - break; + break; } /* if (e->GetType() == eTYPE_ITEMENTITY) { - shared_ptr<ItemEntity> itemEntity = dynamic_pointer_cast<ItemEntity>(e); - shared_ptr<AddItemEntityPacket> packet = shared_ptr<AddItemEntityPacket>( new AddItemEntityPacket(itemEntity, xp, yp, zp) ); + std::shared_ptr<ItemEntity> itemEntity = dynamic_pointer_cast<ItemEntity>(e); + std::shared_ptr<AddItemEntityPacket> packet = std::shared_ptr<AddItemEntityPacket>( new AddItemEntityPacket(itemEntity, xp, yp, zp) ); itemEntity->x = packet->x / 32.0; itemEntity->y = packet->y / 32.0; itemEntity->z = packet->z / 32.0; @@ -776,7 +776,7 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() if (e->GetType() == eTYPE_SERVERPLAYER ) { - shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(e); + std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(e); XUID xuid = INVALID_XUID; XUID OnlineXuid = INVALID_XUID; if( player != NULL ) @@ -784,68 +784,68 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() xuid = player->getXuid(); OnlineXuid = player->getOnlineXuid(); } - return shared_ptr<AddPlayerPacket>( new AddPlayerPacket(dynamic_pointer_cast<Player>(e), xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp ) ); + return std::shared_ptr<AddPlayerPacket>( new AddPlayerPacket(dynamic_pointer_cast<Player>(e), xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp ) ); } if (e->GetType() == eTYPE_MINECART) { - shared_ptr<Minecart> minecart = dynamic_pointer_cast<Minecart>(e); - if (minecart->type == Minecart::RIDEABLE) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_RIDEABLE, yRotp, xRotp, xp, yp, zp) ); - if (minecart->type == Minecart::CHEST) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_CHEST, yRotp, xRotp, xp, yp, zp) ); - if (minecart->type == Minecart::FURNACE) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_FURNACE, yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<Minecart> minecart = dynamic_pointer_cast<Minecart>(e); + if (minecart->type == Minecart::RIDEABLE) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_RIDEABLE, yRotp, xRotp, xp, yp, zp) ); + if (minecart->type == Minecart::CHEST) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_CHEST, yRotp, xRotp, xp, yp, zp) ); + if (minecart->type == Minecart::FURNACE) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::MINECART_FURNACE, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_BOAT) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp) ); } if (dynamic_pointer_cast<Creature>(e) != NULL) { - return shared_ptr<AddMobPacket>( new AddMobPacket(dynamic_pointer_cast<Mob>(e), yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddMobPacket>( new AddMobPacket(dynamic_pointer_cast<Mob>(e), yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_ENDERDRAGON) { - return shared_ptr<AddMobPacket>( new AddMobPacket(dynamic_pointer_cast<Mob>(e), yRotp, xRotp, xp, yp, zp ) ); + return std::shared_ptr<AddMobPacket>( new AddMobPacket(dynamic_pointer_cast<Mob>(e), yRotp, xRotp, xp, yp, zp ) ); } if (e->GetType() == eTYPE_FISHINGHOOK) { - shared_ptr<Entity> owner = dynamic_pointer_cast<FishingHook>(e)->owner; - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FISH_HOOK, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<Entity> owner = dynamic_pointer_cast<FishingHook>(e)->owner; + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FISH_HOOK, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_ARROW) { - shared_ptr<Entity> owner = (dynamic_pointer_cast<Arrow>(e))->owner; - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ARROW, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<Entity> owner = (dynamic_pointer_cast<Arrow>(e))->owner; + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ARROW, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_SNOWBALL) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_THROWNPOTION) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_POTION, ((dynamic_pointer_cast<ThrownPotion>(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp)); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_POTION, ((dynamic_pointer_cast<ThrownPotion>(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp)); } if (e->GetType() == eTYPE_THROWNEXPBOTTLE) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_THROWNENDERPEARL) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_EYEOFENDERSIGNAL) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_SMALL_FIREBALL) { - shared_ptr<SmallFireball> fb = dynamic_pointer_cast<SmallFireball>(e); - shared_ptr<AddEntityPacket> aep = NULL; + std::shared_ptr<SmallFireball> fb = dynamic_pointer_cast<SmallFireball>(e); + std::shared_ptr<AddEntityPacket> aep = NULL; if (fb->owner != NULL) { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -854,15 +854,15 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() } if (e->GetType() == eTYPE_FIREBALL) { - shared_ptr<Fireball> fb = dynamic_pointer_cast<Fireball>(e); - shared_ptr<AddEntityPacket> aep = NULL; + std::shared_ptr<Fireball> fb = dynamic_pointer_cast<Fireball>(e); + std::shared_ptr<AddEntityPacket> aep = NULL; if (fb->owner != NULL) { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -871,30 +871,30 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() } if (e->GetType() == eTYPE_THROWNEGG) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_PRIMEDTNT) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_ENDER_CRYSTAL) { - return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp) ); + return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_FALLINGTILE) { - shared_ptr<FallingTile> ft = dynamic_pointer_cast<FallingTile>(e); - if (ft->tile == Tile::sand_Id) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FALLING_SAND, yRotp, xRotp, xp, yp, zp) ); - if (ft->tile == Tile::gravel_Id) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FALLING_GRAVEL, yRotp, xRotp, xp, yp, zp) ); - if (ft->tile == Tile::dragonEgg_Id) return shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FALLING_EGG, yRotp, xRotp, xp, yp, zp) ); + std::shared_ptr<FallingTile> ft = dynamic_pointer_cast<FallingTile>(e); + if (ft->tile == Tile::sand_Id) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FALLING_SAND, yRotp, xRotp, xp, yp, zp) ); + if (ft->tile == Tile::gravel_Id) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FALLING_GRAVEL, yRotp, xRotp, xp, yp, zp) ); + if (ft->tile == Tile::dragonEgg_Id) return std::shared_ptr<AddEntityPacket>( new AddEntityPacket(e, AddEntityPacket::FALLING_EGG, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_PAINTING) { - return shared_ptr<AddPaintingPacket>( new AddPaintingPacket(dynamic_pointer_cast<Painting>(e)) ); + return std::shared_ptr<AddPaintingPacket>( new AddPaintingPacket(dynamic_pointer_cast<Painting>(e)) ); } - if (e->GetType() == eTYPE_ITEM_FRAME) + if (e->GetType() == eTYPE_ITEM_FRAME) { - shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e); + std::shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e); { int ix= (int)frame->xTile; @@ -903,7 +903,7 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() app.DebugPrintf("eTYPE_ITEM_FRAME xyz %d,%d,%d\n",ix,iy,iz); } - shared_ptr<AddEntityPacket> packet = shared_ptr<AddEntityPacket>(new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp)); + std::shared_ptr<AddEntityPacket> packet = std::shared_ptr<AddEntityPacket>(new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp)); packet->x = Mth::floor(frame->xTile * 32.0f); packet->y = Mth::floor(frame->yTile * 32.0f); packet->z = Mth::floor(frame->zTile * 32.0f); @@ -911,14 +911,14 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket() } if (e->GetType() == eTYPE_EXPERIENCEORB) { - return shared_ptr<AddExperienceOrbPacket>( new AddExperienceOrbPacket(dynamic_pointer_cast<ExperienceOrb>(e)) ); + return std::shared_ptr<AddExperienceOrbPacket>( new AddExperienceOrbPacket(dynamic_pointer_cast<ExperienceOrb>(e)) ); } assert(false); */ return nullptr; } -void TrackedEntity::clear(shared_ptr<ServerPlayer> sp) +void TrackedEntity::clear(std::shared_ptr<ServerPlayer> sp) { AUTO_VAR(it, seenBy.find(sp)); if (it != seenBy.end()) diff --git a/Minecraft.Client/TrackedEntity.h b/Minecraft.Client/TrackedEntity.h index 9fb564a4..1efd169b 100644 --- a/Minecraft.Client/TrackedEntity.h +++ b/Minecraft.Client/TrackedEntity.h @@ -15,7 +15,7 @@ private: static const int TOLERANCE_LEVEL = 4; public: - shared_ptr<Entity> e; + std::shared_ptr<Entity> e; int range, updateInterval; int xp, yp, zp, yRotp, xRotp, yHeadRotp; @@ -27,23 +27,23 @@ private: bool updatedPlayerVisibility; bool trackDelta; int teleportDelay; - shared_ptr<Entity> wasRiding; + std::shared_ptr<Entity> wasRiding; public: bool moved; - unordered_set<shared_ptr<ServerPlayer> , PlayerKeyHash, PlayerKeyEq > seenBy; + unordered_set<std::shared_ptr<ServerPlayer> , PlayerKeyHash, PlayerKeyEq > seenBy; - TrackedEntity(shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta); + TrackedEntity(std::shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta); - void tick(EntityTracker *tracker, vector<shared_ptr<Player> > *players); - void broadcast(shared_ptr<Packet> packet); - void broadcastAndSend(shared_ptr<Packet> packet); + void tick(EntityTracker *tracker, vector<std::shared_ptr<Player> > *players); + void broadcast(std::shared_ptr<Packet> packet); + void broadcastAndSend(std::shared_ptr<Packet> packet); void broadcastRemoved(); - void removePlayer(shared_ptr<ServerPlayer> sp); + void removePlayer(std::shared_ptr<ServerPlayer> sp); private: - bool canBySeenBy(shared_ptr<ServerPlayer> player); + bool canBySeenBy(std::shared_ptr<ServerPlayer> player); enum eVisibility { @@ -52,14 +52,14 @@ private: eVisibility_SeenAndVisible = 2, }; - eVisibility isVisible(EntityTracker *tracker, shared_ptr<ServerPlayer> sp, bool forRider = false); // 4J Added forRider - + eVisibility isVisible(EntityTracker *tracker, std::shared_ptr<ServerPlayer> sp, bool forRider = false); // 4J Added forRider + public: - void updatePlayer(EntityTracker *tracker, shared_ptr<ServerPlayer> sp); - void updatePlayers(EntityTracker *tracker, vector<shared_ptr<Player> > *players); + void updatePlayer(EntityTracker *tracker, std::shared_ptr<ServerPlayer> sp); + void updatePlayers(EntityTracker *tracker, vector<std::shared_ptr<Player> > *players); private: - void sendEntityData(shared_ptr<PlayerConnection> conn); - shared_ptr<Packet> getAddEntityPacket(); + void sendEntityData(std::shared_ptr<PlayerConnection> conn); + std::shared_ptr<Packet> getAddEntityPacket(); public: - void clear(shared_ptr<ServerPlayer> sp); + void clear(std::shared_ptr<ServerPlayer> sp); }; diff --git a/Minecraft.Client/TrapScreen.cpp b/Minecraft.Client/TrapScreen.cpp index c7eb1472..6a199d0e 100644 --- a/Minecraft.Client/TrapScreen.cpp +++ b/Minecraft.Client/TrapScreen.cpp @@ -6,7 +6,7 @@ #include "..\Minecraft.World\DispenserTileEntity.h" #include "..\Minecraft.World\net.minecraft.world.h" -TrapScreen::TrapScreen(shared_ptr<Inventory> inventory, shared_ptr<DispenserTileEntity> trap) : AbstractContainerScreen(new TrapMenu(inventory, trap)) +TrapScreen::TrapScreen(std::shared_ptr<Inventory> inventory, std::shared_ptr<DispenserTileEntity> trap) : AbstractContainerScreen(new TrapMenu(inventory, trap)) { } diff --git a/Minecraft.Client/TrapScreen.h b/Minecraft.Client/TrapScreen.h index bda3158f..a993805d 100644 --- a/Minecraft.Client/TrapScreen.h +++ b/Minecraft.Client/TrapScreen.h @@ -6,7 +6,7 @@ class Inventory; class TrapScreen : public AbstractContainerScreen { public: - TrapScreen(shared_ptr<Inventory> inventory, shared_ptr<DispenserTileEntity> trap); + TrapScreen(std::shared_ptr<Inventory> inventory, std::shared_ptr<DispenserTileEntity> trap); protected: virtual void renderLabels(); virtual void renderBg(float a); diff --git a/Minecraft.Client/ViewportCuller.cpp b/Minecraft.Client/ViewportCuller.cpp index bc22faa6..a6d3c87e 100644 --- a/Minecraft.Client/ViewportCuller.cpp +++ b/Minecraft.Client/ViewportCuller.cpp @@ -7,17 +7,17 @@ ViewportCuller::Face::Face(double x, double y, double z, float yRot, float xRot) this->xc = x; this->yc = y; this->zc = z; - + xd = Mth::sin(yRot / 180 * PI) * Mth::cos(xRot / 180 * PI); zd = -Mth::cos(yRot / 180 * PI) * Mth::cos(xRot / 180 * PI); yd = -Mth::sin(xRot / 180 * PI); - - cullOffs = xc*xd+yc*yd+zc*zd; + + cullOffs = xc*xd+yc*yd+zc*zd; } - + bool ViewportCuller::Face::inFront(double x, double y, double z, double r) { - return x*xd+y*yd+z*zd>cullOffs-r; + return x*xd+y*yd+z*zd>cullOffs-r; } bool ViewportCuller::Face::inFront(double x0, double y0, double z0, double x1, double y1, double z1) @@ -30,7 +30,7 @@ bool ViewportCuller::Face::inFront(double x0, double y0, double z0, double x1, d x0*xd+y0*yd+z1*zd>cullOffs || x1*xd+y0*yd+z1*zd>cullOffs || x0*xd+y1*yd+z1*zd>cullOffs || - x1*xd+y1*yd+z1*zd>cullOffs + x1*xd+y1*yd+z1*zd>cullOffs ) return true; return false; } @@ -44,18 +44,18 @@ bool ViewportCuller::Face::fullyInFront(double x0, double y0, double z0, double x0*xd+y0*yd+z1*zd<cullOffs || x1*xd+y0*yd+z1*zd<cullOffs || x0*xd+y1*yd+z1*zd<cullOffs || - x1*xd+y1*yd+z1*zd<cullOffs + x1*xd+y1*yd+z1*zd<cullOffs ) return false; return true; } -ViewportCuller::ViewportCuller(shared_ptr<Mob> mob, double fogDistance, float a) +ViewportCuller::ViewportCuller(std::shared_ptr<Mob> mob, double fogDistance, float a) { float yRot = mob->yRotO+(mob->yRot-mob->yRotO)*a; float xRot = mob->xRotO+(mob->xRot-mob->xRotO)*a; - - double x = mob->xOld+(mob->x-mob->xOld)*a; - double y = mob->yOld+(mob->y-mob->yOld)*a; + + double x = mob->xOld+(mob->x-mob->xOld)*a; + double y = mob->yOld+(mob->y-mob->yOld)*a; double z = mob->zOld+(mob->z-mob->zOld)*a; double xd = Mth::sin(yRot / 180 * PI) * Mth::cos(xRot / 180 * PI); @@ -69,7 +69,7 @@ ViewportCuller::ViewportCuller(shared_ptr<Mob> mob, double fogDistance, float a) faces[2] = Face(x, y, z, yRot-xFov, xRot); faces[3] = Face(x, y, z, yRot, xRot+yFov); faces[4] = Face(x, y, z, yRot, xRot-yFov); - faces[5] = Face(x+xd*fogDistance, y+yd*fogDistance, z+zd*fogDistance, yRot+180, -xRot); + faces[5] = Face(x+xd*fogDistance, y+yd*fogDistance, z+zd*fogDistance, yRot+180, -xRot); } bool ViewportCuller::isVisible(AABB bb) @@ -88,12 +88,12 @@ bool ViewportCuller::cubeInFrustum(double x0, double y0, double z0, double x1, d double xd = (x1-x0)/2.0f; double yd = (y1-y0)/2.0f; double zd = (z1-z0)/2.0f; - + double xc = x0+xd; double yc = y0+yd; double zc = z0+zd; double r = _max(xd, yd, zd)*1.5f; - + if (!faces[0].inFront(xc, yc, zc, r)) return false; if (!faces[1].inFront(xc, yc, zc, r)) return false; if (!faces[2].inFront(xc, yc, zc, r)) return false; @@ -123,7 +123,7 @@ bool ViewportCuller::cubeFullyInFrustum(double x0, double y0, double z0, double double xd = (x1-x0)/2.0f; double yd = (y1-y0)/2.0f; double zd = (z1-z0)/2.0f; - + double xc = x0+xd; double yc = y0+yd; double zc = z0+zd; @@ -135,8 +135,8 @@ bool ViewportCuller::cubeFullyInFrustum(double x0, double y0, double z0, double if (!faces[3].inFront(xc, yc, zc, r)) return false; if (!faces[4].inFront(xc, yc, zc, r)) return false; if (!faces[5].inFront(xc, yc, zc, r)) return false; - - + + if (!faces[0].fullyInFront(x0, y0, z0, x1, y1, z1)) return false; if (!faces[1].fullyInFront(x0, y0, z0, x1, y1, z1)) return false; if (!faces[2].fullyInFront(x0, y0, z0, x1, y1, z1)) return false; diff --git a/Minecraft.Client/ViewportCuller.h b/Minecraft.Client/ViewportCuller.h index 2a975de9..31739cb6 100644 --- a/Minecraft.Client/ViewportCuller.h +++ b/Minecraft.Client/ViewportCuller.h @@ -14,17 +14,17 @@ private: double cullOffs; public: Face() {} // 4J - added so we can declare an array of these (unitialised) in the class - Face(double x, double y, double z, float yRot, float xRot); + Face(double x, double y, double z, float yRot, float xRot); bool inFront(double x, double y, double z, double r); bool inFront(double x0, double y0, double z0, double x1, double y1, double z1); - bool fullyInFront(double x0, double y0, double z0, double x1, double y1, double z1); + bool fullyInFront(double x0, double y0, double z0, double x1, double y1, double z1); }; private: Face faces[6]; double xOff, yOff, zOff; public: - ViewportCuller(shared_ptr<Mob> mob, double fogDistance, float a); + ViewportCuller(std::shared_ptr<Mob> mob, double fogDistance, float a); virtual bool isVisible(AABB bb); virtual bool cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1); virtual bool cubeFullyInFrustum(double x0, double y0, double z0, double x1, double y1, double z1); diff --git a/Minecraft.Client/VillagerGolemModel.cpp b/Minecraft.Client/VillagerGolemModel.cpp index aaeabd53..5e3b4730 100644 --- a/Minecraft.Client/VillagerGolemModel.cpp +++ b/Minecraft.Client/VillagerGolemModel.cpp @@ -36,7 +36,7 @@ VillagerGolemModel::VillagerGolemModel(float g, float yOffset) leg1->addBox(-3.5f, -3, -3, 6, 16, 5, g); } -void VillagerGolemModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void VillagerGolemModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); @@ -59,9 +59,9 @@ void VillagerGolemModel::setupAnim(float time, float r, float bob, float yRot, f leg1->yRot = 0; } -void VillagerGolemModel::prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) +void VillagerGolemModel::prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) { - shared_ptr<VillagerGolem> vg = dynamic_pointer_cast<VillagerGolem>(mob); + std::shared_ptr<VillagerGolem> vg = dynamic_pointer_cast<VillagerGolem>(mob); int attackTick = vg->getAttackAnimationTick(); if (attackTick > 0) { diff --git a/Minecraft.Client/VillagerGolemModel.h b/Minecraft.Client/VillagerGolemModel.h index 83e73616..80c822d5 100644 --- a/Minecraft.Client/VillagerGolemModel.h +++ b/Minecraft.Client/VillagerGolemModel.h @@ -21,9 +21,9 @@ public: VillagerGolemModel(float g = 0.0f, float yOffset = -7.0f); - void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - void prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a); + void prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a); private: float triangleWave(float bob, float period); diff --git a/Minecraft.Client/VillagerGolemRenderer.cpp b/Minecraft.Client/VillagerGolemRenderer.cpp index f03cea4c..dd7396e6 100644 --- a/Minecraft.Client/VillagerGolemRenderer.cpp +++ b/Minecraft.Client/VillagerGolemRenderer.cpp @@ -15,16 +15,16 @@ int VillagerGolemRenderer::prepareArmor(VillagerGolemModel *villagerGolem, int l return -1; } -void VillagerGolemRenderer::render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) +void VillagerGolemRenderer::render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); } -void VillagerGolemRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a) +void VillagerGolemRenderer::setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<VillagerGolem> mob = dynamic_pointer_cast<VillagerGolem>(_mob); + std::shared_ptr<VillagerGolem> mob = dynamic_pointer_cast<VillagerGolem>(_mob); MobRenderer::setupRotations(mob, bob, bodyRot, a); if (mob->walkAnimSpeed < 0.01) return; @@ -34,11 +34,11 @@ void VillagerGolemRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, floa glRotatef(6.5f * triangleWave, 0, 0, 1); } -void VillagerGolemRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) +void VillagerGolemRenderer::additionalRendering(std::shared_ptr<Mob> _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<VillagerGolem> mob = dynamic_pointer_cast<VillagerGolem>(_mob); + std::shared_ptr<VillagerGolem> mob = dynamic_pointer_cast<VillagerGolem>(_mob); MobRenderer::additionalRendering(mob, a); if (mob->getOfferFlowerTick() == 0) return; diff --git a/Minecraft.Client/VillagerGolemRenderer.h b/Minecraft.Client/VillagerGolemRenderer.h index 4bc3fd9c..185e38d4 100644 --- a/Minecraft.Client/VillagerGolemRenderer.h +++ b/Minecraft.Client/VillagerGolemRenderer.h @@ -16,9 +16,9 @@ protected: int prepareArmor(VillagerGolemModel *villagerGolem, int layer, float a); public: - void render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); + void render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); protected: - void setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a); - void additionalRendering(shared_ptr<Mob> mob, float a); + void setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a); + void additionalRendering(std::shared_ptr<Mob> mob, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/VillagerModel.cpp b/Minecraft.Client/VillagerModel.cpp index 8885484d..72e6ea3a 100644 --- a/Minecraft.Client/VillagerModel.cpp +++ b/Minecraft.Client/VillagerModel.cpp @@ -55,7 +55,7 @@ VillagerModel::VillagerModel(float g, float yOffset) : Model() _init(g,yOffset); } -void VillagerModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void VillagerModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); @@ -70,11 +70,11 @@ void VillagerModel::setupAnim(float time, float r, float bob, float yRot, float { head->yRot = yRot / (float) (180 / PI); head->xRot = xRot / (float) (180 / PI); - + arms->y = 3; arms->z = -1; arms->xRot = -0.75f; - + leg0->xRot = ((float) Mth::cos(time * 0.6662f) * 1.4f) * r * 0.5f; leg1->xRot = ((float) Mth::cos(time * 0.6662f + PI) * 1.4f) * r * 0.5f; leg0->yRot = 0; diff --git a/Minecraft.Client/VillagerModel.h b/Minecraft.Client/VillagerModel.h index 24c8b858..07a301c4 100644 --- a/Minecraft.Client/VillagerModel.h +++ b/Minecraft.Client/VillagerModel.h @@ -2,7 +2,7 @@ #pragma once #include "Model.h" -class VillagerModel : public Model +class VillagerModel : public Model { public: ModelPart *head, *body, *arms, *leg0, *leg1; @@ -10,6 +10,6 @@ public: void _init(float g, float yOffset); // 4J added VillagerModel(float g, float yOffset); VillagerModel(float g); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) ; + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) ; virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; diff --git a/Minecraft.Client/VillagerRenderer.cpp b/Minecraft.Client/VillagerRenderer.cpp index b4c88173..bb31caa5 100644 --- a/Minecraft.Client/VillagerRenderer.cpp +++ b/Minecraft.Client/VillagerRenderer.cpp @@ -8,30 +8,30 @@ VillagerRenderer::VillagerRenderer() : MobRenderer(new VillagerModel(0), 0.5f) villagerModel = (VillagerModel *) model; } -int VillagerRenderer::prepareArmor(shared_ptr<Mob> villager, int layer, float a) +int VillagerRenderer::prepareArmor(std::shared_ptr<Mob> villager, int layer, float a) { return -1; } -void VillagerRenderer::render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) +void VillagerRenderer::render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); } -void VillagerRenderer::renderName(shared_ptr<Mob> mob, double x, double y, double z) +void VillagerRenderer::renderName(std::shared_ptr<Mob> mob, double x, double y, double z) { } -void VillagerRenderer::additionalRendering(shared_ptr<Mob> mob, float a) +void VillagerRenderer::additionalRendering(std::shared_ptr<Mob> mob, float a) { MobRenderer::additionalRendering(mob, a); } -void VillagerRenderer::scale(shared_ptr<Mob> _mob, float a) +void VillagerRenderer::scale(std::shared_ptr<Mob> _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr<Entity> we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr<Entity> we have here - // do some casting around instead - shared_ptr<Villager> mob = dynamic_pointer_cast<Villager>(_mob); + std::shared_ptr<Villager> mob = dynamic_pointer_cast<Villager>(_mob); float s = 15 / 16.0f; if (mob->getAge() < 0) { diff --git a/Minecraft.Client/VillagerRenderer.h b/Minecraft.Client/VillagerRenderer.h index 21c2a631..1263f485 100644 --- a/Minecraft.Client/VillagerRenderer.h +++ b/Minecraft.Client/VillagerRenderer.h @@ -13,13 +13,13 @@ public: VillagerRenderer(); protected: - virtual int prepareArmor(shared_ptr<Mob> villager, int layer, float a); + virtual int prepareArmor(std::shared_ptr<Mob> villager, int layer, float a); public: - virtual void render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); + virtual void render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a); protected: - virtual void renderName(shared_ptr<Mob> mob, double x, double y, double z); - virtual void additionalRendering(shared_ptr<Mob> mob, float a); - virtual void scale(shared_ptr<Mob> player, float a); + virtual void renderName(std::shared_ptr<Mob> mob, double x, double y, double z); + virtual void additionalRendering(std::shared_ptr<Mob> mob, float a); + virtual void scale(std::shared_ptr<Mob> player, float a); };
\ No newline at end of file diff --git a/Minecraft.Client/WolfModel.cpp b/Minecraft.Client/WolfModel.cpp index f4835ec3..18dd96cf 100644 --- a/Minecraft.Client/WolfModel.cpp +++ b/Minecraft.Client/WolfModel.cpp @@ -57,12 +57,12 @@ WolfModel::WolfModel() tail->compile(1.0f/16.0f); } -void WolfModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void WolfModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { Model::render(entity, time, r, bob, yRot, xRot, scale, usecompiled); setupAnim(time, r, bob, yRot, xRot, scale); - if (young) + if (young) { float ss = 2; glPushMatrix(); @@ -80,8 +80,8 @@ void WolfModel::render(shared_ptr<Entity> entity, float time, float r, float bob tail->renderRollable(scale, usecompiled); upperBody->render(scale, usecompiled); glPopMatrix(); - } - else + } + else { head->renderRollable(scale, usecompiled); body->render(scale, usecompiled); @@ -94,9 +94,9 @@ void WolfModel::render(shared_ptr<Entity> entity, float time, float r, float bob } } -void WolfModel::prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) +void WolfModel::prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) { - shared_ptr<Wolf> wolf = dynamic_pointer_cast<Wolf>(mob); + std::shared_ptr<Wolf> wolf = dynamic_pointer_cast<Wolf>(mob); if (wolf->isAngry()) { diff --git a/Minecraft.Client/WolfModel.h b/Minecraft.Client/WolfModel.h index ab26a9e8..6fb5fb6f 100644 --- a/Minecraft.Client/WolfModel.h +++ b/Minecraft.Client/WolfModel.h @@ -15,7 +15,7 @@ private: static const int legSize = 8; public: WolfModel(); - virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); - void prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a); + virtual void render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); };
\ No newline at end of file diff --git a/Minecraft.Client/WolfRenderer.cpp b/Minecraft.Client/WolfRenderer.cpp index a21affa2..96b3ee7e 100644 --- a/Minecraft.Client/WolfRenderer.cpp +++ b/Minecraft.Client/WolfRenderer.cpp @@ -8,19 +8,19 @@ WolfRenderer::WolfRenderer(Model *model, Model *armor, float shadow) : MobRender setArmor(armor); } -float WolfRenderer::getBob(shared_ptr<Mob> _mob, float a) +float WolfRenderer::getBob(std::shared_ptr<Mob> _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Wolf> mob = dynamic_pointer_cast<Wolf>(_mob); + std::shared_ptr<Wolf> mob = dynamic_pointer_cast<Wolf>(_mob); return mob->getTailAngle(); } -int WolfRenderer::prepareArmor(shared_ptr<Mob> mob, int layer, float a) +int WolfRenderer::prepareArmor(std::shared_ptr<Mob> mob, int layer, float a) { if (mob->isInvisibleTo(Minecraft::GetInstance()->player)) return -1; // 4J-JEV: Todo, merge with java fix in '1.7.5'. - shared_ptr<Wolf> wolf = dynamic_pointer_cast<Wolf>(mob); + std::shared_ptr<Wolf> wolf = dynamic_pointer_cast<Wolf>(mob); if (layer == 0 && wolf->isWet()) { float brightness = wolf->getBrightness(a) * wolf->getWetShade(a); diff --git a/Minecraft.Client/WolfRenderer.h b/Minecraft.Client/WolfRenderer.h index 9cdf8caa..218951c9 100644 --- a/Minecraft.Client/WolfRenderer.h +++ b/Minecraft.Client/WolfRenderer.h @@ -6,6 +6,6 @@ class WolfRenderer : public MobRenderer public: WolfRenderer(Model *model, Model *armor, float shadow); protected: - virtual float getBob(shared_ptr<Mob> _mob, float a); - virtual int prepareArmor(shared_ptr<Mob> mob, int layer, float a); + virtual float getBob(std::shared_ptr<Mob> _mob, float a); + virtual int prepareArmor(std::shared_ptr<Mob> mob, int layer, float a); }; diff --git a/Minecraft.Client/Xbox/Audio/SoundEngine.cpp b/Minecraft.Client/Xbox/Audio/SoundEngine.cpp index b088150c..e7e2dded 100644 --- a/Minecraft.Client/Xbox/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Xbox/Audio/SoundEngine.cpp @@ -327,7 +327,7 @@ void SoundEngine::CreateStreamingWavebank(const char *pchName, IXACT3WaveBank ** HANDLE file = CreateFile(pchName, GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, NULL); if( file == INVALID_HANDLE_VALUE ) - { + { app.FatalLoadError(); assert(false); return; @@ -638,7 +638,7 @@ void SoundEngine::playUI(int iSound, float, float) void SoundEngine::playStreaming(const wstring& name, float x, float y, float z, float vol, float pitch, bool bMusicDelay) { IXACT3SoundBank *pSoundBank=NULL; - + bool bSoundBank2=false; MemSect(34); if(m_MusicInfo.pCue!=NULL) @@ -747,7 +747,7 @@ void SoundEngine::playStreaming(const wstring& name, float x, float y, float z, MemSect(0); return; } - + if(GetIsPlayingStreamingCDMusic()) { @@ -984,7 +984,7 @@ void SoundEngine::update3DPosition(SoundEngine::soundInfo *pInfo, bool bPlaceEmi XACT3DApply( &m_DSPSettings, pInfo->pCue); } -void SoundEngine::tick(shared_ptr<Mob> *players, float a) +void SoundEngine::tick(std::shared_ptr<Mob> *players, float a) { if( m_pXACT3Engine == NULL ) return; diff --git a/Minecraft.Client/Xbox/Audio/SoundEngine.h b/Minecraft.Client/Xbox/Audio/SoundEngine.h index e2f22869..4dc398b5 100644 --- a/Minecraft.Client/Xbox/Audio/SoundEngine.h +++ b/Minecraft.Client/Xbox/Audio/SoundEngine.h @@ -86,7 +86,7 @@ public: virtual void updateSystemMusicPlaying(bool isPlaying); virtual void updateSoundEffectVolume(float fVal); virtual void init(Options *); - virtual void tick(shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one + virtual void tick(std::shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one virtual void add(const wstring& name, File *file); virtual void addMusic(const wstring& name, File *file); virtual void addStreaming(const wstring& name, File *file); @@ -107,4 +107,4 @@ private: #ifndef __PS3__ static void XACTNotificationCallback( const XACT_NOTIFICATION* pNotification ); #endif // __PS3__ -};
\ No newline at end of file +};
\ No newline at end of file diff --git a/Minecraft.Client/ZombieRenderer.cpp b/Minecraft.Client/ZombieRenderer.cpp index 5408736d..b2125701 100644 --- a/Minecraft.Client/ZombieRenderer.cpp +++ b/Minecraft.Client/ZombieRenderer.cpp @@ -34,28 +34,28 @@ void ZombieRenderer::createArmorParts() villagerArmorParts2 = new VillagerZombieModel(0.5f, 0, true); } -int ZombieRenderer::prepareArmor(shared_ptr<Mob> _mob, int layer, float a) +int ZombieRenderer::prepareArmor(std::shared_ptr<Mob> _mob, int layer, float a) { - shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob); + std::shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob); swapArmor(mob); return HumanoidMobRenderer::prepareArmor(_mob, layer, a); } -void ZombieRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) +void ZombieRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) { - shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob); + std::shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob); swapArmor(mob); HumanoidMobRenderer::render(_mob, x, y, z, rot, a); } -void ZombieRenderer::additionalRendering(shared_ptr<Mob> _mob, float a) +void ZombieRenderer::additionalRendering(std::shared_ptr<Mob> _mob, float a) { - shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob); + std::shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob); swapArmor(mob); HumanoidMobRenderer::additionalRendering(_mob, a); } -void ZombieRenderer::swapArmor(shared_ptr<Zombie> mob) +void ZombieRenderer::swapArmor(std::shared_ptr<Zombie> mob) { if (mob->isVillager()) { @@ -80,9 +80,9 @@ void ZombieRenderer::swapArmor(shared_ptr<Zombie> mob) humanoidModel = (HumanoidModel *) model; } -void ZombieRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a) +void ZombieRenderer::setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a) { - shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob); + std::shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob); if (mob->isConverting()) { bodyRot += (float) (cos(mob->tickCount * 3.25) * PI * .25f); diff --git a/Minecraft.Client/ZombieRenderer.h b/Minecraft.Client/ZombieRenderer.h index e070cc7b..b727659a 100644 --- a/Minecraft.Client/ZombieRenderer.h +++ b/Minecraft.Client/ZombieRenderer.h @@ -25,17 +25,17 @@ public: protected: void createArmorParts(); - int prepareArmor(shared_ptr<Mob> _mob, int layer, float a); + int prepareArmor(std::shared_ptr<Mob> _mob, int layer, float a); public: - void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); + void render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); protected: - void additionalRendering(shared_ptr<Mob> _mob, float a); + void additionalRendering(std::shared_ptr<Mob> _mob, float a); private: - void swapArmor(shared_ptr<Zombie> mob); + void swapArmor(std::shared_ptr<Zombie> mob); protected: - void setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a); + void setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a); };
\ No newline at end of file |
