diff --git a/dists/engine-data/hugo.dat b/dists/engine-data/hugo.dat index 473c05d7839..ac82bebbf77 100644 Binary files a/dists/engine-data/hugo.dat and b/dists/engine-data/hugo.dat differ diff --git a/tools/create_hugo/Data/Btn_1.bmp b/tools/create_hugo/Data/Btn_1.bmp new file mode 100644 index 00000000000..0cdfc91fd32 Binary files /dev/null and b/tools/create_hugo/Data/Btn_1.bmp differ diff --git a/tools/create_hugo/Data/Btn_1_off.bmp b/tools/create_hugo/Data/Btn_1_off.bmp new file mode 100644 index 00000000000..eb6146ac967 Binary files /dev/null and b/tools/create_hugo/Data/Btn_1_off.bmp differ diff --git a/tools/create_hugo/Data/Btn_2.bmp b/tools/create_hugo/Data/Btn_2.bmp new file mode 100644 index 00000000000..971c996b4d5 Binary files /dev/null and b/tools/create_hugo/Data/Btn_2.bmp differ diff --git a/tools/create_hugo/Data/Btn_2_off.bmp b/tools/create_hugo/Data/Btn_2_off.bmp new file mode 100644 index 00000000000..988c682b44e Binary files /dev/null and b/tools/create_hugo/Data/Btn_2_off.bmp differ diff --git a/tools/create_hugo/Data/Btn_3.bmp b/tools/create_hugo/Data/Btn_3.bmp new file mode 100644 index 00000000000..ac988d8a909 Binary files /dev/null and b/tools/create_hugo/Data/Btn_3.bmp differ diff --git a/tools/create_hugo/Data/Btn_3_off.bmp b/tools/create_hugo/Data/Btn_3_off.bmp new file mode 100644 index 00000000000..14df72666be Binary files /dev/null and b/tools/create_hugo/Data/Btn_3_off.bmp differ diff --git a/tools/create_hugo/Data/Btn_4.bmp b/tools/create_hugo/Data/Btn_4.bmp new file mode 100644 index 00000000000..ef475890449 Binary files /dev/null and b/tools/create_hugo/Data/Btn_4.bmp differ diff --git a/tools/create_hugo/Data/Btn_4_off.bmp b/tools/create_hugo/Data/Btn_4_off.bmp new file mode 100644 index 00000000000..d32f497d6c0 Binary files /dev/null and b/tools/create_hugo/Data/Btn_4_off.bmp differ diff --git a/tools/create_hugo/Data/Btn_5.bmp b/tools/create_hugo/Data/Btn_5.bmp new file mode 100644 index 00000000000..3eb03b20d6f Binary files /dev/null and b/tools/create_hugo/Data/Btn_5.bmp differ diff --git a/tools/create_hugo/Data/Btn_5_off.bmp b/tools/create_hugo/Data/Btn_5_off.bmp new file mode 100644 index 00000000000..6513ff2080c Binary files /dev/null and b/tools/create_hugo/Data/Btn_5_off.bmp differ diff --git a/tools/create_hugo/Data/Btn_6.bmp b/tools/create_hugo/Data/Btn_6.bmp new file mode 100644 index 00000000000..d53585dde73 Binary files /dev/null and b/tools/create_hugo/Data/Btn_6.bmp differ diff --git a/tools/create_hugo/Data/Btn_6_off.bmp b/tools/create_hugo/Data/Btn_6_off.bmp new file mode 100644 index 00000000000..8748fa0ff2c Binary files /dev/null and b/tools/create_hugo/Data/Btn_6_off.bmp differ diff --git a/tools/create_hugo/Data/Btn_7.bmp b/tools/create_hugo/Data/Btn_7.bmp new file mode 100644 index 00000000000..25ba757e938 Binary files /dev/null and b/tools/create_hugo/Data/Btn_7.bmp differ diff --git a/tools/create_hugo/Data/Btn_7_off.bmp b/tools/create_hugo/Data/Btn_7_off.bmp new file mode 100644 index 00000000000..6fe8cff9047 Binary files /dev/null and b/tools/create_hugo/Data/Btn_7_off.bmp differ diff --git a/tools/create_hugo/Data/Btn_8.bmp b/tools/create_hugo/Data/Btn_8.bmp new file mode 100644 index 00000000000..d3a92fccac8 Binary files /dev/null and b/tools/create_hugo/Data/Btn_8.bmp differ diff --git a/tools/create_hugo/Data/Btn_8_off.bmp b/tools/create_hugo/Data/Btn_8_off.bmp new file mode 100644 index 00000000000..7fb40a42b40 Binary files /dev/null and b/tools/create_hugo/Data/Btn_8_off.bmp differ diff --git a/tools/create_hugo/Data/Btn_9.bmp b/tools/create_hugo/Data/Btn_9.bmp new file mode 100644 index 00000000000..6443649b208 Binary files /dev/null and b/tools/create_hugo/Data/Btn_9.bmp differ diff --git a/tools/create_hugo/Data/Btn_9_off.bmp b/tools/create_hugo/Data/Btn_9_off.bmp new file mode 100644 index 00000000000..a9ce9dcddb0 Binary files /dev/null and b/tools/create_hugo/Data/Btn_9_off.bmp differ diff --git a/tools/create_hugo/README b/tools/create_hugo/README new file mode 100644 index 00000000000..42bdd22c36b --- /dev/null +++ b/tools/create_hugo/README @@ -0,0 +1,7 @@ +This tool creates hugo.dat. +This file contains all the hardcoded strings, logic, fonts, and bitmaps and +is used by the engine depending on the version of the game started. + +In order to work properly, the content of the DATA sub-directory has to be +copy next to the executable. + diff --git a/tools/create_hugo/create_hugo.cpp b/tools/create_hugo/create_hugo.cpp index 7f4198704cd..ea28cbd7d7c 100644 --- a/tools/create_hugo/create_hugo.cpp +++ b/tools/create_hugo/create_hugo.cpp @@ -847,6 +847,281 @@ int main(int argc, char *argv[]) { for (int j = 0; j < nbrElem; j++) writeByte(outFile, font8[j]); + //bitmap images for menu + writeUint16BE(outFile, 18); + + FILE* src_file; + char buf[2]; + src_file = fopen("btn_1.bmp", "rb"); + if (src_file == NULL) { + perror("btn_1.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_1_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_1_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_2.bmp", "rb"); + if (src_file == NULL) { + perror("btn_2.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_2_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_2_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_3.bmp", "rb"); + if (src_file == NULL) { + perror("btn_3.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_3_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_3_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_4.bmp", "rb"); + if (src_file == NULL) { + perror("btn_4.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_4_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_4_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_5.bmp", "rb"); + if (src_file == NULL) { + perror("btn_5.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_5_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_5_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_6.bmp", "rb"); + if (src_file == NULL) { + perror("btn_6.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_6_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_6_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_7.bmp", "rb"); + if (src_file == NULL) { + perror("btn_7.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_7_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_7_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_8.bmp", "rb"); + if (src_file == NULL) { + perror("btn_8.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_8_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_8_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_9.bmp", "rb"); + if (src_file == NULL) { + perror("btn_9.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + + src_file = fopen("btn_9_off.bmp", "rb"); + if (src_file == NULL) { + perror("btn_9_off.bmp"); + return -1; + } + fseek(src_file , 0 , SEEK_END); + nbrElem = ftell(src_file); + writeUint16BE(outFile, nbrElem); + rewind(src_file); + for (int j = 0; j < nbrElem; j++) { + fread(buf, 1, 1, src_file); + writeByte(outFile, buf[0]); + } + fclose(src_file); + fclose(outFile); return 0; } diff --git a/tools/create_hugo/create_hugo.h b/tools/create_hugo/create_hugo.h index a2389b03cf5..d0960d1166d 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 35 // 1 byte +#define HUGO_DAT_VER_MIN 36 // 1 byte typedef unsigned char uint8; typedef unsigned char byte;