main.cpp/physics.h: add some (somewhat icky) compile fixes for OS X
[openc2e.git] / caosVM_ports.cpp
blob135eab56c3739d47051bb6c9b64d5736dc7035d1
1 /*
2 * caosVM_vehicles.cpp
3 * openc2e
5 * Created by Alyssa Milburn on 02/02/2005.
6 * Copyright 2005 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
20 #include "caosVM.h"
21 #include <iostream>
22 #include "openc2e.h"
24 /**
25 PRT: BANG (command) strength (integer)
26 %status stub
28 void caosVM::c_PRT_BANG() {
29 VM_VERIFY_SIZE(1)
30 VM_PARAM_INTEGER(strength)
33 /**
34 PRT: FRMA (agent) inputport (integer)
35 %status stub
37 void caosVM::v_PRT_FRMA() {
38 VM_VERIFY_SIZE(1)
39 VM_PARAM_INTEGER(inputport)
42 /**
43 PRT: FROM (integer) inputport (integer)
44 %status stub
46 void caosVM::v_PRT_FROM() {
47 VM_VERIFY_SIZE(1)
48 VM_PARAM_INTEGER(inputport)
51 /**
52 PRT: INEW (command) id (integer) name (string) desc (string) x (integer) y (integer) msgnum (integer)
53 %status stub
55 void caosVM::c_PRT_INEW() {
56 VM_VERIFY_SIZE(6)
57 VM_PARAM_INTEGER(msgnum)
58 VM_PARAM_INTEGER(y)
59 VM_PARAM_INTEGER(x)
60 VM_PARAM_STRING(desc)
61 VM_PARAM_STRING(name)
62 VM_PARAM_INTEGER(id)
65 /**
66 PRT: ITOT (integer)
67 %status stub
69 void caosVM::v_PRT_ITOT() {
70 VM_VERIFY_SIZE(0)
73 /**
74 PRT: IZAP (command) id (integer)
75 %status stub
77 void caosVM::c_PRT_IZAP() {
78 VM_VERIFY_SIZE(1)
79 VM_PARAM_INTEGER(id)
82 /**
83 PRT: JOIN (command) source (agent) outputport (integer) dest (agent) inputport (integer)
84 %status stub
86 void caosVM::c_PRT_JOIN() {
87 VM_VERIFY_SIZE(4)
88 VM_PARAM_INTEGER(inputport)
89 VM_PARAM_AGENT(dest)
90 VM_PARAM_INTEGER(outputport)
91 VM_PARAM_AGENT(source)
94 /**
95 PRT: KRAK (command) agent (agent) in_or_out (integer) port (integer)
96 %status stub
98 void caosVM::c_PRT_KRAK() {
99 VM_VERIFY_SIZE(3)
100 VM_PARAM_INTEGER(port)
101 VM_PARAM_INTEGER(in_or_out)
102 VM_PARAM_AGENT(agent)
106 PRT: NAME (string) agent (agent) in_or_out (integer) port (integer)
107 %status stub
109 void caosVM::v_PRT_NAME() {
110 VM_VERIFY_SIZE(0)
111 VM_PARAM_INTEGER(port)
112 VM_PARAM_INTEGER(in_or_out)
113 VM_PARAM_AGENT(agent)
117 PRT: ONEW (command) id (integer) name (string) desc (string) x (integer) y (integer)
118 %status stub
120 void caosVM::c_PRT_ONEW() {
121 VM_VERIFY_SIZE(5)
122 VM_PARAM_INTEGER(y)
123 VM_PARAM_INTEGER(x)
124 VM_PARAM_STRING(desc)
125 VM_PARAM_STRING(name)
126 VM_PARAM_INTEGER(id)
130 PRT: OTOT (integer)
131 %status stub
133 void caosVM::v_PRT_OTOT() {
134 VM_VERIFY_SIZE(0)
138 PRT: OZAP (command) id (integer)
139 %status stub
141 void caosVM::c_PRT_OZAP() {
142 VM_VERIFY_SIZE(1)
143 VM_PARAM_INTEGER(id)
147 PRT: SEND (command) id (integer) data (anything)
148 %status stub
150 void caosVM::c_PRT_SEND() { // TODO
151 VM_VERIFY_SIZE(2)
152 VM_PARAM_VALUE(data)
153 VM_PARAM_INTEGER(id)
156 /* vim: set noet: */