igorseabra4 / HeroesPowerPlant

Level editor for Sonic Heroes (PC, GameCube, XBOX, PS2) and Shadow the Hedgehog (GameCube, XBOX, PS2). Integrates editors for various file types with a 3D view of the stage.
27 stars 14 forks source link

[Enhancement/Feature] Shadow Destructable/Decoration DFF Automatic Model Mapping via Parsing _gdt.one #35

Open dreamsyntax opened 2 years ago

dreamsyntax commented 2 years ago

Why?

Some stages share same DFF names but different Ids Sandbag is ID 7 for GUN Fortress, but is really 11 in Air Fleet image

We currently have a hardcoded list of IDs / DFF model names being used for these objects. This leads to showing wrong models in some stages for decorations/destructible.

Draft flow implementation:

-> on stage open when parse the _gdt.one happens ->> find ARTISTGADGET.BIN and ARTISTWORK.BIN within the _gdt.one (I think the mapping is destruction1 and decoration1) parse ARTISTGADGET/ARTISTWORK for DFF names & ID references per decoration1/destruction1, ignore everything else Override destructable/decoration setobjs to use the above parsed information for the RenderDFF/SetDFF function