I think I may have finally generated correct working SHP decompilation code. It correctly renders a lot of stuff including AOR and PG SHPs which did not render correctly before.
EDIT: It all comes down to the SHP header data.
xStart and yStart in the SHP Icon Headers are irrelevant in Steel Panthers; because everything always begins in the upper left corner of the SHP file, whether it's a screen image, button, or unit icon.
But in Age of Rifles; because of the extensive use of paperdolls with multiple SHP images overlaid over each other; some way of "offsetting" x/y had to be done:
AHA!
It's because Steel Panthers uses the xStart and yStart SHP header variables differently than other SSI programs -- in Steel Panthers, this is used to place the turret and hull offsets to place icons centered on the battlefield.
I need to go look deeper into Fred's code; to see if he had any flags that recognized a Steel Panthers SHP image and treated it differently than a "regular" SSI SHP
EDIT: I figured it out.
SHPs that are used in transparent "paper dolls" have POSITIVE numbers for xStart + yStart.
SHPs that use xStart + yStart to store centroid information for turret placement are NEGATIVE numbers; and this is how SSI differentiated between them, while maintaining compatibility