mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-07 17:22:26 +00:00
Merge branch 'master' into tasks
This commit is contained in:
commit
d2679f065a
@ -27,10 +27,7 @@
|
|||||||
#EQEMU_USE_MAP_MMFS
|
#EQEMU_USE_MAP_MMFS
|
||||||
#EQEMU_MAP_DIR
|
#EQEMU_MAP_DIR
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||||
|
|
||||||
SET(CMAKE_CXX_STANDARD 11)
|
|
||||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
#FindMySQL is located here so lets make it so CMake can find it
|
#FindMySQL is located here so lets make it so CMake can find it
|
||||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
|
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
|
||||||
|
|||||||
241
utils/scripts/lua-doc-parser.pl
Normal file
241
utils/scripts/lua-doc-parser.pl
Normal file
@ -0,0 +1,241 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
# Author: Akkadius
|
||||||
|
# @file: lua-doc-parser.pl
|
||||||
|
# @description: Script meant to parse the source code to build the LUA API list
|
||||||
|
|
||||||
|
use File::Find;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
|
sub usage() {
|
||||||
|
print "Usage:\n";
|
||||||
|
print " --client - Prints methods for just client class methods\n";
|
||||||
|
print " --mob - Prints methods for just mob class methods\n";
|
||||||
|
print " --npc - Prints methods for just npc class methods\n";
|
||||||
|
print " --entity - Prints methods for just entity class methods\n";
|
||||||
|
print " --entity_list - Prints methods for just entity_list class methods\n";
|
||||||
|
print " --door - Prints methods for just door class methods\n";
|
||||||
|
print " --object - Prints methods for just object class methods\n";
|
||||||
|
print " --group - Prints methods for just group class methods\n";
|
||||||
|
print " --raid - Prints methods for just raid class methods\n";
|
||||||
|
print " --item - Prints methods for just item class methods\n";
|
||||||
|
print " --iteminst - Prints methods for just iteminst class methods\n";
|
||||||
|
print " --inventory - Prints methods for just inventory class methods\n";
|
||||||
|
print " --corpse - Prints methods for just corpse class methods\n";
|
||||||
|
print " --hate_entry - Prints methods for just hate_entry class methods\n";
|
||||||
|
print " --quest - Prints methods for just quest class methods\n";
|
||||||
|
print " --spell - Prints methods for just spell class methods\n";
|
||||||
|
print " --spawn - Prints methods for just spawn class methods\n";
|
||||||
|
print " --packet - Prints methods for just packet class methods\n";
|
||||||
|
print " --stat_bonuses - Prints methods for just stat_bonuses class methods\n";
|
||||||
|
print " --all - Prints methods for all classes\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($#ARGV < 0) {
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Open File
|
||||||
|
my $filename = 'lua-api.md';
|
||||||
|
open(my $fh, '>', $filename) or die "Could not open file '$filename' $!";
|
||||||
|
|
||||||
|
my $export = $ARGV[0];
|
||||||
|
$export=~s/--//g;
|
||||||
|
|
||||||
|
my $export_file_search = $export;
|
||||||
|
|
||||||
|
if ($export eq "quest") {
|
||||||
|
$export_file_search = "lua_general";
|
||||||
|
}
|
||||||
|
|
||||||
|
my @files;
|
||||||
|
my $start_dir = "zone/";
|
||||||
|
find(
|
||||||
|
sub { push @files, $File::Find::name unless -d; },
|
||||||
|
$start_dir
|
||||||
|
);
|
||||||
|
for my $file (@files) {
|
||||||
|
|
||||||
|
#::: Skip non lua.cpp files
|
||||||
|
if($file!~/lua_/i || $file!~/cpp/i){
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: If we are specifying a specific class type, skip everything else
|
||||||
|
if ($export ne "all" && $export ne "") {
|
||||||
|
if ($file!~/$export_file_search\.cpp/i) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@methods = ();
|
||||||
|
$split_key = "";
|
||||||
|
$object_prefix = "";
|
||||||
|
|
||||||
|
#::: Client Export
|
||||||
|
if ($export=~/all|client/i && $file=~/_client/i) {
|
||||||
|
$split_key = "Client::";
|
||||||
|
$object_prefix = "client:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Mob Export
|
||||||
|
if ($export=~/all|mob/i && $file=~/_mob/i) {
|
||||||
|
$split_key = "Mob::";
|
||||||
|
$object_prefix = "mob:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: NPC Export
|
||||||
|
if ($export=~/all|npc/i && $file=~/_npc/i) {
|
||||||
|
$split_key = "NPC::";
|
||||||
|
$object_prefix = "npc:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Object Export
|
||||||
|
if ($export=~/all|object/i && $file=~/_object/i) {
|
||||||
|
$split_key = "Object::";
|
||||||
|
$object_prefix = "object:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Door Export
|
||||||
|
if ($export=~/all|door/i && $file=~/_door/i) {
|
||||||
|
$split_key = "Door::";
|
||||||
|
$object_prefix = "door:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Entity Export
|
||||||
|
if ($export=~/all|entity/i && $file=~/_entity/i) {
|
||||||
|
$split_key = "Entity::";
|
||||||
|
$object_prefix = "entity:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Entity List Export
|
||||||
|
if ($export=~/all|entity_list/i && $file=~/_entity_list/i) {
|
||||||
|
$split_key = "EntityList::";
|
||||||
|
$object_prefix = "entity_list:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Group
|
||||||
|
if ($export=~/all|group/i && $file=~/_group/i) {
|
||||||
|
$split_key = "Group::";
|
||||||
|
$object_prefix = "group:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Raid
|
||||||
|
if ($export=~/all|raid/i && $file=~/_raid/i) {
|
||||||
|
$split_key = "Raid::";
|
||||||
|
$object_prefix = "raid:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Corpse
|
||||||
|
if ($export=~/all|corpse/i && $file=~/_corpse/i) {
|
||||||
|
$split_key = "Corpse::";
|
||||||
|
$object_prefix = "corpse:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Hateentry
|
||||||
|
if ($export=~/all|hate_entry/i && $file=~/_hate_entry/i) {
|
||||||
|
$split_key = "HateEntry::";
|
||||||
|
$object_prefix = "hate_entry:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Spell
|
||||||
|
if ($export=~/all|spell/i && $file=~/_spell/i) {
|
||||||
|
$split_key = "Spell::";
|
||||||
|
$object_prefix = "spell:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Spawn
|
||||||
|
if ($export=~/all|spawn/i && $file=~/_spawn/i) {
|
||||||
|
$split_key = "Spawn::";
|
||||||
|
$object_prefix = "spawn:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: StatBonuses
|
||||||
|
if ($export=~/all|stat_bonuses/i && $file=~/stat_bonuses/i) {
|
||||||
|
$split_key = "StatBonuses::";
|
||||||
|
$object_prefix = "statbonuses:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Item
|
||||||
|
if ($export=~/all|item/i && $file=~/_item/i) {
|
||||||
|
$split_key = "Item::";
|
||||||
|
$object_prefix = "item:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: ItemInst
|
||||||
|
if ($export=~/all|iteminst/i && $file=~/_iteminst/i) {
|
||||||
|
$split_key = "ItemInst::";
|
||||||
|
$object_prefix = "iteminst:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Inventory
|
||||||
|
if ($export=~/all|inventory/i && $file=~/_inventory/i) {
|
||||||
|
$split_key = "Inventory::";
|
||||||
|
$object_prefix = "inventory:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Packet
|
||||||
|
if ($export=~/all|packet/i && $file=~/_packet/i) {
|
||||||
|
$split_key = "Packet::";
|
||||||
|
$object_prefix = "packet:";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Quest
|
||||||
|
if ($export=~/all|quest/i && $file=~/lua_general/i) {
|
||||||
|
$split_key = " lua_";
|
||||||
|
$object_prefix = "eq.";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Open File
|
||||||
|
print "\nOpening '" . $file . "'\n";
|
||||||
|
|
||||||
|
if ($split_key eq "") {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
open (FILE, $file);
|
||||||
|
while (<FILE>) {
|
||||||
|
chomp;
|
||||||
|
$line = $_;
|
||||||
|
|
||||||
|
@data = split(" ", $line);
|
||||||
|
|
||||||
|
if ((lc(substr($data[1], 0, 4)) eq "lua_") && $line!~/luabind/i && $line!~/return |#ifdef|struct /i) {
|
||||||
|
#::: Get return type
|
||||||
|
$return_type = trim($data[0]);
|
||||||
|
|
||||||
|
@method_split = split($split_key, $line);
|
||||||
|
@method_end = split("{", $method_split[1]);
|
||||||
|
|
||||||
|
$method = $object_prefix . trim($method_end[0]) . "; -- " . $return_type . "\n";
|
||||||
|
|
||||||
|
push @methods, $method;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Header
|
||||||
|
$header = $split_key;
|
||||||
|
$header =~s/:://g;
|
||||||
|
|
||||||
|
print $fh "# " . $header . "\n";
|
||||||
|
print $fh "```lua\n";
|
||||||
|
|
||||||
|
@methods = sort @methods;
|
||||||
|
foreach $method (@methods) {
|
||||||
|
print $fh $method;
|
||||||
|
print $method;
|
||||||
|
}
|
||||||
|
|
||||||
|
print $fh "```\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
close $fh;
|
||||||
|
|
||||||
|
#::: Trim Whitespaces
|
||||||
|
sub trim {
|
||||||
|
my $string = $_[0];
|
||||||
|
$string =~ s/^\s+//;
|
||||||
|
$string =~ s/\s+$//;
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
179
utils/scripts/perl-doc-parser.pl
Executable file
179
utils/scripts/perl-doc-parser.pl
Executable file
@ -0,0 +1,179 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
# Author: Akkadius
|
||||||
|
# @file: perl-doc-parser.pl
|
||||||
|
# @description: Script meant to parse the source code to build the Perl API list
|
||||||
|
|
||||||
|
use File::Find;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
|
sub usage() {
|
||||||
|
print "Usage:\n";
|
||||||
|
print " --client - Prints methods for just client class methods\n";
|
||||||
|
print " --mob - Prints methods for just mob class methods\n";
|
||||||
|
print " --npc - Prints methods for just npc class methods\n";
|
||||||
|
print " --entity - Prints methods for just entity class methods\n";
|
||||||
|
print " --door - Prints methods for just door class methods\n";
|
||||||
|
print " --object - Prints methods for just object class methods\n";
|
||||||
|
print " --group - Prints methods for just group class methods\n";
|
||||||
|
print " --raid - Prints methods for just raid class methods\n";
|
||||||
|
print " --questitem - Prints methods for just questitem class methods\n";
|
||||||
|
print " --corpse - Prints methods for just corpse class methods\n";
|
||||||
|
print " --hateentry - Prints methods for just hateentry class methods\n";
|
||||||
|
print " --quest - Prints methods for just quest class methods\n";
|
||||||
|
print " --all - Prints methods for all classes\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($#ARGV < 0) {
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
my $export = $ARGV[0];
|
||||||
|
$export=~s/--//g;
|
||||||
|
|
||||||
|
my $export_file_search = $export;
|
||||||
|
|
||||||
|
if ($export eq "quest") {
|
||||||
|
$export_file_search = "embparser_api";
|
||||||
|
}
|
||||||
|
|
||||||
|
my @files;
|
||||||
|
my $start_dir = "zone/";
|
||||||
|
find(
|
||||||
|
sub { push @files, $File::Find::name unless -d; },
|
||||||
|
$start_dir
|
||||||
|
);
|
||||||
|
for my $file (@files) {
|
||||||
|
|
||||||
|
#::: Skip non Perl files
|
||||||
|
if($file!~/perl_|embparser_api/i){
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: If we are specifying a specific class type, skip everything else
|
||||||
|
if ($export ne "all" && $export ne "") {
|
||||||
|
if ($file!~/$export_file_search/i) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@methods = ();
|
||||||
|
$split_key = "";
|
||||||
|
$object_prefix = "";
|
||||||
|
|
||||||
|
#::: Open File
|
||||||
|
print "\nOpening '" . $file . "'\n";
|
||||||
|
open (FILE, $file);
|
||||||
|
while (<FILE>) {
|
||||||
|
chomp;
|
||||||
|
$line = $_;
|
||||||
|
|
||||||
|
if ($line=~/Perl_croak/i && $line=~/Usa/i && $line=~/::/i && $line!~/::new/i) {
|
||||||
|
|
||||||
|
#::: Client export
|
||||||
|
if ($export=~/all|client/i && $line=~/Client::/i) {
|
||||||
|
$split_key = "Client::";
|
||||||
|
$object_prefix = "\$client->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Mob export
|
||||||
|
if ($export=~/all|mob/i && $line=~/Mob::/i) {
|
||||||
|
$split_key = "Mob::";
|
||||||
|
$object_prefix = "\$mob->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: NPC export
|
||||||
|
if ($export=~/all|npc/i && $line=~/NPC::/i) {
|
||||||
|
$split_key = "NPC::";
|
||||||
|
$object_prefix = "\$npc->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Corpse export
|
||||||
|
if ($export=~/all|corpse/i && $line=~/Corpse::/i) {
|
||||||
|
$split_key = "Corpse::";
|
||||||
|
$object_prefix = "\$corpse->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Entity export
|
||||||
|
if ($export=~/all|entity/i && $line=~/EntityList::/i) {
|
||||||
|
$split_key = "EntityList::";
|
||||||
|
$object_prefix = "\$entity_list->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Doors export
|
||||||
|
if ($export=~/all|door/i && $line=~/Doors::/i) {
|
||||||
|
$split_key = "Doors::";
|
||||||
|
$object_prefix = "\$door->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Object export
|
||||||
|
if ($export=~/all|object/i && $line=~/Object::/i) {
|
||||||
|
$split_key = "Object::";
|
||||||
|
$object_prefix = "\$object->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Group export
|
||||||
|
if ($export=~/all|group/i && $line=~/Group::/i) {
|
||||||
|
$split_key = "Group::";
|
||||||
|
$object_prefix = "\$group->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Raid export
|
||||||
|
if ($export=~/all|raid/i && $line=~/Raid::/i) {
|
||||||
|
$split_key = "Raid::";
|
||||||
|
$object_prefix = "\$raid->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Hateentry export
|
||||||
|
if ($export=~/all|hateentry/i && $line=~/HateEntry::/i) {
|
||||||
|
$split_key = "HateEntry::";
|
||||||
|
$object_prefix = "\$hate_entry->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Questitem export
|
||||||
|
if ($export=~/all|questitem/i && $line=~/QuestItem::/i) {
|
||||||
|
$split_key = "QuestItem::";
|
||||||
|
$object_prefix = "\$quest_item->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Quest:: exports
|
||||||
|
if ($export=~/all|quest/i && $line=~/quest::/i) {
|
||||||
|
$split_key = "quest::";
|
||||||
|
$object_prefix = "\quest::";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Split on croak usage
|
||||||
|
@data = split($split_key, $line);
|
||||||
|
$usage = trim($data[1]);
|
||||||
|
|
||||||
|
#::: Split out param borders and get method name
|
||||||
|
@params_begin = split('\(', $usage);
|
||||||
|
$method_name = trim($params_begin[0]);
|
||||||
|
|
||||||
|
#::: Get params string built
|
||||||
|
@params_end = split('\)', $params_begin[1]);
|
||||||
|
$params_string = trim($params_end[0]);
|
||||||
|
$params_string =~s/THIS\,//g;
|
||||||
|
$params_string =~s/THIS//g;
|
||||||
|
$params_string = trim($params_string);
|
||||||
|
|
||||||
|
$method = $object_prefix . $method_name . "(" . lc($params_string) . ")\n";
|
||||||
|
|
||||||
|
push @methods, $method;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@methods = sort @methods;
|
||||||
|
foreach $method (@methods) {
|
||||||
|
print $method;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Trim Whitespaces
|
||||||
|
sub trim {
|
||||||
|
my $string = $_[0];
|
||||||
|
$string =~ s/^\s+//;
|
||||||
|
$string =~ s/\s+$//;
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -725,14 +725,12 @@ void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug
|
|||||||
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5);
|
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5,
|
void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, bool attuned) {
|
||||||
bool attuned) {
|
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, 0, attuned);
|
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, 0, attuned);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5,
|
void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, bool attuned, int to_slot) {
|
||||||
bool attuned, int to_slot) {
|
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, 0, attuned, to_slot);
|
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, 0, attuned, to_slot);
|
||||||
}
|
}
|
||||||
|
|||||||
1993
zone/perl_client.cpp
1993
zone/perl_client.cpp
File diff suppressed because it is too large
Load Diff
@ -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,24 +280,23 @@ 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, type)");
|
Perl_croak(aTHX_ "Usage: Doors::GetNoKeyring(THIS, uint8 type)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
uint8 type = (uint8) SvUV(ST(1));
|
uint8 type = (uint8) SvUV(ST(1));
|
||||||
@ -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,26 +352,24 @@ 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, type)");
|
Perl_croak(aTHX_ "Usage: Doors::SetOpenType(THIS, uint32 open_type)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
uint32 type = (uint32) SvUV(ST(1));
|
uint32 type = (uint32) SvUV(ST(1));
|
||||||
@ -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,11 +388,10 @@ 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, type)");
|
Perl_croak(aTHX_ "Usage: Doors::SetLockpick(THIS, uint32 lockpick_type)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
uint32 type = (uint32) SvUV(ST(1));
|
uint32 type = (uint32) SvUV(ST(1));
|
||||||
@ -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,11 +410,10 @@ 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, type)");
|
Perl_croak(aTHX_ "Usage: Doors::SetKeyItem(THIS, uint32 key_item_id)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
uint32 type = (uint32) SvUV(ST(1));
|
uint32 type = (uint32) SvUV(ST(1));
|
||||||
@ -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,11 +432,10 @@ 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, type)");
|
Perl_croak(aTHX_ "Usage: Doors::SetNoKeyring(THIS, uint8 no_key_ring)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
uint8 type = (uint8) SvUV(ST(1));
|
uint8 type = (uint8) SvUV(ST(1));
|
||||||
@ -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,11 +454,10 @@ 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, type)");
|
Perl_croak(aTHX_ "Usage: Doors::SetIncline(THIS, uint32 incline)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
uint32 type = (uint32) SvUV(ST(1));
|
uint32 type = (uint32) SvUV(ST(1));
|
||||||
@ -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,11 +476,10 @@ 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, size)");
|
Perl_croak(aTHX_ "Usage: Doors::SetSize(THIS, uint32 size)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
uint32 type = (uint32) SvUV(ST(1));
|
uint32 type = (uint32) SvUV(ST(1));
|
||||||
@ -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,11 +498,10 @@ 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, x, y, z)");
|
Perl_croak(aTHX_ "Usage: Doors::SetLocation(THIS, float x, float y, float z)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
float x = (float) SvNV(ST(1));
|
float x = (float) SvNV(ST(1));
|
||||||
@ -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,11 +522,10 @@ 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, XPos)");
|
Perl_croak(aTHX_ "Usage: Doors::SetX(THIS, float x)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
float x = (float) SvNV(ST(1));
|
float x = (float) SvNV(ST(1));
|
||||||
@ -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,11 +545,10 @@ 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, YPos)");
|
Perl_croak(aTHX_ "Usage: Doors::SetY(THIS, float y)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
float y = (float) SvNV(ST(1));
|
float y = (float) SvNV(ST(1));
|
||||||
@ -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,11 +569,10 @@ 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, ZPos)");
|
Perl_croak(aTHX_ "Usage: Doors::SetZ(THIS, float z)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
float z = (float) SvNV(ST(1));
|
float z = (float) SvNV(ST(1));
|
||||||
@ -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,11 +593,10 @@ 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, heading)");
|
Perl_croak(aTHX_ "Usage: Doors::SetHeading(THIS, float heading)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
float heading = (float) SvNV(ST(1));
|
float heading = (float) SvNV(ST(1));
|
||||||
@ -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,11 +617,10 @@ 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, name)");
|
Perl_croak(aTHX_ "Usage: Doors::SetModelName(THIS, string name)");
|
||||||
{
|
{
|
||||||
Doors *THIS;
|
Doors *THIS;
|
||||||
char *name = nullptr;
|
char *name = nullptr;
|
||||||
@ -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);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||||
|
|
||||||
@ -42,8 +44,7 @@
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Group_DisbandGroup); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_DisbandGroup); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_DisbandGroup)
|
XS(XS_Group_DisbandGroup) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Group::DisbandGroup(THIS)");
|
Perl_croak(aTHX_ "Usage: Group::DisbandGroup(THIS)");
|
||||||
@ -53,8 +54,7 @@ XS(XS_Group_DisbandGroup)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -65,8 +65,7 @@ XS(XS_Group_DisbandGroup)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_IsGroupMember); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_IsGroupMember); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_IsGroupMember)
|
XS(XS_Group_IsGroupMember) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Group::IsGroupMember(THIS, client)");
|
Perl_croak(aTHX_ "Usage: Group::IsGroupMember(THIS, client)");
|
||||||
@ -78,8 +77,7 @@ XS(XS_Group_IsGroupMember)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -87,8 +85,7 @@ XS(XS_Group_IsGroupMember)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
client = INT2PTR(Mob *, tmp);
|
client = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "client is not of type Mob");
|
Perl_croak(aTHX_ "client is not of type Mob");
|
||||||
if (client == nullptr)
|
if (client == nullptr)
|
||||||
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
||||||
@ -101,11 +98,10 @@ XS(XS_Group_IsGroupMember)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_CastGroupSpell); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_CastGroupSpell); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_CastGroupSpell)
|
XS(XS_Group_CastGroupSpell) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 3)
|
if (items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: Group::CastGroupSpell(THIS, caster, spellid)");
|
Perl_croak(aTHX_ "Usage: Group::CastGroupSpell(THIS, Mob* caster, uint16 spell_id)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
Mob *caster;
|
Mob *caster;
|
||||||
@ -114,8 +110,7 @@ XS(XS_Group_CastGroupSpell)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -123,8 +118,7 @@ XS(XS_Group_CastGroupSpell)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
caster = INT2PTR(Mob *, tmp);
|
caster = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "caster is not of type Mob");
|
Perl_croak(aTHX_ "caster is not of type Mob");
|
||||||
if (caster == nullptr)
|
if (caster == nullptr)
|
||||||
Perl_croak(aTHX_ "caster is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "caster is nullptr, avoiding crash.");
|
||||||
@ -135,11 +129,10 @@ XS(XS_Group_CastGroupSpell)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_SplitExp); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_SplitExp); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_SplitExp)
|
XS(XS_Group_SplitExp) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 3)
|
if (items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: Group::SplitExp(THIS, exp, other)");
|
Perl_croak(aTHX_ "Usage: Group::SplitExp(THIS, uint32 exp, Mob* other)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
uint32 exp = (uint32) SvUV(ST(1));
|
uint32 exp = (uint32) SvUV(ST(1));
|
||||||
@ -148,8 +141,7 @@ XS(XS_Group_SplitExp)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -157,8 +149,7 @@ XS(XS_Group_SplitExp)
|
|||||||
if (sv_derived_from(ST(2), "Mob")) {
|
if (sv_derived_from(ST(2), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(2)));
|
IV tmp = SvIV((SV *) SvRV(ST(2)));
|
||||||
other = INT2PTR(Mob *, tmp);
|
other = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "other is not of type Mob");
|
Perl_croak(aTHX_ "other is not of type Mob");
|
||||||
if (other == nullptr)
|
if (other == nullptr)
|
||||||
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
||||||
@ -169,11 +160,10 @@ XS(XS_Group_SplitExp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_GroupMessage); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_GroupMessage); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_GroupMessage)
|
XS(XS_Group_GroupMessage) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if ((items != 3) && (items != 4)) // the 3 item version is kept for backwards compatability
|
if ((items != 3) && (items != 4)) // the 3 item version is kept for backwards compatability
|
||||||
Perl_croak(aTHX_ "Usage: Group::GroupMessage(THIS, sender, language, message)");
|
Perl_croak(aTHX_ "Usage: Group::GroupMessage(THIS, Mob* sender, uint8 language, string message)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
Mob *sender;
|
Mob *sender;
|
||||||
@ -183,8 +173,7 @@ XS(XS_Group_GroupMessage)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -192,8 +181,7 @@ XS(XS_Group_GroupMessage)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
sender = INT2PTR(Mob *, tmp);
|
sender = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||||
if (sender == nullptr)
|
if (sender == nullptr)
|
||||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||||
@ -204,8 +192,7 @@ XS(XS_Group_GroupMessage)
|
|||||||
language = 0;
|
language = 0;
|
||||||
message = (char *) SvPV_nolen(ST(3));
|
message = (char *) SvPV_nolen(ST(3));
|
||||||
THIS->GroupMessage(sender, language, 100, message);
|
THIS->GroupMessage(sender, language, 100, message);
|
||||||
}
|
} else { // if no language is specificed, send it in common
|
||||||
else { // if no language is specificed, send it in common
|
|
||||||
message = (char *) SvPV_nolen(ST(2));
|
message = (char *) SvPV_nolen(ST(2));
|
||||||
THIS->GroupMessage(sender, 0, 100, message);
|
THIS->GroupMessage(sender, 0, 100, message);
|
||||||
}
|
}
|
||||||
@ -214,11 +201,10 @@ XS(XS_Group_GroupMessage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_GetTotalGroupDamage); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_GetTotalGroupDamage); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_GetTotalGroupDamage)
|
XS(XS_Group_GetTotalGroupDamage) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Group::GetTotalGroupDamage(THIS, other)");
|
Perl_croak(aTHX_ "Usage: Group::GetTotalGroupDamage(THIS, Mob* other)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
uint32 RETVAL;
|
uint32 RETVAL;
|
||||||
@ -228,8 +214,7 @@ XS(XS_Group_GetTotalGroupDamage)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -237,24 +222,23 @@ XS(XS_Group_GetTotalGroupDamage)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
other = INT2PTR(Mob *, tmp);
|
other = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "other is not of type Mob");
|
Perl_croak(aTHX_ "other is not of type Mob");
|
||||||
if (other == nullptr)
|
if (other == nullptr)
|
||||||
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetTotalGroupDamage(other);
|
RETVAL = THIS->GetTotalGroupDamage(other);
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_SplitMoney); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_SplitMoney); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_SplitMoney)
|
XS(XS_Group_SplitMoney) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 5)
|
if (items != 5)
|
||||||
Perl_croak(aTHX_ "Usage: Group::SplitMoney(THIS, copper, silver, gold, platinum)");
|
Perl_croak(aTHX_ "Usage: Group::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
uint32 copper = (uint32) SvUV(ST(1));
|
uint32 copper = (uint32) SvUV(ST(1));
|
||||||
@ -265,8 +249,7 @@ XS(XS_Group_SplitMoney)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -277,11 +260,10 @@ XS(XS_Group_SplitMoney)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_SetLeader); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_SetLeader); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_SetLeader)
|
XS(XS_Group_SetLeader) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Group::SetLeader(THIS, newleader)");
|
Perl_croak(aTHX_ "Usage: Group::SetLeader(THIS, Mob* new_leader)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
Mob *newleader;
|
Mob *newleader;
|
||||||
@ -289,8 +271,7 @@ XS(XS_Group_SetLeader)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -298,8 +279,7 @@ XS(XS_Group_SetLeader)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
newleader = INT2PTR(Mob *, tmp);
|
newleader = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "newleader is not of type Mob");
|
Perl_croak(aTHX_ "newleader is not of type Mob");
|
||||||
if (newleader == nullptr)
|
if (newleader == nullptr)
|
||||||
Perl_croak(aTHX_ "newleader is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "newleader is nullptr, avoiding crash.");
|
||||||
@ -310,8 +290,7 @@ XS(XS_Group_SetLeader)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_GetLeader); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_GetLeader); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_GetLeader)
|
XS(XS_Group_GetLeader) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Group::GetLeader(THIS)");
|
Perl_croak(aTHX_ "Usage: Group::GetLeader(THIS)");
|
||||||
@ -322,8 +301,7 @@ XS(XS_Group_GetLeader)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -336,8 +314,7 @@ XS(XS_Group_GetLeader)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_GetLeaderName); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_GetLeaderName); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_GetLeaderName)
|
XS(XS_Group_GetLeaderName) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Group::GetLeaderName(THIS)");
|
Perl_croak(aTHX_ "Usage: Group::GetLeaderName(THIS)");
|
||||||
@ -349,24 +326,24 @@ XS(XS_Group_GetLeaderName)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetLeaderName();
|
RETVAL = THIS->GetLeaderName();
|
||||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
sv_setpv(TARG, RETVAL);
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHTARG;
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_SendHPPacketsTo); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_SendHPPacketsTo); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_SendHPPacketsTo)
|
XS(XS_Group_SendHPPacketsTo) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Group::SendHPPacketsTo(THIS, newmember)");
|
Perl_croak(aTHX_ "Usage: Group::SendHPPacketsTo(THIS, Mob* new_member)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
Mob *newmember;
|
Mob *newmember;
|
||||||
@ -374,8 +351,7 @@ XS(XS_Group_SendHPPacketsTo)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -383,8 +359,7 @@ XS(XS_Group_SendHPPacketsTo)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
newmember = INT2PTR(Mob *, tmp);
|
newmember = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "newmember is not of type Mob");
|
Perl_croak(aTHX_ "newmember is not of type Mob");
|
||||||
if (newmember == nullptr)
|
if (newmember == nullptr)
|
||||||
Perl_croak(aTHX_ "newmember is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "newmember is nullptr, avoiding crash.");
|
||||||
@ -395,11 +370,10 @@ XS(XS_Group_SendHPPacketsTo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_SendHPPacketsFrom); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_SendHPPacketsFrom); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_SendHPPacketsFrom)
|
XS(XS_Group_SendHPPacketsFrom) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Group::SendHPPacketsFrom(THIS, newmember)");
|
Perl_croak(aTHX_ "Usage: Group::SendHPPacketsFrom(THIS, Mob* new_member)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
Mob *newmember;
|
Mob *newmember;
|
||||||
@ -407,8 +381,7 @@ XS(XS_Group_SendHPPacketsFrom)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -416,8 +389,7 @@ XS(XS_Group_SendHPPacketsFrom)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
newmember = INT2PTR(Mob *, tmp);
|
newmember = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "newmember is not of type Mob");
|
Perl_croak(aTHX_ "newmember is not of type Mob");
|
||||||
if (newmember == nullptr)
|
if (newmember == nullptr)
|
||||||
Perl_croak(aTHX_ "newmember is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "newmember is nullptr, avoiding crash.");
|
||||||
@ -428,11 +400,10 @@ XS(XS_Group_SendHPPacketsFrom)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_IsLeader); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_IsLeader); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_IsLeader)
|
XS(XS_Group_IsLeader) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Group::IsLeader(THIS, leadertest)");
|
Perl_croak(aTHX_ "Usage: Group::IsLeader(THIS, Mob* target)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
bool RETVAL;
|
bool RETVAL;
|
||||||
@ -441,8 +412,7 @@ XS(XS_Group_IsLeader)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -450,8 +420,7 @@ XS(XS_Group_IsLeader)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
leadertest = INT2PTR(Mob *, tmp);
|
leadertest = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "leadertest is not of type Mob");
|
Perl_croak(aTHX_ "leadertest is not of type Mob");
|
||||||
if (leadertest == nullptr)
|
if (leadertest == nullptr)
|
||||||
Perl_croak(aTHX_ "leadertest is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "leadertest is nullptr, avoiding crash.");
|
||||||
@ -464,8 +433,7 @@ XS(XS_Group_IsLeader)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_GroupCount); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_GroupCount); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_GroupCount)
|
XS(XS_Group_GroupCount) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Group::GroupCount(THIS)");
|
Perl_croak(aTHX_ "Usage: Group::GroupCount(THIS)");
|
||||||
@ -477,21 +445,20 @@ XS(XS_Group_GroupCount)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GroupCount();
|
RETVAL = THIS->GroupCount();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_GetHighestLevel); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_GetHighestLevel); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_GetHighestLevel)
|
XS(XS_Group_GetHighestLevel) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Group::GetHighestLevel(THIS)");
|
Perl_croak(aTHX_ "Usage: Group::GetHighestLevel(THIS)");
|
||||||
@ -503,24 +470,24 @@ XS(XS_Group_GetHighestLevel)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetHighestLevel();
|
RETVAL = THIS->GetHighestLevel();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_TeleportGroup); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_TeleportGroup); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_TeleportGroup)
|
XS(XS_Group_TeleportGroup) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 7)
|
if (items != 7)
|
||||||
Perl_croak(aTHX_ "Usage: Group::TeleportGroup(THIS, sender, zoneID, x, y, z, heading)");
|
Perl_croak(aTHX_
|
||||||
|
"Usage: Group::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
Mob *sender;
|
Mob *sender;
|
||||||
@ -533,8 +500,7 @@ XS(XS_Group_TeleportGroup)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -542,8 +508,7 @@ XS(XS_Group_TeleportGroup)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
sender = INT2PTR(Mob *, tmp);
|
sender = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||||
if (sender == nullptr)
|
if (sender == nullptr)
|
||||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||||
@ -554,8 +519,7 @@ XS(XS_Group_TeleportGroup)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_GetID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Group_GetID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Group_GetID)
|
XS(XS_Group_GetID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Group::GetID(THIS)");
|
Perl_croak(aTHX_ "Usage: Group::GetID(THIS)");
|
||||||
@ -567,24 +531,23 @@ XS(XS_Group_GetID)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetID();
|
RETVAL = THIS->GetID();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Group_GetMember);
|
XS(XS_Group_GetMember);
|
||||||
XS(XS_Group_GetMember)
|
XS(XS_Group_GetMember) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Group::GetMember(THIS, index)");
|
Perl_croak(aTHX_ "Usage: Group::GetMember(THIS, int group_index)");
|
||||||
{
|
{
|
||||||
Group *THIS;
|
Group *THIS;
|
||||||
Mob *member;
|
Mob *member;
|
||||||
@ -594,8 +557,7 @@ XS(XS_Group_GetMember)
|
|||||||
if (sv_derived_from(ST(0), "Group")) {
|
if (sv_derived_from(ST(0), "Group")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Group *, tmp);
|
THIS = INT2PTR(Group *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -619,8 +581,7 @@ XS(XS_Group_GetMember)
|
|||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
XS(boot_Group); /* prototype to pass -Wmissing-prototypes */
|
XS(boot_Group); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(boot_Group)
|
XS(boot_Group) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
char file[256];
|
char file[256];
|
||||||
strncpy(file, __FILE__, 256);
|
strncpy(file, __FILE__, 256);
|
||||||
|
|||||||
@ -18,7 +18,9 @@
|
|||||||
|
|
||||||
#include "../common/features.h"
|
#include "../common/features.h"
|
||||||
#include "client.h"
|
#include "client.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"
|
||||||
|
|
||||||
@ -34,8 +36,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
XS(XS_HateEntry_GetEnt); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_HateEntry_GetEnt); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_HateEntry_GetEnt)
|
XS(XS_HateEntry_GetEnt) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: HateEntry::GetData(THIS)");
|
Perl_croak(aTHX_ "Usage: HateEntry::GetData(THIS)");
|
||||||
@ -46,8 +47,7 @@ XS(XS_HateEntry_GetEnt)
|
|||||||
if (sv_derived_from(ST(0), "HateEntry")) {
|
if (sv_derived_from(ST(0), "HateEntry")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(struct_HateList *, tmp);
|
THIS = INT2PTR(struct_HateList *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -60,8 +60,7 @@ XS(XS_HateEntry_GetEnt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_HateEntry_GetHate); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_HateEntry_GetHate); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_HateEntry_GetHate)
|
XS(XS_HateEntry_GetHate) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: HateEntry::GetHate(THIS)");
|
Perl_croak(aTHX_ "Usage: HateEntry::GetHate(THIS)");
|
||||||
@ -73,21 +72,20 @@ XS(XS_HateEntry_GetHate)
|
|||||||
if (sv_derived_from(ST(0), "HateEntry")) {
|
if (sv_derived_from(ST(0), "HateEntry")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(struct_HateList *, tmp);
|
THIS = INT2PTR(struct_HateList *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->stored_hate_amount;
|
RETVAL = THIS->stored_hate_amount;
|
||||||
XSprePUSH; PUSHi((IV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHi((IV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_HateEntry_GetDamage); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_HateEntry_GetDamage); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_HateEntry_GetDamage)
|
XS(XS_HateEntry_GetDamage) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: HateEntry::GetDamage(THIS)");
|
Perl_croak(aTHX_ "Usage: HateEntry::GetDamage(THIS)");
|
||||||
@ -99,14 +97,14 @@ XS(XS_HateEntry_GetDamage)
|
|||||||
if (sv_derived_from(ST(0), "HateEntry")) {
|
if (sv_derived_from(ST(0), "HateEntry")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(struct_HateList *, tmp);
|
THIS = INT2PTR(struct_HateList *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->hatelist_damage;
|
RETVAL = THIS->hatelist_damage;
|
||||||
XSprePUSH; PUSHi((IV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHi((IV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
@ -116,8 +114,7 @@ extern "C"
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
XS(boot_HateEntry);
|
XS(boot_HateEntry);
|
||||||
XS(boot_HateEntry)
|
XS(boot_HateEntry) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
char file[256];
|
char file[256];
|
||||||
strncpy(file, __FILE__, 256);
|
strncpy(file, __FILE__, 256);
|
||||||
|
|||||||
2709
zone/perl_mob.cpp
2709
zone/perl_mob.cpp
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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_Object_IsGroundSpawn); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_IsGroundSpawn); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_IsGroundSpawn)
|
XS(XS_Object_IsGroundSpawn) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::IsGroundSpawn(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::IsGroundSpawn(THIS)");
|
||||||
@ -53,8 +54,7 @@ XS(XS_Object_IsGroundSpawn)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -67,10 +67,8 @@ XS(XS_Object_IsGroundSpawn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
XS(XS_Object_Close); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_Close); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_Close)
|
XS(XS_Object_Close) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::Close(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::Close(THIS)");
|
||||||
@ -80,8 +78,7 @@ XS(XS_Object_Close)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -93,11 +90,10 @@ XS(XS_Object_Close)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_Delete); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_Delete); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_Delete)
|
XS(XS_Object_Delete) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items < 1 || items > 2)
|
if (items < 1 || items > 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::Delete(THIS, reset_state=false)");
|
Perl_croak(aTHX_ "Usage: Object::Delete(THIS, [bool reset_state = false])");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
bool reset_state;
|
bool reset_state;
|
||||||
@ -105,8 +101,7 @@ XS(XS_Object_Delete)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -122,8 +117,7 @@ XS(XS_Object_Delete)
|
|||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
XS(XS_Object_StartDecay); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_StartDecay); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_StartDecay)
|
XS(XS_Object_StartDecay) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::StartDecay(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::StartDecay(THIS)");
|
||||||
@ -133,8 +127,7 @@ XS(XS_Object_StartDecay)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -146,11 +139,10 @@ XS(XS_Object_StartDecay)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_DeleteItem); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_DeleteItem); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_DeleteItem)
|
XS(XS_Object_DeleteItem) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::DeleteItem(THIS, index)");
|
Perl_croak(aTHX_ "Usage: Object::DeleteItem(THIS, uint8 index)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
uint8 index = (uint8) SvUV(ST(1));
|
uint8 index = (uint8) SvUV(ST(1));
|
||||||
@ -158,8 +150,7 @@ XS(XS_Object_DeleteItem)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -170,8 +161,7 @@ XS(XS_Object_DeleteItem)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_IsObject); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_IsObject); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_IsObject)
|
XS(XS_Object_IsObject) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::IsObject(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::IsObject(THIS)");
|
||||||
@ -182,8 +172,7 @@ XS(XS_Object_IsObject)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -197,8 +186,7 @@ XS(XS_Object_IsObject)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_Save); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_Save); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_Save)
|
XS(XS_Object_Save) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::Save(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::Save(THIS)");
|
||||||
@ -209,8 +197,7 @@ XS(XS_Object_Save)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -224,11 +211,10 @@ XS(XS_Object_Save)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_SetID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetID)
|
XS(XS_Object_SetID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetID(THIS, set_id)");
|
Perl_croak(aTHX_ "Usage: Object::SetID(THIS, uint16 id)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
uint16 set_id = (uint16) SvUV(ST(1));
|
uint16 set_id = (uint16) SvUV(ST(1));
|
||||||
@ -236,8 +222,7 @@ XS(XS_Object_SetID)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -249,8 +234,7 @@ XS(XS_Object_SetID)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_ClearUser); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_ClearUser); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_ClearUser)
|
XS(XS_Object_ClearUser) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::ClearUser(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::ClearUser(THIS)");
|
||||||
@ -260,8 +244,7 @@ XS(XS_Object_ClearUser)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -273,8 +256,7 @@ XS(XS_Object_ClearUser)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_GetDBID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetDBID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetDBID)
|
XS(XS_Object_GetDBID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetDBID(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetDBID(THIS)");
|
||||||
@ -286,21 +268,20 @@ XS(XS_Object_GetDBID)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetDBID();
|
RETVAL = THIS->GetDBID();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetID)
|
XS(XS_Object_GetID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetID(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetID(THIS)");
|
||||||
@ -312,21 +293,20 @@ XS(XS_Object_GetID)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetID();
|
RETVAL = THIS->GetID();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetX); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetX); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetX)
|
XS(XS_Object_GetX) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetX(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetX(THIS)");
|
||||||
@ -338,21 +318,20 @@ XS(XS_Object_GetX)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetX();
|
RETVAL = THIS->GetX();
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHn((double) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetY); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetY); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetY)
|
XS(XS_Object_GetY) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetY(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetY(THIS)");
|
||||||
@ -364,21 +343,20 @@ XS(XS_Object_GetY)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetY();
|
RETVAL = THIS->GetY();
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHn((double) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetZ); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetZ); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetZ)
|
XS(XS_Object_GetZ) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetZ(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetZ(THIS)");
|
||||||
@ -390,21 +368,20 @@ XS(XS_Object_GetZ)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetZ();
|
RETVAL = THIS->GetZ();
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHn((double) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetHeading); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetHeading); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetHeading)
|
XS(XS_Object_GetHeading) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetHeading(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetHeading(THIS)");
|
||||||
@ -416,21 +393,20 @@ XS(XS_Object_GetHeading)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetHeadingData();
|
RETVAL = THIS->GetHeadingData();
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHn((double) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_VarSave); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_VarSave); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_VarSave)
|
XS(XS_Object_VarSave) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::VarSave(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::VarSave(THIS)");
|
||||||
@ -442,22 +418,21 @@ XS(XS_Object_VarSave)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->VarSave();
|
RETVAL = THIS->VarSave();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XS(XS_Object_GetType); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetType); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetType)
|
XS(XS_Object_GetType) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetType(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetType(THIS)");
|
||||||
@ -469,25 +444,24 @@ XS(XS_Object_GetType)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetType();
|
RETVAL = THIS->GetType();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XS(XS_Object_SetType); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetType); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetType)
|
XS(XS_Object_SetType) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetType(THIS, type)");
|
Perl_croak(aTHX_ "Usage: Object::SetType(THIS, uint32 type)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
uint32 type = (uint32) SvUV(ST(1));
|
uint32 type = (uint32) SvUV(ST(1));
|
||||||
@ -495,8 +469,7 @@ XS(XS_Object_SetType)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -508,8 +481,7 @@ XS(XS_Object_SetType)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_GetIcon); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetIcon); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetIcon)
|
XS(XS_Object_GetIcon) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetIcon(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetIcon(THIS)");
|
||||||
@ -521,25 +493,24 @@ XS(XS_Object_GetIcon)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetIcon();
|
RETVAL = THIS->GetIcon();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XS(XS_Object_SetIcon); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetIcon); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetIcon)
|
XS(XS_Object_SetIcon) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetIcon(THIS, icon)");
|
Perl_croak(aTHX_ "Usage: Object::SetIcon(THIS, uint32 icon)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
uint32 icon = (uint32) SvUV(ST(1));
|
uint32 icon = (uint32) SvUV(ST(1));
|
||||||
@ -547,8 +518,7 @@ XS(XS_Object_SetIcon)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -560,8 +530,7 @@ XS(XS_Object_SetIcon)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_GetItemID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetItemID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetItemID)
|
XS(XS_Object_GetItemID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetItemID(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetItemID(THIS)");
|
||||||
@ -573,25 +542,24 @@ XS(XS_Object_GetItemID)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetItemID();
|
RETVAL = THIS->GetItemID();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XS(XS_Object_SetItemID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetItemID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetItemID)
|
XS(XS_Object_SetItemID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetItemID(THIS, itemid)");
|
Perl_croak(aTHX_ "Usage: Object::SetItemID(THIS, uint32 item_id)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
uint32 itemid = (uint32) SvUV(ST(1));
|
uint32 itemid = (uint32) SvUV(ST(1));
|
||||||
@ -599,8 +567,7 @@ XS(XS_Object_SetItemID)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -611,11 +578,10 @@ XS(XS_Object_SetItemID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetLocation); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetLocation); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetLocation)
|
XS(XS_Object_SetLocation) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 4)
|
if (items != 4)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetLocation(THIS, x, y, z)");
|
Perl_croak(aTHX_ "Usage: Object::SetLocation(THIS, float x, float y, float z)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
float x = (float) SvNV(ST(1));
|
float x = (float) SvNV(ST(1));
|
||||||
@ -625,8 +591,7 @@ XS(XS_Object_SetLocation)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -637,11 +602,10 @@ XS(XS_Object_SetLocation)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetX); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetX); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetX)
|
XS(XS_Object_SetX) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetX(THIS, XPos)");
|
Perl_croak(aTHX_ "Usage: Object::SetX(THIS, float x)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
float pos = (float) SvNV(ST(1));
|
float pos = (float) SvNV(ST(1));
|
||||||
@ -649,8 +613,7 @@ XS(XS_Object_SetX)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -661,11 +624,10 @@ XS(XS_Object_SetX)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetY); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetY); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetY)
|
XS(XS_Object_SetY) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetY(THIS, YPos)");
|
Perl_croak(aTHX_ "Usage: Object::SetY(THIS, float y)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
float pos = (float) SvNV(ST(1));
|
float pos = (float) SvNV(ST(1));
|
||||||
@ -673,8 +635,7 @@ XS(XS_Object_SetY)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -685,11 +646,10 @@ XS(XS_Object_SetY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetZ); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetZ); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetZ)
|
XS(XS_Object_SetZ) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetZ(THIS, ZPos)");
|
Perl_croak(aTHX_ "Usage: Object::SetZ(THIS, float z)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
float pos = (float) SvNV(ST(1));
|
float pos = (float) SvNV(ST(1));
|
||||||
@ -697,8 +657,7 @@ XS(XS_Object_SetZ)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -709,11 +668,10 @@ XS(XS_Object_SetZ)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetHeading); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetHeading); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetHeading)
|
XS(XS_Object_SetHeading) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetHeading(THIS, heading)");
|
Perl_croak(aTHX_ "Usage: Object::SetHeading(THIS, float heading)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
float heading = (float) SvNV(ST(1));
|
float heading = (float) SvNV(ST(1));
|
||||||
@ -721,8 +679,7 @@ XS(XS_Object_SetHeading)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -733,11 +690,10 @@ XS(XS_Object_SetHeading)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetModelName); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetModelName); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetModelName)
|
XS(XS_Object_SetModelName) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items < 1 || items > 2)
|
if (items < 1 || items > 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetModelName(THIS, name)");
|
Perl_croak(aTHX_ "Usage: Object::SetModelName(THIS, string name)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
char *name = nullptr;
|
char *name = nullptr;
|
||||||
@ -745,8 +701,7 @@ XS(XS_Object_SetModelName)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -758,8 +713,7 @@ XS(XS_Object_SetModelName)
|
|||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
XS(XS_Object_GetModelName); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetModelName); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetModelName)
|
XS(XS_Object_GetModelName) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetModelName(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetModelName(THIS)");
|
||||||
@ -771,21 +725,21 @@ XS(XS_Object_GetModelName)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetModelName();
|
RETVAL = THIS->GetModelName();
|
||||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
sv_setpv(TARG, RETVAL);
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHTARG;
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_Repop); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_Repop); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_Repop)
|
XS(XS_Object_Repop) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::Repop(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::Repop(THIS)");
|
||||||
@ -796,8 +750,7 @@ XS(XS_Object_Repop)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -807,8 +760,7 @@ XS(XS_Object_Repop)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_Depop); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_Depop); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_Depop)
|
XS(XS_Object_Depop) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::Depop(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::Depop(THIS)");
|
||||||
@ -819,8 +771,7 @@ XS(XS_Object_Depop)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -831,11 +782,10 @@ XS(XS_Object_Depop)
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Object_GetEntityVariable); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetEntityVariable); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetEntityVariable)
|
XS(XS_Object_GetEntityVariable) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetEntityVariable(THIS, id)");
|
Perl_croak(aTHX_ "Usage: Object::GetEntityVariable(THIS, string key)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
Const_char *id = SvPV_nolen(ST(1));
|
Const_char *id = SvPV_nolen(ST(1));
|
||||||
@ -845,24 +795,24 @@ XS(XS_Object_GetEntityVariable)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetEntityVariable(id);
|
RETVAL = THIS->GetEntityVariable(id);
|
||||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
sv_setpv(TARG, RETVAL);
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHTARG;
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_EntityVariableExists); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_EntityVariableExists); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_EntityVariableExists)
|
XS(XS_Object_EntityVariableExists) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::EntityVariableExists(THIS, id)");
|
Perl_croak(aTHX_ "Usage: Object::EntityVariableExists(THIS, string key)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
Const_char *id = SvPV_nolen(ST(1));
|
Const_char *id = SvPV_nolen(ST(1));
|
||||||
@ -871,8 +821,7 @@ XS(XS_Object_EntityVariableExists)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -885,11 +834,10 @@ XS(XS_Object_EntityVariableExists)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetEntityVariable); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetEntityVariable); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetEntityVariable)
|
XS(XS_Object_SetEntityVariable) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 3)
|
if (items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetEntityVariable(THIS, id, var)");
|
Perl_croak(aTHX_ "Usage: Object::SetEntityVariable(THIS, string key, string var)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
Const_char *id = SvPV_nolen(ST(1));
|
Const_char *id = SvPV_nolen(ST(1));
|
||||||
@ -898,8 +846,7 @@ XS(XS_Object_SetEntityVariable)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -910,8 +857,7 @@ XS(XS_Object_SetEntityVariable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetSolidType); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetSolidType); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetSolidType)
|
XS(XS_Object_GetSolidType) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetSolidType(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetSolidType(THIS)");
|
||||||
@ -923,25 +869,24 @@ XS(XS_Object_GetSolidType)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetSolidType();
|
RETVAL = THIS->GetSolidType();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XS(XS_Object_SetSolidType); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetSolidType); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetSolidType)
|
XS(XS_Object_SetSolidType) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetSolidType(THIS, type)");
|
Perl_croak(aTHX_ "Usage: Object::SetSolidType(THIS, uint16 type)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
uint16 type = (uint16) SvUV(ST(1));
|
uint16 type = (uint16) SvUV(ST(1));
|
||||||
@ -949,8 +894,7 @@ XS(XS_Object_SetSolidType)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -961,8 +905,7 @@ XS(XS_Object_SetSolidType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetSize); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetSize); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetSize)
|
XS(XS_Object_GetSize) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)");
|
||||||
@ -974,25 +917,24 @@ XS(XS_Object_GetSize)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
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; PUSHn((double)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHn((double) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XS(XS_Object_SetSize); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetSize); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetSize)
|
XS(XS_Object_SetSize) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetSize(THIS, type)");
|
Perl_croak(aTHX_ "Usage: Object::SetSize(THIS, float size)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
float size = (float) SvNV(ST(1));
|
float size = (float) SvNV(ST(1));
|
||||||
@ -1000,8 +942,7 @@ XS(XS_Object_SetSize)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -1012,11 +953,10 @@ XS(XS_Object_SetSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetTiltX); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetTiltX); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetTiltX)
|
XS(XS_Object_SetTiltX) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetTiltX(THIS, pos)");
|
Perl_croak(aTHX_ "Usage: Object::SetTiltX(THIS, float tilt_x)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
float pos = (float) SvNV(ST(1));
|
float pos = (float) SvNV(ST(1));
|
||||||
@ -1024,8 +964,7 @@ XS(XS_Object_SetTiltX)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -1036,11 +975,10 @@ XS(XS_Object_SetTiltX)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_SetTiltY); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_SetTiltY); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_SetTiltY)
|
XS(XS_Object_SetTiltY) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Object::SetTiltY(THIS, pos)");
|
Perl_croak(aTHX_ "Usage: Object::SetTiltY(THIS, float tilt_y)");
|
||||||
{
|
{
|
||||||
Object *THIS;
|
Object *THIS;
|
||||||
float pos = (float) SvNV(ST(1));
|
float pos = (float) SvNV(ST(1));
|
||||||
@ -1048,8 +986,7 @@ XS(XS_Object_SetTiltY)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -1060,8 +997,7 @@ XS(XS_Object_SetTiltY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetTiltX); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetTiltX); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetTiltX)
|
XS(XS_Object_GetTiltX) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)");
|
||||||
@ -1073,21 +1009,20 @@ XS(XS_Object_GetTiltX)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetTiltX();
|
RETVAL = THIS->GetTiltX();
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHn((double) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Object_GetTiltY); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Object_GetTiltY); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Object_GetTiltY)
|
XS(XS_Object_GetTiltY) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)");
|
Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)");
|
||||||
@ -1099,14 +1034,14 @@ XS(XS_Object_GetTiltY)
|
|||||||
if (sv_derived_from(ST(0), "Object")) {
|
if (sv_derived_from(ST(0), "Object")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Object *, tmp);
|
THIS = INT2PTR(Object *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetTiltY();
|
RETVAL = THIS->GetTiltY();
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHn((double) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
@ -1115,8 +1050,7 @@ XS(XS_Object_GetTiltY)
|
|||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
XS(boot_Object); /* prototype to pass -Wmissing-prototypes */
|
XS(boot_Object); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(boot_Object)
|
XS(boot_Object) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
char file[256];
|
char file[256];
|
||||||
strncpy(file, __FILE__, 256);
|
strncpy(file, __FILE__, 256);
|
||||||
|
|||||||
@ -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"
|
||||||
|
|
||||||
@ -42,8 +44,7 @@
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Corpse_GetCharID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetCharID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetCharID)
|
XS(XS_Corpse_GetCharID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetCharID(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetCharID(THIS)");
|
||||||
@ -55,21 +56,20 @@ XS(XS_Corpse_GetCharID)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetCharID();
|
RETVAL = THIS->GetCharID();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_GetDecayTime); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetDecayTime); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetDecayTime)
|
XS(XS_Corpse_GetDecayTime) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetDecayTime(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetDecayTime(THIS)");
|
||||||
@ -81,21 +81,20 @@ XS(XS_Corpse_GetDecayTime)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetDecayTime();
|
RETVAL = THIS->GetDecayTime();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_Lock); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_Lock); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_Lock)
|
XS(XS_Corpse_Lock) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::Lock(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::Lock(THIS)");
|
||||||
@ -105,8 +104,7 @@ XS(XS_Corpse_Lock)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -117,8 +115,7 @@ XS(XS_Corpse_Lock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_UnLock); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_UnLock); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_UnLock)
|
XS(XS_Corpse_UnLock) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::UnLock(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::UnLock(THIS)");
|
||||||
@ -128,8 +125,7 @@ XS(XS_Corpse_UnLock)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -140,8 +136,7 @@ XS(XS_Corpse_UnLock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_IsLocked); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_IsLocked); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_IsLocked)
|
XS(XS_Corpse_IsLocked) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::IsLocked(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::IsLocked(THIS)");
|
||||||
@ -152,8 +147,7 @@ XS(XS_Corpse_IsLocked)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -166,8 +160,7 @@ XS(XS_Corpse_IsLocked)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_ResetLooter); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_ResetLooter); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_ResetLooter)
|
XS(XS_Corpse_ResetLooter) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::ResetLooter(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::ResetLooter(THIS)");
|
||||||
@ -177,8 +170,7 @@ XS(XS_Corpse_ResetLooter)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -189,8 +181,7 @@ XS(XS_Corpse_ResetLooter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_GetDBID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetDBID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetDBID)
|
XS(XS_Corpse_GetDBID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetDBID(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetDBID(THIS)");
|
||||||
@ -202,21 +193,20 @@ XS(XS_Corpse_GetDBID)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetCorpseDBID();
|
RETVAL = THIS->GetCorpseDBID();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_GetOwnerName); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetOwnerName); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetOwnerName)
|
XS(XS_Corpse_GetOwnerName) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetOwnerName(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetOwnerName(THIS)");
|
||||||
@ -228,24 +218,24 @@ XS(XS_Corpse_GetOwnerName)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetOwnerName();
|
RETVAL = THIS->GetOwnerName();
|
||||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
sv_setpv(TARG, RETVAL);
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHTARG;
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_SetDecayTimer); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_SetDecayTimer); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_SetDecayTimer)
|
XS(XS_Corpse_SetDecayTimer) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::SetDecayTimer(THIS, decaytime)");
|
Perl_croak(aTHX_ "Usage: Corpse::SetDecayTimer(THIS, uint32 decay_time)");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
uint32 decaytime = (uint32) SvUV(ST(1));
|
uint32 decaytime = (uint32) SvUV(ST(1));
|
||||||
@ -253,8 +243,7 @@ XS(XS_Corpse_SetDecayTimer)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -265,8 +254,7 @@ XS(XS_Corpse_SetDecayTimer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_IsEmpty); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_IsEmpty); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_IsEmpty)
|
XS(XS_Corpse_IsEmpty) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::IsEmpty(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::IsEmpty(THIS)");
|
||||||
@ -277,8 +265,7 @@ XS(XS_Corpse_IsEmpty)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -291,11 +278,10 @@ XS(XS_Corpse_IsEmpty)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_AddItem); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_AddItem); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_AddItem)
|
XS(XS_Corpse_AddItem) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items < 3 || items > 4)
|
if (items < 3 || items > 4)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::AddItem(THIS, itemnum, charges, slot= 0)");
|
Perl_croak(aTHX_ "Usage: Corpse::AddItem(THIS, uint32 item_id, uint16 charges, [unt16 slot = 0])");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
uint32 itemnum = (uint32) SvUV(ST(1));
|
uint32 itemnum = (uint32) SvUV(ST(1));
|
||||||
@ -305,8 +291,7 @@ XS(XS_Corpse_AddItem)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -323,8 +308,7 @@ XS(XS_Corpse_AddItem)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_GetWornItem); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetWornItem); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetWornItem)
|
XS(XS_Corpse_GetWornItem) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetWornItem(THIS, equipSlot)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetWornItem(THIS, equipSlot)");
|
||||||
@ -337,24 +321,23 @@ XS(XS_Corpse_GetWornItem)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetWornItem(equipSlot);
|
RETVAL = THIS->GetWornItem(equipSlot);
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_RemoveItem); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_RemoveItem); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_RemoveItem)
|
XS(XS_Corpse_RemoveItem) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::RemoveItem(THIS, lootslot)");
|
Perl_croak(aTHX_ "Usage: Corpse::RemoveItem(THIS, uint16 loot_slot)");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
uint16 lootslot = (uint16) SvUV(ST(1));
|
uint16 lootslot = (uint16) SvUV(ST(1));
|
||||||
@ -362,8 +345,7 @@ XS(XS_Corpse_RemoveItem)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -374,11 +356,10 @@ XS(XS_Corpse_RemoveItem)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_SetCash); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_SetCash); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_SetCash)
|
XS(XS_Corpse_SetCash) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 5)
|
if (items != 5)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::SetCash(THIS, in_copper, in_silver, in_gold, in_platinum)");
|
Perl_croak(aTHX_ "Usage: Corpse::SetCash(THIS, uint16 copper, uint16 silver, uint16 gold, uint16 platinum)");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
uint16 in_copper = (uint16) SvUV(ST(1));
|
uint16 in_copper = (uint16) SvUV(ST(1));
|
||||||
@ -389,8 +370,7 @@ XS(XS_Corpse_SetCash)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -401,8 +381,7 @@ XS(XS_Corpse_SetCash)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_RemoveCash); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_RemoveCash); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_RemoveCash)
|
XS(XS_Corpse_RemoveCash) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::RemoveCash(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::RemoveCash(THIS)");
|
||||||
@ -412,8 +391,7 @@ XS(XS_Corpse_RemoveCash)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -424,8 +402,7 @@ XS(XS_Corpse_RemoveCash)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_CountItems); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_CountItems); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_CountItems)
|
XS(XS_Corpse_CountItems) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::CountItems(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::CountItems(THIS)");
|
||||||
@ -437,21 +414,20 @@ XS(XS_Corpse_CountItems)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->CountItems();
|
RETVAL = THIS->CountItems();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_Delete); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_Delete); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_Delete)
|
XS(XS_Corpse_Delete) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::Delete(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::Delete(THIS)");
|
||||||
@ -461,8 +437,7 @@ XS(XS_Corpse_Delete)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -473,8 +448,7 @@ XS(XS_Corpse_Delete)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_GetCopper); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetCopper); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetCopper)
|
XS(XS_Corpse_GetCopper) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetCopper(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetCopper(THIS)");
|
||||||
@ -486,21 +460,20 @@ XS(XS_Corpse_GetCopper)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetCopper();
|
RETVAL = THIS->GetCopper();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_GetSilver); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetSilver); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetSilver)
|
XS(XS_Corpse_GetSilver) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetSilver(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetSilver(THIS)");
|
||||||
@ -512,21 +485,20 @@ XS(XS_Corpse_GetSilver)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetSilver();
|
RETVAL = THIS->GetSilver();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_GetGold); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetGold); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetGold)
|
XS(XS_Corpse_GetGold) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetGold(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetGold(THIS)");
|
||||||
@ -538,21 +510,20 @@ XS(XS_Corpse_GetGold)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetGold();
|
RETVAL = THIS->GetGold();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_GetPlatinum); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_GetPlatinum); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_GetPlatinum)
|
XS(XS_Corpse_GetPlatinum) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::GetPlatinum(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::GetPlatinum(THIS)");
|
||||||
@ -564,24 +535,23 @@ XS(XS_Corpse_GetPlatinum)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetPlatinum();
|
RETVAL = THIS->GetPlatinum();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_Summon); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_Summon); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_Summon)
|
XS(XS_Corpse_Summon) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 3)
|
if (items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::Summon(THIS, client, spell)");
|
Perl_croak(aTHX_ "Usage: Corpse::Summon(THIS, Client* client, bool is_spell)");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
Client *client;
|
Client *client;
|
||||||
@ -590,8 +560,7 @@ XS(XS_Corpse_Summon)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -599,8 +568,7 @@ XS(XS_Corpse_Summon)
|
|||||||
if (sv_derived_from(ST(1), "Client")) {
|
if (sv_derived_from(ST(1), "Client")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
client = INT2PTR(Client *, tmp);
|
client = INT2PTR(Client *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "client is not of type Client");
|
Perl_croak(aTHX_ "client is not of type Client");
|
||||||
if (client == nullptr)
|
if (client == nullptr)
|
||||||
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
||||||
@ -611,11 +579,10 @@ XS(XS_Corpse_Summon)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_CastRezz); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_CastRezz); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_CastRezz)
|
XS(XS_Corpse_CastRezz) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 3)
|
if (items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::CastRezz(THIS, spellid, Caster)");
|
Perl_croak(aTHX_ "Usage: Corpse::CastRezz(THIS, uint16 spell_id, [Mob* caster = nullptr])");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
uint16 spellid = (uint16) SvUV(ST(1));
|
uint16 spellid = (uint16) SvUV(ST(1));
|
||||||
@ -624,8 +591,7 @@ XS(XS_Corpse_CastRezz)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -633,8 +599,7 @@ XS(XS_Corpse_CastRezz)
|
|||||||
if (sv_derived_from(ST(2), "Mob")) {
|
if (sv_derived_from(ST(2), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(2)));
|
IV tmp = SvIV((SV *) SvRV(ST(2)));
|
||||||
Caster = INT2PTR(Mob *, tmp);
|
Caster = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "Caster is not of type Mob");
|
Perl_croak(aTHX_ "Caster is not of type Mob");
|
||||||
if (Caster == nullptr)
|
if (Caster == nullptr)
|
||||||
Perl_croak(aTHX_ "Caster is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "Caster is nullptr, avoiding crash.");
|
||||||
@ -645,8 +610,7 @@ XS(XS_Corpse_CastRezz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_CompleteRezz); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_CompleteRezz); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_CompleteRezz)
|
XS(XS_Corpse_CompleteRezz) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::CompleteRezz(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::CompleteRezz(THIS)");
|
||||||
@ -656,8 +620,7 @@ XS(XS_Corpse_CompleteRezz)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -668,11 +631,10 @@ XS(XS_Corpse_CompleteRezz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_CanMobLoot); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_CanMobLoot); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_CanMobLoot)
|
XS(XS_Corpse_CanMobLoot) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::CanMobLoot(THIS, charid)");
|
Perl_croak(aTHX_ "Usage: Corpse::CanMobLoot(THIS, int character_id)");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
bool RETVAL;
|
bool RETVAL;
|
||||||
@ -681,8 +643,7 @@ XS(XS_Corpse_CanMobLoot)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -695,11 +656,10 @@ XS(XS_Corpse_CanMobLoot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_AllowMobLoot); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_AllowMobLoot); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_AllowMobLoot)
|
XS(XS_Corpse_AllowMobLoot) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 3)
|
if (items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::AllowMobLoot(THIS, them, slot)");
|
Perl_croak(aTHX_ "Usage: Corpse::AllowMobLoot(THIS, Mob* them, uint8 slot)");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
Mob *them;
|
Mob *them;
|
||||||
@ -708,8 +668,7 @@ XS(XS_Corpse_AllowMobLoot)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -717,8 +676,7 @@ XS(XS_Corpse_AllowMobLoot)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
them = INT2PTR(Mob *, tmp);
|
them = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "them is not of type Mob");
|
Perl_croak(aTHX_ "them is not of type Mob");
|
||||||
if (them == nullptr)
|
if (them == nullptr)
|
||||||
Perl_croak(aTHX_ "them is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "them is nullptr, avoiding crash.");
|
||||||
@ -729,11 +687,10 @@ XS(XS_Corpse_AllowMobLoot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_AddLooter); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_AddLooter); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_AddLooter)
|
XS(XS_Corpse_AddLooter) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::AddLooter(THIS, who)");
|
Perl_croak(aTHX_ "Usage: Corpse::AddLooter(THIS, Mob* who)");
|
||||||
{
|
{
|
||||||
Corpse *THIS;
|
Corpse *THIS;
|
||||||
Mob *who;
|
Mob *who;
|
||||||
@ -741,8 +698,7 @@ XS(XS_Corpse_AddLooter)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -750,8 +706,7 @@ XS(XS_Corpse_AddLooter)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
who = INT2PTR(Mob *, tmp);
|
who = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "who is not of type Mob");
|
Perl_croak(aTHX_ "who is not of type Mob");
|
||||||
if (who == nullptr)
|
if (who == nullptr)
|
||||||
Perl_croak(aTHX_ "who is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "who is nullptr, avoiding crash.");
|
||||||
@ -762,8 +717,7 @@ XS(XS_Corpse_AddLooter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Corpse_IsRezzed); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Corpse_IsRezzed); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Corpse_IsRezzed)
|
XS(XS_Corpse_IsRezzed) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Corpse::IsRezzed(THIS)");
|
Perl_croak(aTHX_ "Usage: Corpse::IsRezzed(THIS)");
|
||||||
@ -774,8 +728,7 @@ XS(XS_Corpse_IsRezzed)
|
|||||||
if (sv_derived_from(ST(0), "Corpse")) {
|
if (sv_derived_from(ST(0), "Corpse")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Corpse *, tmp);
|
THIS = INT2PTR(Corpse *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -791,8 +744,7 @@ XS(XS_Corpse_IsRezzed)
|
|||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
XS(boot_Corpse); /* prototype to pass -Wmissing-prototypes */
|
XS(boot_Corpse); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(boot_Corpse)
|
XS(boot_Corpse) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
char file[256];
|
char file[256];
|
||||||
strncpy(file, __FILE__, 256);
|
strncpy(file, __FILE__, 256);
|
||||||
|
|||||||
@ -18,7 +18,9 @@
|
|||||||
|
|
||||||
#include "../common/features.h"
|
#include "../common/features.h"
|
||||||
#include "client.h"
|
#include "client.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"
|
||||||
|
|
||||||
@ -45,24 +47,24 @@ XS(XS_QuestItem_GetName) {
|
|||||||
if (sv_derived_from(ST(0), "QuestItem")) {
|
if (sv_derived_from(ST(0), "QuestItem")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetItem()->Name;
|
RETVAL = THIS->GetItem()->Name;
|
||||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
sv_setpv(TARG, RETVAL);
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHTARG;
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_QuestItem_SetScale);
|
XS(XS_QuestItem_SetScale);
|
||||||
XS(XS_QuestItem_SetScale)
|
XS(XS_QuestItem_SetScale) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: QuestItem::SetScale(THIS, scale factor)");
|
Perl_croak(aTHX_ "Usage: QuestItem::SetScale(THIS, float scale_multiplier)");
|
||||||
{
|
{
|
||||||
EQEmu::ItemInstance *THIS;
|
EQEmu::ItemInstance *THIS;
|
||||||
float Mult;
|
float Mult;
|
||||||
@ -70,8 +72,7 @@ XS(XS_QuestItem_SetScale)
|
|||||||
if (sv_derived_from(ST(0), "QuestItem")) {
|
if (sv_derived_from(ST(0), "QuestItem")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -86,11 +87,10 @@ XS(XS_QuestItem_SetScale)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_QuestItem_ItemSay);
|
XS(XS_QuestItem_ItemSay);
|
||||||
XS(XS_QuestItem_ItemSay)
|
XS(XS_QuestItem_ItemSay) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2 && items != 3)
|
if (items != 2 && items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: QuestItem::ItemSay(THIS, text [, language])");
|
Perl_croak(aTHX_ "Usage: QuestItem::ItemSay(THIS, string text [int language_id])");
|
||||||
{
|
{
|
||||||
EQEmu::ItemInstance *THIS;
|
EQEmu::ItemInstance *THIS;
|
||||||
Const_char *text;
|
Const_char *text;
|
||||||
@ -99,8 +99,7 @@ XS(XS_QuestItem_ItemSay)
|
|||||||
if (sv_derived_from(ST(0), "QuestItem")) {
|
if (sv_derived_from(ST(0), "QuestItem")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -115,8 +114,7 @@ XS(XS_QuestItem_ItemSay)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_QuestItem_IsType); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_QuestItem_IsType); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_QuestItem_IsType)
|
XS(XS_QuestItem_IsType) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: QuestItem::IsType(THIS, type)");
|
Perl_croak(aTHX_ "Usage: QuestItem::IsType(THIS, type)");
|
||||||
@ -128,8 +126,7 @@ XS(XS_QuestItem_IsType)
|
|||||||
if (sv_derived_from(ST(0), "QuestItem")) {
|
if (sv_derived_from(ST(0), "QuestItem")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -142,8 +139,7 @@ XS(XS_QuestItem_IsType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_QuestItem_IsAttuned); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_QuestItem_IsAttuned); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_QuestItem_IsAttuned)
|
XS(XS_QuestItem_IsAttuned) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: QuestItem::IsAttuned(THIS)");
|
Perl_croak(aTHX_ "Usage: QuestItem::IsAttuned(THIS)");
|
||||||
@ -154,8 +150,7 @@ XS(XS_QuestItem_IsAttuned)
|
|||||||
if (sv_derived_from(ST(0), "QuestItem")) {
|
if (sv_derived_from(ST(0), "QuestItem")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -168,8 +163,7 @@ XS(XS_QuestItem_IsAttuned)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_QuestItem_GetCharges); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_QuestItem_GetCharges); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_QuestItem_GetCharges)
|
XS(XS_QuestItem_GetCharges) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: QuestItem::GetCharges(THIS)");
|
Perl_croak(aTHX_ "Usage: QuestItem::GetCharges(THIS)");
|
||||||
@ -181,24 +175,23 @@ XS(XS_QuestItem_GetCharges)
|
|||||||
if (sv_derived_from(ST(0), "QuestItem")) {
|
if (sv_derived_from(ST(0), "QuestItem")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetCharges();
|
RETVAL = THIS->GetCharges();
|
||||||
XSprePUSH; PUSHi((IV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHi((IV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_QuestItem_GetAugment); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_QuestItem_GetAugment); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_QuestItem_GetAugment)
|
XS(XS_QuestItem_GetAugment) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: QuestItem::GetAugment(THIS, augment_id)");
|
Perl_croak(aTHX_ "Usage: QuestItem::GetAugment(THIS, int16 slot_id)");
|
||||||
{
|
{
|
||||||
EQEmu::ItemInstance *THIS;
|
EQEmu::ItemInstance *THIS;
|
||||||
int16 slot_id = (int16) SvIV(ST(1));
|
int16 slot_id = (int16) SvIV(ST(1));
|
||||||
@ -207,8 +200,7 @@ XS(XS_QuestItem_GetAugment)
|
|||||||
if (sv_derived_from(ST(0), "QuestItem")) {
|
if (sv_derived_from(ST(0), "QuestItem")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -221,8 +213,7 @@ XS(XS_QuestItem_GetAugment)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_QuestItem_GetID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_QuestItem_GetID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_QuestItem_GetID)
|
XS(XS_QuestItem_GetID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: QuestItem::GetID(THIS)");
|
Perl_croak(aTHX_ "Usage: QuestItem::GetID(THIS)");
|
||||||
@ -234,14 +225,14 @@ XS(XS_QuestItem_GetID)
|
|||||||
if (sv_derived_from(ST(0), "QuestItem")) {
|
if (sv_derived_from(ST(0), "QuestItem")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
THIS = INT2PTR(EQEmu::ItemInstance *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetItem()->ID;
|
RETVAL = THIS->GetItem()->ID;
|
||||||
XSprePUSH; PUSHi((IV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHi((IV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
@ -251,8 +242,7 @@ extern "C"
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
XS(boot_QuestItem);
|
XS(boot_QuestItem);
|
||||||
XS(boot_QuestItem)
|
XS(boot_QuestItem) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
char file[256];
|
char file[256];
|
||||||
strncpy(file, __FILE__, 256);
|
strncpy(file, __FILE__, 256);
|
||||||
|
|||||||
@ -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"
|
||||||
|
|
||||||
@ -43,11 +45,10 @@
|
|||||||
|
|
||||||
|
|
||||||
XS(XS_Raid_IsRaidMember); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_IsRaidMember); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_IsRaidMember)
|
XS(XS_Raid_IsRaidMember) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::IsRaidMember(THIS, name)");
|
Perl_croak(aTHX_ "Usage: Raid::IsRaidMember(THIS, string name)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
bool RETVAL;
|
bool RETVAL;
|
||||||
@ -56,8 +57,7 @@ XS(XS_Raid_IsRaidMember)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -70,11 +70,10 @@ XS(XS_Raid_IsRaidMember)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_CastGroupSpell); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_CastGroupSpell); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_CastGroupSpell)
|
XS(XS_Raid_CastGroupSpell) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 4)
|
if (items != 4)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::CastGroupSpell(THIS, caster, spellid, gid)");
|
Perl_croak(aTHX_ "Usage: Raid::CastGroupSpell(THIS, Mob* caster, uint16 spell_id, uint32 group_id)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
Mob *caster;
|
Mob *caster;
|
||||||
@ -84,8 +83,7 @@ XS(XS_Raid_CastGroupSpell)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -93,8 +91,7 @@ XS(XS_Raid_CastGroupSpell)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
caster = INT2PTR(Mob *, tmp);
|
caster = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "caster is not of type Mob");
|
Perl_croak(aTHX_ "caster is not of type Mob");
|
||||||
if (caster == nullptr)
|
if (caster == nullptr)
|
||||||
Perl_croak(aTHX_ "caster is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "caster is nullptr, avoiding crash.");
|
||||||
@ -105,11 +102,10 @@ XS(XS_Raid_CastGroupSpell)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_GroupCount); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_GroupCount); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_GroupCount)
|
XS(XS_Raid_GroupCount) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::GroupCount(THIS, gid)");
|
Perl_croak(aTHX_ "Usage: Raid::GroupCount(THIS, uint32 group_id)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
uint8 RETVAL;
|
uint8 RETVAL;
|
||||||
@ -119,21 +115,20 @@ XS(XS_Raid_GroupCount)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GroupCount(gid);
|
RETVAL = THIS->GroupCount(gid);
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_RaidCount); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_RaidCount); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_RaidCount)
|
XS(XS_Raid_RaidCount) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::RaidCount(THIS)");
|
Perl_croak(aTHX_ "Usage: Raid::RaidCount(THIS)");
|
||||||
@ -145,24 +140,23 @@ XS(XS_Raid_RaidCount)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->RaidCount();
|
RETVAL = THIS->RaidCount();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_GetGroup); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_GetGroup); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_GetGroup)
|
XS(XS_Raid_GetGroup) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::GetGroup(THIS, name)");
|
Perl_croak(aTHX_ "Usage: Raid::GetGroup(THIS, string name)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
uint32 RETVAL;
|
uint32 RETVAL;
|
||||||
@ -172,24 +166,23 @@ XS(XS_Raid_GetGroup)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetGroup(name);
|
RETVAL = THIS->GetGroup(name);
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_SplitExp); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_SplitExp); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_SplitExp)
|
XS(XS_Raid_SplitExp) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 3)
|
if (items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::SplitExp(THIS, exp, other)");
|
Perl_croak(aTHX_ "Usage: Raid::SplitExp(THIS, uint32 experience, [Mob* other = nullptr])");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
uint32 exp = (uint32) SvUV(ST(1));
|
uint32 exp = (uint32) SvUV(ST(1));
|
||||||
@ -198,8 +191,7 @@ XS(XS_Raid_SplitExp)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -207,8 +199,7 @@ XS(XS_Raid_SplitExp)
|
|||||||
if (sv_derived_from(ST(2), "Mob")) {
|
if (sv_derived_from(ST(2), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(2)));
|
IV tmp = SvIV((SV *) SvRV(ST(2)));
|
||||||
other = INT2PTR(Mob *, tmp);
|
other = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "other is not of type Mob");
|
Perl_croak(aTHX_ "other is not of type Mob");
|
||||||
if (other == nullptr)
|
if (other == nullptr)
|
||||||
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
||||||
@ -219,11 +210,10 @@ XS(XS_Raid_SplitExp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_GetTotalRaidDamage); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_GetTotalRaidDamage); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_GetTotalRaidDamage)
|
XS(XS_Raid_GetTotalRaidDamage) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::GetTotalRaidDamage(THIS, other)");
|
Perl_croak(aTHX_ "Usage: Raid::GetTotalRaidDamage(THIS, [Mob* other = nullptr])");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
uint32 RETVAL;
|
uint32 RETVAL;
|
||||||
@ -233,8 +223,7 @@ XS(XS_Raid_GetTotalRaidDamage)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -242,24 +231,23 @@ XS(XS_Raid_GetTotalRaidDamage)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
other = INT2PTR(Mob *, tmp);
|
other = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "other is not of type Mob");
|
Perl_croak(aTHX_ "other is not of type Mob");
|
||||||
if (other == nullptr)
|
if (other == nullptr)
|
||||||
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetTotalRaidDamage(other);
|
RETVAL = THIS->GetTotalRaidDamage(other);
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_SplitMoney); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_SplitMoney); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_SplitMoney)
|
XS(XS_Raid_SplitMoney) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 5)
|
if (items != 5)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::SplitMoney(THIS, copper, silver, gold, platinum)");
|
Perl_croak(aTHX_ "Usage: Raid::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
uint32 copper = (uint32) SvUV(ST(1));
|
uint32 copper = (uint32) SvUV(ST(1));
|
||||||
@ -270,8 +258,7 @@ XS(XS_Raid_SplitMoney)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -282,11 +269,10 @@ XS(XS_Raid_SplitMoney)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_BalanceHP); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_BalanceHP); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_BalanceHP)
|
XS(XS_Raid_BalanceHP) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 3)
|
if (items != 3)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::BalanceHP(THIS, penalty, gid)");
|
Perl_croak(aTHX_ "Usage: Raid::BalanceHP(THIS, int32 penalty, uint32 group_id)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
int32 penalty = (int32) SvUV(ST(1));
|
int32 penalty = (int32) SvUV(ST(1));
|
||||||
@ -295,8 +281,7 @@ XS(XS_Raid_BalanceHP)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -307,11 +292,10 @@ XS(XS_Raid_BalanceHP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_IsLeader); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_IsLeader); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_IsLeader)
|
XS(XS_Raid_IsLeader) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::IsLeader(THIS, name)");
|
Perl_croak(aTHX_ "Usage: Raid::IsLeader(THIS, string name)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
bool RETVAL;
|
bool RETVAL;
|
||||||
@ -320,8 +304,7 @@ XS(XS_Raid_IsLeader)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -334,11 +317,10 @@ XS(XS_Raid_IsLeader)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_IsGroupLeader); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_IsGroupLeader); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_IsGroupLeader)
|
XS(XS_Raid_IsGroupLeader) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::IsGroupLeader(THIS, who)");
|
Perl_croak(aTHX_ "Usage: Raid::IsGroupLeader(THIS, string name)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
bool RETVAL;
|
bool RETVAL;
|
||||||
@ -347,8 +329,7 @@ XS(XS_Raid_IsGroupLeader)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -361,8 +342,7 @@ XS(XS_Raid_IsGroupLeader)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_GetHighestLevel); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_GetHighestLevel); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_GetHighestLevel)
|
XS(XS_Raid_GetHighestLevel) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::GetHighestLevel(THIS)");
|
Perl_croak(aTHX_ "Usage: Raid::GetHighestLevel(THIS)");
|
||||||
@ -374,21 +354,20 @@ XS(XS_Raid_GetHighestLevel)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetHighestLevel();
|
RETVAL = THIS->GetHighestLevel();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_GetLowestLevel); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_GetLowestLevel); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_GetLowestLevel)
|
XS(XS_Raid_GetLowestLevel) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::GetLowestLevel(THIS)");
|
Perl_croak(aTHX_ "Usage: Raid::GetLowestLevel(THIS)");
|
||||||
@ -400,24 +379,23 @@ XS(XS_Raid_GetLowestLevel)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetLowestLevel();
|
RETVAL = THIS->GetLowestLevel();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_GetClientByIndex); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_GetClientByIndex); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_GetClientByIndex)
|
XS(XS_Raid_GetClientByIndex) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, index)");
|
Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, uint16 raid_indez)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
Client *RETVAL;
|
Client *RETVAL;
|
||||||
@ -426,8 +404,7 @@ XS(XS_Raid_GetClientByIndex)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -440,11 +417,11 @@ XS(XS_Raid_GetClientByIndex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_TeleportGroup); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_TeleportGroup); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_TeleportGroup)
|
XS(XS_Raid_TeleportGroup) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 8)
|
if (items != 8)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::TeleportGroup(THIS, sender, zoneID, x, y, z, heading, gid)");
|
Perl_croak(aTHX_
|
||||||
|
"Usage: Raid::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading, uint32 group_id)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
Mob *sender;
|
Mob *sender;
|
||||||
@ -458,8 +435,7 @@ XS(XS_Raid_TeleportGroup)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -467,8 +443,7 @@ XS(XS_Raid_TeleportGroup)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
sender = INT2PTR(Mob *, tmp);
|
sender = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||||
if (sender == nullptr)
|
if (sender == nullptr)
|
||||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||||
@ -479,11 +454,11 @@ XS(XS_Raid_TeleportGroup)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_TeleportRaid); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_TeleportRaid); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_TeleportRaid)
|
XS(XS_Raid_TeleportRaid) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 7)
|
if (items != 7)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::TeleportRaid(THIS, sender, zoneID, x, y, z, heading)");
|
Perl_croak(aTHX_
|
||||||
|
"Usage: Raid::TeleportRaid(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
Mob *sender;
|
Mob *sender;
|
||||||
@ -496,8 +471,7 @@ XS(XS_Raid_TeleportRaid)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -505,8 +479,7 @@ XS(XS_Raid_TeleportRaid)
|
|||||||
if (sv_derived_from(ST(1), "Mob")) {
|
if (sv_derived_from(ST(1), "Mob")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||||
sender = INT2PTR(Mob *, tmp);
|
sender = INT2PTR(Mob *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||||
if (sender == nullptr)
|
if (sender == nullptr)
|
||||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||||
@ -517,8 +490,7 @@ XS(XS_Raid_TeleportRaid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_GetID); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Raid_GetID); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Raid_GetID)
|
XS(XS_Raid_GetID) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::GetID(THIS)");
|
Perl_croak(aTHX_ "Usage: Raid::GetID(THIS)");
|
||||||
@ -530,24 +502,23 @@ XS(XS_Raid_GetID)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetID();
|
RETVAL = THIS->GetID();
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH;
|
||||||
|
PUSHu((UV) RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
XS(XS_Raid_GetMember);
|
XS(XS_Raid_GetMember);
|
||||||
XS(XS_Raid_GetMember)
|
XS(XS_Raid_GetMember) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 2)
|
if (items != 2)
|
||||||
Perl_croak(aTHX_ "Usage: Raid::GetMember(THIS, index)");
|
Perl_croak(aTHX_ "Usage: Raid::GetMember(THIS, int raid_index)");
|
||||||
{
|
{
|
||||||
Raid *THIS;
|
Raid *THIS;
|
||||||
Client *RETVAL = nullptr;
|
Client *RETVAL = nullptr;
|
||||||
@ -556,8 +527,7 @@ XS(XS_Raid_GetMember)
|
|||||||
if (sv_derived_from(ST(0), "Raid")) {
|
if (sv_derived_from(ST(0), "Raid")) {
|
||||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||||
THIS = INT2PTR(Raid *, tmp);
|
THIS = INT2PTR(Raid *, tmp);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
@ -580,8 +550,7 @@ XS(XS_Raid_GetMember)
|
|||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
XS(boot_Raid); /* prototype to pass -Wmissing-prototypes */
|
XS(boot_Raid); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(boot_Raid)
|
XS(boot_Raid) {
|
||||||
{
|
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
char file[256];
|
char file[256];
|
||||||
strncpy(file, __FILE__, 256);
|
strncpy(file, __FILE__, 256);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user