| 2638 | } |
| 2639 | |
| 2640 | bool ConsoleValue::getBoolValue() |
| 2641 | { |
| 2642 | if(type == TypeInternalString || type == TypeInternalStackString || type == TypeInternalStringStackPtr) |
| 2643 | return dAtob(getStringValue()); |
| 2644 | if(type == TypeInternalFloat) |
| 2645 | return fval > 0; |
| 2646 | else if(type == TypeInternalInt) |
| 2647 | return ival > 0; |
| 2648 | else { |
| 2649 | const char *value = Con::getData(type, dataPtr, 0, enumTable); |
| 2650 | return dAtob(value); |
| 2651 | } |
| 2652 | } |
| 2653 | |
| 2654 | void ConsoleValue::setIntValue(S32 val) |
| 2655 | { |