Skip to content

Conversation

@cvuchener
Copy link
Contributor

I am not sure about the bitfield size, but I cannot check right now.

I have no idea where the stuff I'm removing has gone, but it's not the first time in this structure from the comments. There are two bytes of padding after chores, bools could fit in there.

@cvuchener
Copy link
Contributor Author

related function: DFHack/dfhack#2901 (comment)

@cvuchener
Copy link
Contributor Author

I am not sure about the bitfield size, but I cannot check right now.

Actually read as a single byte. Bitfield or bool?

.text:000000014030E9DF                 test    byte ptr cs:g_plotinfo.hauling.anon_7, 1
.text:000000014030E9E6                 jz      loc_14030F334

df.ui.xml Outdated
<int32_t ref-target='unit'/>
</stl-vector>

<!--
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were these fields just wrong before? why are they commented out now? and can they just be deleted instead of commented?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not check older versions, I guess they were wrong since 0.50.01.

They could be deleted. I followed the trend started by @quietust in cc7c6b1. I think quietust did that so it would be easier to recreate the field when they are found. But now we know there is not enough space for them to be in hauling. If they still exist, they are much further away.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, the main reason I commented things out was because a lot of things had changed so I didn't know at the time whether those fields had been removed or simply relocated.

Once it's clear that something has actually been removed, it should be erased from the XML - if it ever comes back, we can look back in the commit history to find it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed all the comments.

@cvuchener
Copy link
Contributor Author

I am not sure about the bitfield size, but I cannot check right now.

Actually read as a single byte. Bitfield or bool?

.text:000000014030E9DF                 test    byte ptr cs:g_plotinfo.hauling.anon_7, 1
.text:000000014030E9E6                 jz      loc_14030F334

Should have looked at how it is written. It is definitely a 32 bit bitfield.

.text:0000000140307A93                 and     cs:g_plotinfo.hauling.anon_7, 0FFFFFFFEh

@myk002 myk002 merged commit 8b8ac2d into DFHack:master Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants