Posted July 09, 2025 by RastPort
#C++ #Amiga #IFF
I have decided to refactor the project and expand classes hierarchy to avoid duplication of common code. Seven operation modes of IFFChunkTool can be divided into three groups:
Then I have created three base classes for these categories: ChunkLister, ChunkPicker and ChunkCopier. Each of them has different IFF parse loop. Next I have 6 subclasses implementing operating modes. ChunkExtractor and ChunkDumper inherit from ChunkPicker. They are implemented and tested. Four more classes will inherit from ChunkCopier.
LIST, EXTRACT and DUMP modes can be seen in action on the example screenshot. I have analyzed an IFF ILBM image there. I have also shown that thanks to refactoring I'm still below 5 kB of executable. I hope to keep it below 10 kB with all planned functionality added.