aboutsummaryrefslogtreecommitdiff
path: root/tools/create_hugo/create_hugo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/create_hugo/create_hugo.cpp')
-rw-r--r--tools/create_hugo/create_hugo.cpp56
1 files changed, 32 insertions, 24 deletions
diff --git a/tools/create_hugo/create_hugo.cpp b/tools/create_hugo/create_hugo.cpp
index fc3ac8a168..7f4198704c 100644
--- a/tools/create_hugo/create_hugo.cpp
+++ b/tools/create_hugo/create_hugo.cpp
@@ -25,6 +25,9 @@
* data file, used by the game engine
*/
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
// HACK to allow building with the SDL backend on MinGW
// see bug #1800764 "TOOLS: MinGW tools building broken"
#ifdef main
@@ -47,7 +50,6 @@
#include "staticintro.h"
#include "staticmouse.h"
#include "staticparser.h"
-#include "staticschedule.h"
#include "staticutil.h"
#include "staticfont.h"
@@ -55,6 +57,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));
@@ -358,11 +364,13 @@ int main(int argc, char *argv[]) {
// Write textParser
writeTextArray(outFile, textParser, NUM_PARSER_TEXT);
- // Write textSchedule
- writeTextArray(outFile, textSchedule, NUM_SCHEDULE_TEXT);
-
// Write textUtil
- writeTextArray(outFile, textUtil, NUM_UTIL_TEXT);
+ writeTextArray(outFile, textUtil_v1w, NUM_UTIL_TEXT);
+ writeTextArray(outFile, textUtil_v1w, NUM_UTIL_TEXT);
+ writeTextArray(outFile, textUtil_v1w, NUM_UTIL_TEXT);
+ writeTextArray(outFile, textUtil_v1d, NUM_UTIL_TEXT);
+ writeTextArray(outFile, textUtil_v1d, NUM_UTIL_TEXT);
+ writeTextArray(outFile, textUtil_v1d, NUM_UTIL_TEXT);
// arrayReqs_1w
nbrElem = sizeof(arrayReqs_1w) / sizeof(uint16 *);
@@ -700,29 +708,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);
@@ -804,7 +812,7 @@ int main(int argc, char *argv[]) {
writeUint16BE(outFile, LASTOBJ_1w);
writeUint16BE(outFile, LASTOBJ_2w);
writeUint16BE(outFile, LASTOBJ_3w);
- writeUint16BE(outFile, NUM_PICS_1d); //(not set in original, as Hugo1 DOS doesn't use a DAT file to pack the screens)
+ writeUint16BE(outFile, LASTOBJ_1d); //(not set in original, as Hugo1 DOS doesn't use a DAT file to pack the screens)
writeUint16BE(outFile, LASTOBJ_2d);
writeUint16BE(outFile, LASTOBJ_3d);