aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/Tutorial
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Client/Common/Tutorial')
-rw-r--r--Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp20
-rw-r--r--Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp4
-rw-r--r--Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.h2
-rw-r--r--Minecraft.Client/Common/Tutorial/CraftTask.cpp2
-rw-r--r--Minecraft.Client/Common/Tutorial/CraftTask.h2
-rw-r--r--Minecraft.Client/Common/Tutorial/DiggerItemHint.cpp4
-rw-r--r--Minecraft.Client/Common/Tutorial/DiggerItemHint.h4
-rw-r--r--Minecraft.Client/Common/Tutorial/PickupTask.cpp2
-rw-r--r--Minecraft.Client/Common/Tutorial/PickupTask.h2
-rw-r--r--Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp8
-rw-r--r--Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h8
-rw-r--r--Minecraft.Client/Common/Tutorial/TakeItemHint.cpp2
-rw-r--r--Minecraft.Client/Common/Tutorial/TakeItemHint.h2
-rw-r--r--Minecraft.Client/Common/Tutorial/Tutorial.cpp20
-rw-r--r--Minecraft.Client/Common/Tutorial/Tutorial.h22
-rw-r--r--Minecraft.Client/Common/Tutorial/TutorialHint.cpp14
-rw-r--r--Minecraft.Client/Common/Tutorial/TutorialHint.h12
-rw-r--r--Minecraft.Client/Common/Tutorial/TutorialMode.cpp10
-rw-r--r--Minecraft.Client/Common/Tutorial/TutorialMode.h4
-rw-r--r--Minecraft.Client/Common/Tutorial/TutorialTask.h14
-rw-r--r--Minecraft.Client/Common/Tutorial/UseItemTask.cpp2
-rw-r--r--Minecraft.Client/Common/Tutorial/UseItemTask.h2
-rw-r--r--Minecraft.Client/Common/Tutorial/UseTileTask.cpp2
-rw-r--r--Minecraft.Client/Common/Tutorial/UseTileTask.h2
24 files changed, 83 insertions, 83 deletions
diff --git a/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp b/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp
index f495cca0..f01db84e 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();
- std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
+ Minecraft *pMinecraft = Minecraft::GetInstance();
+ shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
{
- player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
+ player->connection->send( 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();
- std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
+ Minecraft *pMinecraft = Minecraft::GetInstance();
+ shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
{
- player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
+ player->connection->send( 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();
- std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
+ Minecraft *pMinecraft = Minecraft::GetInstance();
+ shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
{
- player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
+ player->connection->send( 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 fbd6ddf3..43b2f7f3 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(std::shared_ptr<ItemInstance> item)
+void CompleteUsingItemTask::completeUsingItem(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 41758e1f..a905bead 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(std::shared_ptr<ItemInstance> item);
+ virtual void completeUsingItem(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 ca462aa5..6749d030 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(std::shared_ptr<ItemInstance> item)
+void CraftTask::onCrafted(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 c841c96b..1496f07a 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(std::shared_ptr<ItemInstance> item);
+ virtual void onCrafted(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 fcfec29d..1367f411 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(std::shared_ptr<ItemInstance> item, Tile *tile)
+int DiggerItemHint::startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile)
{
if(item != NULL)
{
@@ -46,7 +46,7 @@ int DiggerItemHint::startDestroyBlock(std::shared_ptr<ItemInstance> item, Tile *
return -1;
}
-int DiggerItemHint::attack(std::shared_ptr<ItemInstance> item, std::shared_ptr<Entity> entity)
+int DiggerItemHint::attack(shared_ptr<ItemInstance> item, shared_ptr<Entity> entity)
{
if(item != NULL)
{
diff --git a/Minecraft.Client/Common/Tutorial/DiggerItemHint.h b/Minecraft.Client/Common/Tutorial/DiggerItemHint.h
index b23a8be3..cb71742e 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(std::shared_ptr<ItemInstance> item, Tile *tile);
- virtual int attack(std::shared_ptr<ItemInstance> item, std::shared_ptr<Entity> entity);
+ virtual int startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile);
+ virtual int attack(shared_ptr<ItemInstance> item, 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 742ed08c..00bc9d1f 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(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux)
+void PickupTask::onTake(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 26ef3a21..68e1d479 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(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux);
+ virtual void onTake(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 39daa72a..8603f765 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(std::shared_ptr<ItemInstance> item)
+void ProcedureCompoundTask::onCrafted(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, std::shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly)
+void ProcedureCompoundTask::useItemOn(Level *level, 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, std::shared_ptr<ItemInstance
}
}
-void ProcedureCompoundTask::useItem(std::shared_ptr<ItemInstance> item, bool bTestUseOnly)
+void ProcedureCompoundTask::useItem(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(std::shared_ptr<ItemInstance> item, bool bTe
}
}
-void ProcedureCompoundTask::onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux)
+void ProcedureCompoundTask::onTake(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 e60bcfb0..36b32798 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(std::shared_ptr<ItemInstance> item);
+ virtual void onCrafted(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, 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 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 onStateChange(eTutorial_State newState);
private:
diff --git a/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp b/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp
index 5a5c0ea5..a1a5c37a 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(std::shared_ptr<ItemInstance> item)
+bool TakeItemHint::onTake(shared_ptr<ItemInstance> item)
{
if(item != NULL)
{
diff --git a/Minecraft.Client/Common/Tutorial/TakeItemHint.h b/Minecraft.Client/Common/Tutorial/TakeItemHint.h
index 25d43eac..f001d4c7 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( std::shared_ptr<ItemInstance> item );
+ virtual bool onTake( 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 fa865b90..f7e44b17 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, std::shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly)
+void Tutorial::useItemOn(Level *level, 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, std::shared_ptr<ItemInstance> item, int x
}
}
-void Tutorial::useItemOn(std::shared_ptr<ItemInstance> item, bool bTestUseOnly)
+void Tutorial::useItemOn(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(std::shared_ptr<ItemInstance> item, bool bTestUseOnly)
}
}
-void Tutorial::completeUsingItem(std::shared_ptr<ItemInstance> item)
+void Tutorial::completeUsingItem(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(std::shared_ptr<ItemInstance> item)
}
}
-void Tutorial::startDestroyBlock(std::shared_ptr<ItemInstance> item, Tile *tile)
+void Tutorial::startDestroyBlock(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(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity)
+void Tutorial::attack(shared_ptr<Player> player, 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(std::shared_ptr<Player> player, std::shared_ptr<Entity> en
}
}
-void Tutorial::itemDamaged(std::shared_ptr<ItemInstance> item)
+void Tutorial::itemDamaged(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(std::shared_ptr<ItemInstance> item, bool canMake)
+void Tutorial::createItemSelected(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(std::shared_ptr<ItemInstance> item, bool canMa
}
}
-void Tutorial::onCrafted(std::shared_ptr<ItemInstance> item)
+void Tutorial::onCrafted(shared_ptr<ItemInstance> item)
{
for(unsigned int state = 0; state < e_Tutorial_State_Max; ++state)
{
@@ -1833,7 +1833,7 @@ void Tutorial::onCrafted(std::shared_ptr<ItemInstance> item)
}
}
-void Tutorial::onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux)
+void Tutorial::onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux)
{
if( !m_hintDisplayed )
{
@@ -1860,7 +1860,7 @@ void Tutorial::onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCo
}
}
-void Tutorial::onSelectedItemChanged(std::shared_ptr<ItemInstance> item)
+void Tutorial::onSelectedItemChanged(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 e942ff32..aaaaba0a 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, 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 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 destroyBlock(Tile *tile);
- void attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity);
- void itemDamaged(std::shared_ptr<ItemInstance> item);
+ void attack(shared_ptr<Player> player, shared_ptr<Entity> entity);
+ void itemDamaged(shared_ptr<ItemInstance> item);
void handleUIInput(int iAction);
- 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 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 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 ecd6fe29..5f0808bf 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(std::shared_ptr<ItemInstance> item, Tile *tile)
+int TutorialHint::startDestroyBlock(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(std::shared_ptr<ItemInstance> item, std::shared_ptr<Entity> entity)
+int TutorialHint::attack(shared_ptr<ItemInstance> item, shared_ptr<Entity> entity)
{
/*
switch(m_type)
@@ -71,7 +71,7 @@ int TutorialHint::attack(std::shared_ptr<ItemInstance> item, std::shared_ptr<Ent
return -1;
}
-int TutorialHint::createItemSelected(std::shared_ptr<ItemInstance> item, bool canMake)
+int TutorialHint::createItemSelected(shared_ptr<ItemInstance> item, bool canMake)
{
int returnVal = -1;
switch(m_type)
@@ -86,7 +86,7 @@ int TutorialHint::createItemSelected(std::shared_ptr<ItemInstance> item, bool ca
return returnVal;
}
-int TutorialHint::itemDamaged(std::shared_ptr<ItemInstance> item)
+int TutorialHint::itemDamaged(shared_ptr<ItemInstance> item)
{
int returnVal = -1;
switch(m_type)
@@ -100,7 +100,7 @@ int TutorialHint::itemDamaged(std::shared_ptr<ItemInstance> item)
return returnVal;
}
-bool TutorialHint::onTake( std::shared_ptr<ItemInstance> item )
+bool TutorialHint::onTake( 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 8c33156f..8ca543cc 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(std::shared_ptr<ItemInstance> item, Tile *tile);
+ virtual int startDestroyBlock(shared_ptr<ItemInstance> item, Tile *tile);
virtual int destroyBlock(Tile *tile);
- 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 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 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 774e9c73..82c81598 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]);
}
- std::shared_ptr<ItemInstance> item = minecraft->player->getSelectedItem();
+ 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(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 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 haveItem = false;
int itemCount = 0;
@@ -87,7 +87,7 @@ bool TutorialMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::
tutorial->useItemOn(level, item, x, y, z, bTestUseOnly);
if(!bTestUseOnly)
- {
+ {
if(item != NULL)
{
haveItem = true;
@@ -110,7 +110,7 @@ bool TutorialMode::useItemOn(std::shared_ptr<Player> player, Level *level, std::
return result;
}
-void TutorialMode::attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity)
+void TutorialMode::attack(shared_ptr<Player> player, 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 330b0d51..75e24edf 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(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 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 isInputAllowed(int mapping);
diff --git a/Minecraft.Client/Common/Tutorial/TutorialTask.h b/Minecraft.Client/Common/Tutorial/TutorialTask.h
index adeaab6d..92cb5999 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, 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 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 handleUIInput(int iAction) { }
- virtual void onCrafted(std::shared_ptr<ItemInstance> item) { }
- virtual void onTake(std::shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { }
+ virtual void onCrafted(shared_ptr<ItemInstance> item) { }
+ virtual void onTake(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 8f53f14d..09bac4d1 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(std::shared_ptr<ItemInstance> item,bool bTestUseOnly)
+void UseItemTask::useItem(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 2982412e..46d71be4 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(std::shared_ptr<ItemInstance> item, bool bTestUseOnly=false);
+ virtual void useItem(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 57e67cad..1f4ed4cb 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, std::shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly)
+void UseTileTask::useItemOn(Level *level, 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 b20c4b84..74b3a40c 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, std::shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false);
+ virtual void useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false);
}; \ No newline at end of file