diff options
author | Filippos Karapetis | 2008-06-09 14:21:32 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-06-09 14:21:32 +0000 |
commit | 32edf673a4685224062a3eef9e4756180bb94803 (patch) | |
tree | 12f74690d749444716ce084d0e1f74529e472815 | |
parent | 62248a0011dcf8bf1c94ea8e945bb3b306778e32 (diff) | |
download | scummvm-rg350-32edf673a4685224062a3eef9e4756180bb94803.tar.gz scummvm-rg350-32edf673a4685224062a3eef9e4756180bb94803.tar.bz2 scummvm-rg350-32edf673a4685224062a3eef9e4756180bb94803.zip |
Slight code revamp to create_drascula.cpp by sev (drascula.dat remains unchanged)
svn-id: r32633
-rw-r--r-- | tools/create_drascula/create_drascula.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index 856405dbff..cedce4070f 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) { writeUint16BE(outFile, NUM_TEXT); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXT; i++) { len1 = strlen(_text[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXT; i++) { len = strlen(_text[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -198,7 +198,7 @@ int main(int argc, char *argv[]) { // Write _textd writeUint16BE(outFile, NUM_TEXTD); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTD; i++) { len1 = strlen(_textd[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -206,7 +206,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTD; i++) { len = strlen(_textd[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) { // Write _textb writeUint16BE(outFile, NUM_TEXTB); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTB; i++) { len1 = strlen(_textb[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -229,7 +229,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTB; i++) { len = strlen(_textb[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -244,7 +244,7 @@ int main(int argc, char *argv[]) { // Write _textbj writeUint16BE(outFile, NUM_TEXTBJ); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTBJ; i++) { len1 = strlen(_textbj[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -252,7 +252,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTBJ; i++) { len = strlen(_textbj[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -267,7 +267,7 @@ int main(int argc, char *argv[]) { // Write _texte writeUint16BE(outFile, NUM_TEXTE); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTE; i++) { len1 = strlen(_texte[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -275,7 +275,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTE; i++) { len = strlen(_texte[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -290,7 +290,7 @@ int main(int argc, char *argv[]) { // Write _texti writeUint16BE(outFile, NUM_TEXTI); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTI; i++) { len1 = strlen(_texti[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -298,7 +298,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTI; i++) { len = strlen(_texti[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -313,7 +313,7 @@ int main(int argc, char *argv[]) { // Write _textl writeUint16BE(outFile, NUM_TEXTL); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTL; i++) { len1 = strlen(_textl[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTL; i++) { len = strlen(_textl[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -336,7 +336,7 @@ int main(int argc, char *argv[]) { // Write _textp writeUint16BE(outFile, NUM_TEXTP); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTP; i++) { len1 = strlen(_textp[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -344,7 +344,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTP; i++) { len = strlen(_textp[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -359,7 +359,7 @@ int main(int argc, char *argv[]) { // Write _textt writeUint16BE(outFile, NUM_TEXTT); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTT; i++) { len1 = strlen(_textt[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -367,7 +367,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTT; i++) { len = strlen(_textt[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -382,7 +382,7 @@ int main(int argc, char *argv[]) { // Write _textvb writeUint16BE(outFile, NUM_TEXTVB); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTVB; i++) { len1 = strlen(_textvb[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -390,7 +390,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTVB; i++) { len = strlen(_textvb[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -405,7 +405,7 @@ int main(int argc, char *argv[]) { // Write _textsys writeUint16BE(outFile, NUM_TEXTSYS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTSYS; i++) { len1 = strlen(_textsys[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -413,7 +413,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTSYS; i++) { len = strlen(_textsys[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -428,7 +428,7 @@ int main(int argc, char *argv[]) { // Write _texthis writeUint16BE(outFile, NUM_TEXTHIS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTHIS; i++) { len1 = strlen(_texthis[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -436,7 +436,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTHIS; i++) { len = strlen(_texthis[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -451,7 +451,7 @@ int main(int argc, char *argv[]) { // Write _textverbs writeUint16BE(outFile, NUM_TEXTVERBS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTVERBS; i++) { len1 = strlen(_textverbs[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -459,7 +459,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTVERBS; i++) { len = strlen(_textverbs[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -474,7 +474,7 @@ int main(int argc, char *argv[]) { // Write _textmisc writeUint16BE(outFile, NUM_TEXTMISC); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTMISC; i++) { len1 = strlen(_textmisc[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -482,7 +482,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTMISC; i++) { len = strlen(_textmisc[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -497,7 +497,7 @@ int main(int argc, char *argv[]) { // Write _textd1 writeUint16BE(outFile, NUM_TEXTD1); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTD1; i++) { len1 = strlen(_textd1[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -505,7 +505,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTD1; i++) { len = strlen(_textd1[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; |