-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up lib
imported data
#2235
Conversation
static u8 D_us_8018283C[] = {20, 1, 20, 2, 20, 3, 20, 2, 0, 0}; | ||
static u8 D_us_80182848[] = {24, 4, 24, 5, 24, 6, 24, 5, 0, 0}; | ||
static u8 D_us_80182854[] = {24, 7, 24, 8, 24, 9, 24, 8, 0, 0}; | ||
static u8 D_us_80182860[] = {18, 8, 18, 9, -1, 0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notice I split D_us_80182854
in two here since 0,0
signals the end of this data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a few of these when importing PSP data, since the unused symbols get stripped there, but it causes a mismatch if they're part of a data address that is actually used. Nice work
#else | ||
static u16 D_us_80181A78[] = {0x0903, 0x0A03, 0x0B03, 0x0C03, 0x0D03, 0x0E03, | ||
0xF03, 0x1003, 0x0000, 0x0000, 0x0003, 0x0000}; | ||
static s32 D_us_80181A8C = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were actually u8[]
s since they are passed to AnimateEntity
with an unused s32 at the end
Data seems to be aligned to a 4 byte boundary, so a lot of imported data has trailing zeros that are actually padding between data. Here I mostly remove trailing zeros from
u8[]
s passed toAnimateEntity
since that function ignores everything after a-1, 0
or a0, 0
.I also adjusted some imported arrays so their size matches what the code expects their size to be. I had to add a
STATIC_PAD_DATA(4);
but perhaps that could be a clue to adjust the file boundary.