perl_doors.cpp formatting

This commit is contained in:
Akkadius 2018-07-01 19:56:02 -05:00
parent 4a036116dd
commit 86c9b6b079

View File

@ -26,7 +26,9 @@
*/ */
#include "../common/features.h" #include "../common/features.h"
#ifdef EMBPERL_XS_CLASSES #ifdef EMBPERL_XS_CLASSES
#include "../common/global_define.h" #include "../common/global_define.h"
#include "embperl.h" #include "embperl.h"
@ -41,8 +43,7 @@
#endif #endif
XS(XS_Doors_GetDoorDBID); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetDoorDBID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetDoorDBID) XS(XS_Doors_GetDoorDBID) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetDoorDBID(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetDoorDBID(THIS)");
@ -54,21 +55,20 @@ XS(XS_Doors_GetDoorDBID)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetDoorDBID(); RETVAL = THIS->GetDoorDBID();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetDoorID); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetDoorID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetDoorID) XS(XS_Doors_GetDoorID) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetDoorID(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetDoorID(THIS)");
@ -80,21 +80,20 @@ XS(XS_Doors_GetDoorID)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetDoorID(); RETVAL = THIS->GetDoorID();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetID); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetID) XS(XS_Doors_GetID) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetID(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetID(THIS)");
@ -106,21 +105,20 @@ XS(XS_Doors_GetID)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetEntityID(); RETVAL = THIS->GetEntityID();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetX); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetX); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetX) XS(XS_Doors_GetX) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetX(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetX(THIS)");
@ -132,21 +130,20 @@ XS(XS_Doors_GetX)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetPosition().x; RETVAL = THIS->GetPosition().x;
XSprePUSH; PUSHn((double)RETVAL); XSprePUSH;
PUSHn((double) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetY); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetY); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetY) XS(XS_Doors_GetY) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetY(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetY(THIS)");
@ -158,21 +155,20 @@ XS(XS_Doors_GetY)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetPosition().y; RETVAL = THIS->GetPosition().y;
XSprePUSH; PUSHn((double)RETVAL); XSprePUSH;
PUSHn((double) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetZ); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetZ); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetZ) XS(XS_Doors_GetZ) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetZ(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetZ(THIS)");
@ -184,21 +180,20 @@ XS(XS_Doors_GetZ)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetPosition().z; RETVAL = THIS->GetPosition().z;
XSprePUSH; PUSHn((double)RETVAL); XSprePUSH;
PUSHn((double) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetHeading); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetHeading); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetHeading) XS(XS_Doors_GetHeading) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetHeading(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetHeading(THIS)");
@ -210,21 +205,20 @@ XS(XS_Doors_GetHeading)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetPosition().w; RETVAL = THIS->GetPosition().w;
XSprePUSH; PUSHn((double)RETVAL); XSprePUSH;
PUSHn((double) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetOpenType); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetOpenType); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetOpenType) XS(XS_Doors_GetOpenType) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetOpenType(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetOpenType(THIS)");
@ -236,21 +230,20 @@ XS(XS_Doors_GetOpenType)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetOpenType(); RETVAL = THIS->GetOpenType();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetLockpick); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetLockpick); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetLockpick) XS(XS_Doors_GetLockpick) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetLockpick(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetLockpick(THIS)");
@ -262,21 +255,20 @@ XS(XS_Doors_GetLockpick)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetLockpick(); RETVAL = THIS->GetLockpick();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetKeyItem); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetKeyItem); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetKeyItem) XS(XS_Doors_GetKeyItem) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetKeyItem(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetKeyItem(THIS)");
@ -288,21 +280,20 @@ XS(XS_Doors_GetKeyItem)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetKeyItem(); RETVAL = THIS->GetKeyItem();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetNoKeyring); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetNoKeyring); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetNoKeyring) XS(XS_Doors_GetNoKeyring) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::GetNoKeyring(THIS, uint8 type)"); Perl_croak(aTHX_ "Usage: Doors::GetNoKeyring(THIS, uint8 type)");
@ -313,8 +304,7 @@ XS(XS_Doors_GetNoKeyring)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -325,8 +315,7 @@ XS(XS_Doors_GetNoKeyring)
} }
XS(XS_Doors_GetIncline); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetIncline); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetIncline) XS(XS_Doors_GetIncline) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)");
@ -338,21 +327,20 @@ XS(XS_Doors_GetIncline)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetIncline(); RETVAL = THIS->GetIncline();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_GetSize); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetSize); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetSize) XS(XS_Doors_GetSize) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)");
@ -364,23 +352,21 @@ XS(XS_Doors_GetSize)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetSize(); RETVAL = THIS->GetSize();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_SetOpenType); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetOpenType); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetOpenType) XS(XS_Doors_SetOpenType) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetOpenType(THIS, uint32 open_type)"); Perl_croak(aTHX_ "Usage: Doors::SetOpenType(THIS, uint32 open_type)");
@ -391,8 +377,7 @@ XS(XS_Doors_SetOpenType)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -403,8 +388,7 @@ XS(XS_Doors_SetOpenType)
} }
XS(XS_Doors_SetLockpick); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetLockpick); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetLockpick) XS(XS_Doors_SetLockpick) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetLockpick(THIS, uint32 lockpick_type)"); Perl_croak(aTHX_ "Usage: Doors::SetLockpick(THIS, uint32 lockpick_type)");
@ -415,8 +399,7 @@ XS(XS_Doors_SetLockpick)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -427,8 +410,7 @@ XS(XS_Doors_SetLockpick)
} }
XS(XS_Doors_SetKeyItem); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetKeyItem); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetKeyItem) XS(XS_Doors_SetKeyItem) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetKeyItem(THIS, uint32 key_item_id)"); Perl_croak(aTHX_ "Usage: Doors::SetKeyItem(THIS, uint32 key_item_id)");
@ -439,8 +421,7 @@ XS(XS_Doors_SetKeyItem)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -451,8 +432,7 @@ XS(XS_Doors_SetKeyItem)
} }
XS(XS_Doors_SetNoKeyring); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetNoKeyring); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetNoKeyring) XS(XS_Doors_SetNoKeyring) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetNoKeyring(THIS, uint8 no_key_ring)"); Perl_croak(aTHX_ "Usage: Doors::SetNoKeyring(THIS, uint8 no_key_ring)");
@ -463,8 +443,7 @@ XS(XS_Doors_SetNoKeyring)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -475,8 +454,7 @@ XS(XS_Doors_SetNoKeyring)
} }
XS(XS_Doors_SetIncline); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetIncline); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetIncline) XS(XS_Doors_SetIncline) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetIncline(THIS, uint32 incline)"); Perl_croak(aTHX_ "Usage: Doors::SetIncline(THIS, uint32 incline)");
@ -487,8 +465,7 @@ XS(XS_Doors_SetIncline)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -499,8 +476,7 @@ XS(XS_Doors_SetIncline)
} }
XS(XS_Doors_SetSize); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetSize); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetSize) XS(XS_Doors_SetSize) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetSize(THIS, uint32 size)"); Perl_croak(aTHX_ "Usage: Doors::SetSize(THIS, uint32 size)");
@ -511,8 +487,7 @@ XS(XS_Doors_SetSize)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -523,8 +498,7 @@ XS(XS_Doors_SetSize)
} }
XS(XS_Doors_SetLocation); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetLocation); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetLocation) XS(XS_Doors_SetLocation) {
{
dXSARGS; dXSARGS;
if (items != 4) if (items != 4)
Perl_croak(aTHX_ "Usage: Doors::SetLocation(THIS, float x, float y, float z)"); Perl_croak(aTHX_ "Usage: Doors::SetLocation(THIS, float x, float y, float z)");
@ -537,8 +511,7 @@ XS(XS_Doors_SetLocation)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -549,8 +522,7 @@ XS(XS_Doors_SetLocation)
} }
XS(XS_Doors_SetX); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetX); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetX) XS(XS_Doors_SetX) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetX(THIS, float x)"); Perl_croak(aTHX_ "Usage: Doors::SetX(THIS, float x)");
@ -561,8 +533,7 @@ XS(XS_Doors_SetX)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -574,8 +545,7 @@ XS(XS_Doors_SetX)
} }
XS(XS_Doors_SetY); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetY); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetY) XS(XS_Doors_SetY) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetY(THIS, float y)"); Perl_croak(aTHX_ "Usage: Doors::SetY(THIS, float y)");
@ -586,8 +556,7 @@ XS(XS_Doors_SetY)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -600,8 +569,7 @@ XS(XS_Doors_SetY)
} }
XS(XS_Doors_SetZ); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetZ); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetZ) XS(XS_Doors_SetZ) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetZ(THIS, float z)"); Perl_croak(aTHX_ "Usage: Doors::SetZ(THIS, float z)");
@ -612,8 +580,7 @@ XS(XS_Doors_SetZ)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -626,8 +593,7 @@ XS(XS_Doors_SetZ)
} }
XS(XS_Doors_SetHeading); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetHeading); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetHeading) XS(XS_Doors_SetHeading) {
{
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Doors::SetHeading(THIS, float heading)"); Perl_croak(aTHX_ "Usage: Doors::SetHeading(THIS, float heading)");
@ -638,8 +604,7 @@ XS(XS_Doors_SetHeading)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -652,8 +617,7 @@ XS(XS_Doors_SetHeading)
} }
XS(XS_Doors_SetModelName); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_SetModelName); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_SetModelName) XS(XS_Doors_SetModelName) {
{
dXSARGS; dXSARGS;
if (items < 1 || items > 2) if (items < 1 || items > 2)
Perl_croak(aTHX_ "Usage: Doors::SetModelName(THIS, string name)"); Perl_croak(aTHX_ "Usage: Doors::SetModelName(THIS, string name)");
@ -664,8 +628,7 @@ XS(XS_Doors_SetModelName)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -677,8 +640,7 @@ XS(XS_Doors_SetModelName)
XSRETURN_EMPTY; XSRETURN_EMPTY;
} }
XS(XS_Doors_GetModelName); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_GetModelName); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_GetModelName) XS(XS_Doors_GetModelName) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::GetModelName(THIS)"); Perl_croak(aTHX_ "Usage: Doors::GetModelName(THIS)");
@ -690,21 +652,21 @@ XS(XS_Doors_GetModelName)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetDoorName(); RETVAL = THIS->GetDoorName();
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; sv_setpv(TARG, RETVAL);
XSprePUSH;
PUSHTARG;
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Doors_CreateDatabaseEntry); /* prototype to pass -Wmissing-prototypes */ XS(XS_Doors_CreateDatabaseEntry); /* prototype to pass -Wmissing-prototypes */
XS(XS_Doors_CreateDatabaseEntry) XS(XS_Doors_CreateDatabaseEntry) {
{
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: Doors::InsertDoor(THIS)"); Perl_croak(aTHX_ "Usage: Doors::InsertDoor(THIS)");
@ -714,8 +676,7 @@ XS(XS_Doors_CreateDatabaseEntry)
if (sv_derived_from(ST(0), "Doors")) { if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV *) SvRV(ST(0))); IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Doors *, tmp); THIS = INT2PTR(Doors *, tmp);
} } else
else
Perl_croak(aTHX_ "THIS is not of type Doors"); Perl_croak(aTHX_ "THIS is not of type Doors");
if (THIS == nullptr) if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
@ -726,13 +687,11 @@ XS(XS_Doors_CreateDatabaseEntry)
} }
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
#endif #endif
XS(boot_Doors); /* prototype to pass -Wmissing-prototypes */ XS(boot_Doors); /* prototype to pass -Wmissing-prototypes */
XS(boot_Doors) XS(boot_Doors) {
{
dXSARGS; dXSARGS;
char file[256]; char file[256];
strncpy(file, __FILE__, 256); strncpy(file, __FILE__, 256);