cbhacks / CrashEdit

Unofficial Crash Bandicoot 1/2/3 Level Editor
https://www.cbhacks.com/tools/crashedit/
Other
135 stars 27 forks source link

Fix scaling (0x30E) property #83

Closed ManDude closed 4 years ago

ManDude commented 8 years ago

Paths for the triceratops (object 17:0) and hotrods + willy (highroad levels) need to be scaled up by 4x (again). I'm pretty sure some other objects need this but I can't remember them.

ManDude commented 8 years ago

If I scale uo the triceratops paths by 4, some will still be off from where they are in-game, so the scaling is probably mentioned sonewhere (in the entity itself as a property maybe?). Holy shit I hate this game.

ughman commented 8 years ago

It seems to have something to do with the 0x30E property. Most objects have the value 0x0. One Dino Might! obj_triceratops has the value 0x1, haven't checked the others. The Road Crash obj_willy and obj_hotrail have 0x3. Some of the obj_hotrods have 0x1 and some have 0x0. So, that's probably it. Also, objects without the property at all scale like crash 2.

AraHaan commented 8 years ago

It seems like paths in Crash 3 are off a lot for me But for me they are too big.

ManDude commented 8 years ago

Example of working code: float scale = (1 << entity.Scaling.Value) / 4;