From e670e698f1571fab1c21c0d09b5003c2772e58d1 Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Mon, 3 Jan 2011 16:15:52 +0000 Subject: TOOLS: Add button bitmaps to create_hugo svn-id: r55102 --- tools/create_hugo/Data/Btn_1.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_1_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_2.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_2_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_3.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_3_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_4.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_4_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_5.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_5_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_6.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_6_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_7.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_7_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_8.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_8_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_9.bmp | Bin 0 -> 774 bytes tools/create_hugo/Data/Btn_9_off.bmp | Bin 0 -> 774 bytes tools/create_hugo/README | 7 + tools/create_hugo/create_hugo.cpp | 275 +++++++++++++++++++++++++++++++++++ tools/create_hugo/create_hugo.h | 2 +- 21 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 tools/create_hugo/Data/Btn_1.bmp create mode 100644 tools/create_hugo/Data/Btn_1_off.bmp create mode 100644 tools/create_hugo/Data/Btn_2.bmp create mode 100644 tools/create_hugo/Data/Btn_2_off.bmp create mode 100644 tools/create_hugo/Data/Btn_3.bmp create mode 100644 tools/create_hugo/Data/Btn_3_off.bmp create mode 100644 tools/create_hugo/Data/Btn_4.bmp create mode 100644 tools/create_hugo/Data/Btn_4_off.bmp create mode 100644 tools/create_hugo/Data/Btn_5.bmp create mode 100644 tools/create_hugo/Data/Btn_5_off.bmp create mode 100644 tools/create_hugo/Data/Btn_6.bmp create mode 100644 tools/create_hugo/Data/Btn_6_off.bmp create mode 100644 tools/create_hugo/Data/Btn_7.bmp create mode 100644 tools/create_hugo/Data/Btn_7_off.bmp create mode 100644 tools/create_hugo/Data/Btn_8.bmp create mode 100644 tools/create_hugo/Data/Btn_8_off.bmp create mode 100644 tools/create_hugo/Data/Btn_9.bmp create mode 100644 tools/create_hugo/Data/Btn_9_off.bmp create mode 100644 tools/create_hugo/README (limited to 'tools/create_hugo') diff --git a/tools/create_hugo/Data/Btn_1.bmp b/tools/create_hugo/Data/Btn_1.bmp new file mode 100644 index 0000000000..0cdfc91fd3 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 0000000000..eb6146ac96 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 0000000000..971c996b4d 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 0000000000..988c682b44 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 0000000000..ac988d8a90 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 0000000000..14df72666b 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 0000000000..ef47589044 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 0000000000..d32f497d6c 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 0000000000..3eb03b20d6 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 0000000000..6513ff2080 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 0000000000..d53585dde7 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 0000000000..8748fa0ff2 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 0000000000..25ba757e93 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 0000000000..6fe8cff904 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 0000000000..d3a92fccac 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 0000000000..7fb40a42b4 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 0000000000..6443649b20 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 0000000000..a9ce9dcddb 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 0000000000..42bdd22c36 --- /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 7f4198704c..ea28cbd7d7 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 a2389b03cf..d0960d1166 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; -- cgit v1.2.3