ptypes?

  • AC3_Blade
    24th Apr 2016 Member 0 Permalink

    Hi I'm porting elements from maksprogs mod to a newer version of TPT and I've fixed all but one thing. I keep getting an error about something called "ptypes" and I cant find any meaningful references to in the source. Picture is the error i get:

  • jacob1
    24th Apr 2016 Developer 1 Permalink
    A number of things were changed in the rewrite to C++ a few years ago. So you'll have to change all those things.

    ptypes can be replaced with sim->elements, then most of the properties are in CamelCase now. So ptypes[r&0xFF].hardness should probably be sim->elements[r&0xFF].Hardness.

    A lot of functions are now in Simulation.cpp so you can just add sim-> before them. Some variables are also now in simulation (sim->photons, sim->air->pv, sim->grav->gravy)
  • AC3_Blade
    24th Apr 2016 Member 0 Permalink

    @jacob1 (View Post)

     Just compiled and tested with sim->elements and it works great! Many thanks!