| 1906 | #endif |
| 1907 | |
| 1908 | RString GameDataNil::GetText() const |
| 1909 | { |
| 1910 | if (_type == GameVoid) |
| 1911 | { |
| 1912 | return "scalar bool array string 0xfcffffef"; |
| 1913 | } |
| 1914 | if (_type == ~0) |
| 1915 | { |
| 1916 | return "all"; |
| 1917 | } |
| 1918 | char buf[MAX_EXPR_LEN]; |
| 1919 | strcpy(buf, ""); |
| 1920 | int rest = _type; |
| 1921 | while (rest) |
| 1922 | { |
| 1923 | if (*buf) |
| 1924 | { |
| 1925 | strcat(buf, " "); |
| 1926 | } |
| 1927 | if (rest & GameScalar) |
| 1928 | { |
| 1929 | strcat(buf, "scalar"), rest &= ~GameScalar; |
| 1930 | } |
| 1931 | else if (rest & GameBool) |
| 1932 | { |
| 1933 | strcat(buf, "bool"), rest &= ~GameBool; |
| 1934 | } |
| 1935 | else if (rest & GameArray) |
| 1936 | { |
| 1937 | strcat(buf, "array"), rest &= ~GameArray; |
| 1938 | } |
| 1939 | else if (rest & GameString) |
| 1940 | { |
| 1941 | strcat(buf, "string"), rest &= ~GameString; |
| 1942 | } |
| 1943 | else if (rest & GameNothing) |
| 1944 | { |
| 1945 | strcat(buf, "nothing"), rest &= ~GameNothing; |
| 1946 | } |
| 1947 | else |
| 1948 | { |
| 1949 | sprintf(buf + strlen(buf), "0x%x", _type); |
| 1950 | break; |
| 1951 | } |
| 1952 | } |
| 1953 | return buf; |
| 1954 | } |
| 1955 | |
| 1956 | bool GameDataNothing::IsEqualTo(const GameData* data) const |
| 1957 | { |
no test coverage detected