From a6565d650889162f6f674761034c4d0d6f8c9f9e Mon Sep 17 00:00:00 2001 From: Reonu Date: Sat, 17 Jul 2021 18:19:32 +0100 Subject: [PATCH] Added define for parallel lakitu cam / aglab cam --- include/config.h | 4 +++- src/game/camera.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/include/config.h b/include/config.h index 0b4e4021..db9c20ee 100644 --- a/include/config.h +++ b/include/config.h @@ -66,7 +66,7 @@ #define CASTLE_MUSIC_FIX // Remove course specific camera processing #define CAMERA_FIX -// Change the movement speed when hanging from a ceiling +// Change the movement speed when hanging from a ceiling (the vanilla value is 4.f) #define HANGING_SPEED 12.f // Makes Mario face the direction of the analog stick directly while hanging from a ceiling, without doing "semicircles" #define TIGHTER_HANGING_CONTROLS @@ -90,6 +90,8 @@ //#define KEEP_MARIO_HEAD // Makes the coins ia8 64x64 instead of ia16 32x32. Uses new ia8 textures so that vanilla coins look better. #define IA8_COINS +// Enables "parallel lakitu camera" or "aglab cam" which lets you move the camera smoothly with the dpad +#define PARALLEL_LAKITU_CAM // HACKER QOL diff --git a/src/game/camera.c b/src/game/camera.c index 4c487b07..13ca56b4 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -1188,6 +1188,22 @@ void mode_8_directions_camera(struct Camera *c) { s8DirModeYawOffset -= DEGREES(45); play_sound_cbutton_side(); } +#ifdef PARALLEL_LAKITU_CAM + // extra functionality + else if (gPlayer1Controller->buttonPressed & U_JPAD) { + s8DirModeYawOffset = 0; + s8DirModeYawOffset = gMarioState->faceAngle[1]-0x8000; + } + else if (gPlayer1Controller->buttonDown & L_JPAD) { + s8DirModeYawOffset -= DEGREES(2); + } + else if (gPlayer1Controller->buttonDown & R_JPAD) { + s8DirModeYawOffset += DEGREES(2); + } + else if (gPlayer1Controller->buttonPressed & D_JPAD) { + s8DirModeYawOffset = s8DirModeYawOffset&0xE000; + } +#endif lakitu_zoom(400.f, 0x900); c->nextYaw = update_8_directions_camera(c, c->focus, pos);