mrkite / TerraFirma

Mapping for Terraria
http://seancode.com/terrafirma
BSD 2-Clause "Simplified" License
278 stars 61 forks source link

Incorrect highlight count #41

Closed galtgendo closed 4 years ago

galtgendo commented 8 years ago

Version 3.0.9 (explicitly tagging versions in public git would be recommended). It would seem the highlight function is somehow off-by-one - not sure if this affects all of the blocks, but the easiest testable (Crimson Heart) doesn't highlight the leftmost heart on one map.

galtgendo commented 8 years ago

...tested with another map, this time with Corruption map. Again, one Shadow Orb isn't highlighted.

It's not a matter of map position though, it's probably an internal order of the counted objects.

mrkite commented 8 years ago

Strange. I'll have to look into what's happening.

galtgendo commented 8 years ago

...:sweat:... OK, this is a dupe of #36 after all. It just happens to be that both of the non-highlighted objects were submerged. If you happen to have a map were a large object is partially submerged, you may sometimes (on lower zoom level or when textures aren't used) see that the object is partially highlighted (just the part above water level).

galtgendo commented 8 years ago

...however, I've found a different typo: in res/items.json, Space Gun is incorrectly listed with the same id as Bottled Water.

galtgendo commented 4 years ago

...funny, you've failed to address my last comment...

galtgendo commented 4 years ago

Actually, I'm a bit curious: how do you produce those res json files in the first place ? Cause given their size, it doesn't seem to be by manual entry...

mrkite commented 4 years ago

I didn't comment on it, sorry, but I did fix it. I just haven't pushed it yet.

The json files are generated by a web tool. I've been contemplating porting the tool over to Qt and sticking it into Terrafirma.

galtgendo commented 4 years ago

...correct me, if I'm wrong, but doesn't that tool get its values from the executable ? Not that I know which tool you're talking about, I simply don't see any file among loose data that would contain such info. Also, such tool would still need a history database - I didn't check if you're actually using 'min' fields from header.json, but I'm nearly certain that those are history related. Cause if so, it might be tricky to get it to work with both Windows and Linux executables...

mrkite commented 4 years ago

Pretty much all the data is gotten from reverse engineering the executable. The header stuff definitely is (and I do use min and max). The tool just gives a nice way of editing the jsons.

galtgendo commented 4 years ago

...I wonder if there's a freeware tool not written in C#, that is able to do some of the more basic stuff dnSpy/ILSpy are doing - some of basic bytecode reversing at least...

galtgendo commented 4 years ago

...I mean something scriptable, like able to list contained classes, then dump the selected ones...