aboutsummaryrefslogtreecommitdiff
path: root/tools/create_hugo/create_hugo.cpp
diff options
context:
space:
mode:
authorArnaud Boutonné2010-10-31 18:27:53 +0000
committerArnaud Boutonné2010-10-31 18:27:53 +0000
commit88892dc982362cdaae8fa67fec7600041375fbd9 (patch)
treec1c8e28e760ed30ed01191948a21d9266e655f5b /tools/create_hugo/create_hugo.cpp
parentc94278fb20977db7de6a3738dd876249fff1fec7 (diff)
downloadscummvm-rg350-88892dc982362cdaae8fa67fec7600041375fbd9.tar.gz
scummvm-rg350-88892dc982362cdaae8fa67fec7600041375fbd9.tar.bz2
scummvm-rg350-88892dc982362cdaae8fa67fec7600041375fbd9.zip
TOOLS: Fix GCC warnings reported by Fingolgin in create_hugo
Also realign arrays to make them (a bit) more readable. These modifications don't modify Hugo.dat svn-id: r53983
Diffstat (limited to 'tools/create_hugo/create_hugo.cpp')
-rw-r--r--tools/create_hugo/create_hugo.cpp40
1 files changed, 22 insertions, 18 deletions
diff --git a/tools/create_hugo/create_hugo.cpp b/tools/create_hugo/create_hugo.cpp
index 031804f8e1..921d09d7ef 100644
--- a/tools/create_hugo/create_hugo.cpp
+++ b/tools/create_hugo/create_hugo.cpp
@@ -58,6 +58,10 @@ static void writeByte(FILE *fp, uint8 b) {
fwrite(&b, 1, 1, fp);
}
+static void writeSByte(FILE *fp, int8 b) {
+ fwrite(&b, 1, 1, fp);
+}
+
static void writeUint16BE(FILE *fp, uint16 value) {
writeByte(fp, (uint8)(value >> 8));
writeByte(fp, (uint8)(value & 0xFF));
@@ -703,29 +707,29 @@ int main(int argc, char *argv[]) {
nbrElem = sizeof(actListArr_3d) / sizeof(actList);
writeActListArray(outFile, actListArr_3d, nbrElem);
- writeByte(outFile, NUM_TUNES_1w);
- writeByte(outFile, SILENCE_1w);
- writeByte(outFile, TEST_SOUND_1w);
+ writeSByte(outFile, NUM_TUNES_1w);
+ writeSByte(outFile, SILENCE_1w);
+ writeSByte(outFile, TEST_SOUND_1w);
- writeByte(outFile, NUM_TUNES_2w);
- writeByte(outFile, SILENCE_2w);
- writeByte(outFile, TEST_SOUND_2w);
+ writeSByte(outFile, NUM_TUNES_2w);
+ writeSByte(outFile, SILENCE_2w);
+ writeSByte(outFile, TEST_SOUND_2w);
- writeByte(outFile, NUM_TUNES_3w);
- writeByte(outFile, SILENCE_3w);
- writeByte(outFile, TEST_SOUND_3w);
+ writeSByte(outFile, NUM_TUNES_3w);
+ writeSByte(outFile, SILENCE_3w);
+ writeSByte(outFile, TEST_SOUND_3w);
- writeByte(outFile, NUM_TUNES_1d);
- writeByte(outFile, SILENCE_1d);
- writeByte(outFile, TEST_SOUND_1d);
+ writeSByte(outFile, NUM_TUNES_1d);
+ writeSByte(outFile, SILENCE_1d);
+ writeSByte(outFile, TEST_SOUND_1d);
- writeByte(outFile, NUM_TUNES_2d);
- writeByte(outFile, SILENCE_2d);
- writeByte(outFile, TEST_SOUND_2d);
+ writeSByte(outFile, NUM_TUNES_2d);
+ writeSByte(outFile, SILENCE_2d);
+ writeSByte(outFile, TEST_SOUND_2d);
- writeByte(outFile, NUM_TUNES_3d);
- writeByte(outFile, SILENCE_3d);
- writeByte(outFile, TEST_SOUND_3d);
+ writeSByte(outFile, NUM_TUNES_3d);
+ writeSByte(outFile, SILENCE_3d);
+ writeSByte(outFile, TEST_SOUND_3d);
// def_tunes_1w
nbrElem = sizeof(def_tunes_1w) / sizeof(int16);