Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
bool.qh
Go to the documentation of this file.
1#pragma once
2
3#ifndef QCC_SUPPORT_BOOL
4 // Boolean Constants
5 const int true = 1;
6 const int false = 0;
7#endif
8
9#define boolean(value) ((value) != 0)
10
13float InterpretBoolean(string input)
14{
15 switch (strtolower(input))
16 {
17 case "yes":
18 case "true":
19 case "on":
20 return true;
21 case "no":
22 case "false":
23 case "off":
24 return false;
25 default:
26 return boolean(stof(input));
27 }
28}
#define boolean(value)
Definition bool.qh:9
ERASEABLE float InterpretBoolean(string input)
Get true/false value of a string with multiple different inputs.
Definition bool.qh:13
string strtolower(string s)
#define ERASEABLE
Definition _all.inc:37
float stof(string val,...)