engine: reject mbf21 and shit24 wads. there is no way to know if it is safe to ignore...
[k8vavoom.git] / source / psim / p_polyobj_vcapi.cpp
blob73106a70b370508041fe27aaadac0a438df91e25
1 //**************************************************************************
2 //**
3 //** ## ## ## ## ## #### #### ### ###
4 //** ## ## ## ## ## ## ## ## ## ## #### ####
5 //** ## ## ## ## ## ## ## ## ## ## ## ## ## ##
6 //** ## ## ######## ## ## ## ## ## ## ## ### ##
7 //** ### ## ## ### ## ## ## ## ## ##
8 //** # ## ## # #### #### ## ##
9 //**
10 //** Copyright (C) 1999-2006 Jānis Legzdiņš
11 //** Copyright (C) 2018-2023 Ketmar Dark
12 //**
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.
16 //**
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.
21 //**
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/>.
24 //**
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) {
36 mthing_t *thing;
37 float x, y, height;
38 int tag;
39 bool crush, hurt;
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) {
46 mthing_t *thing;
47 float x, y, height;
48 int tag;
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) {
55 mthing_t *thing;
56 int srcpid, destpid;
57 vobjGetParamSelf(thing, srcpid, destpid);
58 Self->Add3DPolyobjLink(thing, srcpid, destpid);
61 //native final polyobj_t *GetPolyobj (int polyNum);
62 IMPLEMENT_FUNCTION(VLevel, GetPolyobj) {
63 int tag;
64 vobjGetParamSelf(tag);
65 RET_PTR(Self->GetPolyobj(tag));
68 //native final int GetPolyobjMirror (int poly);
69 IMPLEMENT_FUNCTION(VLevel, GetPolyobjMirror) {
70 int tag;
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) {
77 int tag;
78 float x, y;
79 VOptParamFloat z(0);
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) {
87 int tag;
88 float angle;
89 VOptParamInt flags(0);
90 vobjGetParamSelf(tag, angle, flags);
91 RET_BOOL(Self->RotatePolyobj(tag, angle, flags));