emoose / MBINCompiler

Now maintained by monkeyman192: https://github.com/monkeyman192/MBINCompiler
Other
43 stars 69 forks source link

Change GcSolarGenerationGlobals #66

Closed Bananasft closed 7 years ago

Bananasft commented 7 years ago

Changed GcSolarGenerationGlobals to a template, that @spAnser created for hex workshop.

This is not by any means complete, but contains some names that he worked out by trial & error. :+1:

emoose commented 7 years ago

Neat, could you change the types to match the ones from the older struct though? I went through and checked all of them myself by looking at the code that uses them, they should be correct (except for the ones with the "unused?" comments, those didn't seem to have any code mentioning them, might be useful to copy those comments over too) I'd guess the types should probably match with spAnsers work, if any don't let me know here and I'll take another look at it.

The

[NMS(Size = 6)] public Vector3i[] Unknown134;

part is defintely a Vector3i array too, code for that was a bit confusing though, took a while to decipher, could you copy that into it too? (from unk194 up to (but not including) unk1DC)

Also the start bit

public bool Unknown0; [NMS(Size = 0xF)] public byte[] Unknown1;

seems to be correct too, the defaults func & games code don't touch that Unknown1, and the Unknown0 is definitely used as a bool by the code, I got a feeling the Unknown1 might be padding for one of the types that require 0x10 alignment (Colour, Vector%%, etc)

Bananasft commented 7 years ago

Yep, I can change that back tomorrow.

Bananasft commented 7 years ago

I've re-added your comments and types.

The only things I changed from the original are the types of Unknown28, Unknown30 and Unknown74. They were bools before, I changed them to float/uint (as they were in spAnsers template).

Not sure which one is correct but there definitely seem to be 4 bytes at 0x28 0x30 and 0x74 each.

emoose commented 7 years ago

Thanks, I'll merge this for now and take another look at the code that uses those fields later, they could be single bools with padding for the next field, which would explain them taking up 4 bytes (with only the first byte actually being used, if they are bools that is)