Follow

Question, for naming variables.

So the "two bytes" from the previous post are actually sub ID's, because they apparenly ran out of space with a limit of 255 max.

For my library, what should the two sub ID fields be called?

SubID and SubSubID or...any other better ideas, I'm out of any.

@pixel@desu.social if \LaTeX's allowed to have \subsection and \subsubsection, why not?

Altough I'd rather go for minor and major if it's just two fields.

@pixel rename the root id to DomID, then follow it up with SwitchID and SubID

@pixel *who designed this MESS*

Do they have any kind of semantic relationship or are they just two IDs?

@luna back in 2004 devs:

"oh hey, 255 bones surely will be enough"

2014 calling:

"at bone 254, we introduce a sub ID to continue counting up, and another id to count even further"

@pixel So

0-253 only uses the first ID, and then 254 and 255 use the second ID?

@luna because bone 255 is the root, and the game is instructed to stop reading in structures if it reaches 255, so it adds another id on 254.

@pixel oh so 0-253 uses First ID, 254 use Second ID and 255 is a special value?

@luna @pixel you'd think that after reading 255 IDs once, they'd at least hack in *more* than another byte to actually future proof it

@kurisu @luna

that's why they added two

and the first sub ID of 254 is not 0

it's 254

reading order in one of the models I found:
0..253
254,254,0
254,255,0
254,0,1
254,1,1
254,2,1
254,3,1
...
254,33,1
255

@pixel Why do people always come up with the worst fucking binary formats

Like I used to mess around with cave story music files and THEY'RE SO BAD

Cuz they have

[header]
[track] * 16
[notes] * track.note_count * 16
EXCEPT THE NOTES AREN'T STORED LIKE

[note]
[note]
[note]
...

IT'S

[note duration]
[note duration]
...
[note pitch]
[note pitch]
...

IT'S SUCH A PAIN TO PARSE THAT YOU END UP WITH SO MANY LOOPS

@pixel Reason I mentioned this is because

A) people make fucking awful formats
and
B) I HAVE SO MANY PROJECTS BACKLOGGED BUT I CAN'T BE ARSED TO WRITE A LIBRARY FOR THIS :(((((((((((((

@pixel @luna ok i'm confused, i thouht there were two single-byte ID fields

@kurisu @luna

two additional ones, to the one already existing. (and if the existing one reaches 254 they add the two others ones after that)

@pixel @luna ahh that makes a bit more sense. I guess they know that 65k is always enough bones

@kurisu @luna most likely so

it was a pain in the ass to debug this because the file that contained this structure is 12 MB

12 MB of binary structures related to animations, and shortly before the end this weird parsing error with the two additional bytes comes up, which can be skipped over quite easily.

@pixel@desu.social @kurisu@iscute.moe @luna@weirder.earth
Need to order bytes?

Tried of simple endianess? Try advanced Pangyaness.

@pixel First off: What a fucking nightmare.

Secondly I suppose you could see it as Major ID / Minor ID pair?

so

SubIdMajor and SubIdMinor?

Sign in to participate in the conversation
desu.social

Welcome to desu.social, pixeldesu's personal Mastodon instance!