diff options
author | strangerke | 2011-02-20 11:32:00 +0100 |
---|---|---|
committer | strangerke | 2011-02-20 11:32:00 +0100 |
commit | 93f25b73be2b6aca7d5ea0321c8aba5252e86d54 (patch) | |
tree | d8fd9f24f137a1aaa7cd9e6ee5fcfd1cb759cc2f /tools/create_hugo | |
parent | ae88f41596b1331496db4dce30e84d5948244518 (diff) | |
download | scummvm-rg350-93f25b73be2b6aca7d5ea0321c8aba5252e86d54.tar.gz scummvm-rg350-93f25b73be2b6aca7d5ea0321c8aba5252e86d54.tar.bz2 scummvm-rg350-93f25b73be2b6aca7d5ea0321c8aba5252e86d54.zip |
HUGO/TOOLS: reorder things in HUGO.DAT, move from RGBA to RGB
Diffstat (limited to 'tools/create_hugo')
-rw-r--r-- | tools/create_hugo/create_hugo.cpp | 328 | ||||
-rw-r--r-- | tools/create_hugo/create_hugo.h | 2 | ||||
-rw-r--r-- | tools/create_hugo/staticdisplay.h | 66 |
3 files changed, 198 insertions, 198 deletions
diff --git a/tools/create_hugo/create_hugo.cpp b/tools/create_hugo/create_hugo.cpp index 01b6d915f0..1dffa0edf1 100644 --- a/tools/create_hugo/create_hugo.cpp +++ b/tools/create_hugo/create_hugo.cpp @@ -103,6 +103,29 @@ int main(int argc, char *argv[]) { writeByte(outFile, _palette[i]); } + // The following fonts info have been added to avoid temporarly the .FON + // used in the DOS version + // font5 + nbrElem = sizeof(font5) / sizeof(byte); + writeUint16BE(outFile, nbrElem); + + for (int j = 0; j < nbrElem; j++) + writeByte(outFile, font5[j]); + + // font6 + nbrElem = sizeof(font6) / sizeof(byte); + writeUint16BE(outFile, nbrElem); + + for (int j = 0; j < nbrElem; j++) + writeByte(outFile, font6[j]); + + // font8 + nbrElem = sizeof(font8) / sizeof(byte); + writeUint16BE(outFile, nbrElem); + + for (int j = 0; j < nbrElem; j++) + writeByte(outFile, font8[j]); + // Write textData // textData_1w nbrElem = sizeof(textData_1w) / sizeof(char *); @@ -396,6 +419,114 @@ int main(int argc, char *argv[]) { nbrElem = sizeof(arrayReqs_3d) / sizeof(uint16 *); writeUint16Array(outFile, arrayReqs_3d, nbrElem); + // catchall_1w + nbrElem = sizeof(catchall_1w) / sizeof(background_t); + writeBackgroundArray(outFile, catchall_1w, nbrElem); + + // catchall_2w + nbrElem = sizeof(catchall_2w) / sizeof(background_t); + writeBackgroundArray(outFile, catchall_2w, nbrElem); + + // catchall_3w + nbrElem = sizeof(catchall_3w) / sizeof(background_t); + writeBackgroundArray(outFile, catchall_3w, nbrElem); + + // catchall_1d + nbrElem = sizeof(catchall_1d) / sizeof(background_t); + writeBackgroundArray(outFile, catchall_1d, nbrElem); + + // catchall_2d + nbrElem = sizeof(catchall_2d) / sizeof(background_t); + writeBackgroundArray(outFile, catchall_2d, nbrElem); + + // catchall_3d + nbrElem = sizeof(catchall_3d) / sizeof(background_t); + writeBackgroundArray(outFile, catchall_3d, nbrElem); + + // backgroundList_1w + nbrElem = sizeof(backgroundList_1w) / sizeof(background_t *); + writeUint16BE(outFile, nbrElem); + for (int j = 0; j < nbrElem; j++) { + nbrSubElem = 1; + for (int k = 0; backgroundList_1w[j][k].verbIndex != 0; k++) + nbrSubElem ++; + writeBackgroundArray(outFile, backgroundList_1w[j], nbrSubElem); + } + + // backgroundList_2w + nbrElem = sizeof(backgroundList_2w) / sizeof(background_t *); + writeUint16BE(outFile, nbrElem); + for (int j = 0; j < nbrElem; j++) { + nbrSubElem = 1; + for (int k = 0; backgroundList_2w[j][k].verbIndex != 0; k++) + nbrSubElem ++; + writeBackgroundArray(outFile, backgroundList_2w[j], nbrSubElem); + } + + // backgroundList_3w + nbrElem = sizeof(backgroundList_3w) / sizeof(background_t *); + writeUint16BE(outFile, nbrElem); + for (int j = 0; j < nbrElem; j++) { + nbrSubElem = 1; + for (int k = 0; backgroundList_3w[j][k].verbIndex != 0; k++) + nbrSubElem ++; + writeBackgroundArray(outFile, backgroundList_3w[j], nbrSubElem); + } + + // backgroundList_1d + nbrElem = sizeof(backgroundList_1d) / sizeof(background_t *); + writeUint16BE(outFile, nbrElem); + for (int j = 0; j < nbrElem; j++) { + nbrSubElem = 1; + for (int k = 0; backgroundList_1d[j][k].verbIndex != 0; k++) + nbrSubElem ++; + writeBackgroundArray(outFile, backgroundList_1d[j], nbrSubElem); + } + + // backgroundList_2d + nbrElem = sizeof(backgroundList_2d) / sizeof(background_t *); + writeUint16BE(outFile, nbrElem); + for (int j = 0; j < nbrElem; j++) { + nbrSubElem = 1; + for (int k = 0; backgroundList_2d[j][k].verbIndex != 0; k++) + nbrSubElem ++; + writeBackgroundArray(outFile, backgroundList_2d[j], nbrSubElem); + } + + // backgroundList_3d + nbrElem = sizeof(backgroundList_3d) / sizeof(background_t *); + writeUint16BE(outFile, nbrElem); + for (int j = 0; j < nbrElem; j++) { + nbrSubElem = 1; + for (int k = 0; backgroundList_3d[j][k].verbIndex != 0; k++) + nbrSubElem ++; + writeBackgroundArray(outFile, backgroundList_3d[j], nbrSubElem); + } + + // cmdList_1w + nbrElem = sizeof(cmdList_1w) / sizeof(cmd **); + writeCmdArray(outFile, cmdList_1w, nbrElem); + + // cmdList_2w + nbrElem = sizeof(cmdList_2w) / sizeof(cmd **); + writeCmdArray(outFile, cmdList_2w, nbrElem); + + // cmdList_3w + nbrElem = sizeof(cmdList_3w) / sizeof(cmd **); + writeCmdArray(outFile, cmdList_3w, nbrElem); + + // cmdList_1d + nbrElem = sizeof(cmdList_1d) / sizeof(cmd **); + writeCmdArray(outFile, cmdList_1d, nbrElem); + + // cmdList_2d + nbrElem = sizeof(cmdList_2d) / sizeof(cmd **); + writeCmdArray(outFile, cmdList_2d, nbrElem); + + // cmdList_3d + nbrElem = sizeof(cmdList_3d) / sizeof(cmd **); + writeCmdArray(outFile, cmdList_3d, nbrElem); + // hotspots_1w nbrElem = sizeof(hotspots_1w) / sizeof(hotspot_t); writeHotspot(outFile, hotspots_1w, nbrElem); @@ -486,89 +617,37 @@ int main(int argc, char *argv[]) { nbrElem = sizeof(uses_3d) / sizeof(uses_t); writeUseArray(outFile, uses_3d, nbrElem); - // catchall_1w - nbrElem = sizeof(catchall_1w) / sizeof(background_t); - writeBackgroundArray(outFile, catchall_1w, nbrElem); - - // catchall_2w - nbrElem = sizeof(catchall_2w) / sizeof(background_t); - writeBackgroundArray(outFile, catchall_2w, nbrElem); - - // catchall_3w - nbrElem = sizeof(catchall_3w) / sizeof(background_t); - writeBackgroundArray(outFile, catchall_3w, nbrElem); - - // catchall_1d - nbrElem = sizeof(catchall_1d) / sizeof(background_t); - writeBackgroundArray(outFile, catchall_1d, nbrElem); - - // catchall_2d - nbrElem = sizeof(catchall_2d) / sizeof(background_t); - writeBackgroundArray(outFile, catchall_2d, nbrElem); - - // catchall_3d - nbrElem = sizeof(catchall_3d) / sizeof(background_t); - writeBackgroundArray(outFile, catchall_3d, nbrElem); + // objects_1w + nbrElem = sizeof(objects_1w) / sizeof(object_t); + writeObjectArray(outFile, objects_1w, nbrElem); - // backgroundList_1w - nbrElem = sizeof(backgroundList_1w) / sizeof(background_t *); - writeUint16BE(outFile, nbrElem); - for (int j = 0; j < nbrElem; j++) { - nbrSubElem = 1; - for (int k = 0; backgroundList_1w[j][k].verbIndex != 0; k++) - nbrSubElem ++; - writeBackgroundArray(outFile, backgroundList_1w[j], nbrSubElem); - } + // objects_2w + nbrElem = sizeof(objects_2w) / sizeof(object_t); + writeObjectArray(outFile, objects_2w, nbrElem); - // backgroundList_2w - nbrElem = sizeof(backgroundList_2w) / sizeof(background_t *); - writeUint16BE(outFile, nbrElem); - for (int j = 0; j < nbrElem; j++) { - nbrSubElem = 1; - for (int k = 0; backgroundList_2w[j][k].verbIndex != 0; k++) - nbrSubElem ++; - writeBackgroundArray(outFile, backgroundList_2w[j], nbrSubElem); - } + // objects_3w + nbrElem = sizeof(objects_3w) / sizeof(object_t); + writeObjectArray(outFile, objects_3w, nbrElem); - // backgroundList_3w - nbrElem = sizeof(backgroundList_3w) / sizeof(background_t *); - writeUint16BE(outFile, nbrElem); - for (int j = 0; j < nbrElem; j++) { - nbrSubElem = 1; - for (int k = 0; backgroundList_3w[j][k].verbIndex != 0; k++) - nbrSubElem ++; - writeBackgroundArray(outFile, backgroundList_3w[j], nbrSubElem); - } + // objects_1d + nbrElem = sizeof(objects_1d) / sizeof(object_t); + writeObjectArray(outFile, objects_1d, nbrElem); - // backgroundList_1d - nbrElem = sizeof(backgroundList_1d) / sizeof(background_t *); - writeUint16BE(outFile, nbrElem); - for (int j = 0; j < nbrElem; j++) { - nbrSubElem = 1; - for (int k = 0; backgroundList_1d[j][k].verbIndex != 0; k++) - nbrSubElem ++; - writeBackgroundArray(outFile, backgroundList_1d[j], nbrSubElem); - } + // objects_2d + nbrElem = sizeof(objects_2d) / sizeof(object_t); + writeObjectArray(outFile, objects_2d, nbrElem); - // backgroundList_2d - nbrElem = sizeof(backgroundList_2d) / sizeof(background_t *); - writeUint16BE(outFile, nbrElem); - for (int j = 0; j < nbrElem; j++) { - nbrSubElem = 1; - for (int k = 0; backgroundList_2d[j][k].verbIndex != 0; k++) - nbrSubElem ++; - writeBackgroundArray(outFile, backgroundList_2d[j], nbrSubElem); - } + // objects_3d + nbrElem = sizeof(objects_3d) / sizeof(object_t); + writeObjectArray(outFile, objects_3d, nbrElem); - // backgroundList_3d - nbrElem = sizeof(backgroundList_3d) / sizeof(background_t *); - writeUint16BE(outFile, nbrElem); - for (int j = 0; j < nbrElem; j++) { - nbrSubElem = 1; - for (int k = 0; backgroundList_3d[j][k].verbIndex != 0; k++) - nbrSubElem ++; - writeBackgroundArray(outFile, backgroundList_3d[j], nbrSubElem); - } + // Save LASTOBJ + writeUint16BE(outFile, LASTOBJ_1w); + writeUint16BE(outFile, LASTOBJ_2w); + writeUint16BE(outFile, LASTOBJ_3w); + 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); // points_1w nbrElem = sizeof(points_1w) / sizeof(byte); @@ -612,30 +691,6 @@ int main(int argc, char *argv[]) { for (int j = 0; j < nbrElem; j++) writeByte(outFile, points_3d[j]); - // cmdList_1w - nbrElem = sizeof(cmdList_1w) / sizeof(cmd **); - writeCmdArray(outFile, cmdList_1w, nbrElem); - - // cmdList_2w - nbrElem = sizeof(cmdList_2w) / sizeof(cmd **); - writeCmdArray(outFile, cmdList_2w, nbrElem); - - // cmdList_3w - nbrElem = sizeof(cmdList_3w) / sizeof(cmd **); - writeCmdArray(outFile, cmdList_3w, nbrElem); - - // cmdList_1d - nbrElem = sizeof(cmdList_1d) / sizeof(cmd **); - writeCmdArray(outFile, cmdList_1d, nbrElem); - - // cmdList_2d - nbrElem = sizeof(cmdList_2d) / sizeof(cmd **); - writeCmdArray(outFile, cmdList_2d, nbrElem); - - // cmdList_3d - nbrElem = sizeof(cmdList_3d) / sizeof(cmd **); - writeCmdArray(outFile, cmdList_3d, nbrElem); - // screenActs_1w nbrElem = sizeof(screenActs_1w) / sizeof(uint16 *); writeScreenActs(outFile, screenActs_1w, nbrElem); @@ -660,30 +715,6 @@ int main(int argc, char *argv[]) { nbrElem = sizeof(screenActs_3d) / sizeof(uint16 *); writeScreenActs(outFile, screenActs_3d, nbrElem); - // objects_1w - nbrElem = sizeof(objects_1w) / sizeof(object_t); - writeObjectArray(outFile, objects_1w, nbrElem); - - // objects_2w - nbrElem = sizeof(objects_2w) / sizeof(object_t); - writeObjectArray(outFile, objects_2w, nbrElem); - - // objects_3w - nbrElem = sizeof(objects_3w) / sizeof(object_t); - writeObjectArray(outFile, objects_3w, nbrElem); - - // objects_1d - nbrElem = sizeof(objects_1d) / sizeof(object_t); - writeObjectArray(outFile, objects_1d, nbrElem); - - // objects_2d - nbrElem = sizeof(objects_2d) / sizeof(object_t); - writeObjectArray(outFile, objects_2d, nbrElem); - - // objects_3d - nbrElem = sizeof(objects_3d) / sizeof(object_t); - writeObjectArray(outFile, objects_3d, nbrElem); - // actlistArr_1w nbrElem = sizeof(actListArr_1w) / sizeof(actList); writeActListArray(outFile, actListArr_1w, nbrElem); @@ -708,6 +739,14 @@ int main(int argc, char *argv[]) { nbrElem = sizeof(actListArr_3d) / sizeof(actList); writeActListArray(outFile, actListArr_3d, nbrElem); + // Maze ALnewscr + writeUint16BE(outFile, 0); + writeUint16BE(outFile, kALnewscr_2w); + writeUint16BE(outFile, 0); + writeUint16BE(outFile, 0); + writeUint16BE(outFile, kALnewscr_2d); + writeUint16BE(outFile, 0); + writeSByte(outFile, NUM_TUNES_1w); writeSByte(outFile, SILENCE_1w); writeSByte(outFile, TEST_SOUND_1w); @@ -808,22 +847,6 @@ int main(int argc, char *argv[]) { writeUint16BE(outFile, kVTake_3d); writeUint16BE(outFile, kVDrop_3d); - // Save LASTOBJ - writeUint16BE(outFile, LASTOBJ_1w); - writeUint16BE(outFile, LASTOBJ_2w); - writeUint16BE(outFile, LASTOBJ_3w); - 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); - - // Maze ALnewscr - writeUint16BE(outFile, 0); - writeUint16BE(outFile, kALnewscr_2w); - writeUint16BE(outFile, 0); - writeUint16BE(outFile, 0); - writeUint16BE(outFile, kALnewscr_2d); - writeUint16BE(outFile, 0); - // DOS Intro music // Win version do not use it // H1 Dos doesn't have an intro @@ -835,29 +858,6 @@ int main(int argc, char *argv[]) { writeUint16BE(outFile, 0); writeUint16BE(outFile, kDTsong11_3d); - // The following fonts info have been added to avoid temporarly the .FON - // used in the DOS version - // font5 - nbrElem = sizeof(font5) / sizeof(byte); - writeUint16BE(outFile, nbrElem); - - for (int j = 0; j < nbrElem; j++) - writeByte(outFile, font5[j]); - - // font6 - nbrElem = sizeof(font6) / sizeof(byte); - writeUint16BE(outFile, nbrElem); - - for (int j = 0; j < nbrElem; j++) - writeByte(outFile, font6[j]); - - // font8 - nbrElem = sizeof(font8) / sizeof(byte); - writeUint16BE(outFile, nbrElem); - - for (int j = 0; j < nbrElem; j++) - writeByte(outFile, font8[j]); - //bitmap images for menu writeUint16BE(outFile, 18); diff --git a/tools/create_hugo/create_hugo.h b/tools/create_hugo/create_hugo.h index 7fb5d761ba..f30c186877 100644 --- a/tools/create_hugo/create_hugo.h +++ b/tools/create_hugo/create_hugo.h @@ -31,7 +31,7 @@ #define DATAALIGNMENT 4 #define HUGO_DAT_VER_MAJ 0 // 1 byte -#define HUGO_DAT_VER_MIN 41 // 1 byte +#define HUGO_DAT_VER_MIN 42 // 1 byte typedef unsigned char uint8; typedef unsigned char byte; diff --git a/tools/create_hugo/staticdisplay.h b/tools/create_hugo/staticdisplay.h index a9f38ba7a0..790bf74d3b 100644 --- a/tools/create_hugo/staticdisplay.h +++ b/tools/create_hugo/staticdisplay.h @@ -33,7 +33,7 @@ #ifndef STATICDISPLAY_H #define STATICDISPLAY_H -#define SIZE_PAL_ARRAY 64 +#define SIZE_PAL_ARRAY 3*16 #if 1 // Color table of standard 16 VGA colors @@ -45,22 +45,22 @@ byte _palette[SIZE_PAL_ARRAY] = { - 0, 0, 0, 0, // BLACK - 0, 0, V1, 0, // BLUE - 0, V1, 0, 0, // GREEN - 0, V1, V1, 0, // CYAN - V1, 0, 0, 0, // RED - V1, 0, V1, 0, // MAGENTA - V1, V3, 0, 0, // BROWN - V1, V1, V1, 0, // WHITE (LIGHT GRAY) - V3, V3, V3, 0, // GRAY (DARK GRAY) - V4, V4, V2, 0, // LIGHTBLUE - V4, V2, V4, 0, // LIGHTGREEN - V4, V2, V2, 0, // LIGHTCYAN - V2, V4, V4, 0, // LIGHTRED - V2, V4, V2, 0, // LIGHTMAGENTA - V2, V2, V4, 0, // YELLOW - V2, V2, V2, 0 // BRIGHTWHITE + 0, 0, 0, // BLACK + 0, 0, V1, // BLUE + 0, V1, 0, // GREEN + 0, V1, V1, // CYAN + V1, 0, 0, // RED + V1, 0, V1, // MAGENTA + V1, V3, 0, // BROWN + V1, V1, V1, // WHITE (LIGHT GRAY) + V3, V3, V3, // GRAY (DARK GRAY) + V4, V4, V2, // LIGHTBLUE + V4, V2, V4, // LIGHTGREEN + V4, V2, V2, // LIGHTCYAN + V2, V4, V4, // LIGHTRED + V2, V4, V2, // LIGHTMAGENTA + V2, V2, V4, // YELLOW + V2, V2, V2 // BRIGHTWHITE }; #else // Original paletter found in original exe. @@ -70,22 +70,22 @@ byte _palette[SIZE_PAL_ARRAY] = { #define C2 255 // High intensity value #define C3 127 // Special for Brown/Gray byte _palette[SIZE_PAL_ARRAY] = { - 0, 0, 0, 0, // BLACK - 0, 0, C1, 0, // BLUE - 0, C1, 0, 0, // GREEN - 0, C1, C1, 0, // CYAN - C1, 0, 0, 0, // RED - C1, 0, C1, 0, // MAGENTA - C3, C3, 0, 0, // BROWN - C1, C1, C1, 0, // WHITE (LIGHT GRAY) - C3, C3, C3, 0, // GRAY (DARK GRAY) - 0, 0, C2, 0, // LIGHTBLUE - 0, C2, 0, 0, // LIGHTGREEN - 0, C2, C2, 0, // LIGHTCYAN - C2, 0, 0, 0, // LIGHTRED - C2, 0, C2, 0, // LIGHTMAGENTA - C2, C2, 0, 0, // YELLOW - C2, C2, C2, 0 // BRIGHTWHITE + 0, 0, 0, // BLACK + 0, 0, C1, // BLUE + 0, C1, 0, // GREEN + 0, C1, C1, // CYAN + C1, 0, 0, // RED + C1, 0, C1, // MAGENTA + C3, C3, 0, // BROWN + C1, C1, C1, // WHITE (LIGHT GRAY) + C3, C3, C3, // GRAY (DARK GRAY) + 0, 0, C2, // LIGHTBLUE + 0, C2, 0, // LIGHTGREEN + 0, C2, C2, // LIGHTCYAN + C2, 0, 0, // LIGHTRED + C2, 0, C2, // LIGHTMAGENTA + C2, C2, 0, // YELLOW + C2, C2, C2 // BRIGHTWHITE }; #endif |