added simple message dialog

svn-id: r5020
This commit is contained in:
Max Horn 2002-09-26 11:44:02 +00:00
parent 522ee88b62
commit 58e5e0069f
10 changed files with 198 additions and 33 deletions

View file

@ -22,19 +22,27 @@
#include "str.h"
#include "util.h"
#ifdef _MSC_VER
# pragma warning( disable : 4068 ) // unknown pragmas
#endif
namespace ScummVM {
String::String(const char *str)
String::String(const char *str, int len)
{
_refCount = new int(1);
if (str) {
_capacity = _len = resStrLen(str);
if (str) {
if (len)
_capacity = _len = len;
else
_capacity = _len = resStrLen(str);
_str = (char *)calloc(1, _capacity+1);
memcpy(_str, str, _len+1);
memcpy(_str, str, _len);
_str[_len] = 0;
} else {
_capacity = _len = 0;
_str = 0;