dressupgeekout / lunapurpura

Reimplementation of Purple Moon's games from the 1990s (WIP) - NOTE: ScummVM port in progress
https://dressupgeekout.github.io/lunapurpura/
BSD 2-Clause "Simplified" License
8 stars 1 forks source link

Minimize code repetition between PRX and PRD/PRS #14

Closed dressupgeekout closed 4 years ago

dressupgeekout commented 4 years ago

PRX on one hand, and PRD/PRS on the other, are extremely similar file formats. There's got to be a way to minimize the differences in their implementations...

dressupgeekout commented 4 years ago

I have a few ideas of how to do this.

Consider the following:

$ prx -t <file>
$ prx -x -a <file>

Instead of assuming <file> is a single PRX, we can require the user to indicate whether it's a single PRX, OR a PRD/PRS pair. Perhaps something like:

$ prx -t --prx <file>
$ prx -t --prd <file1> --prs <file2>

Just thinking out loud here, mostly. Still gotta deduplicate the code underneath the hood, though. I might do something like I did with the recent MMFW work.