3D palette, button input info#368
Conversation
Co-authored-by: UsernameFodder <93669634+UsernameFodder@users.noreply.github.com>
Co-authored-by: UsernameFodder <93669634+UsernameFodder@users.noreply.github.com>
|
@UsernameFodder The symbols check is giving me an error for the ram symbol being in the wrong place, but I'm not sure if the place it's suggesting is the correct one. |
| ASSERT_SIZE(struct message_log_info, 12); | ||
|
|
||
| // Contains information about the user's current button input in dungeon mode. | ||
| // For a mapping of keys <-> bits, see https://problemkaputt.de/gbatek.htm#gbakeypadinput |
There was a problem hiding this comment.
Would it make sense to define a struct encoding the mapping in bitfields? Especially since multiple fields seem to use the same mapping
There was a problem hiding this comment.
This was actually proposed by @Chesyon a while ago but it seems he never got around to it. I'll add it to this PR.
headers/types/common/common.h
Outdated
| ASSERT_SIZE(struct options, 10); | ||
|
|
||
| // This is the layout of all button bitflags in the input/controller structs. This is present only | ||
| // for analysis purposes, as internally the code does not seem to actually store these as a struct. |
There was a problem hiding this comment.
| // for analysis purposes, as internally the code does not seem to actually store these as a struct. |
This is unnecessary, the code never uses bitfields anywhere and this repo is about documentation, not code matching accuracy
There was a problem hiding this comment.
@Chesyon pinging you just so you see since you were the one who originally wrote this
headers/types/common/common.h
Outdated
| bool unk14 : 1; | ||
| bool unk15 : 1; | ||
| }; | ||
| ASSERT_SIZE(struct buttons, 0x2); |
There was a problem hiding this comment.
| ASSERT_SIZE(struct buttons, 0x2); | |
| ASSERT_SIZE(struct buttons, 2); |
headers/types/common/common.h
Outdated
| }; | ||
| ASSERT_SIZE(struct options, 10); | ||
|
|
||
| // This is the layout of all button bitflags in the input/controller structs. This is present only |
There was a problem hiding this comment.
Let's keep the gbatek reference link. Also, if I read the reference correctly, we should probably add a note that false means a button is pressed, since that's pretty unintuitive
| ASSERT_SIZE(struct message_log_info, 12); | ||
|
|
||
| // Contains information about the user's current button input in dungeon mode. | ||
| // For a mapping of keys <-> bits, see the buttons struct in common.h. |
There was a problem hiding this comment.
Just use the struct as the type for the fields that use the mapping
It's "correct" given the available info. It's ordering the new symbol (which has only the EU address labeled) before the ones with only NA addresses labeled. Addresses across versions aren't really comparable, so the sorting puts the EU-only address first. |
No description provided.