-
Notifications
You must be signed in to change notification settings - Fork 165
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
Separate behavior files into standalone C files #721
base: develop/3.0.0
Are you sure you want to change the base?
Separate behavior files into standalone C files #721
Conversation
tracking warnings
i see we're making 3.0 the "even more hellish to upgrade to than 2.0" update |
encouraging 3.0 to be the starting point for a romhack rather than another upgrade point is the point |
watch me |
Tracking a rogue issue that causes the o->oDoorForwardRoom and o->oDoorBackwardRoom values to lock to |
TODO: Files that include |
subrepo: subdir: "src/libcart" merged: "948358b8" upstream: origin: "https://github.com/devwizard64/libcart" branch: "main" commit: "948358b8" git-subrepo: version: "0.4.6" origin: "???" commit: "???"
The door bug is now fixed (as well as every other thing that could've broken due to that issue). This leaves Scope Bullet Point 2 (merging object helper files) as the last TODO for this PR. |
Did another run-through to make sure everything was in order; I believe this is ready for review now |
src/game/camera.h
Outdated
**/ | ||
|
||
/* End Birds */ | ||
#define /*0x104*/ oEndBirdCutsceneVars9PointX OBJECT_FIELD_F32(0x1F) |
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.
Why have it here?
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.
It was a remnant of the behaviors that were still in camera.c, but now I guess it can just go to global_object_fields
return dialogResponse; | ||
} | ||
|
||
void obj_set_dist_from_home(f32 distFromHome) { |
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.
All small functions like this should be static inline
in header files.
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 did enough function moving here to get rid of obj_behaviors_2
and object_helpers_2
, but anything further is so out of scope that i have another in progress branch trying to consolidate and split everything in a way that makes sense
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 agree, let's keep this PR majorly to splitting behaviors to C files first to ease reviewing process. Can consider minor perf stuff later.
Scope:
src/game/behaviors
to standalone .c files. (COMPLETE)merge the remaining parts of obj_behaviors, obj_behaviors_2, object_helpers, and behavior_actions in some way.(Waaaaay out of scope; postponed to a future PR)Tracked to-do list before PR is ready to merge:
Create a list of behavior files that need more splitting or naming.(N/A)