refactor quick quest info display
This commit is contained in:
parent
198e377a29
commit
9756c816ee
|
@ -117,15 +117,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
|
||||
printf("Quest: id=%d (%d), episode=%d, download=%d, unknown=0x%02x, name=\"%s\", compressed_bin_size=%d, compressed_dat_size=%d\n",
|
||||
bin_header->quest_number_byte,
|
||||
bin_header->quest_number_word,
|
||||
bin_header->episode+1,
|
||||
bin_header->download,
|
||||
bin_header->unknown,
|
||||
bin_header->name,
|
||||
compressed_bin_size,
|
||||
compressed_dat_size);
|
||||
print_quick_quest_info(bin_header, compressed_bin_size, compressed_dat_size);
|
||||
|
||||
|
||||
/** set the "download" flag in the .bin header and then re-compress the .bin data **/
|
||||
|
|
|
@ -196,15 +196,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
|
||||
printf("Quest: id=%d (%d), episode=%d, download=%d, unknown=0x%02x, name=\"%s\", compressed_bin_size=%d, compressed_dat_size=%d\n",
|
||||
bin_header->quest_number_byte,
|
||||
bin_header->quest_number_word,
|
||||
bin_header->episode+1,
|
||||
bin_header->download,
|
||||
bin_header->unknown,
|
||||
bin_header->name,
|
||||
bin_data_size,
|
||||
dat_data_size);
|
||||
print_quick_quest_info(bin_header, bin_data_size, dat_data_size);
|
||||
|
||||
|
||||
/** clear "download" flag from .bin data and re-compress **/
|
||||
|
|
|
@ -85,15 +85,7 @@ int main(int argc, char *argv[]) {
|
|||
//sjis_to_utf8(bin_header->short_description, sizeof(bin_header->short_description));
|
||||
//sjis_to_utf8(bin_header->long_description, sizeof(bin_header->long_description));
|
||||
|
||||
printf("Quest: id=%d (%d), episode=%d, download=%d, unknown=0x%02x, name=\"%s\", compressed_bin_size=%ld, compressed_dat_size=%ld\n",
|
||||
bin_header->quest_number_byte,
|
||||
bin_header->quest_number_word,
|
||||
bin_header->episode+1,
|
||||
bin_header->download,
|
||||
bin_header->unknown,
|
||||
bin_header->name,
|
||||
bin_compressed_size,
|
||||
dat_compressed_size);
|
||||
print_quick_quest_info(bin_header, bin_compressed_size, dat_compressed_size);
|
||||
|
||||
|
||||
QST_HEADER qst_bin_header, qst_dat_header;
|
||||
|
|
12
quests.c
12
quests.c
|
@ -155,3 +155,15 @@ int handle_quest_bin_validation_issues(int bin_validation_result, QUEST_BIN_HEAD
|
|||
|
||||
return bin_validation_result;
|
||||
}
|
||||
|
||||
void print_quick_quest_info(QUEST_BIN_HEADER *bin_header, size_t compressed_bin_size, size_t compressed_dat_size) {
|
||||
printf("Quest: id=%d (%d), episode=%d, download=%d, unknown=0x%02x, name=\"%s\", compressed_bin_size=%ld, compressed_dat_size=%ld\n",
|
||||
bin_header->quest_number_byte,
|
||||
bin_header->quest_number_word,
|
||||
bin_header->episode + 1,
|
||||
bin_header->download,
|
||||
bin_header->unknown,
|
||||
bin_header->name,
|
||||
compressed_bin_size,
|
||||
compressed_dat_size);
|
||||
}
|
||||
|
|
1
quests.h
1
quests.h
|
@ -117,5 +117,6 @@ int generate_qst_data_chunk(const char *base_filename, uint8_t counter, const ui
|
|||
int validate_quest_bin(const QUEST_BIN_HEADER *header, uint32_t length, bool print_errors);
|
||||
int validate_quest_dat(const uint8_t *data, uint32_t length, bool print_errors);
|
||||
int handle_quest_bin_validation_issues(int bin_validation_result, QUEST_BIN_HEADER *bin_header, uint8_t **decompressed_bin_data, size_t *decompressed_bin_length);
|
||||
void print_quick_quest_info(QUEST_BIN_HEADER *bin_header, size_t compressed_bin_size, size_t compressed_dat_size);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue