mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 09:49:11 +00:00
WINTERMUTE: Rename FuncName->funcName in BParser
This commit is contained in:
parent
952998bac5
commit
d634b7d427
@ -228,7 +228,7 @@ HRESULT CAdActor::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ACTOR) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ACTOR) {
|
||||
Game->LOG(0, "'ACTOR' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -238,18 +238,18 @@ HRESULT CAdActor::loadBuffer(byte *buffer, bool complete) {
|
||||
CAdGame *adGame = (CAdGame *)Game;
|
||||
CAdSpriteSet *spr = NULL;
|
||||
int ar = 0, ag = 0, ab = 0, alpha = 0;
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
break;
|
||||
|
||||
case TOKEN_X:
|
||||
parser.ScanStr((char *)params, "%d", &_posX);
|
||||
parser.scanStr((char *)params, "%d", &_posX);
|
||||
break;
|
||||
|
||||
case TOKEN_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_posY);
|
||||
parser.scanStr((char *)params, "%d", &_posY);
|
||||
break;
|
||||
|
||||
case TOKEN_NAME:
|
||||
@ -265,26 +265,26 @@ HRESULT CAdActor::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_SCALABLE:
|
||||
parser.ScanStr((char *)params, "%b", &_zoomable);
|
||||
parser.scanStr((char *)params, "%b", &_zoomable);
|
||||
break;
|
||||
|
||||
case TOKEN_ROTABLE:
|
||||
case TOKEN_ROTATABLE:
|
||||
parser.ScanStr((char *)params, "%b", &_rotatable);
|
||||
parser.scanStr((char *)params, "%b", &_rotatable);
|
||||
break;
|
||||
|
||||
case TOKEN_REGISTRABLE:
|
||||
case TOKEN_INTERACTIVE:
|
||||
parser.ScanStr((char *)params, "%b", &_registrable);
|
||||
parser.scanStr((char *)params, "%b", &_registrable);
|
||||
break;
|
||||
|
||||
case TOKEN_SHADOWABLE:
|
||||
case TOKEN_COLORABLE:
|
||||
parser.ScanStr((char *)params, "%b", &_shadowable);
|
||||
parser.scanStr((char *)params, "%b", &_shadowable);
|
||||
break;
|
||||
|
||||
case TOKEN_ACTIVE:
|
||||
parser.ScanStr((char *)params, "%b", &_active);
|
||||
parser.scanStr((char *)params, "%b", &_active);
|
||||
break;
|
||||
|
||||
case TOKEN_WALK:
|
||||
@ -346,12 +346,12 @@ HRESULT CAdActor::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_SOUND_VOLUME:
|
||||
parser.ScanStr((char *)params, "%d", &_sFXVolume);
|
||||
parser.scanStr((char *)params, "%d", &_sFXVolume);
|
||||
break;
|
||||
|
||||
case TOKEN_SCALE: {
|
||||
int s;
|
||||
parser.ScanStr((char *)params, "%d", &s);
|
||||
parser.scanStr((char *)params, "%d", &s);
|
||||
_scale = (float)s;
|
||||
|
||||
}
|
||||
@ -359,14 +359,14 @@ HRESULT CAdActor::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
case TOKEN_RELATIVE_SCALE: {
|
||||
int s;
|
||||
parser.ScanStr((char *)params, "%d", &s);
|
||||
parser.scanStr((char *)params, "%d", &s);
|
||||
_relativeScale = (float)s;
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case TOKEN_SOUND_PANNING:
|
||||
parser.ScanStr((char *)params, "%b", &_autoSoundPanning);
|
||||
parser.scanStr((char *)params, "%b", &_autoSoundPanning);
|
||||
break;
|
||||
|
||||
case TOKEN_PROPERTY:
|
||||
@ -416,15 +416,15 @@ HRESULT CAdActor::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_IGNORE_ITEMS:
|
||||
parser.ScanStr((char *)params, "%b", &_ignoreItems);
|
||||
parser.scanStr((char *)params, "%b", &_ignoreItems);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA_COLOR:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
parser.scanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA:
|
||||
parser.ScanStr((char *)params, "%d", &alpha);
|
||||
parser.scanStr((char *)params, "%d", &alpha);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
@ -1281,7 +1281,7 @@ HRESULT CAdActor::mergeAnims(const char *animsFilename) {
|
||||
|
||||
HRESULT Ret = S_OK;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_ANIMATION: {
|
||||
CAdSpriteSet *Anim = new CAdSpriteSet(Game, this);
|
||||
|
@ -201,7 +201,7 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ENTITY) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ENTITY) {
|
||||
Game->LOG(0, "'ENTITY' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -211,18 +211,18 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
CAdGame *adGame = (CAdGame *)Game;
|
||||
CBSprite *spr = NULL;
|
||||
int ar = 0, ag = 0, ab = 0, alpha = 0;
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
break;
|
||||
|
||||
case TOKEN_X:
|
||||
parser.ScanStr((char *)params, "%d", &_posX);
|
||||
parser.scanStr((char *)params, "%d", &_posX);
|
||||
break;
|
||||
|
||||
case TOKEN_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_posY);
|
||||
parser.scanStr((char *)params, "%d", &_posY);
|
||||
break;
|
||||
|
||||
case TOKEN_SPRITE: {
|
||||
@ -265,12 +265,12 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_SCALABLE:
|
||||
parser.ScanStr((char *)params, "%b", &_zoomable);
|
||||
parser.scanStr((char *)params, "%b", &_zoomable);
|
||||
break;
|
||||
|
||||
case TOKEN_SCALE: {
|
||||
int s;
|
||||
parser.ScanStr((char *)params, "%d", &s);
|
||||
parser.scanStr((char *)params, "%d", &s);
|
||||
_scale = (float)s;
|
||||
|
||||
}
|
||||
@ -278,7 +278,7 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
case TOKEN_RELATIVE_SCALE: {
|
||||
int s;
|
||||
parser.ScanStr((char *)params, "%d", &s);
|
||||
parser.scanStr((char *)params, "%d", &s);
|
||||
_relativeScale = (float)s;
|
||||
|
||||
}
|
||||
@ -286,21 +286,21 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
case TOKEN_ROTABLE:
|
||||
case TOKEN_ROTATABLE:
|
||||
parser.ScanStr((char *)params, "%b", &_rotatable);
|
||||
parser.scanStr((char *)params, "%b", &_rotatable);
|
||||
break;
|
||||
|
||||
case TOKEN_REGISTRABLE:
|
||||
case TOKEN_INTERACTIVE:
|
||||
parser.ScanStr((char *)params, "%b", &_registrable);
|
||||
parser.scanStr((char *)params, "%b", &_registrable);
|
||||
break;
|
||||
|
||||
case TOKEN_SHADOWABLE:
|
||||
case TOKEN_COLORABLE:
|
||||
parser.ScanStr((char *)params, "%b", &_shadowable);
|
||||
parser.scanStr((char *)params, "%b", &_shadowable);
|
||||
break;
|
||||
|
||||
case TOKEN_ACTIVE:
|
||||
parser.ScanStr((char *)params, "%b", &_active);
|
||||
parser.scanStr((char *)params, "%b", &_active);
|
||||
break;
|
||||
|
||||
case TOKEN_CURSOR:
|
||||
@ -314,7 +314,7 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED:
|
||||
parser.ScanStr((char *)params, "%b", &_editorSelected);
|
||||
parser.scanStr((char *)params, "%b", &_editorSelected);
|
||||
break;
|
||||
|
||||
case TOKEN_REGION: {
|
||||
@ -399,19 +399,19 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_SOUND_START_TIME:
|
||||
parser.ScanStr((char *)params, "%d", &_sFXStart);
|
||||
parser.scanStr((char *)params, "%d", &_sFXStart);
|
||||
break;
|
||||
|
||||
case TOKEN_SOUND_VOLUME:
|
||||
parser.ScanStr((char *)params, "%d", &_sFXVolume);
|
||||
parser.scanStr((char *)params, "%d", &_sFXVolume);
|
||||
break;
|
||||
|
||||
case TOKEN_SOUND_PANNING:
|
||||
parser.ScanStr((char *)params, "%b", &_autoSoundPanning);
|
||||
parser.scanStr((char *)params, "%b", &_autoSoundPanning);
|
||||
break;
|
||||
|
||||
case TOKEN_SAVE_STATE:
|
||||
parser.ScanStr((char *)params, "%b", &_saveState);
|
||||
parser.scanStr((char *)params, "%b", &_saveState);
|
||||
break;
|
||||
|
||||
case TOKEN_PROPERTY:
|
||||
@ -419,15 +419,15 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_IGNORE_ITEMS:
|
||||
parser.ScanStr((char *)params, "%b", &_ignoreItems);
|
||||
parser.scanStr((char *)params, "%b", &_ignoreItems);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA_COLOR:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
parser.scanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA:
|
||||
parser.ScanStr((char *)params, "%d", &alpha);
|
||||
parser.scanStr((char *)params, "%d", &alpha);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
@ -435,16 +435,16 @@ HRESULT CAdEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_WALK_TO_X:
|
||||
parser.ScanStr((char *)params, "%d", &_walkToX);
|
||||
parser.scanStr((char *)params, "%d", &_walkToX);
|
||||
break;
|
||||
|
||||
case TOKEN_WALK_TO_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_walkToY);
|
||||
parser.scanStr((char *)params, "%d", &_walkToY);
|
||||
break;
|
||||
|
||||
case TOKEN_WALK_TO_DIR: {
|
||||
int i;
|
||||
parser.ScanStr((char *)params, "%d", &i);
|
||||
parser.scanStr((char *)params, "%d", &i);
|
||||
if (i < 0) i = 0;
|
||||
if (i >= NUM_DIRECTIONS) i = DI_NONE;
|
||||
_walkToDir = (TDirection)i;
|
||||
|
@ -1171,14 +1171,14 @@ HRESULT CAdGame::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
bool itemFound = false, itemsFound = false;
|
||||
|
||||
while (cmd > 0 && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while (cmd > 0 && (cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_GAME:
|
||||
if (FAILED(CBGame::loadBuffer(params, false))) cmd = PARSERR_GENERIC;
|
||||
break;
|
||||
|
||||
case TOKEN_AD_GAME:
|
||||
while (cmd > 0 && (cmd = parser.GetCommand((char **)¶ms, commands, (char **)¶ms2)) > 0) {
|
||||
while (cmd > 0 && (cmd = parser.getCommand((char **)¶ms, commands, (char **)¶ms2)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_RESPONSE_BOX:
|
||||
delete _responseBox;
|
||||
@ -1222,7 +1222,7 @@ HRESULT CAdGame::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
case TOKEN_SCENE_VIEWPORT: {
|
||||
RECT rc;
|
||||
parser.ScanStr((char *)params2, "%d,%d,%d,%d", &rc.left, &rc.top, &rc.right, &rc.bottom);
|
||||
parser.scanStr((char *)params2, "%d,%d,%d,%d", &rc.left, &rc.top, &rc.right, &rc.bottom);
|
||||
if (!_sceneViewport) _sceneViewport = new CBViewport(Game);
|
||||
if (_sceneViewport) _sceneViewport->setRect(rc.left, rc.top, rc.right, rc.bottom);
|
||||
}
|
||||
@ -1419,7 +1419,7 @@ HRESULT CAdGame::loadItemsBuffer(byte *buffer, bool merge) {
|
||||
while (_items.GetSize() > 0) deleteItem(_items[0]);
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_ITEM: {
|
||||
CAdItem *item = new CAdItem(Game);
|
||||
@ -1492,7 +1492,7 @@ HRESULT CAdGame::windowLoadHook(CUIWindow *win, char **buffer, char **params) {
|
||||
int cmd = PARSERR_GENERIC;
|
||||
CBParser parser(Game);
|
||||
|
||||
cmd = parser.GetCommand(buffer, commands, params);
|
||||
cmd = parser.getCommand(buffer, commands, params);
|
||||
switch (cmd) {
|
||||
case TOKEN_ENTITY_CONTAINER: {
|
||||
CUIEntity *ent = new CUIEntity(Game);
|
||||
|
@ -217,14 +217,14 @@ HRESULT CAdInventoryBox::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
_exclusive = false;
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_INVENTORY_BOX) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_INVENTORY_BOX) {
|
||||
Game->LOG(0, "'INVENTORY_BOX' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while (cmd > 0 && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while (cmd > 0 && (cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -249,35 +249,35 @@ HRESULT CAdInventoryBox::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_AREA:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_itemsArea.left, &_itemsArea.top, &_itemsArea.right, &_itemsArea.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_itemsArea.left, &_itemsArea.top, &_itemsArea.right, &_itemsArea.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_EXCLUSIVE:
|
||||
parser.ScanStr((char *)params, "%b", &_exclusive);
|
||||
parser.scanStr((char *)params, "%b", &_exclusive);
|
||||
break;
|
||||
|
||||
case TOKEN_HIDE_SELECTED:
|
||||
parser.ScanStr((char *)params, "%b", &_hideSelected);
|
||||
parser.scanStr((char *)params, "%b", &_hideSelected);
|
||||
break;
|
||||
|
||||
case TOKEN_ALWAYS_VISIBLE:
|
||||
parser.ScanStr((char *)params, "%b", &always_visible);
|
||||
parser.scanStr((char *)params, "%b", &always_visible);
|
||||
break;
|
||||
|
||||
case TOKEN_SPACING:
|
||||
parser.ScanStr((char *)params, "%d", &_spacing);
|
||||
parser.scanStr((char *)params, "%d", &_spacing);
|
||||
break;
|
||||
|
||||
case TOKEN_ITEM_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_itemWidth);
|
||||
parser.scanStr((char *)params, "%d", &_itemWidth);
|
||||
break;
|
||||
|
||||
case TOKEN_ITEM_HEIGHT:
|
||||
parser.ScanStr((char *)params, "%d", &_itemHeight);
|
||||
parser.scanStr((char *)params, "%d", &_itemHeight);
|
||||
break;
|
||||
|
||||
case TOKEN_SCROLL_BY:
|
||||
parser.ScanStr((char *)params, "%d", &_scrollBy);
|
||||
parser.scanStr((char *)params, "%d", &_scrollBy);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -169,7 +169,7 @@ HRESULT CAdItem::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ITEM) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ITEM) {
|
||||
Game->LOG(0, "'ITEM' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -177,7 +177,7 @@ HRESULT CAdItem::loadBuffer(byte *buffer, bool complete) {
|
||||
}
|
||||
|
||||
int ar = 0, ag = 0, ab = 0, alpha = 255;
|
||||
while (cmd > 0 && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while (cmd > 0 && (cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -216,19 +216,19 @@ HRESULT CAdItem::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_AMOUNT:
|
||||
parser.ScanStr((char *)params, "%d", &_amount);
|
||||
parser.scanStr((char *)params, "%d", &_amount);
|
||||
break;
|
||||
|
||||
case TOKEN_DISPLAY_AMOUNT:
|
||||
parser.ScanStr((char *)params, "%b", &_displayAmount);
|
||||
parser.scanStr((char *)params, "%b", &_displayAmount);
|
||||
break;
|
||||
|
||||
case TOKEN_AMOUNT_OFFSET_X:
|
||||
parser.ScanStr((char *)params, "%d", &_amountOffsetX);
|
||||
parser.scanStr((char *)params, "%d", &_amountOffsetX);
|
||||
break;
|
||||
|
||||
case TOKEN_AMOUNT_OFFSET_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_amountOffsetY);
|
||||
parser.scanStr((char *)params, "%d", &_amountOffsetY);
|
||||
break;
|
||||
|
||||
case TOKEN_AMOUNT_ALIGN:
|
||||
@ -276,7 +276,7 @@ HRESULT CAdItem::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_CURSOR_COMBINED:
|
||||
parser.ScanStr((char *)params, "%b", &_cursorCombined);
|
||||
parser.scanStr((char *)params, "%b", &_cursorCombined);
|
||||
break;
|
||||
|
||||
case TOKEN_SCRIPT:
|
||||
@ -288,11 +288,11 @@ HRESULT CAdItem::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA_COLOR:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
parser.scanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA:
|
||||
parser.ScanStr((char *)params, "%d", &alpha);
|
||||
parser.scanStr((char *)params, "%d", &alpha);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -123,14 +123,14 @@ HRESULT CAdLayer::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_LAYER) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_LAYER) {
|
||||
Game->LOG(0, "'LAYER' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -145,23 +145,23 @@ HRESULT CAdLayer::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_MAIN:
|
||||
parser.ScanStr((char *)params, "%b", &_main);
|
||||
parser.scanStr((char *)params, "%b", &_main);
|
||||
break;
|
||||
|
||||
case TOKEN_CLOSE_UP:
|
||||
parser.ScanStr((char *)params, "%b", &_closeUp);
|
||||
parser.scanStr((char *)params, "%b", &_closeUp);
|
||||
break;
|
||||
|
||||
case TOKEN_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_width);
|
||||
parser.scanStr((char *)params, "%d", &_width);
|
||||
break;
|
||||
|
||||
case TOKEN_HEIGHT:
|
||||
parser.ScanStr((char *)params, "%d", &_height);
|
||||
parser.scanStr((char *)params, "%d", &_height);
|
||||
break;
|
||||
|
||||
case TOKEN_ACTIVE:
|
||||
parser.ScanStr((char *)params, "%b", &_active);
|
||||
parser.scanStr((char *)params, "%b", &_active);
|
||||
break;
|
||||
|
||||
case TOKEN_REGION: {
|
||||
@ -198,7 +198,7 @@ HRESULT CAdLayer::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED:
|
||||
parser.ScanStr((char *)params, "%b", &_editorSelected);
|
||||
parser.scanStr((char *)params, "%b", &_editorSelected);
|
||||
break;
|
||||
|
||||
case TOKEN_SCRIPT:
|
||||
|
@ -121,7 +121,7 @@ HRESULT CAdRegion::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_REGION) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_REGION) {
|
||||
Game->LOG(0, "'REGION' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -133,7 +133,7 @@ HRESULT CAdRegion::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
int ar = 255, ag = 255, ab = 255, alpha = 255;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -148,46 +148,46 @@ HRESULT CAdRegion::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_ACTIVE:
|
||||
parser.ScanStr((char *)params, "%b", &_active);
|
||||
parser.scanStr((char *)params, "%b", &_active);
|
||||
break;
|
||||
|
||||
case TOKEN_BLOCKED:
|
||||
parser.ScanStr((char *)params, "%b", &_blocked);
|
||||
parser.scanStr((char *)params, "%b", &_blocked);
|
||||
break;
|
||||
|
||||
case TOKEN_DECORATION:
|
||||
parser.ScanStr((char *)params, "%b", &_decoration);
|
||||
parser.scanStr((char *)params, "%b", &_decoration);
|
||||
break;
|
||||
|
||||
case TOKEN_ZOOM:
|
||||
case TOKEN_SCALE: {
|
||||
int j;
|
||||
parser.ScanStr((char *)params, "%d", &j);
|
||||
parser.scanStr((char *)params, "%d", &j);
|
||||
_zoom = (float)j;
|
||||
}
|
||||
break;
|
||||
|
||||
case TOKEN_POINT: {
|
||||
int x, y;
|
||||
parser.ScanStr((char *)params, "%d,%d", &x, &y);
|
||||
parser.scanStr((char *)params, "%d,%d", &x, &y);
|
||||
_points.Add(new CBPoint(x, y));
|
||||
}
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA_COLOR:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
parser.scanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA:
|
||||
parser.ScanStr((char *)params, "%d", &alpha);
|
||||
parser.scanStr((char *)params, "%d", &alpha);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED:
|
||||
parser.ScanStr((char *)params, "%b", &_editorSelected);
|
||||
parser.scanStr((char *)params, "%b", &_editorSelected);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED_POINT:
|
||||
parser.ScanStr((char *)params, "%d", &_editorSelectedPoint);
|
||||
parser.scanStr((char *)params, "%d", &_editorSelectedPoint);
|
||||
break;
|
||||
|
||||
case TOKEN_SCRIPT:
|
||||
|
@ -245,14 +245,14 @@ HRESULT CAdResponseBox::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_RESPONSE_BOX) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_RESPONSE_BOX) {
|
||||
Game->LOG(0, "'RESPONSE_BOX' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -281,11 +281,11 @@ HRESULT CAdResponseBox::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_AREA:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_responseArea.left, &_responseArea.top, &_responseArea.right, &_responseArea.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_responseArea.left, &_responseArea.top, &_responseArea.right, &_responseArea.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_HORIZONTAL:
|
||||
parser.ScanStr((char *)params, "%b", &_horizontal);
|
||||
parser.scanStr((char *)params, "%b", &_horizontal);
|
||||
break;
|
||||
|
||||
case TOKEN_TEXT_ALIGN:
|
||||
@ -301,7 +301,7 @@ HRESULT CAdResponseBox::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_SPACING:
|
||||
parser.ScanStr((char *)params, "%d", &_spacing);
|
||||
parser.scanStr((char *)params, "%d", &_spacing);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -96,26 +96,26 @@ HRESULT CAdRotLevel::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ROTATION_LEVEL) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ROTATION_LEVEL) {
|
||||
Game->LOG(0, "'ROTATION_LEVEL' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
break;
|
||||
|
||||
case TOKEN_X:
|
||||
parser.ScanStr((char *)params, "%d", &_posX);
|
||||
parser.scanStr((char *)params, "%d", &_posX);
|
||||
break;
|
||||
|
||||
case TOKEN_ROTATION: {
|
||||
int i;
|
||||
parser.ScanStr((char *)params, "%d", &i);
|
||||
parser.scanStr((char *)params, "%d", &i);
|
||||
_rotation = (float)i;
|
||||
}
|
||||
break;
|
||||
|
@ -94,26 +94,26 @@ HRESULT CAdScaleLevel::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SCALE_LEVEL) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SCALE_LEVEL) {
|
||||
Game->LOG(0, "'SCALE_LEVEL' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
break;
|
||||
|
||||
case TOKEN_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_posY);
|
||||
parser.scanStr((char *)params, "%d", &_posY);
|
||||
break;
|
||||
|
||||
case TOKEN_SCALE: {
|
||||
int i;
|
||||
parser.ScanStr((char *)params, "%d", &i);
|
||||
parser.scanStr((char *)params, "%d", &i);
|
||||
_scale = (float)i;
|
||||
}
|
||||
break;
|
||||
|
@ -613,7 +613,7 @@ HRESULT CAdScene::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SCENE) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SCENE) {
|
||||
Game->LOG(0, "'SCENE' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -624,7 +624,7 @@ HRESULT CAdScene::loadBuffer(byte *buffer, bool complete) {
|
||||
char camera[MAX_PATH] = "";
|
||||
/* float WaypointHeight = -1.0f; */
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -722,91 +722,91 @@ HRESULT CAdScene::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_MARGIN_H:
|
||||
parser.ScanStr((char *)params, "%d", &_editorMarginH);
|
||||
parser.scanStr((char *)params, "%d", &_editorMarginH);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_MARGIN_V:
|
||||
parser.ScanStr((char *)params, "%d", &_editorMarginV);
|
||||
parser.scanStr((char *)params, "%d", &_editorMarginV);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_FRAME:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColFrame = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_ENTITY:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColEntity = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_ENTITY_SEL:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColEntitySel = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_REGION_SEL:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColRegionSel = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_DECORATION_SEL:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColDecorSel = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_BLOCKED_SEL:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColBlockedSel = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_WAYPOINTS_SEL:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColWaypointsSel = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_REGION:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColRegion = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_DECORATION:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColDecor = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_BLOCKED:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColBlocked = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_WAYPOINTS:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColWaypoints = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_COLOR_SCALE:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &ar, &ag, &ab, &aa);
|
||||
_editorColScale = DRGBA(ar, ag, ab, aa);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SHOW_REGIONS:
|
||||
parser.ScanStr((char *)params, "%b", &_editorShowRegions);
|
||||
parser.scanStr((char *)params, "%b", &_editorShowRegions);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SHOW_BLOCKED:
|
||||
parser.ScanStr((char *)params, "%b", &_editorShowBlocked);
|
||||
parser.scanStr((char *)params, "%b", &_editorShowBlocked);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SHOW_DECORATION:
|
||||
parser.ScanStr((char *)params, "%b", &_editorShowDecor);
|
||||
parser.scanStr((char *)params, "%b", &_editorShowDecor);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SHOW_ENTITIES:
|
||||
parser.ScanStr((char *)params, "%b", &_editorShowEntities);
|
||||
parser.scanStr((char *)params, "%b", &_editorShowEntities);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SHOW_SCALE:
|
||||
parser.ScanStr((char *)params, "%b", &_editorShowScale);
|
||||
parser.scanStr((char *)params, "%b", &_editorShowScale);
|
||||
break;
|
||||
|
||||
case TOKEN_SCRIPT:
|
||||
@ -819,17 +819,17 @@ HRESULT CAdScene::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
case TOKEN_VIEWPORT: {
|
||||
RECT rc;
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &rc.left, &rc.top, &rc.right, &rc.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &rc.left, &rc.top, &rc.right, &rc.bottom);
|
||||
if (!_viewport) _viewport = new CBViewport(Game);
|
||||
if (_viewport) _viewport->setRect(rc.left, rc.top, rc.right, rc.bottom, true);
|
||||
}
|
||||
|
||||
case TOKEN_PERSISTENT_STATE:
|
||||
parser.ScanStr((char *)params, "%b", &_persistentState);
|
||||
parser.scanStr((char *)params, "%b", &_persistentState);
|
||||
break;
|
||||
|
||||
case TOKEN_PERSISTENT_STATE_SPRITES:
|
||||
parser.ScanStr((char *)params, "%b", &_persistentStateSprites);
|
||||
parser.scanStr((char *)params, "%b", &_persistentStateSprites);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -111,7 +111,7 @@ HRESULT CAdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpr
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SPRITESET) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SPRITESET) {
|
||||
Game->LOG(0, "'SPRITESET' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -119,7 +119,7 @@ HRESULT CAdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpr
|
||||
}
|
||||
|
||||
CBSprite *spr = NULL;
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params, lifeTime, CacheType))) cmd = PARSERR_GENERIC;
|
||||
|
@ -114,14 +114,14 @@ HRESULT CAdTalkDef::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_TALK) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_TALK) {
|
||||
Game->LOG(0, "'TALK' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
|
@ -98,7 +98,7 @@ HRESULT CAdTalkNode::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ACTION) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ACTION) {
|
||||
Game->LOG(0, "'ACTION' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -109,7 +109,7 @@ HRESULT CAdTalkNode::loadBuffer(byte *buffer, bool complete) {
|
||||
_playToEnd = false;
|
||||
_preCache = false;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_SPRITE:
|
||||
CBUtils::setString(&_spriteFilename, (char *)params);
|
||||
@ -131,15 +131,15 @@ HRESULT CAdTalkNode::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_START_TIME:
|
||||
parser.ScanStr((char *)params, "%d", &_startTime);
|
||||
parser.scanStr((char *)params, "%d", &_startTime);
|
||||
break;
|
||||
|
||||
case TOKEN_END_TIME:
|
||||
parser.ScanStr((char *)params, "%d", &_endTime);
|
||||
parser.scanStr((char *)params, "%d", &_endTime);
|
||||
break;
|
||||
|
||||
case TOKEN_PRECACHE:
|
||||
parser.ScanStr((char *)params, "%b", &_preCache);
|
||||
parser.scanStr((char *)params, "%b", &_preCache);
|
||||
break;
|
||||
|
||||
case TOKEN_COMMENT:
|
||||
|
@ -113,14 +113,14 @@ HRESULT CAdWaypointGroup::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_WAYPOINTS) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_WAYPOINTS) {
|
||||
Game->LOG(0, "'WAYPOINTS' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -132,17 +132,17 @@ HRESULT CAdWaypointGroup::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
case TOKEN_POINT: {
|
||||
int x, y;
|
||||
parser.ScanStr((char *)params, "%d,%d", &x, &y);
|
||||
parser.scanStr((char *)params, "%d,%d", &x, &y);
|
||||
_points.Add(new CBPoint(x, y));
|
||||
}
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED:
|
||||
parser.ScanStr((char *)params, "%b", &_editorSelected);
|
||||
parser.scanStr((char *)params, "%b", &_editorSelected);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED_POINT:
|
||||
parser.ScanStr((char *)params, "%d", &_editorSelectedPoint);
|
||||
parser.scanStr((char *)params, "%d", &_editorSelectedPoint);
|
||||
break;
|
||||
|
||||
case TOKEN_PROPERTY:
|
||||
|
@ -101,7 +101,7 @@ HRESULT CBBase::parseEditorProperty(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_EDITOR_PROPERTY) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_EDITOR_PROPERTY) {
|
||||
Game->LOG(0, "'EDITOR_PROPERTY' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -111,7 +111,7 @@ HRESULT CBBase::parseEditorProperty(byte *buffer, bool complete) {
|
||||
char *propName = NULL;
|
||||
char *propValue = NULL;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_NAME:
|
||||
delete[] propName;
|
||||
|
@ -121,7 +121,7 @@ HRESULT CBFont::loadBuffer(byte * Buffer)
|
||||
break;
|
||||
|
||||
case TOKEN_TRANSPARENT:
|
||||
parser.ScanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
parser.scanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
custo_trans = true;
|
||||
break;
|
||||
}
|
||||
@ -196,7 +196,7 @@ bool CBFont::isTrueType(CBGame *Game, const char *filename) {
|
||||
CBParser parser(Game);
|
||||
|
||||
bool ret = false;
|
||||
if (parser.GetCommand((char **)&WorkBuffer, commands, (char **)¶ms) == TOKEN_TTFONT)
|
||||
if (parser.getCommand((char **)&WorkBuffer, commands, (char **)¶ms) == TOKEN_TTFONT)
|
||||
ret = true;
|
||||
|
||||
delete [] buffer;
|
||||
|
@ -308,7 +308,7 @@ HRESULT CBFontBitmap::loadBuffer(byte *buffer) {
|
||||
int cmd;
|
||||
CBParser parser(Game);
|
||||
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_FONT) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_FONT) {
|
||||
Game->LOG(0, "'FONT' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -327,7 +327,7 @@ HRESULT CBFontBitmap::loadBuffer(byte *buffer) {
|
||||
int spaceWidth = 0;
|
||||
int expandWidth = 0;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
|
||||
switch (cmd) {
|
||||
case TOKEN_IMAGE:
|
||||
@ -339,55 +339,55 @@ HRESULT CBFontBitmap::loadBuffer(byte *buffer) {
|
||||
break;
|
||||
|
||||
case TOKEN_TRANSPARENT:
|
||||
parser.ScanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
parser.scanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
custoTrans = true;
|
||||
break;
|
||||
|
||||
case TOKEN_WIDTHS:
|
||||
parser.ScanStr(params, "%D", widths, &num);
|
||||
parser.scanStr(params, "%D", widths, &num);
|
||||
for (i = 0; lastWidth < NUM_CHARACTERS, num > 0; lastWidth++, num--, i++) {
|
||||
_widths[lastWidth] = (byte)widths[i];
|
||||
}
|
||||
break;
|
||||
|
||||
case TOKEN_DEFAULT_WIDTH:
|
||||
parser.ScanStr(params, "%d", &default_width);
|
||||
parser.scanStr(params, "%d", &default_width);
|
||||
break;
|
||||
|
||||
case TOKEN_WIDTHS_FRAME:
|
||||
parser.ScanStr(params, "%d", &_widthsFrame);
|
||||
parser.scanStr(params, "%d", &_widthsFrame);
|
||||
break;
|
||||
|
||||
case TOKEN_COLUMNS:
|
||||
parser.ScanStr(params, "%d", &_numColumns);
|
||||
parser.scanStr(params, "%d", &_numColumns);
|
||||
break;
|
||||
|
||||
case TOKEN_TILE_WIDTH:
|
||||
parser.ScanStr(params, "%d", &_tileWidth);
|
||||
parser.scanStr(params, "%d", &_tileWidth);
|
||||
break;
|
||||
|
||||
case TOKEN_TILE_HEIGHT:
|
||||
parser.ScanStr(params, "%d", &_tileHeight);
|
||||
parser.scanStr(params, "%d", &_tileHeight);
|
||||
break;
|
||||
|
||||
case TOKEN_AUTO_WIDTH:
|
||||
parser.ScanStr(params, "%b", &autoWidth);
|
||||
parser.scanStr(params, "%b", &autoWidth);
|
||||
break;
|
||||
|
||||
case TOKEN_FONTEXT_FIX:
|
||||
parser.ScanStr(params, "%b", &_fontextFix);
|
||||
parser.scanStr(params, "%b", &_fontextFix);
|
||||
break;
|
||||
|
||||
case TOKEN_PAINT_WHOLE_CELL:
|
||||
parser.ScanStr(params, "%b", &_wholeCell);
|
||||
parser.scanStr(params, "%b", &_wholeCell);
|
||||
break;
|
||||
|
||||
case TOKEN_SPACE_WIDTH:
|
||||
parser.ScanStr(params, "%d", &spaceWidth);
|
||||
parser.scanStr(params, "%d", &spaceWidth);
|
||||
break;
|
||||
|
||||
case TOKEN_EXPAND_WIDTH:
|
||||
parser.ScanStr(params, "%d", &expandWidth);
|
||||
parser.scanStr(params, "%d", &expandWidth);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -460,7 +460,7 @@ HRESULT CBFontTT::loadBuffer(byte *buffer) {
|
||||
int cmd;
|
||||
CBParser parser(Game);
|
||||
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_TTFONT) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_TTFONT) {
|
||||
Game->LOG(0, "'TTFONT' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -468,10 +468,10 @@ HRESULT CBFontTT::loadBuffer(byte *buffer) {
|
||||
|
||||
uint32 BaseColor = 0x00000000;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_SIZE:
|
||||
parser.ScanStr(params, "%d", &_fontHeight);
|
||||
parser.scanStr(params, "%d", &_fontHeight);
|
||||
break;
|
||||
|
||||
case TOKEN_FACE:
|
||||
@ -483,19 +483,19 @@ HRESULT CBFontTT::loadBuffer(byte *buffer) {
|
||||
break;
|
||||
|
||||
case TOKEN_BOLD:
|
||||
parser.ScanStr(params, "%b", &_isBold);
|
||||
parser.scanStr(params, "%b", &_isBold);
|
||||
break;
|
||||
|
||||
case TOKEN_ITALIC:
|
||||
parser.ScanStr(params, "%b", &_isItalic);
|
||||
parser.scanStr(params, "%b", &_isItalic);
|
||||
break;
|
||||
|
||||
case TOKEN_UNDERLINE:
|
||||
parser.ScanStr(params, "%b", &_isUnderline);
|
||||
parser.scanStr(params, "%b", &_isUnderline);
|
||||
break;
|
||||
|
||||
case TOKEN_STRIKE:
|
||||
parser.ScanStr(params, "%b", &_isStriked);
|
||||
parser.scanStr(params, "%b", &_isStriked);
|
||||
break;
|
||||
|
||||
case TOKEN_CHARSET:
|
||||
@ -504,14 +504,14 @@ HRESULT CBFontTT::loadBuffer(byte *buffer) {
|
||||
|
||||
case TOKEN_COLOR: {
|
||||
int r, g, b;
|
||||
parser.ScanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
parser.scanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
BaseColor = DRGBA(r, g, b, D3DCOLGetA(BaseColor));
|
||||
}
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA: {
|
||||
int a;
|
||||
parser.ScanStr(params, "%d", &a);
|
||||
parser.scanStr(params, "%d", &a);
|
||||
BaseColor = DRGBA(D3DCOLGetR(BaseColor), D3DCOLGetG(BaseColor), D3DCOLGetB(BaseColor), a);
|
||||
}
|
||||
break;
|
||||
@ -560,26 +560,26 @@ HRESULT CBFontTT::parseLayer(CBTTFontLayer *layer, byte *buffer) {
|
||||
int cmd;
|
||||
CBParser parser(Game);
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_OFFSET_X:
|
||||
parser.ScanStr(params, "%d", &layer->_offsetX);
|
||||
parser.scanStr(params, "%d", &layer->_offsetX);
|
||||
break;
|
||||
|
||||
case TOKEN_OFFSET_Y:
|
||||
parser.ScanStr(params, "%d", &layer->_offsetY);
|
||||
parser.scanStr(params, "%d", &layer->_offsetY);
|
||||
break;
|
||||
|
||||
case TOKEN_COLOR: {
|
||||
int r, g, b;
|
||||
parser.ScanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
parser.scanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
layer->_color = DRGBA(r, g, b, D3DCOLGetA(layer->_color));
|
||||
}
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA: {
|
||||
int a;
|
||||
parser.ScanStr(params, "%d", &a);
|
||||
parser.scanStr(params, "%d", &a);
|
||||
layer->_color = DRGBA(D3DCOLGetR(layer->_color), D3DCOLGetG(layer->_color), D3DCOLGetB(layer->_color), a);
|
||||
}
|
||||
break;
|
||||
|
@ -173,10 +173,10 @@ HRESULT CBFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
|
||||
CBPlatform::SetRectEmpty(&rect);
|
||||
char *surface_file = NULL;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, ¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, ¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_DELAY:
|
||||
parser.ScanStr(params, "%d", &_delay);
|
||||
parser.scanStr(params, "%d", &_delay);
|
||||
break;
|
||||
|
||||
case TOKEN_IMAGE:
|
||||
@ -184,56 +184,56 @@ HRESULT CBFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
|
||||
break;
|
||||
|
||||
case TOKEN_TRANSPARENT:
|
||||
parser.ScanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
parser.scanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
custoTrans = true;
|
||||
break;
|
||||
|
||||
case TOKEN_RECT:
|
||||
parser.ScanStr(params, "%d,%d,%d,%d", &rect.left, &rect.top, &rect.right, &rect.bottom);
|
||||
parser.scanStr(params, "%d,%d,%d,%d", &rect.left, &rect.top, &rect.right, &rect.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_HOTSPOT:
|
||||
parser.ScanStr(params, "%d,%d", &hotspotX, &hotspotY);
|
||||
parser.scanStr(params, "%d,%d", &hotspotX, &hotspotY);
|
||||
break;
|
||||
|
||||
case TOKEN_MOVE:
|
||||
parser.ScanStr(params, "%d,%d", &_moveX, &_moveY);
|
||||
parser.scanStr(params, "%d,%d", &_moveX, &_moveY);
|
||||
break;
|
||||
|
||||
case TOKEN_2D_ONLY:
|
||||
parser.ScanStr(params, "%b", &is2DOnly);
|
||||
parser.scanStr(params, "%b", &is2DOnly);
|
||||
break;
|
||||
|
||||
case TOKEN_3D_ONLY:
|
||||
parser.ScanStr(params, "%b", &is3DOnly);
|
||||
parser.scanStr(params, "%b", &is3DOnly);
|
||||
break;
|
||||
|
||||
case TOKEN_MIRROR_X:
|
||||
parser.ScanStr(params, "%b", &mirrorX);
|
||||
parser.scanStr(params, "%b", &mirrorX);
|
||||
break;
|
||||
|
||||
case TOKEN_MIRROR_Y:
|
||||
parser.ScanStr(params, "%b", &mirrorY);
|
||||
parser.scanStr(params, "%b", &mirrorY);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA_COLOR:
|
||||
parser.ScanStr(params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
parser.scanStr(params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA:
|
||||
parser.ScanStr(params, "%d", &alpha);
|
||||
parser.scanStr(params, "%d", &alpha);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED:
|
||||
parser.ScanStr(params, "%b", &editorSelected);
|
||||
parser.scanStr(params, "%b", &editorSelected);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_EXPANDED:
|
||||
parser.ScanStr(params, "%b", &_editorExpanded);
|
||||
parser.scanStr(params, "%b", &_editorExpanded);
|
||||
break;
|
||||
|
||||
case TOKEN_KILL_SOUND:
|
||||
parser.ScanStr(params, "%b", &_killSound);
|
||||
parser.scanStr(params, "%b", &_killSound);
|
||||
break;
|
||||
|
||||
case TOKEN_SUBFRAME: {
|
||||
@ -267,11 +267,11 @@ HRESULT CBFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
|
||||
break;
|
||||
|
||||
case TOKEN_KEYFRAME:
|
||||
parser.ScanStr(params, "%b", &_keyframe);
|
||||
parser.scanStr(params, "%b", &_keyframe);
|
||||
break;
|
||||
|
||||
case TOKEN_DECORATION:
|
||||
parser.ScanStr(params, "%b", &decoration);
|
||||
parser.scanStr(params, "%b", &decoration);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -811,14 +811,14 @@ HRESULT CBGame::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_GAME) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_GAME) {
|
||||
Game->LOG(0, "'GAME' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -883,19 +883,19 @@ HRESULT CBGame::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_PERSONAL_SAVEGAMES:
|
||||
parser.ScanStr((char *)params, "%b", &_personalizedSave);
|
||||
parser.scanStr((char *)params, "%b", &_personalizedSave);
|
||||
break;
|
||||
|
||||
case TOKEN_SUBTITLES:
|
||||
parser.ScanStr((char *)params, "%b", &_subtitles);
|
||||
parser.scanStr((char *)params, "%b", &_subtitles);
|
||||
break;
|
||||
|
||||
case TOKEN_SUBTITLES_SPEED:
|
||||
parser.ScanStr((char *)params, "%d", &_subtitlesSpeed);
|
||||
parser.scanStr((char *)params, "%d", &_subtitlesSpeed);
|
||||
break;
|
||||
|
||||
case TOKEN_VIDEO_SUBTITLES:
|
||||
parser.ScanStr((char *)params, "%b", &_videoSubtitles);
|
||||
parser.scanStr((char *)params, "%b", &_videoSubtitles);
|
||||
break;
|
||||
|
||||
case TOKEN_PROPERTY:
|
||||
@ -907,34 +907,34 @@ HRESULT CBGame::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_THUMBNAIL_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_thumbnailWidth);
|
||||
parser.scanStr((char *)params, "%d", &_thumbnailWidth);
|
||||
break;
|
||||
|
||||
case TOKEN_THUMBNAIL_HEIGHT:
|
||||
parser.ScanStr((char *)params, "%d", &_thumbnailHeight);
|
||||
parser.scanStr((char *)params, "%d", &_thumbnailHeight);
|
||||
break;
|
||||
|
||||
case TOKEN_INDICATOR_X:
|
||||
parser.ScanStr((char *)params, "%d", &_indicatorX);
|
||||
parser.scanStr((char *)params, "%d", &_indicatorX);
|
||||
break;
|
||||
|
||||
case TOKEN_INDICATOR_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_indicatorY);
|
||||
parser.scanStr((char *)params, "%d", &_indicatorY);
|
||||
break;
|
||||
|
||||
case TOKEN_INDICATOR_COLOR: {
|
||||
int r, g, b, a;
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &r, &g, &b, &a);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &r, &g, &b, &a);
|
||||
_indicatorColor = DRGBA(r, g, b, a);
|
||||
}
|
||||
break;
|
||||
|
||||
case TOKEN_INDICATOR_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_indicatorWidth);
|
||||
parser.scanStr((char *)params, "%d", &_indicatorWidth);
|
||||
break;
|
||||
|
||||
case TOKEN_INDICATOR_HEIGHT:
|
||||
parser.ScanStr((char *)params, "%d", &_indicatorHeight);
|
||||
parser.scanStr((char *)params, "%d", &_indicatorHeight);
|
||||
break;
|
||||
|
||||
case TOKEN_SAVE_IMAGE:
|
||||
@ -942,11 +942,11 @@ HRESULT CBGame::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_SAVE_IMAGE_X:
|
||||
parser.ScanStr((char *)params, "%d", &_saveImageX);
|
||||
parser.scanStr((char *)params, "%d", &_saveImageX);
|
||||
break;
|
||||
|
||||
case TOKEN_SAVE_IMAGE_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_saveImageY);
|
||||
parser.scanStr((char *)params, "%d", &_saveImageY);
|
||||
break;
|
||||
|
||||
case TOKEN_LOAD_IMAGE:
|
||||
@ -954,11 +954,11 @@ HRESULT CBGame::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_LOAD_IMAGE_X:
|
||||
parser.ScanStr((char *)params, "%d", &_loadImageX);
|
||||
parser.scanStr((char *)params, "%d", &_loadImageX);
|
||||
break;
|
||||
|
||||
case TOKEN_LOAD_IMAGE_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_loadImageY);
|
||||
parser.scanStr((char *)params, "%d", &_loadImageY);
|
||||
break;
|
||||
|
||||
case TOKEN_LOCAL_SAVE_DIR:
|
||||
@ -966,7 +966,7 @@ HRESULT CBGame::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_COMPAT_KILL_METHOD_THREADS:
|
||||
parser.ScanStr((char *)params, "%b", &_compatKillMethodThreads);
|
||||
parser.scanStr((char *)params, "%b", &_compatKillMethodThreads);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3534,12 +3534,12 @@ HRESULT CBGame::loadSettings(const char *filename) {
|
||||
int cmd;
|
||||
CBParser parser(Game);
|
||||
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SETTINGS) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SETTINGS) {
|
||||
Game->LOG(0, "'SETTINGS' keyword expected in game settings file.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_GAME:
|
||||
delete[] _settingsGameFile;
|
||||
@ -3552,39 +3552,39 @@ HRESULT CBGame::loadSettings(const char *filename) {
|
||||
break;
|
||||
|
||||
case TOKEN_RESOLUTION:
|
||||
parser.ScanStr((char *)params, "%d,%d", &_settingsResWidth, &_settingsResHeight);
|
||||
parser.scanStr((char *)params, "%d,%d", &_settingsResWidth, &_settingsResHeight);
|
||||
break;
|
||||
|
||||
case TOKEN_REQUIRE_3D_ACCELERATION:
|
||||
parser.ScanStr((char *)params, "%b", &_settingsRequireAcceleration);
|
||||
parser.scanStr((char *)params, "%b", &_settingsRequireAcceleration);
|
||||
break;
|
||||
|
||||
case TOKEN_REQUIRE_SOUND:
|
||||
parser.ScanStr((char *)params, "%b", &_settingsRequireSound);
|
||||
parser.scanStr((char *)params, "%b", &_settingsRequireSound);
|
||||
break;
|
||||
|
||||
case TOKEN_HWTL_MODE:
|
||||
parser.ScanStr((char *)params, "%d", &_settingsTLMode);
|
||||
parser.scanStr((char *)params, "%d", &_settingsTLMode);
|
||||
break;
|
||||
|
||||
case TOKEN_ALLOW_WINDOWED_MODE:
|
||||
parser.ScanStr((char *)params, "%b", &_settingsAllowWindowed);
|
||||
parser.scanStr((char *)params, "%b", &_settingsAllowWindowed);
|
||||
break;
|
||||
|
||||
case TOKEN_ALLOW_DESKTOP_RES:
|
||||
parser.ScanStr((char *)params, "%b", &_settingsAllowDesktopRes);
|
||||
parser.scanStr((char *)params, "%b", &_settingsAllowDesktopRes);
|
||||
break;
|
||||
|
||||
case TOKEN_ALLOW_ADVANCED:
|
||||
parser.ScanStr((char *)params, "%b", &_settingsAllowAdvanced);
|
||||
parser.scanStr((char *)params, "%b", &_settingsAllowAdvanced);
|
||||
break;
|
||||
|
||||
case TOKEN_ALLOW_ACCESSIBILITY_TAB:
|
||||
parser.ScanStr((char *)params, "%b", &_settingsAllowAccessTab);
|
||||
parser.scanStr((char *)params, "%b", &_settingsAllowAccessTab);
|
||||
break;
|
||||
|
||||
case TOKEN_ALLOW_ABOUT_TAB:
|
||||
parser.ScanStr((char *)params, "%b", &_settingsAllowAboutTab);
|
||||
parser.scanStr((char *)params, "%b", &_settingsAllowAboutTab);
|
||||
break;
|
||||
|
||||
case TOKEN_REGISTRY_PATH:
|
||||
@ -3592,7 +3592,7 @@ HRESULT CBGame::loadSettings(const char *filename) {
|
||||
break;
|
||||
|
||||
case TOKEN_RICH_SAVED_GAMES:
|
||||
parser.ScanStr((char *)params, "%b", &_richSavedGames);
|
||||
parser.scanStr((char *)params, "%b", &_richSavedGames);
|
||||
break;
|
||||
|
||||
case TOKEN_SAVED_GAME_EXT:
|
||||
|
@ -56,20 +56,20 @@ CBParser::~CBParser() {
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
char *CBParser::GetLastOffender() {
|
||||
char *CBParser::getLastOffender() {
|
||||
return _lastOffender;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
long CBParser::GetObject(char **buf, TokenDesc *tokens, char **name, char **data) {
|
||||
SkipCharacters(buf, _whiteSpace);
|
||||
long CBParser::getObject(char **buf, TokenDesc *tokens, char **name, char **data) {
|
||||
skipCharacters(buf, _whiteSpace);
|
||||
|
||||
// skip comment lines.
|
||||
while (**buf == ';') {
|
||||
*buf = strchr(*buf, '\n');
|
||||
_parserLine++;
|
||||
SkipCharacters(buf, _whiteSpace);
|
||||
skipCharacters(buf, _whiteSpace);
|
||||
}
|
||||
|
||||
if (! **buf) // at end of file
|
||||
@ -96,33 +96,33 @@ long CBParser::GetObject(char **buf, TokenDesc *tokens, char **name, char **data
|
||||
}
|
||||
// skip the token
|
||||
*buf += strlen(tokens->token);
|
||||
SkipCharacters(buf, _whiteSpace);
|
||||
skipCharacters(buf, _whiteSpace);
|
||||
|
||||
// get optional name
|
||||
*name = GetSubText(buf, '\'', '\''); // single quotes
|
||||
SkipCharacters(buf, _whiteSpace);
|
||||
*name = getSubText(buf, '\'', '\''); // single quotes
|
||||
skipCharacters(buf, _whiteSpace);
|
||||
|
||||
// get optional data
|
||||
if (**buf == '=') // An assignment rather than a command/object.
|
||||
*data = GetAssignmentText(buf);
|
||||
*data = getAssignmentText(buf);
|
||||
else
|
||||
*data = GetSubText(buf, '{', '}');
|
||||
*data = getSubText(buf, '{', '}');
|
||||
|
||||
return tokens->id;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
long CBParser::GetCommand(char **buf, TokenDesc *tokens, char **params) {
|
||||
long CBParser::getCommand(char **buf, TokenDesc *tokens, char **params) {
|
||||
if (!*buf) return PARSERR_TOKENNOTFOUND;
|
||||
Game->miniUpdate();
|
||||
char *name;
|
||||
return GetObject(buf, tokens, &name, params);
|
||||
return getObject(buf, tokens, &name, params);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void CBParser::SkipCharacters(char **buf, const char *toSkip) {
|
||||
void CBParser::skipCharacters(char **buf, const char *toSkip) {
|
||||
char ch;
|
||||
while ((ch = **buf) != 0) {
|
||||
if (ch == '\n') _parserLine++;
|
||||
@ -135,7 +135,7 @@ void CBParser::SkipCharacters(char **buf, const char *toSkip) {
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
char *CBParser::GetSubText(char **buf, char open, char close) {
|
||||
char *CBParser::getSubText(char **buf, char open, char close) {
|
||||
if (**buf == 0 || **buf != open)
|
||||
return 0;
|
||||
++*buf; // skip opening delimiter
|
||||
@ -164,14 +164,14 @@ char *CBParser::GetSubText(char **buf, char open, char close) {
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
char *CBParser::GetAssignmentText(char **buf) {
|
||||
char *CBParser::getAssignmentText(char **buf) {
|
||||
++*buf; // skip the '='
|
||||
SkipCharacters(buf, _whiteSpace);
|
||||
skipCharacters(buf, _whiteSpace);
|
||||
char *result = *buf;
|
||||
|
||||
|
||||
if (*result == '"') {
|
||||
result = GetSubText(buf, '"', '"');
|
||||
result = getSubText(buf, '"', '"');
|
||||
} else {
|
||||
// now, we need to find the next whitespace to end the data
|
||||
char theChar;
|
||||
@ -192,7 +192,7 @@ char *CBParser::GetAssignmentText(char **buf) {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
char *CBParser::GetToken(char **buf) {
|
||||
char *CBParser::getToken(char **buf) {
|
||||
static char token[100];
|
||||
char *b = *buf, * t = token;
|
||||
while (true) {
|
||||
@ -240,8 +240,8 @@ char *CBParser::GetToken(char **buf) {
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
float CBParser::GetTokenFloat(char **buf) {
|
||||
char *t = GetToken(buf);
|
||||
float CBParser::getTokenFloat(char **buf) {
|
||||
char *t = getToken(buf);
|
||||
if (!((*t >= '0' && *t <= '9') || *t == '-' || *t == '.')) {
|
||||
// Error situation. We handle this by return 0.
|
||||
return 0.;
|
||||
@ -252,8 +252,8 @@ float CBParser::GetTokenFloat(char **buf) {
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
int CBParser::GetTokenInt(char **buf) {
|
||||
char *t = GetToken(buf);
|
||||
int CBParser::getTokenInt(char **buf) {
|
||||
char *t = getToken(buf);
|
||||
if (!((*t >= '0' && *t <= '9') || *t == '-')) {
|
||||
// Error situation. We handle this by return 0.
|
||||
return 0;
|
||||
@ -264,14 +264,14 @@ int CBParser::GetTokenInt(char **buf) {
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void CBParser::SkipToken(char **buf, char *tok, char * /*msg*/) {
|
||||
char *t = GetToken(buf);
|
||||
void CBParser::skipToken(char **buf, char *tok, char * /*msg*/) {
|
||||
char *t = getToken(buf);
|
||||
if (strcmp(t, tok)) return; // Error
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
int CBParser::ScanStr(const char *in, const char *format, ...) {
|
||||
int CBParser::scanStr(const char *in, const char *format, ...) {
|
||||
va_list arg;
|
||||
va_start(arg, format);
|
||||
|
||||
|
@ -65,21 +65,22 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
int ScanStr(const char *in, const char *format, ...);
|
||||
char *GetLastOffender();
|
||||
void SkipToken(char **buf, char *tok, char *msg = NULL);
|
||||
int GetTokenInt(char **buf);
|
||||
float GetTokenFloat(char **buf);
|
||||
char *GetToken(char **buf);
|
||||
char *GetAssignmentText(char **buf);
|
||||
char *GetSubText(char **buf, char open, char close);
|
||||
void SkipCharacters(char **buf, const char *toSkip);
|
||||
long GetCommand(char **buf, TokenDesc *tokens, char **params);
|
||||
long GetObject(char **buf, TokenDesc *tokens, char **name, char **data);
|
||||
int _parserLine;
|
||||
char _lastOffender[255];
|
||||
int scanStr(const char *in, const char *format, ...);
|
||||
long getCommand(char **buf, TokenDesc *tokens, char **params);
|
||||
CBParser(CBGame *inGame = NULL);
|
||||
virtual ~CBParser();
|
||||
private:
|
||||
char *getLastOffender();
|
||||
void skipToken(char **buf, char *tok, char *msg = NULL);
|
||||
int getTokenInt(char **buf);
|
||||
float getTokenFloat(char **buf);
|
||||
char *getToken(char **buf);
|
||||
char *getAssignmentText(char **buf);
|
||||
char *getSubText(char **buf, char open, char close);
|
||||
void skipCharacters(char **buf, const char *toSkip);
|
||||
long getObject(char **buf, TokenDesc *tokens, char **name, char **data);
|
||||
int _parserLine;
|
||||
char _lastOffender[255];
|
||||
char *_whiteSpace;
|
||||
};
|
||||
|
||||
|
@ -146,7 +146,7 @@ HRESULT CBRegion::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_REGION) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_REGION) {
|
||||
Game->LOG(0, "'REGION' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -158,7 +158,7 @@ HRESULT CBRegion::loadBuffer(byte *buffer, bool complete) {
|
||||
for (i = 0; i < _points.GetSize(); i++) delete _points[i];
|
||||
_points.RemoveAll();
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -173,12 +173,12 @@ HRESULT CBRegion::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_ACTIVE:
|
||||
parser.ScanStr((char *)params, "%b", &_active);
|
||||
parser.scanStr((char *)params, "%b", &_active);
|
||||
break;
|
||||
|
||||
case TOKEN_POINT: {
|
||||
int x, y;
|
||||
parser.ScanStr((char *)params, "%d,%d", &x, &y);
|
||||
parser.scanStr((char *)params, "%d,%d", &x, &y);
|
||||
_points.Add(new CBPoint(x, y));
|
||||
}
|
||||
break;
|
||||
@ -188,7 +188,7 @@ HRESULT CBRegion::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED_POINT:
|
||||
parser.ScanStr((char *)params, "%d", &_editorSelectedPoint);
|
||||
parser.scanStr((char *)params, "%d", &_editorSelectedPoint);
|
||||
break;
|
||||
|
||||
case TOKEN_PROPERTY:
|
||||
|
@ -357,7 +357,7 @@ HRESULT CBScriptHolder::parseProperty(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_PROPERTY) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_PROPERTY) {
|
||||
Game->LOG(0, "'PROPERTY' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -367,7 +367,7 @@ HRESULT CBScriptHolder::parseProperty(byte *buffer, bool complete) {
|
||||
char *PropName = NULL;
|
||||
char *PropValue = NULL;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_NAME:
|
||||
delete[] PropName;
|
||||
|
@ -214,7 +214,7 @@ HRESULT CBSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
|
||||
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SPRITE) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_SPRITE) {
|
||||
Game->LOG(0, "'SPRITE' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -223,14 +223,14 @@ HRESULT CBSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
|
||||
|
||||
int frame_count = 1;
|
||||
CBFrame *frame;
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_CONTINUOUS:
|
||||
parser.ScanStr((char *)params, "%b", &_continuous);
|
||||
parser.scanStr((char *)params, "%b", &_continuous);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_MUTED:
|
||||
parser.ScanStr((char *)params, "%b", &_editorMuted);
|
||||
parser.scanStr((char *)params, "%b", &_editorMuted);
|
||||
break;
|
||||
|
||||
case TOKEN_SCRIPT:
|
||||
@ -238,15 +238,15 @@ HRESULT CBSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
|
||||
break;
|
||||
|
||||
case TOKEN_LOOPING:
|
||||
parser.ScanStr((char *)params, "%b", &_looping);
|
||||
parser.scanStr((char *)params, "%b", &_looping);
|
||||
break;
|
||||
|
||||
case TOKEN_PRECISE:
|
||||
parser.ScanStr((char *)params, "%b", &_precise);
|
||||
parser.scanStr((char *)params, "%b", &_precise);
|
||||
break;
|
||||
|
||||
case TOKEN_STREAMED:
|
||||
parser.ScanStr((char *)params, "%b", &_streamed);
|
||||
parser.scanStr((char *)params, "%b", &_streamed);
|
||||
if (_streamed && lifeTime == -1) {
|
||||
lifeTime = 500;
|
||||
cacheType = CACHE_ALL;
|
||||
@ -254,7 +254,7 @@ HRESULT CBSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
|
||||
break;
|
||||
|
||||
case TOKEN_STREAMED_KEEP_LOADED:
|
||||
parser.ScanStr((char *)params, "%b", &_streamedKeepLoaded);
|
||||
parser.scanStr((char *)params, "%b", &_streamedKeepLoaded);
|
||||
break;
|
||||
|
||||
case TOKEN_NAME:
|
||||
@ -270,15 +270,15 @@ HRESULT CBSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_BG_OFFSET_X:
|
||||
parser.ScanStr((char *)params, "%d", &_editorBgOffsetX);
|
||||
parser.scanStr((char *)params, "%d", &_editorBgOffsetX);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_BG_OFFSET_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_editorBgOffsetY);
|
||||
parser.scanStr((char *)params, "%d", &_editorBgOffsetY);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_BG_ALPHA:
|
||||
parser.ScanStr((char *)params, "%d", &_editorBgAlpha);
|
||||
parser.scanStr((char *)params, "%d", &_editorBgAlpha);
|
||||
_editorBgAlpha = MIN(_editorBgAlpha, 255);
|
||||
_editorBgAlpha = MAX(_editorBgAlpha, 0);
|
||||
break;
|
||||
|
@ -120,55 +120,55 @@ HRESULT CBSubFrame::loadBuffer(byte *Buffer, int LifeTime, bool KeepLoaded) {
|
||||
delete _surface;
|
||||
_surface = NULL;
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&Buffer, commands, ¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&Buffer, commands, ¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_IMAGE:
|
||||
surface_file = params;
|
||||
break;
|
||||
|
||||
case TOKEN_TRANSPARENT:
|
||||
parser.ScanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
parser.scanStr(params, "%d,%d,%d", &r, &g, &b);
|
||||
custo_trans = true;
|
||||
break;
|
||||
|
||||
case TOKEN_RECT:
|
||||
parser.ScanStr(params, "%d,%d,%d,%d", &rect.left, &rect.top, &rect.right, &rect.bottom);
|
||||
parser.scanStr(params, "%d,%d,%d,%d", &rect.left, &rect.top, &rect.right, &rect.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_HOTSPOT:
|
||||
parser.ScanStr(params, "%d,%d", &_hotspotX, &_hotspotY);
|
||||
parser.scanStr(params, "%d,%d", &_hotspotX, &_hotspotY);
|
||||
break;
|
||||
|
||||
case TOKEN_2D_ONLY:
|
||||
parser.ScanStr(params, "%b", &_2DOnly);
|
||||
parser.scanStr(params, "%b", &_2DOnly);
|
||||
break;
|
||||
|
||||
case TOKEN_3D_ONLY:
|
||||
parser.ScanStr(params, "%b", &_3DOnly);
|
||||
parser.scanStr(params, "%b", &_3DOnly);
|
||||
break;
|
||||
|
||||
case TOKEN_MIRROR_X:
|
||||
parser.ScanStr(params, "%b", &_mirrorX);
|
||||
parser.scanStr(params, "%b", &_mirrorX);
|
||||
break;
|
||||
|
||||
case TOKEN_MIRROR_Y:
|
||||
parser.ScanStr(params, "%b", &_mirrorY);
|
||||
parser.scanStr(params, "%b", &_mirrorY);
|
||||
break;
|
||||
|
||||
case TOKEN_DECORATION:
|
||||
parser.ScanStr(params, "%b", &_decoration);
|
||||
parser.scanStr(params, "%b", &_decoration);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA_COLOR:
|
||||
parser.ScanStr(params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
parser.scanStr(params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA:
|
||||
parser.ScanStr(params, "%d", &alpha);
|
||||
parser.scanStr(params, "%d", &alpha);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_SELECTED:
|
||||
parser.ScanStr(params, "%b", &_editorSelected);
|
||||
parser.scanStr(params, "%b", &_editorSelected);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -200,14 +200,14 @@ HRESULT CUIButton::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_BUTTON) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_BUTTON) {
|
||||
Game->LOG(0, "'BUTTON' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while (cmd > 0 && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while (cmd > 0 && (cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -363,19 +363,19 @@ HRESULT CUIButton::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_X:
|
||||
parser.ScanStr((char *)params, "%d", &_posX);
|
||||
parser.scanStr((char *)params, "%d", &_posX);
|
||||
break;
|
||||
|
||||
case TOKEN_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_posY);
|
||||
parser.scanStr((char *)params, "%d", &_posY);
|
||||
break;
|
||||
|
||||
case TOKEN_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_width);
|
||||
parser.scanStr((char *)params, "%d", &_width);
|
||||
break;
|
||||
|
||||
case TOKEN_HEIGHT:
|
||||
parser.ScanStr((char *)params, "%d", &_height);
|
||||
parser.scanStr((char *)params, "%d", &_height);
|
||||
break;
|
||||
|
||||
case TOKEN_CURSOR:
|
||||
@ -393,31 +393,31 @@ HRESULT CUIButton::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_PARENT_NOTIFY:
|
||||
parser.ScanStr((char *)params, "%b", &_parentNotify);
|
||||
parser.scanStr((char *)params, "%b", &_parentNotify);
|
||||
break;
|
||||
|
||||
case TOKEN_DISABLED:
|
||||
parser.ScanStr((char *)params, "%b", &_disable);
|
||||
parser.scanStr((char *)params, "%b", &_disable);
|
||||
break;
|
||||
|
||||
case TOKEN_VISIBLE:
|
||||
parser.ScanStr((char *)params, "%b", &_visible);
|
||||
parser.scanStr((char *)params, "%b", &_visible);
|
||||
break;
|
||||
|
||||
case TOKEN_FOCUSABLE:
|
||||
parser.ScanStr((char *)params, "%b", &_canFocus);
|
||||
parser.scanStr((char *)params, "%b", &_canFocus);
|
||||
break;
|
||||
|
||||
case TOKEN_CENTER_IMAGE:
|
||||
parser.ScanStr((char *)params, "%b", &_centerImage);
|
||||
parser.scanStr((char *)params, "%b", &_centerImage);
|
||||
break;
|
||||
|
||||
case TOKEN_PRESSED:
|
||||
parser.ScanStr((char *)params, "%b", &_stayPressed);
|
||||
parser.scanStr((char *)params, "%b", &_stayPressed);
|
||||
break;
|
||||
|
||||
case TOKEN_PIXEL_PERFECT:
|
||||
parser.ScanStr((char *)params, "%b", &_pixelPerfect);
|
||||
parser.scanStr((char *)params, "%b", &_pixelPerfect);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -170,14 +170,14 @@ HRESULT CUIEdit::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_EDIT) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_EDIT) {
|
||||
Game->LOG(0, "'EDIT' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while (cmd > 0 && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while (cmd > 0 && (cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -225,23 +225,23 @@ HRESULT CUIEdit::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_X:
|
||||
parser.ScanStr((char *)params, "%d", &_posX);
|
||||
parser.scanStr((char *)params, "%d", &_posX);
|
||||
break;
|
||||
|
||||
case TOKEN_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_posY);
|
||||
parser.scanStr((char *)params, "%d", &_posY);
|
||||
break;
|
||||
|
||||
case TOKEN_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_width);
|
||||
parser.scanStr((char *)params, "%d", &_width);
|
||||
break;
|
||||
|
||||
case TOKEN_HEIGHT:
|
||||
parser.ScanStr((char *)params, "%d", &_height);
|
||||
parser.scanStr((char *)params, "%d", &_height);
|
||||
break;
|
||||
|
||||
case TOKEN_MAX_LENGTH:
|
||||
parser.ScanStr((char *)params, "%d", &_maxLength);
|
||||
parser.scanStr((char *)params, "%d", &_maxLength);
|
||||
break;
|
||||
|
||||
case TOKEN_CAPTION:
|
||||
@ -259,11 +259,11 @@ HRESULT CUIEdit::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_CURSOR_BLINK_RATE:
|
||||
parser.ScanStr((char *)params, "%d", &_cursorBlinkRate);
|
||||
parser.scanStr((char *)params, "%d", &_cursorBlinkRate);
|
||||
break;
|
||||
|
||||
case TOKEN_FRAME_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_frameWidth);
|
||||
parser.scanStr((char *)params, "%d", &_frameWidth);
|
||||
break;
|
||||
|
||||
case TOKEN_SCRIPT:
|
||||
@ -271,15 +271,15 @@ HRESULT CUIEdit::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_PARENT_NOTIFY:
|
||||
parser.ScanStr((char *)params, "%b", &_parentNotify);
|
||||
parser.scanStr((char *)params, "%b", &_parentNotify);
|
||||
break;
|
||||
|
||||
case TOKEN_DISABLED:
|
||||
parser.ScanStr((char *)params, "%b", &_disable);
|
||||
parser.scanStr((char *)params, "%b", &_disable);
|
||||
break;
|
||||
|
||||
case TOKEN_VISIBLE:
|
||||
parser.ScanStr((char *)params, "%b", &_visible);
|
||||
parser.scanStr((char *)params, "%b", &_visible);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -108,14 +108,14 @@ HRESULT CUIEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ENTITY_CONTAINER) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ENTITY_CONTAINER) {
|
||||
Game->LOG(0, "'ENTITY_CONTAINER' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while (cmd > 0 && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while (cmd > 0 && (cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -126,19 +126,19 @@ HRESULT CUIEntity::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_X:
|
||||
parser.ScanStr((char *)params, "%d", &_posX);
|
||||
parser.scanStr((char *)params, "%d", &_posX);
|
||||
break;
|
||||
|
||||
case TOKEN_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_posY);
|
||||
parser.scanStr((char *)params, "%d", &_posY);
|
||||
break;
|
||||
|
||||
case TOKEN_DISABLED:
|
||||
parser.ScanStr((char *)params, "%b", &_disable);
|
||||
parser.scanStr((char *)params, "%b", &_disable);
|
||||
break;
|
||||
|
||||
case TOKEN_VISIBLE:
|
||||
parser.ScanStr((char *)params, "%b", &_visible);
|
||||
parser.scanStr((char *)params, "%b", &_visible);
|
||||
break;
|
||||
|
||||
case TOKEN_ENTITY:
|
||||
|
@ -167,14 +167,14 @@ HRESULT CUIText::loadBuffer(byte *buffer, bool complete) {
|
||||
CBParser parser(Game);
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_STATIC) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_STATIC) {
|
||||
Game->LOG(0, "'STATIC' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while (cmd > 0 && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while (cmd > 0 && (cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -232,19 +232,19 @@ HRESULT CUIText::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_X:
|
||||
parser.ScanStr((char *)params, "%d", &_posX);
|
||||
parser.scanStr((char *)params, "%d", &_posX);
|
||||
break;
|
||||
|
||||
case TOKEN_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_posY);
|
||||
parser.scanStr((char *)params, "%d", &_posY);
|
||||
break;
|
||||
|
||||
case TOKEN_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_width);
|
||||
parser.scanStr((char *)params, "%d", &_width);
|
||||
break;
|
||||
|
||||
case TOKEN_HEIGHT:
|
||||
parser.ScanStr((char *)params, "%d", &_height);
|
||||
parser.scanStr((char *)params, "%d", &_height);
|
||||
break;
|
||||
|
||||
case TOKEN_CURSOR:
|
||||
@ -262,15 +262,15 @@ HRESULT CUIText::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_PARENT_NOTIFY:
|
||||
parser.ScanStr((char *)params, "%b", &_parentNotify);
|
||||
parser.scanStr((char *)params, "%b", &_parentNotify);
|
||||
break;
|
||||
|
||||
case TOKEN_DISABLED:
|
||||
parser.ScanStr((char *)params, "%b", &_disable);
|
||||
parser.scanStr((char *)params, "%b", &_disable);
|
||||
break;
|
||||
|
||||
case TOKEN_VISIBLE:
|
||||
parser.ScanStr((char *)params, "%b", &_visible);
|
||||
parser.scanStr((char *)params, "%b", &_visible);
|
||||
break;
|
||||
|
||||
case TOKEN_EDITOR_PROPERTY:
|
||||
|
@ -185,14 +185,14 @@ HRESULT CUITiledImage::loadBuffer(byte *buffer, bool complete) {
|
||||
int V1 = 0, V2 = 0, V3 = 0;
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_TILED_IMAGE) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_TILED_IMAGE) {
|
||||
Game->LOG(0, "'TILED_IMAGE' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -209,48 +209,48 @@ HRESULT CUITiledImage::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_UP_LEFT:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_upLeft.left, &_upLeft.top, &_upLeft.right, &_upLeft.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_upLeft.left, &_upLeft.top, &_upLeft.right, &_upLeft.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_UP_RIGHT:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_upRight.left, &_upRight.top, &_upRight.right, &_upRight.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_upRight.left, &_upRight.top, &_upRight.right, &_upRight.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_UP_MIDDLE:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_upMiddle.left, &_upMiddle.top, &_upMiddle.right, &_upMiddle.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_upMiddle.left, &_upMiddle.top, &_upMiddle.right, &_upMiddle.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_DOWN_LEFT:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_downLeft.left, &_downLeft.top, &_downLeft.right, &_downLeft.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_downLeft.left, &_downLeft.top, &_downLeft.right, &_downLeft.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_DOWN_RIGHT:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_downRight.left, &_downRight.top, &_downRight.right, &_downRight.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_downRight.left, &_downRight.top, &_downRight.right, &_downRight.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_DOWN_MIDDLE:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_downMiddle.left, &_downMiddle.top, &_downMiddle.right, &_downMiddle.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_downMiddle.left, &_downMiddle.top, &_downMiddle.right, &_downMiddle.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_MIDDLE_LEFT:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_middleLeft.left, &_middleLeft.top, &_middleLeft.right, &_middleLeft.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_middleLeft.left, &_middleLeft.top, &_middleLeft.right, &_middleLeft.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_MIDDLE_RIGHT:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_middleRight.left, &_middleRight.top, &_middleRight.right, &_middleRight.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_middleRight.left, &_middleRight.top, &_middleRight.right, &_middleRight.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_MIDDLE_MIDDLE:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_middleMiddle.left, &_middleMiddle.top, &_middleMiddle.right, &_middleMiddle.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_middleMiddle.left, &_middleMiddle.top, &_middleMiddle.right, &_middleMiddle.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_HORIZONTAL_TILES:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d", &H1, &H2, &H3);
|
||||
parser.scanStr((char *)params, "%d,%d,%d", &H1, &H2, &H3);
|
||||
HTiles = true;
|
||||
break;
|
||||
|
||||
case TOKEN_VERTICAL_TILES:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d", &V1, &V2, &V3);
|
||||
parser.scanStr((char *)params, "%d,%d,%d", &V1, &V2, &V3);
|
||||
VTiles = true;
|
||||
break;
|
||||
|
||||
|
@ -307,14 +307,14 @@ HRESULT CUIWindow::loadBuffer(byte *buffer, bool complete) {
|
||||
int ar = 0, ag = 0, ab = 0, alpha = 0;
|
||||
|
||||
if (complete) {
|
||||
if (parser.GetCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_WINDOW) {
|
||||
if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_WINDOW) {
|
||||
Game->LOG(0, "'WINDOW' keyword expected.");
|
||||
return E_FAIL;
|
||||
}
|
||||
buffer = params;
|
||||
}
|
||||
|
||||
while (cmd >= PARSERR_TOKENNOTFOUND && (cmd = parser.GetCommand((char **)&buffer, commands, (char **)¶ms)) >= PARSERR_TOKENNOTFOUND) {
|
||||
while (cmd >= PARSERR_TOKENNOTFOUND && (cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) >= PARSERR_TOKENNOTFOUND) {
|
||||
switch (cmd) {
|
||||
case TOKEN_TEMPLATE:
|
||||
if (FAILED(loadFile((char *)params))) cmd = PARSERR_GENERIC;
|
||||
@ -392,27 +392,27 @@ HRESULT CUIWindow::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_TITLE_RECT:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_titleRect.left, &_titleRect.top, &_titleRect.right, &_titleRect.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_titleRect.left, &_titleRect.top, &_titleRect.right, &_titleRect.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_DRAG_RECT:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d,%d", &_dragRect.left, &_dragRect.top, &_dragRect.right, &_dragRect.bottom);
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &_dragRect.left, &_dragRect.top, &_dragRect.right, &_dragRect.bottom);
|
||||
break;
|
||||
|
||||
case TOKEN_X:
|
||||
parser.ScanStr((char *)params, "%d", &_posX);
|
||||
parser.scanStr((char *)params, "%d", &_posX);
|
||||
break;
|
||||
|
||||
case TOKEN_Y:
|
||||
parser.ScanStr((char *)params, "%d", &_posY);
|
||||
parser.scanStr((char *)params, "%d", &_posY);
|
||||
break;
|
||||
|
||||
case TOKEN_WIDTH:
|
||||
parser.ScanStr((char *)params, "%d", &_width);
|
||||
parser.scanStr((char *)params, "%d", &_width);
|
||||
break;
|
||||
|
||||
case TOKEN_HEIGHT:
|
||||
parser.ScanStr((char *)params, "%d", &_height);
|
||||
parser.scanStr((char *)params, "%d", &_height);
|
||||
break;
|
||||
|
||||
case TOKEN_CURSOR:
|
||||
@ -479,7 +479,7 @@ HRESULT CUIWindow::loadBuffer(byte *buffer, bool complete) {
|
||||
|
||||
|
||||
case TOKEN_TRANSPARENT:
|
||||
parser.ScanStr((char *)params, "%b", &_transparent);
|
||||
parser.scanStr((char *)params, "%b", &_transparent);
|
||||
break;
|
||||
|
||||
case TOKEN_SCRIPT:
|
||||
@ -487,40 +487,40 @@ HRESULT CUIWindow::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_PARENT_NOTIFY:
|
||||
parser.ScanStr((char *)params, "%b", &_parentNotify);
|
||||
parser.scanStr((char *)params, "%b", &_parentNotify);
|
||||
break;
|
||||
|
||||
case TOKEN_PAUSE_MUSIC:
|
||||
parser.ScanStr((char *)params, "%b", &_pauseMusic);
|
||||
parser.scanStr((char *)params, "%b", &_pauseMusic);
|
||||
break;
|
||||
|
||||
case TOKEN_DISABLED:
|
||||
parser.ScanStr((char *)params, "%b", &_disable);
|
||||
parser.scanStr((char *)params, "%b", &_disable);
|
||||
break;
|
||||
|
||||
case TOKEN_VISIBLE:
|
||||
parser.ScanStr((char *)params, "%b", &_visible);
|
||||
parser.scanStr((char *)params, "%b", &_visible);
|
||||
break;
|
||||
|
||||
case TOKEN_MENU:
|
||||
parser.ScanStr((char *)params, "%b", &_isMenu);
|
||||
parser.scanStr((char *)params, "%b", &_isMenu);
|
||||
break;
|
||||
|
||||
case TOKEN_IN_GAME:
|
||||
parser.ScanStr((char *)params, "%b", &_inGame);
|
||||
parser.scanStr((char *)params, "%b", &_inGame);
|
||||
break;
|
||||
|
||||
case TOKEN_CLIP_CONTENTS:
|
||||
parser.ScanStr((char *)params, "%b", &_clipContents);
|
||||
parser.scanStr((char *)params, "%b", &_clipContents);
|
||||
break;
|
||||
|
||||
case TOKEN_FADE_COLOR:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d", &FadeR, &FadeG, &FadeB);
|
||||
parser.scanStr((char *)params, "%d,%d,%d", &FadeR, &FadeG, &FadeB);
|
||||
_fadeBackground = true;
|
||||
break;
|
||||
|
||||
case TOKEN_FADE_ALPHA:
|
||||
parser.ScanStr((char *)params, "%d", &FadeA);
|
||||
parser.scanStr((char *)params, "%d", &FadeA);
|
||||
_fadeBackground = true;
|
||||
break;
|
||||
|
||||
@ -529,11 +529,11 @@ HRESULT CUIWindow::loadBuffer(byte *buffer, bool complete) {
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA_COLOR:
|
||||
parser.ScanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
parser.scanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab);
|
||||
break;
|
||||
|
||||
case TOKEN_ALPHA:
|
||||
parser.ScanStr((char *)params, "%d", &alpha);
|
||||
parser.scanStr((char *)params, "%d", &alpha);
|
||||
break;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user