aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/UI/UIEdit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/UI/UIEdit.cpp')
-rw-r--r--engines/wintermute/UI/UIEdit.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/engines/wintermute/UI/UIEdit.cpp b/engines/wintermute/UI/UIEdit.cpp
index 87d70c8f88..5ad3c3fcdf 100644
--- a/engines/wintermute/UI/UIEdit.cpp
+++ b/engines/wintermute/UI/UIEdit.cpp
@@ -95,8 +95,8 @@ CUIEdit::~CUIEdit() {
//////////////////////////////////////////////////////////////////////////
HRESULT CUIEdit::loadFile(const char *filename) {
- byte *Buffer = Game->_fileManager->readWholeFile(filename);
- if (Buffer == NULL) {
+ byte *buffer = Game->_fileManager->readWholeFile(filename);
+ if (buffer == NULL) {
Game->LOG(0, "CUIEdit::LoadFile failed for file '%s'", filename);
return E_FAIL;
}
@@ -106,9 +106,9 @@ HRESULT CUIEdit::loadFile(const char *filename) {
_filename = new char [strlen(filename) + 1];
strcpy(_filename, filename);
- if (FAILED(ret = loadBuffer(Buffer, true))) Game->LOG(0, "Error parsing EDIT file '%s'", filename);
+ if (FAILED(ret = loadBuffer(buffer, true))) Game->LOG(0, "Error parsing EDIT file '%s'", filename);
- delete [] Buffer;
+ delete [] buffer;
return ret;
}
@@ -139,7 +139,7 @@ TOKEN_DEF(EDIT)
TOKEN_DEF(CAPTION)
TOKEN_DEF_END
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIEdit::loadBuffer(byte *Buffer, bool Complete) {
+HRESULT CUIEdit::loadBuffer(byte *buffer, bool complete) {
TOKEN_TABLE_START(commands)
TOKEN_TABLE(TEMPLATE)
TOKEN_TABLE(DISABLED)
@@ -169,15 +169,15 @@ HRESULT CUIEdit::loadBuffer(byte *Buffer, bool Complete) {
int cmd = 2;
CBParser parser(Game);
- if (Complete) {
- if (parser.GetCommand((char **)&Buffer, commands, (char **)&params) != TOKEN_EDIT) {
+ if (complete) {
+ if (parser.GetCommand((char **)&buffer, commands, (char **)&params) != TOKEN_EDIT) {
Game->LOG(0, "'EDIT' keyword expected.");
return E_FAIL;
}
- Buffer = params;
+ buffer = params;
}
- while (cmd > 0 && (cmd = parser.GetCommand((char **)&Buffer, commands, (char **)&params)) > 0) {
+ while (cmd > 0 && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)&params)) > 0) {
switch (cmd) {
case TOKEN_TEMPLATE:
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
@@ -302,59 +302,59 @@ HRESULT CUIEdit::loadBuffer(byte *Buffer, bool Complete) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIEdit::saveAsText(CBDynBuffer *Buffer, int Indent) {
- Buffer->putTextIndent(Indent, "EDIT\n");
- Buffer->putTextIndent(Indent, "{\n");
+HRESULT CUIEdit::saveAsText(CBDynBuffer *buffer, int indent) {
+ buffer->putTextIndent(indent, "EDIT\n");
+ buffer->putTextIndent(indent, "{\n");
- Buffer->putTextIndent(Indent + 2, "NAME=\"%s\"\n", _name);
- Buffer->putTextIndent(Indent + 2, "CAPTION=\"%s\"\n", getCaption());
+ buffer->putTextIndent(indent + 2, "NAME=\"%s\"\n", _name);
+ buffer->putTextIndent(indent + 2, "CAPTION=\"%s\"\n", getCaption());
- Buffer->putTextIndent(Indent + 2, "\n");
+ buffer->putTextIndent(indent + 2, "\n");
if (_back && _back->_filename)
- Buffer->putTextIndent(Indent + 2, "BACK=\"%s\"\n", _back->_filename);
+ buffer->putTextIndent(indent + 2, "BACK=\"%s\"\n", _back->_filename);
if (_image && _image->_filename)
- Buffer->putTextIndent(Indent + 2, "IMAGE=\"%s\"\n", _image->_filename);
+ buffer->putTextIndent(indent + 2, "IMAGE=\"%s\"\n", _image->_filename);
if (_font && _font->_filename)
- Buffer->putTextIndent(Indent + 2, "FONT=\"%s\"\n", _font->_filename);
+ buffer->putTextIndent(indent + 2, "FONT=\"%s\"\n", _font->_filename);
if (_fontSelected && _fontSelected->_filename)
- Buffer->putTextIndent(Indent + 2, "FONT_SELECTED=\"%s\"\n", _fontSelected->_filename);
+ buffer->putTextIndent(indent + 2, "FONT_SELECTED=\"%s\"\n", _fontSelected->_filename);
if (_cursor && _cursor->_filename)
- Buffer->putTextIndent(Indent + 2, "CURSOR=\"%s\"\n", _cursor->_filename);
+ buffer->putTextIndent(indent + 2, "CURSOR=\"%s\"\n", _cursor->_filename);
- Buffer->putTextIndent(Indent + 2, "\n");
+ buffer->putTextIndent(indent + 2, "\n");
if (_text)
- Buffer->putTextIndent(Indent + 2, "TEXT=\"%s\"\n", _text);
+ buffer->putTextIndent(indent + 2, "TEXT=\"%s\"\n", _text);
- Buffer->putTextIndent(Indent + 2, "\n");
+ buffer->putTextIndent(indent + 2, "\n");
- Buffer->putTextIndent(Indent + 2, "X=%d\n", _posX);
- Buffer->putTextIndent(Indent + 2, "Y=%d\n", _posY);
- Buffer->putTextIndent(Indent + 2, "WIDTH=%d\n", _width);
- Buffer->putTextIndent(Indent + 2, "HEIGHT=%d\n", _height);
- Buffer->putTextIndent(Indent + 2, "MAX_LENGTH=%d\n", _maxLength);
- Buffer->putTextIndent(Indent + 2, "CURSOR_BLINK_RATE=%d\n", _cursorBlinkRate);
- Buffer->putTextIndent(Indent + 2, "FRAME_WIDTH=%d\n", _frameWidth);
+ buffer->putTextIndent(indent + 2, "X=%d\n", _posX);
+ buffer->putTextIndent(indent + 2, "Y=%d\n", _posY);
+ buffer->putTextIndent(indent + 2, "WIDTH=%d\n", _width);
+ buffer->putTextIndent(indent + 2, "HEIGHT=%d\n", _height);
+ buffer->putTextIndent(indent + 2, "MAX_LENGTH=%d\n", _maxLength);
+ buffer->putTextIndent(indent + 2, "CURSOR_BLINK_RATE=%d\n", _cursorBlinkRate);
+ buffer->putTextIndent(indent + 2, "FRAME_WIDTH=%d\n", _frameWidth);
- Buffer->putTextIndent(Indent + 2, "DISABLED=%s\n", _disable ? "TRUE" : "FALSE");
- Buffer->putTextIndent(Indent + 2, "VISIBLE=%s\n", _visible ? "TRUE" : "FALSE");
- Buffer->putTextIndent(Indent + 2, "PARENT_NOTIFY=%s\n", _parentNotify ? "TRUE" : "FALSE");
+ buffer->putTextIndent(indent + 2, "DISABLED=%s\n", _disable ? "TRUE" : "FALSE");
+ buffer->putTextIndent(indent + 2, "VISIBLE=%s\n", _visible ? "TRUE" : "FALSE");
+ buffer->putTextIndent(indent + 2, "PARENT_NOTIFY=%s\n", _parentNotify ? "TRUE" : "FALSE");
// scripts
for (int i = 0; i < _scripts.GetSize(); i++) {
- Buffer->putTextIndent(Indent + 2, "SCRIPT=\"%s\"\n", _scripts[i]->_filename);
+ buffer->putTextIndent(indent + 2, "SCRIPT=\"%s\"\n", _scripts[i]->_filename);
}
- Buffer->putTextIndent(Indent + 2, "\n");
+ buffer->putTextIndent(indent + 2, "\n");
// editor properties
- CBBase::saveAsText(Buffer, Indent + 2);
+ CBBase::saveAsText(buffer, indent + 2);
- Buffer->putTextIndent(Indent, "}\n");
+ buffer->putTextIndent(indent, "}\n");
return S_OK;
}