1 //**************************************************************************
3 //** ## ## ## ## ## #### #### ### ###
4 //** ## ## ## ## ## ## ## ## ## ## #### ####
5 //** ## ## ## ## ## ## ## ## ## ## ## ## ## ##
6 //** ## ## ######## ## ## ## ## ## ## ## ### ##
7 //** ### ## ## ### ## ## ## ## ## ##
8 //** # ## ## # #### #### ## ##
10 //** Copyright (C) 1999-2006 Jānis Legzdiņš
11 //** Copyright (C) 2018-2023 Ketmar Dark
13 //** This program is free software: you can redistribute it and/or modify
14 //** it under the terms of the GNU General Public License as published by
15 //** the Free Software Foundation, version 3 of the License ONLY.
17 //** This program is distributed in the hope that it will be useful,
18 //** but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 //** GNU General Public License for more details.
22 //** You should have received a copy of the GNU General Public License
23 //** along with this program. If not, see <http://www.gnu.org/licenses/>.
25 //**************************************************************************
26 #include "../gamedefs.h"
29 //==========================================================================
31 // Script polyobject methods
33 //==========================================================================
34 //native final void SpawnPolyobj (mthing_t *thing, float x, float y, float height, int tag, bool crush, bool hurt);
35 IMPLEMENT_FUNCTION(VLevel
, SpawnPolyobj
) {
40 vobjGetParamSelf(thing
, x
, y
, height
, tag
, crush
, hurt
);
41 Self
->SpawnPolyobj(thing
, x
, y
, height
, tag
, crush
, hurt
);
44 //native final void AddPolyAnchorPoint (mthing_t *thing, float x, float y, float height, int tag);
45 IMPLEMENT_FUNCTION(VLevel
, AddPolyAnchorPoint
) {
49 vobjGetParamSelf(thing
, x
, y
, height
, tag
);
50 Self
->AddPolyAnchorPoint(thing
, x
, y
, height
, tag
);
53 //native final void Add3DPolyobjLink (mthing_t *thing, int srcpid, int destpid);
54 IMPLEMENT_FUNCTION(VLevel
, Add3DPolyobjLink
) {
57 vobjGetParamSelf(thing
, srcpid
, destpid
);
58 Self
->Add3DPolyobjLink(thing
, srcpid
, destpid
);
61 //native final polyobj_t *GetPolyobj (int polyNum);
62 IMPLEMENT_FUNCTION(VLevel
, GetPolyobj
) {
64 vobjGetParamSelf(tag
);
65 RET_PTR(Self
->GetPolyobj(tag
));
68 //native final int GetPolyobjMirror (int poly);
69 IMPLEMENT_FUNCTION(VLevel
, GetPolyobjMirror
) {
71 vobjGetParamSelf(tag
);
72 RET_INT(Self
->GetPolyobjMirror(tag
));
75 //native final bool MovePolyobj (int num, float x, float y, optional float z, optional int flags);
76 IMPLEMENT_FUNCTION(VLevel
, MovePolyobj
) {
80 VOptParamInt
flags(0);
81 vobjGetParamSelf(tag
, x
, y
, z
, flags
);
82 RET_BOOL(Self
->MovePolyobj(tag
, x
, y
, z
, flags
));
85 //native final bool RotatePolyobj (int num, float angle, optional int flags);
86 IMPLEMENT_FUNCTION(VLevel
, RotatePolyobj
) {
89 VOptParamInt
flags(0);
90 vobjGetParamSelf(tag
, angle
, flags
);
91 RET_BOOL(Self
->RotatePolyobj(tag
, angle
, flags
));