diff --git a/dummycharaviewer.py b/dummycharaviewer.py index ad5e7b7..5779213 100755 --- a/dummycharaviewer.py +++ b/dummycharaviewer.py @@ -4,19 +4,17 @@ import sys import struct - -source = sys.argv[-1] expected_magic_word = 0xdeadface -def check_magic_word(): +def check_magic_word(dat_file): magic_word = struct.unpack("") + raise SystemExit(-1) + + source = argv[1] + with open(source, "rb") as dat_file: + check_magic_word(dat_file) + read_character_name(dat_file) + read_filename(dat_file) + read_coordinates(dat_file) + raise SystemExit(0) + + +if __name__ == "__main__": + main(sys.argv)