collinsmith / riiablo

Diablo II remade using Java and LibGDX
http://riiablo.com
Apache License 2.0
884 stars 101 forks source link

MapRenderer debug preset grid drawing grid size incorrect #16

Closed collinsmith closed 5 years ago

collinsmith commented 5 years ago

drawDebugGrid in MapRenderer when RENDER_DEBUG_GRID=3 is drawing the incorrect grid size, or it's offset somehow and not aligning with the actual preset bounds. I think this is an error I made when calculating the modulus. The bug show up in the Den of Evil zone and works as expected in the default zones (zones branching from 0,0.


Double checked and yes. The bounds are calculated from 0,0 and not from the zone's origin tx,ty, so it's offset because DOE is not aligned on the same grid size as the origin.

collinsmith commented 5 years ago

I made some adjustments and it looks like this might have done the trick. I'm going to close this issue for now.