GLK: Fix warnings

This commit is contained in:
Eugene Sandulenko 2020-01-31 12:16:31 +01:00
parent 7079f01044
commit 02aee2f328
3 changed files with 14 additions and 14 deletions

View File

@ -547,7 +547,7 @@ struct word_type *object_match(struct word_type *iterator, int noun_number) {
do {
/* THIS LOOP MEANS THAT CERTAIN ERRORS SUCH AS TAKING FROM A
* CLOSED CONTAINER CAN OCCUR MORE THAN ONCE */
if ((iterator->word[0] == '*')) {
if (iterator->word[0] == '*') {
object_was_option = TRUE;
if (build_object_list(iterator, noun_number)) {
/* RETURN THE POINT IN THE GRAMMAR TREE THAT MATCHED TO

View File

@ -770,11 +770,11 @@ static const gln_patch_table_t GLN_PATCH_TABLE[] = {
};
const L9V1GameInfo L9_V1_GAMES[] = {
0x1a, 0x24, 301, { 0x0000, -0x004b, 0x0080, -0x002b, 0x00d0 }, 0x03b0, 0x0f80, 0x4857, /* Colossal Adventure */
0x20, 0x3b, 283, { -0x0583, 0x0000, -0x0508, -0x04e0, 0x0000 }, 0x0800, 0x1000, 0x39d1, /* Adventure Quest */
0x14, 0xff, 153, { -0x00d6, 0x0000, 0x0000, 0x0000, 0x0000 }, 0x0a20, 0x16bf, 0x420d, /* Dungeon Adventure */
0x15, 0x5d, 252, { -0x3e70, 0x0000, -0x3d30, -0x3ca0, 0x0100 }, 0x4120, -0x3b9d, 0x3988, /* Lords of Time */
0x15, 0x6c, 284, { -0x00f0, 0x0000, -0x0050, -0x0050, -0x0050 }, 0x0300, 0x1930, 0x3c17, /* Snowball */
{ 0x1a, 0x24, 301, { 0x0000, -0x004b, 0x0080, -0x002b, 0x00d0 }, 0x03b0, 0x0f80, 0x4857 }, /* Colossal Adventure */
{ 0x20, 0x3b, 283, { -0x0583, 0x0000, -0x0508, -0x04e0, 0x0000 }, 0x0800, 0x1000, 0x39d1 }, /* Adventure Quest */
{ 0x14, 0xff, 153, { -0x00d6, 0x0000, 0x0000, 0x0000, 0x0000 }, 0x0a20, 0x16bf, 0x420d }, /* Dungeon Adventure */
{ 0x15, 0x5d, 252, { -0x3e70, 0x0000, -0x3d30, -0x3ca0, 0x0100 }, 0x4120, -0x3b9d, 0x3988 }, /* Lords of Time */
{ 0x15, 0x6c, 284, { -0x00f0, 0x0000, -0x0050, -0x0050, -0x0050 }, 0x0300, 0x1930, 0x3c17 } /* Snowball */
};
const GlkDetectionEntry LEVEL9_GAMES[] = {

View File

@ -1070,7 +1070,7 @@ void geas_implementation::run_command(String s) {
oss << state;
print_normal(oss.str());
return;
} else if (s == "undo") {
if (undo_buffer.size() < 2) {
print_formatted("(No more undo information available!)");
@ -1080,12 +1080,12 @@ void geas_implementation::run_command(String s) {
state = undo_buffer.peek();
print_formatted("Undone.");
return;
} else if (s == "save") {
if (g_vm->saveGame().getCode() == Common::kNoError)
print_formatted("Saved.");
return;
} else if (s == "restore") {
if (g_vm->loadGame().getCode() == Common::kNoError)
run_command("look");
@ -1425,7 +1425,7 @@ bool geas_implementation::run_commands(String cmd, const GeasBlock *room, bool i
Common::Array<String> tmp = split_param(param_contents(tok));
for (uint j = 0; j < tmp.size(); j++)
if (match = match_command(cmd, tmp[j])) {
if ((match = match_command(cmd, tmp[j]))) {
if (!dereference_vars(match.bindings, is_internal))
return false;
set_vars(match.bindings);
@ -1505,12 +1505,12 @@ bool geas_implementation::try_match(String cmd, bool is_internal, bool is_normal
return true;
}
if (match = match_command(cmd, "look")) {
if ((match = match_command(cmd, "look"))) {
look();
return true;
}
if (match = match_command(cmd, "give #@first# to #@second#")) {
if ((match = match_command(cmd, "give #@first# to #@second#"))) {
if (!dereference_vars(match.bindings, is_internal))
return true;
String script, first = match.bindings[0].var_text, second = match.bindings[1].var_text;
@ -1572,7 +1572,7 @@ bool geas_implementation::try_match(String cmd, bool is_internal, bool is_normal
return true;
}
if (match = match_command(cmd, "use #@first#")) {
if ((match = match_command(cmd, "use #@first#"))) {
if (!dereference_vars(match.bindings, is_internal))
return true;
String tmp, obj = match.bindings[0].var_text;
@ -1621,7 +1621,7 @@ bool geas_implementation::try_match(String cmd, bool is_internal, bool is_normal
}
if (match = match_command(cmd, "drop #@object#")) {
if ((match = match_command(cmd, "drop #@object#"))) {
if (!dereference_vars(match.bindings, is_internal))
return true;
String scr, obj = match.bindings[0].var_text;