Add Free Camera C-Up option and sacrifice Pan Level

This commit is contained in:
Agent X 2023-12-05 16:57:10 -05:00
parent 99c9cd27cc
commit 99e53b9f80
16 changed files with 35 additions and 25 deletions

View file

@ -65,6 +65,7 @@ YES = "Ano"
[CAMERA] [CAMERA]
CAMERA = "KAMERA" CAMERA = "KAMERA"
FREE_CAMERA = "Volná kamera" FREE_CAMERA = "Volná kamera"
C_UP = "Volná kamera C-Up"
ANALOG_CAMERA = "Analogová kamera" ANALOG_CAMERA = "Analogová kamera"
MOUSE_LOOK = "Myš pro ovládání kamery" MOUSE_LOOK = "Myš pro ovládání kamery"
INVERT_X = "Převrátit X" INVERT_X = "Převrátit X"

View file

@ -65,6 +65,7 @@ YES = "Ja"
[CAMERA] [CAMERA]
CAMERA = "CAMERA" CAMERA = "CAMERA"
FREE_CAMERA = "Vrije Camera" FREE_CAMERA = "Vrije Camera"
C_UP = "Vrije Camera C-Up"
ANALOG_CAMERA = "Analoge Camera" ANALOG_CAMERA = "Analoge Camera"
MOUSE_LOOK = "Muis Camera" MOUSE_LOOK = "Muis Camera"
INVERT_X = "Keer X om" INVERT_X = "Keer X om"

View file

@ -65,6 +65,7 @@ YES = "Yes"
[CAMERA] [CAMERA]
CAMERA = "CAMERA" CAMERA = "CAMERA"
FREE_CAMERA = "Free Camera" FREE_CAMERA = "Free Camera"
C_UP = "Free Camera C-Up"
ANALOG_CAMERA = "Analog Camera" ANALOG_CAMERA = "Analog Camera"
MOUSE_LOOK = "Mouse Look" MOUSE_LOOK = "Mouse Look"
INVERT_X = "Invert X" INVERT_X = "Invert X"

View file

@ -65,6 +65,7 @@ YES = "Oui"
[CAMERA] [CAMERA]
CAMERA = "CAMÉRA" CAMERA = "CAMÉRA"
FREE_CAMERA = "Caméra Libre" FREE_CAMERA = "Caméra Libre"
C_UP = "Caméra Libre C-Haut"
ANALOG_CAMERA = "Caméra Analogique" ANALOG_CAMERA = "Caméra Analogique"
MOUSE_LOOK = "Souris comme Caméra" MOUSE_LOOK = "Souris comme Caméra"
INVERT_X = "Inverser l'axe X" INVERT_X = "Inverser l'axe X"

View file

@ -65,6 +65,7 @@ YES = "Ja"
[CAMERA] [CAMERA]
CAMERA = "KAMERA" CAMERA = "KAMERA"
FREE_CAMERA = "Freie Kamera" FREE_CAMERA = "Freie Kamera"
C_UP = "Freie Kamera C-Hoch"
ANALOG_CAMERA = "Analoge Kamera" ANALOG_CAMERA = "Analoge Kamera"
MOUSE_LOOK = "Mausansicht" MOUSE_LOOK = "Mausansicht"
INVERT_X = "X invertieren" INVERT_X = "X invertieren"

View file

@ -65,6 +65,7 @@ YES = "Si"
[CAMERA] [CAMERA]
CAMERA = "TELECAMERA" CAMERA = "TELECAMERA"
FREE_CAMERA = "Telecamera libera" FREE_CAMERA = "Telecamera libera"
C_UP = "Telecamera Libera C-Su"
ANALOG_CAMERA = "Telecamera analogica" ANALOG_CAMERA = "Telecamera analogica"
MOUSE_LOOK = "Telecamera con mouse" MOUSE_LOOK = "Telecamera con mouse"
INVERT_X = "Inverti X" INVERT_X = "Inverti X"

View file

@ -65,6 +65,7 @@ YES = "Tak"
[CAMERA] [CAMERA]
CAMERA = "KAMERA" CAMERA = "KAMERA"
FREE_CAMERA = "Wolna Kamera" FREE_CAMERA = "Wolna Kamera"
C_UP = "Wolna Kamera C-Góra"
ANALOG_CAMERA = "Analogowa Kamera" ANALOG_CAMERA = "Analogowa Kamera"
MOUSE_LOOK = "Patrzenie Mysza" MOUSE_LOOK = "Patrzenie Mysza"
INVERT_X = "Odwroc X" INVERT_X = "Odwroc X"

View file

@ -65,6 +65,7 @@ YES = "Sim"
[CAMERA] [CAMERA]
CAMERA = "CÂMERA" CAMERA = "CÂMERA"
FREE_CAMERA = "Câmera Livre" FREE_CAMERA = "Câmera Livre"
C_UP = "Câmara Livre C-Cima"
ANALOG_CAMERA = "Câmera Analógica" ANALOG_CAMERA = "Câmera Analógica"
MOUSE_LOOK = "Olhar com mouse" MOUSE_LOOK = "Olhar com mouse"
INVERT_X = "Inverter X" INVERT_X = "Inverter X"

View file

@ -65,6 +65,7 @@ YES = "Да"
[CAMERA] [CAMERA]
CAMERA = "CAMERA" CAMERA = "CAMERA"
FREE_CAMERA = "Свободная камера" FREE_CAMERA = "Свободная камера"
C_UP = "Свободная камера"
ANALOG_CAMERA = "Аналоговая камера" ANALOG_CAMERA = "Аналоговая камера"
MOUSE_LOOK = "Использовать мышь" MOUSE_LOOK = "Использовать мышь"
INVERT_X = "Инвертировать X" INVERT_X = "Инвертировать X"

View file

@ -65,6 +65,7 @@ YES = "Sí"
[CAMERA] [CAMERA]
CAMERA = "CÁMARA" CAMERA = "CÁMARA"
FREE_CAMERA = "Cámara libre" FREE_CAMERA = "Cámara libre"
C_UP = "Cámara Libre C-Arriba"
ANALOG_CAMERA = "Cámara analógica" ANALOG_CAMERA = "Cámara analógica"
MOUSE_LOOK = "Movimiento con mouse" MOUSE_LOOK = "Movimiento con mouse"
INVERT_X = "Invertir eje X" INVERT_X = "Invertir eje X"

View file

@ -65,6 +65,7 @@ YES = "Sí"
[CAMERA] [CAMERA]
CAMERA = "CÁMARA" CAMERA = "CÁMARA"
FREE_CAMERA = "Cámara libre" FREE_CAMERA = "Cámara libre"
C_UP = "Cámara Libre C-Arriba"
ANALOG_CAMERA = "Cámara analógica" ANALOG_CAMERA = "Cámara analógica"
MOUSE_LOOK = "Movimiento con mouse" MOUSE_LOOK = "Movimiento con mouse"
INVERT_X = "Invertir eje X" INVERT_X = "Invertir eje X"

View file

@ -358,18 +358,17 @@ static void newcam_rotate_button(void) {
} }
newcam_framessincec[1] = 0; newcam_framessincec[1] = 0;
} }
// TODO: find a better way to do this if ((gPlayer1Controller->buttonPressed & U_CBUTTONS) && newcam_modeflags & NC_FLAG_YTURN && !(newcam_modeflags & NC_FLAG_8D) && newcam_analogue == 0 && configCameraCUp) {
// if ((gPlayer1Controller->buttonPressed & U_CBUTTONS) && newcam_modeflags & NC_FLAG_YTURN && !(newcam_modeflags & NC_FLAG_8D) && newcam_analogue == 0) { if (newcam_framessincec[1] < 3 && gMarioState->action & ACT_FLAG_ALLOW_FIRST_PERSON) {
// if (newcam_framessincec[1] < 3 && gMarioState->action & ACT_FLAG_ALLOW_FIRST_PERSON) { gCameraMovementFlags |= CAM_MOVE_C_UP_MODE;
// gCameraMovementFlags |= CAM_MOVE_C_UP_MODE; #ifndef nosound
// #ifndef nosound play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
// play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); #endif
// #endif newcam_init_settings();
// newcam_init_settings(); return;
// return; }
// } newcam_framessincec[1] = 0;
// newcam_framessincec[1] = 0; }
// }
//There's not much point in keeping this behind a check, but it wouldn't hurt, just incase any 2player shenanigans ever happen, it makes it easy to disable. //There's not much point in keeping this behind a check, but it wouldn't hurt, just incase any 2player shenanigans ever happen, it makes it easy to disable.

View file

@ -107,12 +107,12 @@ unsigned int configRumbleStrength = 50;
unsigned int configCameraXSens = 10; unsigned int configCameraXSens = 10;
unsigned int configCameraYSens = 10; unsigned int configCameraYSens = 10;
unsigned int configCameraAggr = 0; unsigned int configCameraAggr = 0;
unsigned int configCameraPan = 0;
unsigned int configCameraDegrade = 50; // 0 - 100% unsigned int configCameraDegrade = 50; // 0 - 100%
bool configCameraInvertX = false; bool configCameraInvertX = false;
bool configCameraInvertY = true; bool configCameraInvertY = true;
bool configEnableCamera = false; bool configEnableCamera = false;
bool configCameraAnalog = false; bool configCameraAnalog = false;
bool configCameraCUp = false;
bool configCameraMouse = false; bool configCameraMouse = false;
// coop-specific // coop-specific
bool configSkipIntro = 0; bool configSkipIntro = 0;
@ -141,18 +141,18 @@ bool configShowFPS = false;
bool configUncappedFramerate = true; bool configUncappedFramerate = true;
unsigned int configFrameLimit = 60; unsigned int configFrameLimit = 60;
unsigned int configDrawDistance = 5; unsigned int configDrawDistance = 5;
bool configDisablePopups = 0; bool configDisablePopups = false;
#if defined(DEVELOPMENT) #if defined(DEVELOPMENT)
bool configLuaProfiler = 0; bool configLuaProfiler = false;
bool configCtxProfiler = 0; bool configCtxProfiler = false;
#endif #endif
unsigned int configInterpolationMode = 1; unsigned int configInterpolationMode = 1;
unsigned int configGamepadNumber = 0; unsigned int configGamepadNumber = 0;
bool configBackgroundGamepad = 1; bool configBackgroundGamepad = true;
bool configSingleplayerPause = 0; bool configSingleplayerPause = false;
bool configDebugPrint = 0; bool configDebugPrint = false;
bool configDebugInfo = 0; bool configDebugInfo = false;
bool configDebugError = 0; bool configDebugError = false;
char configLanguage[MAX_CONFIG_STRING] = ""; char configLanguage[MAX_CONFIG_STRING] = "";
bool configForce4By3 = false; bool configForce4By3 = false;
char configCoopNetIp[MAX_CONFIG_STRING] = DEFAULT_COOPNET_IP; char configCoopNetIp[MAX_CONFIG_STRING] = DEFAULT_COOPNET_IP;
@ -207,13 +207,13 @@ static const struct ConfigOption options[] = {
{.name = "rumble_strength", .type = CONFIG_TYPE_UINT, .uintValue = &configRumbleStrength}, {.name = "rumble_strength", .type = CONFIG_TYPE_UINT, .uintValue = &configRumbleStrength},
{.name = "bettercam_enable", .type = CONFIG_TYPE_BOOL, .boolValue = &configEnableCamera}, {.name = "bettercam_enable", .type = CONFIG_TYPE_BOOL, .boolValue = &configEnableCamera},
{.name = "bettercam_analog", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraAnalog}, {.name = "bettercam_analog", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraAnalog},
{.name = "bettercam_cup", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraCUp},
{.name = "bettercam_mouse_look", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraMouse}, {.name = "bettercam_mouse_look", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraMouse},
{.name = "bettercam_invertx", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraInvertX}, {.name = "bettercam_invertx", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraInvertX},
{.name = "bettercam_inverty", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraInvertY}, {.name = "bettercam_inverty", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraInvertY},
{.name = "bettercam_xsens", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraXSens}, {.name = "bettercam_xsens", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraXSens},
{.name = "bettercam_ysens", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraYSens}, {.name = "bettercam_ysens", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraYSens},
{.name = "bettercam_aggression", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraAggr}, {.name = "bettercam_aggression", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraAggr},
{.name = "bettercam_pan_level", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraPan},
{.name = "bettercam_degrade", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraDegrade}, {.name = "bettercam_degrade", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraDegrade},
{.name = "skip_intro", .type = CONFIG_TYPE_BOOL, .boolValue = &configSkipIntro}, {.name = "skip_intro", .type = CONFIG_TYPE_BOOL, .boolValue = &configSkipIntro},
// debug // debug

View file

@ -67,13 +67,13 @@ extern bool configBackgroundGamepad;
extern unsigned int configCameraXSens; extern unsigned int configCameraXSens;
extern unsigned int configCameraYSens; extern unsigned int configCameraYSens;
extern unsigned int configCameraAggr; extern unsigned int configCameraAggr;
extern unsigned int configCameraPan;
extern unsigned int configCameraDegrade; extern unsigned int configCameraDegrade;
extern bool configCameraInvertX; extern bool configCameraInvertX;
extern bool configCameraInvertY; extern bool configCameraInvertY;
extern bool configEnableCamera; extern bool configEnableCamera;
extern bool configCameraMouse; extern bool configCameraMouse;
extern bool configCameraAnalog; extern bool configCameraAnalog;
extern bool configCameraCUp;
extern bool configSkipIntro; extern bool configSkipIntro;
extern bool configBubbleDeath; extern bool configBubbleDeath;
extern unsigned int configAmountofPlayers; extern unsigned int configAmountofPlayers;

View file

@ -14,6 +14,7 @@ void djui_panel_camera_create(struct DjuiBase* caller) {
struct DjuiBase* body = djui_three_panel_get_body(panel); struct DjuiBase* body = djui_three_panel_get_body(panel);
{ {
djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA), &configEnableCamera, djui_panel_camera_value_changed); djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA), &configEnableCamera, djui_panel_camera_value_changed);
djui_checkbox_create(body, DLANG(CAMERA, C_UP), &configCameraCUp, djui_panel_camera_value_changed);
djui_checkbox_create(body, DLANG(CAMERA, ANALOG_CAMERA), &configCameraAnalog, djui_panel_camera_value_changed); djui_checkbox_create(body, DLANG(CAMERA, ANALOG_CAMERA), &configCameraAnalog, djui_panel_camera_value_changed);
djui_checkbox_create(body, DLANG(CAMERA, MOUSE_LOOK), &configCameraMouse, djui_panel_camera_value_changed); djui_checkbox_create(body, DLANG(CAMERA, MOUSE_LOOK), &configCameraMouse, djui_panel_camera_value_changed);
djui_checkbox_create(body, DLANG(CAMERA, INVERT_X), &configCameraInvertX, djui_panel_camera_value_changed); djui_checkbox_create(body, DLANG(CAMERA, INVERT_X), &configCameraInvertX, djui_panel_camera_value_changed);
@ -21,7 +22,6 @@ void djui_panel_camera_create(struct DjuiBase* caller) {
djui_slider_create(body, DLANG(CAMERA, X_SENSITIVITY), &configCameraXSens, 1, 100, djui_panel_camera_value_changed); djui_slider_create(body, DLANG(CAMERA, X_SENSITIVITY), &configCameraXSens, 1, 100, djui_panel_camera_value_changed);
djui_slider_create(body, DLANG(CAMERA, Y_SENSITIVITY), &configCameraYSens, 1, 100, djui_panel_camera_value_changed); djui_slider_create(body, DLANG(CAMERA, Y_SENSITIVITY), &configCameraYSens, 1, 100, djui_panel_camera_value_changed);
djui_slider_create(body, DLANG(CAMERA, AGGRESSION), &configCameraAggr, 0, 100, djui_panel_camera_value_changed); djui_slider_create(body, DLANG(CAMERA, AGGRESSION), &configCameraAggr, 0, 100, djui_panel_camera_value_changed);
djui_slider_create(body, DLANG(CAMERA, PAN_LEVEL), &configCameraPan, 0, 100, djui_panel_camera_value_changed);
djui_slider_create(body, DLANG(CAMERA, DECELERATION), &configCameraDegrade, 0, 100, djui_panel_camera_value_changed); djui_slider_create(body, DLANG(CAMERA, DECELERATION), &configCameraDegrade, 0, 100, djui_panel_camera_value_changed);
djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back); djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);

View file

@ -335,7 +335,7 @@ u32 camera_config_get_aggression(void) {
} }
u32 camera_config_get_pan_level(void) { u32 camera_config_get_pan_level(void) {
return sOverrideCameraPan.override ? sOverrideCameraPan.value : configCameraPan; return sOverrideCameraPan.override ? sOverrideCameraPan.value : 0;
} }
u32 camera_config_get_deceleration(void) { u32 camera_config_get_deceleration(void) {