System25 / drxtract

Macromedia Director 5 DRI and DRX files data extractor
GNU General Public License v2.0
22 stars 4 forks source link

riffxtract.py globals not being changed #13

Closed Sembiance closed 9 months ago

Sembiance commented 9 months ago

In file drxtract/riffxtract.py in def main() you set the value of several globals if pc is set:

        if sys.argv[1] == 'pc':
            bit_order_type = 'pc'
            bit_order = "<"
            MV93_FILE_TYPE = '39VM'
            RIFX_FILE_FORMAT = 'XFIR'
            IMAP_FILE_FORMAT = 'pami'
            MMAP_FILE_FORMAT = 'pamm'
            FREE_FILE_FORMAT = 'eerf'

That doesn't actually change the globals though, it just creates new locals with those names and thus extraction fails.

You need to add to the top of def main() the following line:

global bit_order_type, bit_order, MV93_FILE_TYPE, RIFX_FILE_FORMAT, IMAP_FILE_FORMAT, MMAP_FILE_FORMAT, FREE_FILE_FORMAT

Similar errors exist in def main() of casxtract.py

I didn't continue looking in other methods and files to see if additional errors exist.

System25 commented 9 months ago

Hi @Sembiance, thank you very much for your issue report. I've just created v0.1.3 with the change that you proposed and I think that bug should be fixed now.

Best regards!

Sembiance commented 9 months ago

Thanks, it works now.