Skip to content

MD2/MD3 support rewritten + optimizations [by SSNTails]

mazmazz requested to merge md3-vanilla into master
Backported from Roly Poly Putt, this is my code for a common model format. I also included two loaders, for both MD2 and MD3. This abstracts the rendering code away from the idiosyncrasies of a particular model format, making it a lot easier to add support for others (I also have a non-animated MS3D loader that I may contribute in the future).

This also includes some optimization -- it should now be possible to push a lot more polygons in the renderer itself.

This is the vanilla port of https://git.magicalgirl.moe/KartKrew/Kart-Public/merge_requests/2 with the following changes:

  • Fixed VC project files back to XP toolchain and added the new sources to all the projects
  • Added new sources to Makefile and CMake
  • GCC and Buildbot fixes
    • Unrecognized types, e.g., byte changed to char; bool changed to boolean
    • Mixed D&C - moved variable declarations to top of code blocks
    • Other stuff? I forget.
    • Buildbot results
  • ifdef'd some Kart-specific stuff for easier merging
    • USE_FTRANSFORM_MIRROR for encore mirroring
    • USE_FTRANSFORM_ANGLEZ for slope rotation
    • USE_MODEL_NEXTFRAME for nextFrame handling in HWR_DrawMD2(). This was ifdef'd out in Kart, so I made it active again which enables interpolation in DrawModelEx()

See diff vs. SSN's original merge here

Parking this here so we can comment on source lines.

Edited by mazmazz

Merge request reports

Loading