Created
July 20, 2018 13:58
-
-
Save Quipyowert2/9e5c51f690629dc7fdcfd8508dd7625d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/GameEvents.cpp b/src/GameEvents.cpp | |
index 3883cd55..274c04a5 100644 | |
--- a/src/GameEvents.cpp | |
+++ b/src/GameEvents.cpp | |
@@ -474,7 +474,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
m_bTouchedWithHead = false; | |
} | |
- MGE_PlayersToucheEntity::MGE_PlayersToucheEntity(int p_eventTime, std::string p_entityID, bool p_bTouchedWithHead) | |
+ MGE_PlayersToucheEntity::MGE_PlayersToucheEntity(int p_eventTime, const std::string& p_entityID, bool p_bTouchedWithHead) | |
: SceneEvent(p_eventTime) { | |
m_entityID = p_entityID; | |
m_bTouchedWithHead = p_bTouchedWithHead; | |
@@ -515,7 +515,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
m_player = 0; | |
} | |
- MGE_PlayerTouchesEntity::MGE_PlayerTouchesEntity(int p_eventTime, std::string p_entityID, | |
+ MGE_PlayerTouchesEntity::MGE_PlayerTouchesEntity(int p_eventTime, const std::string& p_entityID, | |
bool p_bTouchedWithHead, int i_player) | |
: SceneEvent(p_eventTime) { | |
m_entityID = p_entityID; | |
@@ -560,7 +560,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
m_takenByPlayer = -1; // unknown | |
} | |
- MGE_EntityDestroyed::MGE_EntityDestroyed(int p_eventTime, std::string i_entityId, EntitySpeciality i_entityType, Vector2f i_entityPosition, float i_entitySize, int i_takenByPlayer) | |
+ MGE_EntityDestroyed::MGE_EntityDestroyed(int p_eventTime, const std::string& i_entityId, EntitySpeciality i_entityType, Vector2f i_entityPosition, float i_entitySize, int i_takenByPlayer) | |
: SceneEvent(p_eventTime) { | |
m_entityId = i_entityId; | |
m_entityType = i_entityType; | |
@@ -804,7 +804,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
m_message = ""; | |
} | |
- MGE_Message::MGE_Message(int p_eventTime, std::string p_message) | |
+ MGE_Message::MGE_Message(int p_eventTime, const std::string& p_message) | |
: SceneEvent(p_eventTime) { | |
m_message = p_message; | |
} | |
@@ -846,7 +846,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_MoveBlock::MGE_MoveBlock(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
float p_x, float p_y) | |
: SceneEvent(p_eventTime){ | |
m_blockID = p_blockID; | |
@@ -895,7 +895,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetBlockPos::MGE_SetBlockPos(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
float p_x, float p_y) | |
: SceneEvent(p_eventTime) { | |
m_blockID = p_blockID; | |
@@ -1095,7 +1095,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetEntityPos::MGE_SetEntityPos(int p_eventTime, | |
- std::string p_entityID, | |
+ const std::string& p_entityID, | |
float p_x, float p_y) | |
: SceneEvent(p_eventTime){ | |
m_entityID = p_entityID; | |
@@ -1144,7 +1144,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetBlockCenter::MGE_SetBlockCenter(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
float p_x, float p_y) | |
: SceneEvent(p_eventTime) { | |
m_blockID = p_blockID; | |
@@ -1192,7 +1192,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetBlockRotation::MGE_SetBlockRotation(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
float p_angle) | |
: SceneEvent(p_eventTime) { | |
m_blockID = p_blockID; | |
@@ -1241,7 +1241,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetDynamicEntityRotation::MGE_SetDynamicEntityRotation(int p_eventTime, | |
- std::string p_entityID, | |
+ const std::string& p_entityID, | |
float p_fInitAngle, | |
float p_fRadius, | |
int p_period, | |
@@ -1313,7 +1313,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetDynamicEntityTranslation::MGE_SetDynamicEntityTranslation(int p_eventTime, | |
- std::string p_entityID, | |
+ const std::string& p_entityID, | |
float p_x, | |
float p_y, | |
int p_period, | |
@@ -1379,7 +1379,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
m_entityID = ""; | |
} | |
- MGE_SetDynamicEntityNone::MGE_SetDynamicEntityNone(int p_eventTime, std::string p_entityID) | |
+ MGE_SetDynamicEntityNone::MGE_SetDynamicEntityNone(int p_eventTime, const std::string& p_entityID) | |
: SceneEvent(p_eventTime) { | |
m_entityID = p_entityID; | |
} | |
@@ -1424,7 +1424,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetDynamicBlockRotation::MGE_SetDynamicBlockRotation(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
float p_fInitAngle, | |
float p_fRadius, | |
int p_period, | |
@@ -1496,7 +1496,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetDynamicBlockTranslation::MGE_SetDynamicBlockTranslation(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
float p_x, | |
float p_y, | |
int p_period, | |
@@ -1563,7 +1563,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
m_blockID = ""; | |
} | |
- MGE_SetDynamicBlockNone::MGE_SetDynamicBlockNone(int p_eventTime, std::string p_blockID) | |
+ MGE_SetDynamicBlockNone::MGE_SetDynamicBlockNone(int p_eventTime, const std::string& p_blockID) | |
: SceneEvent(p_eventTime) { | |
m_blockID = p_blockID; | |
} | |
@@ -1783,7 +1783,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
} | |
MGE_SetDynamicBlockSelfRotation::MGE_SetDynamicBlockSelfRotation(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
int p_period, | |
int p_startTime, | |
int p_endTime) | |
@@ -1850,7 +1850,7 @@ MGE_SetPhysicsBlockSelfRotation::MGE_SetPhysicsBlockSelfRotation(int eventTime) | |
} | |
MGE_SetPhysicsBlockSelfRotation::MGE_SetPhysicsBlockSelfRotation(int eventTime, | |
- std::string blockID, | |
+ const std::string& blockID, | |
int torque, | |
int startTime, | |
int endTime) | |
@@ -1918,7 +1918,7 @@ MGE_SetPhysicsBlockTranslation::MGE_SetPhysicsBlockTranslation(int eventTime) | |
m_endTime = 0; | |
} | |
-MGE_SetPhysicsBlockTranslation::MGE_SetPhysicsBlockTranslation(int eventTime, std::string blockID, | |
+MGE_SetPhysicsBlockTranslation::MGE_SetPhysicsBlockTranslation(int eventTime, const std::string& blockID, | |
float x, float y, | |
int period, int startTime, int endTime) | |
: SceneEvent(eventTime) | |
@@ -1996,7 +1996,7 @@ std::string MGE_SetPhysicsBlockTranslation::toString() | |
} | |
MGE_SetDynamicEntitySelfRotation::MGE_SetDynamicEntitySelfRotation(int p_eventTime, | |
- std::string p_entityID, | |
+ const std::string& p_entityID, | |
int p_period, | |
int p_startTime, | |
int p_endTime) | |
@@ -2228,7 +2228,7 @@ std::string MGE_SetPhysicsBlockTranslation::toString() | |
m_soundName = ""; | |
} | |
-MGE_PlaySound::MGE_PlaySound(int p_eventTime, std::string p_name, float p_volume) | |
+MGE_PlaySound::MGE_PlaySound(int p_eventTime, const std::string& p_name, float p_volume) | |
: SceneEvent(p_eventTime) { | |
m_soundName = p_name; | |
m_volume = p_volume; | |
@@ -2279,7 +2279,7 @@ MGE_PlaySound::MGE_PlaySound(int p_eventTime, std::string p_name, float p_volume | |
m_musicName = ""; | |
} | |
- MGE_PlayMusic::MGE_PlayMusic(int p_eventTime, std::string p_name) | |
+ MGE_PlayMusic::MGE_PlayMusic(int p_eventTime, const std::string& p_name) | |
: SceneEvent(p_eventTime) { | |
m_musicName = p_name; | |
} | |
diff --git a/src/GameEvents.h b/src/GameEvents.h | |
index c65ad58c..3276424a 100644 | |
--- a/src/GameEvents.h | |
+++ b/src/GameEvents.h | |
@@ -241,7 +241,7 @@ class MGE_PlayerLeavesZone : public SceneEvent { | |
class MGE_PlayersToucheEntity : public SceneEvent { | |
public: | |
MGE_PlayersToucheEntity(int p_eventTime); | |
- MGE_PlayersToucheEntity(int p_eventTime, std::string p_entityID, bool p_bTouchedWithHead); | |
+ MGE_PlayersToucheEntity(int p_eventTime, const std::string& p_entityID, bool p_bTouchedWithHead); | |
~MGE_PlayersToucheEntity(); | |
void doAction(Scene *p_pScene); | |
@@ -260,7 +260,7 @@ class MGE_PlayersToucheEntity : public SceneEvent { | |
class MGE_PlayerTouchesEntity : public SceneEvent { | |
public: | |
MGE_PlayerTouchesEntity(int p_eventTime); | |
- MGE_PlayerTouchesEntity(int p_eventTime, std::string p_entityID, bool p_bTouchedWithHead, int i_player); | |
+ MGE_PlayerTouchesEntity(int p_eventTime, const std::string& p_entityID, bool p_bTouchedWithHead, int i_player); | |
~MGE_PlayerTouchesEntity(); | |
void doAction(Scene *p_pScene); | |
@@ -280,7 +280,7 @@ class MGE_PlayerTouchesEntity : public SceneEvent { | |
class MGE_EntityDestroyed : public SceneEvent { | |
public: | |
MGE_EntityDestroyed(int p_eventTime); | |
- MGE_EntityDestroyed(int p_eventTime, std::string i_entityId, EntitySpeciality i_entityType, Vector2f i_entityPosition, float i_entitySize, int i_takenByPlayer /* -1 if taken by an external event */); | |
+ MGE_EntityDestroyed(int p_eventTime, const std::string& i_entityId, EntitySpeciality i_entityType, Vector2f i_entityPosition, float i_entitySize, int i_takenByPlayer /* -1 if taken by an external event */); | |
~MGE_EntityDestroyed(); | |
void doAction(Scene *p_pScene); | |
@@ -376,7 +376,7 @@ class MGE_HideArrow : public SceneEvent { | |
class MGE_Message : public SceneEvent { | |
public: | |
MGE_Message(int p_eventTime); | |
- MGE_Message(int p_eventTime, std::string p_message); | |
+ MGE_Message(int p_eventTime, const std::string& p_message); | |
~MGE_Message(); | |
void doAction(Scene *p_pScene); | |
@@ -394,7 +394,7 @@ class MGE_Message : public SceneEvent { | |
class MGE_MoveBlock : public SceneEvent { | |
public: | |
MGE_MoveBlock(int p_eventTime); | |
- MGE_MoveBlock(int p_eventTime, std::string p_blockID, float p_x, float p_y); | |
+ MGE_MoveBlock(int p_eventTime, const std::string& p_blockID, float p_x, float p_y); | |
~MGE_MoveBlock(); | |
void doAction(Scene *p_pScene); | |
@@ -413,7 +413,7 @@ class MGE_MoveBlock : public SceneEvent { | |
class MGE_SetBlockPos : public SceneEvent { | |
public: | |
MGE_SetBlockPos(int p_eventTime); | |
- MGE_SetBlockPos(int p_eventTime, std::string p_blockID, float p_x, float p_y); | |
+ MGE_SetBlockPos(int p_eventTime, const std::string& p_blockID, float p_x, float p_y); | |
~MGE_SetBlockPos(); | |
void doAction(Scene *p_pScene); | |
@@ -509,7 +509,7 @@ class MGE_AddForceToPlayer : public SceneEvent { | |
class MGE_SetEntityPos : public SceneEvent { | |
public: | |
MGE_SetEntityPos(int p_eventTime); | |
- MGE_SetEntityPos(int p_eventTime, std::string p_entityID, float p_x, float p_y); | |
+ MGE_SetEntityPos(int p_eventTime, const std::string& p_entityID, float p_x, float p_y); | |
~MGE_SetEntityPos(); | |
void doAction(Scene *p_pScene); | |
@@ -528,7 +528,7 @@ class MGE_SetEntityPos : public SceneEvent { | |
class MGE_SetBlockCenter : public SceneEvent { | |
public: | |
MGE_SetBlockCenter(int p_eventTime); | |
- MGE_SetBlockCenter(int p_eventTime, std::string p_blockID, float p_x, float p_y); | |
+ MGE_SetBlockCenter(int p_eventTime, const std::string& p_blockID, float p_x, float p_y); | |
~MGE_SetBlockCenter(); | |
void doAction(Scene *p_pScene); | |
@@ -547,7 +547,7 @@ class MGE_SetBlockCenter : public SceneEvent { | |
class MGE_SetBlockRotation : public SceneEvent { | |
public: | |
MGE_SetBlockRotation(int p_eventTime); | |
- MGE_SetBlockRotation(int p_eventTime, std::string p_blockID, float p_angle); | |
+ MGE_SetBlockRotation(int p_eventTime, const std::string& p_blockID, float p_angle); | |
~MGE_SetBlockRotation(); | |
void doAction(Scene *p_pScene); | |
@@ -567,7 +567,7 @@ class MGE_SetDynamicBlockSelfRotation : public SceneEvent { | |
public: | |
MGE_SetDynamicBlockSelfRotation(int p_eventTime); | |
MGE_SetDynamicBlockSelfRotation(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
int p_period, | |
int p_startTime, | |
int p_endTime); | |
@@ -593,7 +593,7 @@ class MGE_SetPhysicsBlockSelfRotation : public SceneEvent { | |
public: | |
MGE_SetPhysicsBlockSelfRotation(int eventTime); | |
MGE_SetPhysicsBlockSelfRotation(int eventTime, | |
- std::string blockID, | |
+ const std::string& blockID, | |
int torque, | |
int startTime, | |
int endTime); | |
@@ -619,7 +619,7 @@ class MGE_SetPhysicsBlockSelfRotation : public SceneEvent { | |
class MGE_SetPhysicsBlockTranslation : public SceneEvent { | |
public: | |
MGE_SetPhysicsBlockTranslation(int eventTime); | |
- MGE_SetPhysicsBlockTranslation(int eventTime, std::string blockID, | |
+ MGE_SetPhysicsBlockTranslation(int eventTime, const std::string& blockID, | |
float x, float y, | |
int period, int startTime, int endTime); | |
~MGE_SetPhysicsBlockTranslation(); | |
@@ -645,7 +645,7 @@ class MGE_SetDynamicEntityRotation : public SceneEvent { | |
public: | |
MGE_SetDynamicEntityRotation(int p_eventTime); | |
MGE_SetDynamicEntityRotation(int p_eventTime, | |
- std::string p_entityID, | |
+ const std::string& p_entityID, | |
float p_fInitAngle, | |
float p_fRadius, | |
int p_period, | |
@@ -674,7 +674,7 @@ class MGE_SetDynamicEntitySelfRotation : public SceneEvent { | |
public: | |
MGE_SetDynamicEntitySelfRotation(int p_eventTime); | |
MGE_SetDynamicEntitySelfRotation(int p_eventTime, | |
- std::string p_entityID, | |
+ const std::string& p_entityID, | |
int p_period, | |
int p_startTime, | |
int p_endTime); | |
@@ -700,7 +700,7 @@ class MGE_SetDynamicEntityTranslation : public SceneEvent { | |
public: | |
MGE_SetDynamicEntityTranslation(int p_eventTime); | |
MGE_SetDynamicEntityTranslation(int p_eventTime, | |
- std::string p_entityID, | |
+ const std::string& p_entityID, | |
float p_x, | |
float p_y, | |
int p_period, | |
@@ -727,7 +727,7 @@ class MGE_SetDynamicEntityTranslation : public SceneEvent { | |
class MGE_SetDynamicEntityNone : public SceneEvent { | |
public: | |
MGE_SetDynamicEntityNone(int p_eventTime); | |
- MGE_SetDynamicEntityNone(int p_eventTime, std::string p_entityID); | |
+ MGE_SetDynamicEntityNone(int p_eventTime, const std::string& p_entityID); | |
~MGE_SetDynamicEntityNone(); | |
void doAction(Scene *p_pScene); | |
@@ -746,7 +746,7 @@ class MGE_SetDynamicBlockRotation : public SceneEvent { | |
public: | |
MGE_SetDynamicBlockRotation(int p_eventTime); | |
MGE_SetDynamicBlockRotation(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
float p_fInitAngle, | |
float p_fRadius, | |
int p_period, | |
@@ -776,7 +776,7 @@ class MGE_SetDynamicBlockTranslation : public SceneEvent { | |
public: | |
MGE_SetDynamicBlockTranslation(int p_eventTime); | |
MGE_SetDynamicBlockTranslation(int p_eventTime, | |
- std::string p_blockID, | |
+ const std::string& p_blockID, | |
float p_x, | |
float p_y, | |
int p_period, | |
@@ -803,7 +803,7 @@ class MGE_SetDynamicBlockTranslation : public SceneEvent { | |
class MGE_SetDynamicBlockNone : public SceneEvent { | |
public: | |
MGE_SetDynamicBlockNone(int p_eventTime); | |
- MGE_SetDynamicBlockNone(int p_eventTime, std::string p_blockID); | |
+ MGE_SetDynamicBlockNone(int p_eventTime, const std::string& p_blockID); | |
~MGE_SetDynamicBlockNone(); | |
void doAction(Scene *p_pScene); | |
@@ -946,7 +946,7 @@ class MGE_SetCameraRotationSpeed : public SceneEvent { | |
class MGE_PlaySound : public SceneEvent { | |
public: | |
MGE_PlaySound(int p_eventTime); | |
- MGE_PlaySound(int p_eventTime, std::string p_soundName, float p_volume = DEFAULT_SAMPLE_VOLUME); | |
+ MGE_PlaySound(int p_eventTime, const std::string& p_soundName, float p_volume = DEFAULT_SAMPLE_VOLUME); | |
~MGE_PlaySound(); | |
void doAction(Scene *p_pScene); | |
@@ -967,7 +967,7 @@ class MGE_PlaySound : public SceneEvent { | |
class MGE_PlayMusic : public SceneEvent { | |
public: | |
MGE_PlayMusic(int p_eventTime); | |
- MGE_PlayMusic(int p_eventTime, std::string p_musicName); | |
+ MGE_PlayMusic(int p_eventTime, const std::string& p_musicName); | |
~MGE_PlayMusic(); | |
void doAction(Scene *p_pScene); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment