loadfromdata(string data)
loadfromfile(string file)
float mod(float val, float m)
+const string str_cvar (string)
+ crash()
perhaps only : Menu : WriteMsg
===============================
PRVM_G_FLOAT(OFS_RETURN) = Cvar_VariableValue(PRVM_G_STRING(OFS_PARM0));
}
+/*
+=================
+VM_str_cvar
+
+const string str_cvar (string)
+=================
+*/
+void VM_str_cvar(void)
+{
+ char *out, *name;
+ const char *cvar_string;
+ VM_SAFEPARMCOUNT(1,VM_str_cvar);
+
+ name = PRVM_G_STRING(OFS_PARM0);
+
+ if(!name)
+ PRVM_ERROR("VM_str_cvar: %s: null string\n", PRVM_NAME);
+
+ VM_CheckEmptyString(name);
+
+ out = VM_GetTempString();
+
+ cvar_string = Cvar_VariableString(name);
+
+ strcpy(out, cvar_string);
+
+ PRVM_G_INT(OFS_PARM0) = PRVM_SetString(out);
+}
+
/*
=================
VM_cvar_set
Cbuf_AddText("\n");
}
+/*
+=========
+VM_crash
+
+crash()
+=========
+*/
+
+void VM_crash(void)
+{
+ VM_SAFEPARMCOUNT(0, VM_crash);
+
+ PRVM_ERROR("Crash called by %s\n",PRVM_NAME);
+}
+
/*
=========
VM_traceon
PRVM_G_FLOAT(OFS_RETURN) = cls.state;
}
+/*
+=========
+VM_getostype
+
+float getostype(void)
+=========
+*/ // not used at the moment -> not included in the common list
+void VM_getostype(void)
+{
+ VM_SAFEPARMCOUNT(0,VM_getostype);
+
+ /*
+ OS_WINDOWS
+ OS_LINUX
+ OS_MAC - not supported
+ */
+
+#ifdef _WIN32
+ PRVM_G_FLOAT(OFS_RETURN) = 0;
+#elif defined _MAC
+ PRVM_G_FLOAT(OFS_RETURN) = 2;
+#else
+ PRVM_G_FLOAT(OFS_RETURN) = 1;
+#endif
+}
+
/*
=========
VM_getmousepos
VM_loadfromdata,
VM_loadfromfile,
VM_modulo, // 70
- e10, // 80
+ VM_str_cvar,
+ VM_crash, // 72
+ 0,0,0,0,0,0,0,0,// 80
e10, // 90
e10, // 100
e100, // 200
old_mouse_x = mx;
old_mouse_y = my;
- in_mouse_x = mouse_x;
- in_mouse_y = mouse_y;
+ in_mouse_x = (float) mouse_x * vid.conwidth / vid.realwidth;
+ in_mouse_y = (float) mouse_y * vid.conheight / vid.realheight;
// AK: eveything else is client stuff
// BTW, this should be seperated somewhen