diff options
author | Eugene Sandulenko | 2016-09-05 08:48:51 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-05 08:48:51 +0200 |
commit | 39ce7bc7ff5d4f917e4bf1e870d27a774a6bf25d (patch) | |
tree | 93022202ffd037d46456f9718a9777937d4cd63b /devtools/create_titanic | |
parent | 70a447975e854833edc59f7fd9e2cf5e8b3c6472 (diff) | |
download | scummvm-rg350-39ce7bc7ff5d4f917e4bf1e870d27a774a6bf25d.tar.gz scummvm-rg350-39ce7bc7ff5d4f917e4bf1e870d27a774a6bf25d.tar.bz2 scummvm-rg350-39ce7bc7ff5d4f917e4bf1e870d27a774a6bf25d.zip |
DEVTOOLS: Fix warnings
Diffstat (limited to 'devtools/create_titanic')
-rw-r--r-- | devtools/create_titanic/create_titanic_dat.cpp | 24 | ||||
-rw-r--r-- | devtools/create_titanic/file.h | 4 | ||||
-rw-r--r-- | devtools/create_titanic/script_preresponses.cpp | 2 | ||||
-rw-r--r-- | devtools/create_titanic/script_quotes.cpp | 4 | ||||
-rw-r--r-- | devtools/create_titanic/script_ranges.cpp | 6 | ||||
-rw-r--r-- | devtools/create_titanic/script_responses.cpp | 6 | ||||
-rw-r--r-- | devtools/create_titanic/script_states.cpp | 4 | ||||
-rw-r--r-- | devtools/create_titanic/tag_maps.cpp | 2 |
8 files changed, 26 insertions, 26 deletions
diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp index 61e5de1149..270632744b 100644 --- a/devtools/create_titanic/create_titanic_dat.cpp +++ b/devtools/create_titanic/create_titanic_dat.cpp @@ -77,8 +77,8 @@ enum Version { }; Version _version; -const int FILE_DIFF[3] = { - ENGLISH_10042C_DIFF, ENGLISH_10042B_DIFF, ENGLISH_10042_DIFF +const int FILE_DIFF[3] = { + ENGLISH_10042C_DIFF, ENGLISH_10042B_DIFF, ENGLISH_10042_DIFF }; static const char *const ITEM_NAMES[46] = { @@ -498,7 +498,7 @@ void writeResource(const char *name, Common::File *file) { void writeResource(const char *sectionStr, uint32 resId) { char nameBuffer[256]; sprintf(nameBuffer, "%s/%u", sectionStr, resId); - + Common::File *file = res.getResource(getResId(sectionStr), resId); assert(file); writeResource(nameBuffer, file); @@ -508,7 +508,7 @@ void writeResource(const char *sectionStr, const char *resId) { char nameBuffer[256]; sprintf(nameBuffer, "%s/%s", sectionStr, resId); - Common::File *file = res.getResource(getResId(sectionStr), + Common::File *file = res.getResource(getResId(sectionStr), Common::WinResourceID(resId)); assert(file); writeResource(nameBuffer, file); @@ -577,8 +577,8 @@ void writeString(uint offset) { void writeResponseTree() { outputFile.seek(dataOffset); - - const int OFFSETS[3] = { 0x619520, 0x618340, 0x617380 }; + + const uint OFFSETS[3] = { 0x619520, 0x618340, 0x617380 }; for (int idx = 0; idx < 1022; ++idx) { inputFile.seek(OFFSETS[_version] - FILE_DIFF[_version] + idx * 8); uint id = inputFile.readLong(); @@ -606,7 +606,7 @@ void writeResponseTree() { void writeSentenceEntries(const char *name, uint tableOffset) { outputFile.seek(dataOffset); - uint v1, v2, v4, v9, v11, v12, v13; + uint v1, v2, v9, v11, v12, v13; uint offset3, offset5, offset6, offset7, offset8, offset10; for (uint idx = 0; ; ++idx) { @@ -619,7 +619,7 @@ void writeSentenceEntries(const char *name, uint tableOffset) { // Read data fields v2 = inputFile.readLong(); offset3 = inputFile.readLong(); - v4 = inputFile.readLong(); + /* v4 = */inputFile.readLong(); offset5 = inputFile.readLong(); offset6 = inputFile.readLong(); offset7 = inputFile.readLong(); @@ -813,7 +813,7 @@ void writeParrotLobbyLinkUpdaterEntries() { linkOffset = inputFile.readUint32LE(); for (int idx = 0; idx < 8; ++idx) vals[idx] = inputFile.readUint32LE(); - + // Write out the entry inputFile.seek(linkOffset - FILE_DIFF[_version]); outputFile.writeString(inputFile); @@ -889,7 +889,7 @@ void writeData() { { 0x5C2230, 0x5C10C8, 0X5C0108 }, { 0x5D1670, 0x5D0508, 0x5CF548 }, { 0x5D1A80, 0x5D0918, 0x5CF958 }, { 0x5D1AE8, 0x5D0980, 0x5CF9C0 }, { 0x5D1B88, 0x5D0A20, 0x5CFA60 }, { 0x5D2A60, 0x5D18F8, 0x5D0938 }, - { 0x5D2CD0, 0x5D1B68, 0x5D0BA8 }, { 0x5D3488, 0x5D2320, 0x5D1360 }, + { 0x5D2CD0, 0x5D1B68, 0x5D0BA8 }, { 0x5D3488, 0x5D2320, 0x5D1360 }, { 0x5D3900, 0x5D2798, 0x5D17D8 }, { 0x5D3968, 0x5D2800, 0x5D1840 }, { 0x5D4668, 0x5D3500, 0x5D2540 }, { 0x5D47A0, 0x5D3638, 0x5D2678 }, { 0x5D4EC0, 0x5D3D58, 0x5D2D98 }, { 0x5D5100, 0x5D3F98, 0x5D2FD8 }, @@ -928,7 +928,7 @@ void writeData() { writeSentenceEntries("Sentences/Deskbot", SENTENCES_DESKBOT[0][_version]); writeSentenceEntries("Sentences/Deskbot/2", SENTENCES_DESKBOT[1][_version]); writeSentenceEntries("Sentences/Deskbot/3", SENTENCES_DESKBOT[2][_version]); - + const int SENTENCES_DOORBOT[12][3] = { { 0x5EC110, 0x5EAFA8, 0x5E9FE8 }, { 0x5FD930, 0x5FC7C8, 0x5FB808 }, { 0x5FDD0C, 0x5FCBA4, 0x5FBBE4 }, { 0x5FE668, 0x5FD500, 0x5FC540 }, @@ -1036,7 +1036,7 @@ void createScriptMap() { if ((counter % 3) == 0) printf("\t"); - printf("{ 0x%.5x, 0x%.5x }, ", v1, v2); + printf("{ 0x%.5x, 0x%.5x }, ", (uint)v1, (uint)v2); ++counter; } while (!inFile.eof()); diff --git a/devtools/create_titanic/file.h b/devtools/create_titanic/file.h index 4580e83b19..5ce45a6b9d 100644 --- a/devtools/create_titanic/file.h +++ b/devtools/create_titanic/file.h @@ -52,11 +52,11 @@ public: _f = fopen(filename, (mode == kFileReadMode) ? "rb" : "wb+"); return (_f != NULL); } - bool open(const byte *data, uint size) { + bool open(const byte *data, uint size_) { close(); _f = nullptr; _memPtr = data; - _size = size; + _size = size_; return true; } diff --git a/devtools/create_titanic/script_preresponses.cpp b/devtools/create_titanic/script_preresponses.cpp index d906015296..a12210a53c 100644 --- a/devtools/create_titanic/script_preresponses.cpp +++ b/devtools/create_titanic/script_preresponses.cpp @@ -153,4 +153,4 @@ void writeScriptPreResponses(const char *name, const PreResponse *states) { void writeAllScriptPreResponses() { writeScriptPreResponses("PreResponses/Barbot", BARBOT_PRERESPONSES); writeScriptPreResponses("PreResponses/Bellbot", BELLBOT_PRERESPONSES); -}
\ No newline at end of file +} diff --git a/devtools/create_titanic/script_quotes.cpp b/devtools/create_titanic/script_quotes.cpp index 7e4838c338..4d6b99026c 100644 --- a/devtools/create_titanic/script_quotes.cpp +++ b/devtools/create_titanic/script_quotes.cpp @@ -428,7 +428,7 @@ static const ScriptQuote MAITRED_QUOTES[] = { { 0x00000000, 0x00000000, 0x00000000 } }; -void writeScriptQuotes(const char *name, const ScriptQuote *quotes, +void writeScriptQuotes(const char *name, const ScriptQuote *quotes, uint tag1, uint tag2, uint rangeStart, uint rangeEnd) { outputFile.seek(dataOffset); outputFile.writeLong(tag1); @@ -454,4 +454,4 @@ void writeAllScriptQuotes() { writeScriptQuotes("Quotes/Doorbot", DOORBOT_QUOTES, 221376, 221375, 0, 999); writeScriptQuotes("Quotes/Liftbot", LIFTBOT_QUOTES, 210581, 210580, 0, 999); writeScriptQuotes("Quotes/MaitreD", MAITRED_QUOTES, 260167, 260147, 270000, 270500); -}
\ No newline at end of file +} diff --git a/devtools/create_titanic/script_ranges.cpp b/devtools/create_titanic/script_ranges.cpp index 6ac8092e3a..c00c30da47 100644 --- a/devtools/create_titanic/script_ranges.cpp +++ b/devtools/create_titanic/script_ranges.cpp @@ -1399,7 +1399,7 @@ const ScriptRange LIFTBOT_RANGES[39] = { }; const uint MAITRED_RANGE1[] = { 260009, 260010, 260011, 260012, 0 }; -const uint MAITRED_RANGE2[] = { +const uint MAITRED_RANGE2[] = { 260043, 260013, 260044, 260014, 260017, 260015, 260016, 260040, 260042, 260019, 260029, 260021, 260018, 260020, 260022, 260023, 260041, 260028, 260045, 260031, 260032, 260033, 260030, 260046, 260034, 260039, 0 @@ -1450,7 +1450,7 @@ const uint MAITRED_RANGE22[] = { }; const uint MAITRED_RANGE23[] = { 260185, 260186, 260187, 260188, 0 }; const uint MAITRED_RANGE24[] = { 260191, 260192, 260193, 0 }; -const uint MAITRED_RANGE25[] = { 260203, 260204, 0 }; +const uint MAITRED_RANGE25[] = { 260203, 260204, 0 }; const uint MAITRED_RANGE26[] = { 260217, 260218, 260219, 260220, 0 }; const uint MAITRED_RANGE27[] = { 260263, 260264, 260265, 260427, 260053, 0 }; const uint MAITRED_RANGE28[] = { 260266, 260267, 260268, 0 }; @@ -1801,4 +1801,4 @@ void writeAllScriptRanges() { writeScriptRange("Ranges/MaitreD", MAITRED_RANGES, MAITRED_RANGE_COUNT); writeScriptRange("Ranges/Parrot", PARROT_RANGES, PARROT_RANGE_COUNT); writeScriptRange("Ranges/SuccUBus", SUCCUBUS_RANGES, SUCCUBUS_RANGE_COUNT); -}
\ No newline at end of file +} diff --git a/devtools/create_titanic/script_responses.cpp b/devtools/create_titanic/script_responses.cpp index 30d0c7f1bd..0113403fc9 100644 --- a/devtools/create_titanic/script_responses.cpp +++ b/devtools/create_titanic/script_responses.cpp @@ -612,9 +612,9 @@ const int MAITRED_RESPONSES[74][2] = { void writeScriptResponses(const char *name, const int *tags, uint count, int valuesPerTag) { outputFile.seek(dataOffset); - for (int idx = 0; idx < count * (valuesPerTag + 1); ++idx, ++tags) + for (uint idx = 0; idx < count * (valuesPerTag + 1); ++idx, ++tags) outputFile.writeLong(*tags); - + writeEntryHeader(name, dataOffset, count * (valuesPerTag + 1) * 4); dataOffset += count * (valuesPerTag + 1) * 4; } @@ -626,4 +626,4 @@ void writeAllScriptResponses() { writeScriptResponses("Responses/Doorbot", &DOORBOT_RESPONSES[0][0], 101, 1); writeScriptResponses("Responses/Liftbot", &LIFTBOT_RESPONSES[0][0], 34, 1); writeScriptResponses("Responses/MaitreD", &MAITRED_RESPONSES[0][0], 74, 1); -}
\ No newline at end of file +} diff --git a/devtools/create_titanic/script_states.cpp b/devtools/create_titanic/script_states.cpp index 81157441e4..3166ca7ea3 100644 --- a/devtools/create_titanic/script_states.cpp +++ b/devtools/create_titanic/script_states.cpp @@ -181,7 +181,7 @@ static const UpdateState8 BELLBOT_STATES[] = { { 0x00031070, 0x00000001 }, { 0x0003107B, 0x00000002 }, { 0x0003107E, 0x00000003 }, { 0x0003104F, 0x00000004 }, { 0x00030F23, 0x00000005 }, { 0x00030F2A, 0x00000006 }, { 0x00030F31, 0x00000007 }, { 0x00030F32, 0x00000007 }, { 0x00030F33, 0x00000007 }, - { 0x00030F34, 0x00000007 }, { 0x00030F35, 0x00000007 }, { 0x00030F36, 0x00000007 }, + { 0x00030F34, 0x00000007 }, { 0x00030F35, 0x00000007 }, { 0x00030F36, 0x00000007 }, { 0x00030F37, 0x00000008 }, { 0x00030F2E, 0x00000009 }, { 0x00030E78, 0x0000000A }, { 0x00030E42, 0x0000000C }, { 0x00030E0C, 0x0000000D }, { 0x00030E9C, 0x0000000E }, { 0x00030DC1, 0x0000000F }, { 0x00030DC2, 0x00000010 }, { 0x00030D6B, 0x00000011 }, @@ -545,4 +545,4 @@ void writeAllUpdateStates() { writeUpdateStates("States/Liftbot", LIFTBOT_STATES); writeUpdateStates("States/MaitreD", MAITRED_STATES); -}
\ No newline at end of file +} diff --git a/devtools/create_titanic/tag_maps.cpp b/devtools/create_titanic/tag_maps.cpp index d3640f8404..82589fc889 100644 --- a/devtools/create_titanic/tag_maps.cpp +++ b/devtools/create_titanic/tag_maps.cpp @@ -388,4 +388,4 @@ void writeAllTagMappings() { writeTagMappings("TagMap/Doorbot", DOORBOT_MAP, DOORBOT_COUNT); writeTagMappings("TagMap/Liftbot", LIFTBOT_MAP, LIFTBOT_COUNT); writeTagMappings("TagMap/MaitreD", MAITRED_MAP, MAITRED_COUNT); -}
\ No newline at end of file +} |