mirror of
				https://github.com/coop-deluxe/sm64coopdx.git
				synced 2025-10-30 08:01:01 +00:00 
			
		
		
		
	Merge branch 'coop-deluxe:main' into main
This commit is contained in:
		
						commit
						7478a154e7
					
				
					 7 changed files with 16 additions and 24 deletions
				
			
		| 
						 | 
				
			
			@ -1287,7 +1287,7 @@ void cur_obj_update(void) {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    // handle network area timer
 | 
			
		||||
    if (gCurrentObject->areaTimerType != AREA_TIMER_TYPE_NONE && !(gMenuMode == -1 && configSingleplayerPause)) {
 | 
			
		||||
    if (gCurrentObject->areaTimerType != AREA_TIMER_TYPE_NONE) {
 | 
			
		||||
        // make sure the area is valid
 | 
			
		||||
        if (gNetworkPlayerLocal == NULL || !gNetworkPlayerLocal->currAreaSyncValid) {
 | 
			
		||||
            goto cur_obj_update_end;
 | 
			
		||||
| 
						 | 
				
			
			@ -1437,7 +1437,7 @@ cur_obj_update_begin:;
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    // update network area timer
 | 
			
		||||
    if (gCurrentObject->areaTimerType != AREA_TIMER_TYPE_NONE && !(gMenuMode == -1 && configSingleplayerPause)) {
 | 
			
		||||
    if (gCurrentObject->areaTimerType != AREA_TIMER_TYPE_NONE) {
 | 
			
		||||
        gCurrentObject->areaTimer++;
 | 
			
		||||
        if (gCurrentObject->areaTimer < gNetworkAreaTimer) {
 | 
			
		||||
            goto cur_obj_update_begin;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -245,17 +245,10 @@ u16 level_control_timer(s32 timerOp) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
u32 pressed_pause(void) {
 | 
			
		||||
    if (configSingleplayerPause && network_player_connected_count() == 1) {
 | 
			
		||||
        // prevent softlock in singleplayer pause, by not allowing pause in transitions
 | 
			
		||||
        if (gWarpTransition.isActive || sDelayedWarpOp != WARP_OP_NONE) {
 | 
			
		||||
            return FALSE;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    u32 val4 = get_dialog_id() >= 0;
 | 
			
		||||
    u32 dialogActive = get_dialog_id() >= 0;
 | 
			
		||||
    u32 intangible = (gMarioState->action & ACT_FLAG_INTANGIBLE) != 0;
 | 
			
		||||
 | 
			
		||||
    if (!intangible && !val4 && !gWarpTransition.isActive && sDelayedWarpOp == WARP_OP_NONE
 | 
			
		||||
    if (!intangible && !dialogActive && !gWarpTransition.isActive && sDelayedWarpOp == WARP_OP_NONE
 | 
			
		||||
        && (gPlayer1Controller->buttonPressed & START_BUTTON)) {
 | 
			
		||||
        return TRUE;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -1672,13 +1665,8 @@ s32 update_level(void) {
 | 
			
		|||
            changeLevel = play_mode_normal();
 | 
			
		||||
            break;
 | 
			
		||||
        case PLAY_MODE_PAUSED:
 | 
			
		||||
            if (!(configSingleplayerPause && network_player_connected_count() == 1 && gActiveMods.entryCount == 0)) {
 | 
			
		||||
                changeLevel = play_mode_normal();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (sCurrPlayMode == PLAY_MODE_PAUSED) {
 | 
			
		||||
                changeLevel = play_mode_paused();
 | 
			
		||||
            }
 | 
			
		||||
            changeLevel = play_mode_normal();
 | 
			
		||||
            changeLevel = play_mode_paused();
 | 
			
		||||
            break;
 | 
			
		||||
        case PLAY_MODE_CHANGE_AREA:
 | 
			
		||||
            changeLevel = play_mode_change_area();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,6 +30,7 @@
 | 
			
		|||
#include "pc/network/network.h"
 | 
			
		||||
#include "pc/lua/smlua_hooks.h"
 | 
			
		||||
#include "pc/lua/utils/smlua_misc_utils.h"
 | 
			
		||||
#include "first_person_cam.h"
 | 
			
		||||
 | 
			
		||||
u8 (*gContinueDialogFunction)(void) = NULL;
 | 
			
		||||
struct Object* gContinueDialogFunctionObject = NULL;
 | 
			
		||||
| 
						 | 
				
			
			@ -1944,7 +1945,7 @@ void obj_set_cylboard(struct Object *obj) {
 | 
			
		|||
 | 
			
		||||
void cur_obj_set_billboard_if_vanilla_cam(void) {
 | 
			
		||||
    if (!o) { return; }
 | 
			
		||||
    if (camera_config_is_free_cam_enabled()) {
 | 
			
		||||
    if (camera_config_is_free_cam_enabled() || get_first_person_enabled()) {
 | 
			
		||||
        o->header.gfx.node.flags &= ~GRAPH_RENDER_BILLBOARD;
 | 
			
		||||
        o->header.gfx.node.flags |= GRAPH_RENDER_CYLBOARD;
 | 
			
		||||
    } else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -150,7 +150,6 @@ bool         configCtxProfiler                   = false;
 | 
			
		|||
unsigned int configInterpolationMode             = 1;
 | 
			
		||||
unsigned int configGamepadNumber                 = 0;
 | 
			
		||||
bool         configBackgroundGamepad             = true;
 | 
			
		||||
bool         configSingleplayerPause             = false;
 | 
			
		||||
bool         configDebugPrint                    = false;
 | 
			
		||||
bool         configDebugInfo                     = false;
 | 
			
		||||
bool         configDebugError                    = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -260,7 +259,6 @@ static const struct ConfigOption options[] = {
 | 
			
		|||
    {.name = "coop_custom_palette_skin",       .type = CONFIG_TYPE_COLOR , .colorValue  = &configCustomPalette.parts[SKIN]},
 | 
			
		||||
    {.name = "coop_custom_palette_cap",        .type = CONFIG_TYPE_COLOR , .colorValue  = &configCustomPalette.parts[CAP]},
 | 
			
		||||
    {.name = "coop_stay_in_level_after_star",  .type = CONFIG_TYPE_UINT  , .uintValue   = &configStayInLevelAfterStar},
 | 
			
		||||
    {.name = "coop_singleplayer_pause",        .type = CONFIG_TYPE_BOOL  , .boolValue   = &configSingleplayerPause},
 | 
			
		||||
    {.name = "coop_compatibility",             .type = CONFIG_TYPE_BOOL  ,  .boolValue   = &configCoopCompatibility},
 | 
			
		||||
    {.name = "disable_popups",                 .type = CONFIG_TYPE_BOOL  , .boolValue   = &configDisablePopups},
 | 
			
		||||
#if defined(DEVELOPMENT)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -107,7 +107,6 @@ extern bool         configLuaProfiler;
 | 
			
		|||
extern bool         configCtxProfiler;
 | 
			
		||||
#endif
 | 
			
		||||
extern unsigned int configInterpolationMode;
 | 
			
		||||
extern bool         configSingleplayerPause;
 | 
			
		||||
extern bool         configDebugPrint;
 | 
			
		||||
extern bool         configDebugInfo;
 | 
			
		||||
extern bool         configDebugError;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -288,6 +288,13 @@ static void crash_handler_add_info_str(CrashHandlerText** pTextP, f32 x, f32 y,
 | 
			
		|||
    *pTextP = pText;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void crash_handler_add_version_str(CrashHandlerText** pTextP, f32 x, f32 y) {
 | 
			
		||||
    CrashHandlerText* pText = *pTextP;
 | 
			
		||||
    crash_handler_set_text(x, y, 0xFF, 0xFF, 0x00, "%s", "sm64coopdx ");
 | 
			
		||||
    crash_handler_set_text(-1, y, 0x00, 0xFF, 0xFF, "%s", SM64COOPDX_VERSION);
 | 
			
		||||
    *pTextP = pText;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void crash_handler_add_info_int(CrashHandlerText** pTextP, f32 x, f32 y, const char* title, int value) {
 | 
			
		||||
    CrashHandlerText* pText = *pTextP;
 | 
			
		||||
    crash_handler_set_text(x, y, 0xFF, 0xFF, 0x00, "%s", title);
 | 
			
		||||
| 
						 | 
				
			
			@ -637,7 +644,7 @@ static void crash_handler(const int signalNum, siginfo_t *info, ucontext_t *cont
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    crash_handler_add_info_str(&pText, 335, 208, "Version", get_version_local());
 | 
			
		||||
    crash_handler_add_version_str(&pText, 335, 208);
 | 
			
		||||
    crash_handler_add_info_str(&pText, 8, 208, "RemoteBhv", gLastRemoteBhv);
 | 
			
		||||
 | 
			
		||||
    // sounds
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,7 +48,6 @@ void djui_panel_misc_create(struct DjuiBase* caller) {
 | 
			
		|||
    djui_themes_init();
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        djui_checkbox_create(body, DLANG(MISC, PAUSE_IN_SINGLEPLAYER), &configSingleplayerPause, NULL);
 | 
			
		||||
        djui_checkbox_create(body, DLANG(MISC, DISABLE_POPUPS), &configDisablePopups, NULL);
 | 
			
		||||
        
 | 
			
		||||
        djui_checkbox_create(body, DLANG(MISC, COOP_COMPATIBILITY), &configCoopCompatibility, djui_panel_compatibility_checkbox_on_value_change);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue