* move imageManager code into new imageManager.h/imageManager.cpp
[openc2e.git] / caosVM_world.cpp
blobd42bcebc449627241de74265def3e58c1c76207f
1 /*
2 * caosVM_world.cpp
3 * openc2e
5 * Created by Alyssa Milburn on Sun Aug 28 2005.
6 * Copyright (c) 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 "World.h"
23 /**
24 LOAD (command) worldname (string)
25 %status stub
27 void caosVM::c_LOAD() {
28 VM_PARAM_STRING(worldname)
30 // TODO
33 /**
34 SAVE (command)
35 %status stub
37 Save the world at the start of the next tick. Beware; if you don't put this
38 in an INST, it might save directly after your SAVE call (meaning upon loading,
39 the script will execute the next instruction, often QUIT or LOAD, which is
40 bad).
42 void caosVM::c_SAVE() {
43 // note, world.saving doesn't mean anything yet
44 world.saving = true;
47 /**
48 QUIT (command)
49 %status maybe
51 Quit the game engine at the start of the nexttick
53 void caosVM::c_QUIT() {
54 // TODO
55 world.quitting = true;
58 /**
59 WNAM (string)
60 %status stub
62 Returns the name of the current world.
64 void caosVM::v_WNAM() {
65 // result.setString(world.name);
66 result.setString("oh"); // TODO
69 /**
70 WUID (string)
71 %status stub
73 Returns the unique identifier (moniker?) of the current world.
75 void caosVM::v_WUID() {
76 // result.setString(world.moniker);
77 result.setString("dock-aaaaa-bbbbb-ccccc-ddddd"); // TODO
80 /**
81 WTNT (command) index (integer) red (integer) green (integer) blue (integer) rotation (integer) swap (integer)
82 %status stub
84 Sets an index in the mysterious global tint table to have the specified values. No, we have no idea what that means either.
86 void caosVM::c_WTNT() {
87 VM_PARAM_INTEGER(swap)
88 VM_PARAM_INTEGER(rotation)
89 VM_PARAM_INTEGER(blue)
90 VM_PARAM_INTEGER(green)
91 VM_PARAM_INTEGER(red)
92 VM_PARAM_INTEGER(index)
94 // TODO
97 /**
98 NWLD (integer)
99 %status stub
101 void caosVM::v_NWLD() {
102 result.setInt(0); // TODO
106 WRLD (command) name (string)
107 %status stub
109 Create a new world directory to prepare for the creation of the specified world.
111 void caosVM::c_WRLD() {
112 VM_PARAM_STRING(name)
114 // TODO
118 WRLD (string) world (integer)
119 %status stub
121 Return the name of the specified world (zero-indexed, see NWLD).
123 void caosVM::v_WRLD() {
124 VM_PARAM_INTEGER(world)
126 caos_assert(false); // TODO
130 PSWD (command) password (string)
131 %status stub
133 void caosVM::c_PSWD() {
134 VM_PARAM_STRING(password)
136 // TODO
140 PSWD (string) world (integer)
141 %status stub
143 Return the password for the specified world (zero-indexed, see NWLD), or an empty string for no password.
145 void caosVM::v_PSWD() {
146 VM_PARAM_INTEGER(world)
148 result.setString(""); // TODO
152 WNTI (integer) name (string)
153 %status stub
155 Return the world identifier for the specified world name, or -1 if it doesn't exist.
157 void caosVM::v_WNTI() {
158 VM_PARAM_STRING(name)
160 result.setInt(-1); // TODO
164 DELW (command) name (string)
165 %status stub
167 Delete the specified world directory and all contents.
169 void caosVM::c_DELW() {
170 VM_PARAM_STRING(name)
172 caos_assert(false); // TODO
175 /* vim: set noet: */