Skip to content
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

Make linker entries less janky for .data (e.g. images) #348

Open
mkst opened this issue Feb 24, 2024 · 2 comments
Open

Make linker entries less janky for .data (e.g. images) #348

mkst opened this issue Feb 24, 2024 · 2 comments

Comments

@mkst
Copy link
Collaborator

mkst commented Feb 24, 2024

(copy/pasta from Discord):

The linker names are a little crazy because we are taking the file suffixes and dropping the last one (the aim being to drop the .o)

this leads to the following yaml entry:

    - [0x117200, rgba16, img/intro/spaceship_interior.D_04000630_117200, 32, 32]

generating these lines in the .ld script:

        img_intro_spaceship_interior_D_04000630_117200_rgba16_D_04000630_117200__rgba16__png = .;
        build/assets/img/intro/spaceship_interior.D_04000630_117200.rgba16.png.o(.data);

I think the entry in the linker file should be:

        img_intro_spaceship_interior_D_04000630_117200_rgba16_png = .;
        build/assets/img/intro/spaceship_interior.D_04000630_117200.rgba16.png.o(.data);

This could be done by taking the build_path and removing the prefix (i.e. build/assets) and removing the final suffix (i.e. .o).

This would probably be a breaking change for people though (even if the only change was the double underscores becoming single underscores.

@AngheloAlf
Copy link
Collaborator

Currently who is using this feature?
I thought papermario was the only one using it and as far as I know they migrated to C files instead

@mkst
Copy link
Collaborator Author

mkst commented Feb 24, 2024

I'm using it a bit in SSSV, I would use it more if it was less janky 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants