1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Update blip entity to use the new debugging implementation.

This commit is contained in:
Sandu Liviu Catalin 2015-11-11 08:57:03 +02:00
parent 5855f7b46a
commit ec21e52353

View File

@ -1,3 +1,4 @@
// ------------------------------------------------------------------------------------------------
#include "Entity/Blip.hpp" #include "Entity/Blip.hpp"
#include "Core.hpp" #include "Core.hpp"
@ -20,8 +21,9 @@ SQInteger CBlip::GetWorld() const
} }
else else
{ {
LogWrn(_SC("Attempting to <get blip world> using an invalid reference: %d"), m_ID); BadRef("@world", "get world");
} }
return SQMOD_UNKNOWN; return SQMOD_UNKNOWN;
} }
@ -34,8 +36,9 @@ SQInteger CBlip::GetScale() const
} }
else else
{ {
LogWrn(_SC("Attempting to <get blip scale> using an invalid reference: %d"), m_ID); BadRef("@scale", "get scale");
} }
return SQMOD_UNKNOWN; return SQMOD_UNKNOWN;
} }
@ -48,7 +51,7 @@ const Vector3 & CBlip::GetPosition() const
} }
else else
{ {
LogWrn(_SC("Attempting to <get blip position> using an invalid reference: %d"), m_ID); BadRef("@position", "get position");
} }
return Vector3::NIL; return Vector3::NIL;
@ -63,7 +66,7 @@ SQFloat CBlip::GetPositionX() const
} }
else else
{ {
LogWrn(_SC("Attempting to <get blip position> using an invalid reference: %d"), m_ID); BadRef("@pos_x", "get x axis");
} }
return 0.0; return 0.0;
@ -78,7 +81,7 @@ SQFloat CBlip::GetPositionY() const
} }
else else
{ {
LogWrn(_SC("Attempting to <get blip position> using an invalid reference: %d"), m_ID); BadRef("@pos_y", "get y axis");
} }
return 0.0; return 0.0;
@ -93,7 +96,7 @@ SQFloat CBlip::GetPositionZ() const
} }
else else
{ {
LogWrn(_SC("Attempting to <get blip position> using an invalid reference: %d"), m_ID); BadRef("@pos_z", "get z axis");
} }
return 0.0; return 0.0;
@ -108,7 +111,7 @@ const Color4 & CBlip::GetColor() const
} }
else else
{ {
LogWrn(_SC("Attempting to <get blip color> using an invalid reference: %d"), m_ID); BadRef("@color", "get color");
} }
return Color4::NIL; return Color4::NIL;
@ -123,7 +126,7 @@ SQInt32 CBlip::GetSprID() const
} }
else else
{ {
LogWrn(_SC("Attempting to <get blip sprite> using an invalid reference: %d"), m_ID); BadRef("@spr_id", "get sprite id");
} }
return SQMOD_UNKNOWN; return SQMOD_UNKNOWN;
@ -314,7 +317,7 @@ bool Register_CBlip(HSQUIRRELVM vm)
// Output debugging information // Output debugging information
LogDbg("Registration of <CBlip> type was successful"); LogDbg("Registration of <CBlip> type was successful");
// Output debugging information // Output debugging information
LogDbg("Beginning registration of <Blip functions> type"); LogDbg("Beginning registration of <Blip> functions");
// Register global functions related to this entity type // Register global functions related to this entity type
Sqrat::RootTable(vm) Sqrat::RootTable(vm)
/* Create BaseBlip [E]xtended [S]ubstitute */ /* Create BaseBlip [E]xtended [S]ubstitute */
@ -358,7 +361,7 @@ bool Register_CBlip(HSQUIRRELVM vm)
.Overload< CBlip (*)(SQInt32, SQInt32, const Vector3 &, SQInt32, const Color4 &, SQInt32, SQInt32, SqObj &) > .Overload< CBlip (*)(SQInt32, SQInt32, const Vector3 &, SQInt32, const Color4 &, SQInt32, SQInt32, SqObj &) >
(_SC("CreateBlip_CF"), &CreateBlip_CF); (_SC("CreateBlip_CF"), &CreateBlip_CF);
// Output debugging information // Output debugging information
LogDbg("Registration of <Blip functions> type was successful"); LogDbg("Registration of <Blip> functions was successful");
// Registration succeeded // Registration succeeded
return true; return true;
} }