sourcehold / sourcehold-maps

Reverse engineering the map file format of Stronghold
GNU General Public License v3.0
20 stars 3 forks source link

Preview rework #5

Closed lawrencefoley closed 5 years ago

lawrencefoley commented 5 years ago

Moves the code that extracts the preview image from the a map file from preview_image_extractor.py to the maps package in the Preview class.

lawrencefoley commented 5 years ago

@gynt This is still a WIP.

I did some refactoring of the way the DLL was referenced. I wasn't able to run the individual test with the way that the DLL was referenced... it need the absolute path.

Also, I refactored the run_tests.py to use the unit test library instead of subprocess.

gynt commented 5 years ago

@lawrencefoley great work!

I am fine with it if we merge this with the current master. Can you tell me why it is still WIP? :)

Have you checked out the latest version of the compression stuff? I created a no-callback DLL. Maybe it fixes the issue you are having as well.

lawrencefoley commented 5 years ago

@gynt Thank you!

It's still WIP because I wanted to ask if I should just remove the preview_image_extractor.py or if it should use the new implementation?

I saw the changes you made with the new DDL; It seems to be working great!

gynt commented 5 years ago

For now, I like the separate preview_image_extractor.py. It showcases our work (and how it works) better then endless command line arguments for unpacker.py.

Hmm, maybe an examples/ directory is a good idea? It usually contains examples of how to use the software. Maybe you can move a version with the new implementation into there!

When you have done that, I will merge it into master.

Solves #4

lawrencefoley commented 4 years ago

@gynt Saw you merged this. Sorry I wasn't able to put in a example script. I've been busy here lately. If it's still needed I can create a new branch for that when I get time.

gynt commented 4 years ago

@lawrencefoley No worries, I am busy too! I created a new issue for the examples directory, for future reference :)