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

Feature: Write floats in CutsceneData as IEEE-754 "hex" #316

Closed
Dragorn421 opened this issue Feb 5, 2024 · 1 comment
Closed

Feature: Write floats in CutsceneData as IEEE-754 "hex" #316

Dragorn421 opened this issue Feb 5, 2024 · 1 comment

Comments

@Dragorn421
Copy link
Contributor

Note: it's not decided if this would even be used, but implementing it anyway may help discussion (and it doesn't sound hard to implement)

Context: zeldaret/oot#1719

Currently

CutsceneData is written with floats inside

For example in OoT's assets/scenes/dungeons/bdan/bdan_scene.c:

CutsceneData bdan_sceneCutsceneData_0130A0[] = {
    CS_BEGIN_CUTSCENE(14, 1299),
    CS_PLAYER_CUE_LIST(3),
        CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 272, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347,
                      1.13930372e-29f, 0.00000000e+00f, 1.40129846e-45f),

Feature Request

A config option to toggle if CutsceneData floats should be written as floats or as their IEEE-754 binary representation ("in hex")
Possibly/Ideally with the float value as a comment

For example the excerpt above could look like:

CutsceneData bdan_sceneCutsceneData_0130A0[] = {
    CS_BEGIN_CUTSCENE(14, 1299),
    CS_PLAYER_CUE_LIST(3),
        CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 272, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347,
                      0xF671408 /* 1.13930372e-29f */, 0x0 /* 0.00000000e+00f */, 0x1 /* 1.40129846e-45f */),
@Dragorn421
Copy link
Contributor Author

Addressed by #317 (thanks!)

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

1 participant