summaryrefslogtreecommitdiff
path: root/Xenogears
diff options
context:
space:
mode:
Diffstat (limited to 'Xenogears')
-rw-r--r--Xenogears/Decrypt.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/Xenogears/Decrypt.cpp b/Xenogears/Decrypt.cpp
index 2f4d99f..76289e2 100644
--- a/Xenogears/Decrypt.cpp
+++ b/Xenogears/Decrypt.cpp
@@ -52,14 +52,11 @@ void dump_text(FILE * f_source, FILE * f_cible, long table[5000], long script_nu
{
long next;
unsigned char val;
- char temp_string[2];
+ char temp_string[2] = {0, 0};
long position;
unsigned char temp1 = 0;
unsigned char temp2 = 0;
- long temp;
-
- temp_string[1] = NULL;
-
+
next = found_next(table, script_number, max_script);
fseek(f_source, table[script_number], SEEK_SET);
@@ -86,7 +83,7 @@ void dump_text(FILE * f_source, FILE * f_cible, long table[5000], long script_nu
} else if (val == 0x03) // "<Wait>"
{
fprintf(f_cible, "<Wait>");
- } else if (val == 0x0F) // "<Delay X>
+ } else if (val == 0x0F) // Extended opcode. Reads two more bytes.
{
fread((unsigned char *) &temp1, 1, 1, f_source);
fread((unsigned char *) &temp2, 1, 1, f_source);
@@ -435,7 +432,7 @@ int decrypt(FILE * f_source, FILE * f_cible, int room_number)
script_number = (script_number++);
- fprintf(f_cible, "<Blocks:%i>\n", script_number);
+ fprintf(f_cible, "<Blocks:%li>\n", script_number);
init_table(table);
i = j = 0;