Skip to content

Move shared declarations into dedicated headers#810

Merged
HylianFreddy merged 1 commit intogamestabled:mainfrom
HylianFreddy:shared-headers
Apr 10, 2026
Merged

Move shared declarations into dedicated headers#810
HylianFreddy merged 1 commit intogamestabled:mainfrom
HylianFreddy:shared-headers

Conversation

@HylianFreddy
Copy link
Copy Markdown
Collaborator

Currently the app's .cpp files include some headers from the base patch with ugly directives like #include "../code/src/entrance.h" that cause a bunch of useless declarations to be visible from the app files and create useless dependencies for Make (the stuff in the .d files).

So, I moved all declarations that are used by both the patch and the app into separate headers under the ./shared directory, including them where required. I opted to name them all with a s_ prefix for clarity and to avoid include conflicts.
I also placed the few shared definitions in a shared_data.c file which will be compiled for both subprojects.

To avoid error squiggles in VS Code, developers will need to update their local c_cpp_properties.json, adding something like this to the include path:
"${workspaceFolder}/shared/**"

Comment thread code/src/actors/owl.h

void EnOwl_DespawnInit(Actor* owl, GlobalContext* globalCtx);
void EnOwl_rUpdate(Actor* owl, GlobalContext* globalCtx);
void EnOwl_FastCutscene(GlobalContext* globalCtx);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this unused? Otherwise, why remove it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it was unused. I probably should've deleted it in the previous PR but I noticed it late 😅

@HylianFreddy HylianFreddy merged commit 45e7590 into gamestabled:main Apr 10, 2026
2 checks passed
@HylianFreddy HylianFreddy deleted the shared-headers branch April 10, 2026 19:21
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

Successfully merging this pull request may close these issues.

3 participants