-
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
Reonucam and camera collision defines #778
base: develop/3.0.0
Are you sure you want to change the base?
Conversation
@@ -1116,13 +1141,98 @@ s32 snap_to_45_degrees(s16 angle) { | |||
return angle; | |||
} | |||
|
|||
#ifdef EIGHT_DIR_CAMERA_COLLISION | |||
void eight_dir_collision_handler(struct Camera *c) { |
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.
would like some lines of spacing between parts of the code in this function and the below function, its a little hard to read
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.
mark it as resolved if you think it's ok now
/** | ||
* A mode that only has 8 camera angles, 45 degrees apart | ||
*/ | ||
void mode_8_directions_camera(struct Camera *c) { | ||
Vec3f pos; | ||
s16 oldAreaYaw = sAreaYaw; | ||
|
||
#ifdef REONUCAM |
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.
for this function i think it might be better if reonucam_handler was expanded to include the other parts of this function and then it would be a replacement for this function rather than being full of ifdefs
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.
makes sense, will look into it tomorrow
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.
still havent done this smh
@@ -2882,14 +3003,23 @@ void update_camera(struct Camera *c) { | |||
// Only process R_TRIG if 'fixed' is not selected in the menu | |||
if (cam_select_alt_mode(CAM_SELECTION_NONE) == CAM_SELECTION_MARIO) { | |||
if (gPlayer1Controller->buttonPressed & R_TRIG) { | |||
#ifdef REONUCAM | |||
if (set_cam_angle(0) == CAM_ANGLE_MARIO) { |
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.
this should be in the cam handler not 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.
unless thats not possible with how the cam angle stuff works idk
} | ||
|
||
void play_sound_cbutton_down(void) { | ||
#ifndef REONUCAM |
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.
cleaner (both codewise and optimization wise) to ifdef this whole block and then if reonucam is defined instead do #define play_sound_cbutton_up()
@@ -4741,6 +4881,7 @@ void handle_c_button_movement(struct Camera *c) { | |||
} | |||
} | |||
|
|||
|
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.
get this formatting change outta 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.
I think arceveti took over my pc
@@ -5210,7 +5351,11 @@ void set_camera_mode_8_directions(struct Camera *c) { | |||
if (c->mode != CAMERA_MODE_8_DIRECTIONS) { | |||
c->mode = CAMERA_MODE_8_DIRECTIONS; | |||
sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; | |||
#ifdef REONUCAM | |||
s8DirModeBaseYaw = snap_to_45_degrees(s8DirModeBaseYaw); | |||
#else |
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.
this seems weird, how do you know what s8DirModeBaseYaw is here? that variable is not used outside of 8 direction camera afaik so i don't know if this has the effect you think it does
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 think you're right and this is completely unnecessary
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.
Will review this properly tomorrow:tm:, but for now please remove reonucam from the enhancements folder
it's already not there in 3.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.
Sorry this is a lot of mostly nitpicks, but there's some important stuff in here too.
|
||
// Enables Reonucam, a custom camera that aims to be a more feature-rich "aglabcam" that doesn't use a single button more than the vanilla camera. | ||
// An explanation the features can be seen here: https://www.youtube.com/watch?v=TQNkznX9Z3k (please note that the analog feature shown at the end is no longer present) | ||
//#define REONUCAM |
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.
Nit: // #define REONUCAM
(the space)
#ifndef USE_COURSE_DEFAULT_MODE | ||
#define USE_COURSE_DEFAULT_MODE | ||
#endif |
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.
Nit: #undef
here instead
} else if (gPlayer1Controller->buttonPressed & L_JPAD) { | ||
gReonucamState.speed--; | ||
} | ||
gReonucamState.speed = (gReonucamState.speed + 5) % 5; |
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.
Can you extern cameraSpeeds
, give it a hard size (5), and use ARRAY_COUNT
here instead? Would make configuring camera speeds safer. Also rename it to gReonucamSpeeds
or something less generic.
@@ -58,7 +58,7 @@ | |||
/** | |||
* Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified. | |||
*/ | |||
// #define PUPPYCAM | |||
//#define PUPPYCAM |
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.
Probably should have been a bit more clear; the commented defines in the other files do use a space here. Space is also better because it's consistent with VSCode's commenting shortcut (Ctrl + /).
// Enables Reonucam, a custom camera that aims to be a more feature-rich "aglabcam" that doesn't use a single button more than the vanilla camera. | ||
// An explanation the features can be seen here: https://www.youtube.com/watch?v=TQNkznX9Z3k (please note that the analog feature shown at the end is no longer present) |
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.
Missed this last time, but this should use a block comment rather than line comments like the rest of the file.
This PR adds Reonucam as a define, and additionally, adds a camera collision define for 8 direction camera that also affects Reonucam by extension (but you can toggle either separately)
Will update this in a sec listing all the features of reonucam
REONUCAM FEATURES