/*
	This script file is part of the Sonic 3 A.I.R. script software distribution.
	Copyright (C) 2017-2024 by Eukaryot

	Published under the GNU GPLv3 open source software license, see license.txt
	or https://www.gnu.org/licenses/gpl-3.0.en.html
*/



// Game settings ID pattern: 0xABCCDDEE
//  - A  = flags; only flag right now is 8 for purely visual or audio settings
//  - B  = reserved, should be 0
//  - CC = category (mostly level number starting with 1, or 0 for everything general)
//  - DD = setting number
//  - EE = default value for this setting; this is enforced in Time Attack if flag 8 is not set



//-------------------------------------------------------//
// Gameplay Setting IDs that are active by default       //
//-------------------------------------------------------//

// Code to copy:
//  if (Game.getSetting(SETTING_XYZ))

// General settings affecting game mechanics
constant u32 SETTING_FIX_GLITCHES				= 0x00000102	// Fix various gameplay glitches, especially exploitable glitches (but not visual glitches): 0 = allow original game glitches, 1 = allow only certain glitches for speedrunning, 2 = enable all glitch fixes
constant u32 SETTING_NO_CONTROL_LOCK			= 0x00000201	// Control lock after roll + jump removed
constant u32 SETTING_TAILS_ASSIST_MODE			= 0x00000401	// Allow for control of Tails' flight by first player: 0 = off, 1 = Sonic 3 style, 2 = Hybrid style, 3 = Mania style
constant u32 SETTING_CANCEL_FLIGHT				= 0x00000501	// Cancel Tails' flight with down + jump
constant u32 SETTING_SUPER_CANCEL				= 0x00000601	// Cancel transformations with Y button
constant u32 SETTING_INSTA_SHIELD				= 0x00000701	// Insta-Shield move for Sonic
constant u32 SETTING_LEVELRESULT_SCORE			= 0x00001201	// Increasingly faster counting in level results if score was very large
constant u32 SETTING_HYPER_TAILS				= 0x00001301	// Split up Super Tails into Super form (without flickies) and Hyper form (as usual)
constant u32 SETTING_SHIELD_TYPES				= 0x00001401	// Shields: 0 = Classic, 1 = Elemental, 2 = All shields, 3 = Upgrading

// Level-specific gameplay settings
constant u32 SETTING_AIZ_BLIMPSEQUENCE			= 0x00010101	// Different pattern for AIZ 2 blimp bombing
constant u32 SETTING_AIZ_INTRO_KNUCKLES			= 0x00010301	// AIZ 1 intro for Knuckles
constant u32 SETTING_HCZ_WATERPIPE				= 0x00020101	// Character stays visible in tube
constant u32 SETTING_LBZ_TUBETRANSPORT			= 0x00060101	// Faster tube transport start/end
constant u32 SETTING_LBZ_CUPELEVATOR			= 0x00060201	// Allow jump moves when jumping out of cup elevator
constant u32 SETTING_LBZ_BIGARMS				= 0x00060301	// Spawn Big Arms boss for Sonic & Tails as well
constant u32 SETTING_MHZ_ELEVATOR				= 0x00070101	// Faster elevator movement
constant u32 SETTING_FBZ_ENTERCYLINDER			= 0x00080101	// Allow for entering the horizontal spinning cylinders from above
constant u32 SETTING_FBZ_SCREWDOORS				= 0x00080201	// Faster opening screw doors
constant u32 SETTING_FASTER_PUSH				= 0x00090101	// SOZ rocks and FBZ spikes can be pushed a bit faster
constant u32 SETTING_SOZ_PYRAMID				= 0x00090201	// Faster rising of pyramid
constant u32 SETTING_LRZ2_BOSS					= 0x000a0101	// LRZ 2 boss change: reduced hit count

// Purely visual or audio settings (only those with no effect on simulation at all)
constant u32 SETTING_EXTENDED_HUD				= 0x80000101	// More detailed time display in HUD
constant u32 SETTING_SMOOTH_ROTATION			= 0x80000201	// Smooth rotation
constant u32 SETTING_SPEEDUP_AFTERIMGS			= 0x80000301	// After-images when speed shoes are active
constant u32 SETTING_PLAYER2_OFFSCREEN			= 0x80000401	// Offscreen rendering for second player
constant u32 SETTING_BS_VISUAL_STYLE			= 0x80009103	// Render glow effect in Blue Spheres (flag 0x02), render filtered (flag 0x01)



//-------------------------------------------------------//
// Gameplay Setting IDs that are inactive by default     //
//-------------------------------------------------------//

// Unlockables
constant u32 SETTING_KNUCKLES_AND_TAILS			= 0x00008100	// This is not used any more; instead there is "SECRET_KNUX_AND_TAILS" and the global variable "useKnucklesAndTails"
constant u32 SETTING_DROPDASH					= 0x00008200	// Drop Dash move for Sonic; setting is active if player has the secret unlocked *and* chose to activate the Drop Dash in the options
constant u32 SETTING_SUPER_PEELOUT				= 0x00008300	// Super Peel-Out move for Sonic; setting is active if player has the secret unlocked *and* chose to activate the Super Peel-Out in the options
constant u32 SETTING_DEBUG_MODE					= 0x00008400	// Debug Mode
constant u32 SETTING_TITLE_SCREEN				= 0x00008500	// Title screen selection: Sonic 3 or S&K

// Options
constant u32 SETTING_INFINITE_LIVES				= 0x00000800	// No life counting at all any more
constant u32 SETTING_INFINITE_TIME				= 0x00000900	// Timer won't stop at 9'59"99
constant u32 SETTING_RANDOM_MONITORS			= 0x00000c00	// Randomize monitors: 0 = no change, 1 = random shields, 2 = all monitors randomized
constant u32 SETTING_RANDOM_SPECIALSTAGES		= 0x00000d00	// Use generated special stages
constant u32 SETTING_BUBBLE_SHIELD_BOUNCE		= 0x00001500	// Bubble Shield bouncing behavior more like Mania
constant u32 SETTING_CAMERA_OUTRUN				= 0x00001800	// Allow for out-running the camera
constant u32 SETTING_EXTENDED_CAMERA			= 0x00001900	// Extended camera, similar to Sonic CD
constant u32 SETTING_MAINTAIN_SHIELDS			= 0x00002100	// Maintain shields between zones
constant u32 SETTING_MONITOR_STYLE				= 0x00002200	// Sonic 3 (when 0) or Sonic 2 (when 1) monitors
constant u32 SETTING_HYPER_DASH_CONTROLS		= 0x00002300	// Controls for Hyper Dash in mid-air: 0 = Jump (with or without D-pad), 1 = Jump + D-pad
constant u32 SETTING_SUPER_SONIC_ABILITY		= 0x00002400	// Determines which abilities will Super Sonic have: 0 = none (as in original), 1 = Shield abilities, 2 = air dash (nerfed version of Hyper Sonic's dash)
constant u32 SETTING_MONITOR_BEHAVIOR			= 0x00002500	// How monitors react to contact with player: 0 = Sonic & Knuckles, breaks from all directions, 1 = Sonic 3, bounces from the bottom
constant u32 SETTING_BS_REPEAT_ON_FAIL			= 0x00009100	// Repeat the same special stage again if failed
constant u32 SETTING_DISABLE_GHOST_SPAWN		= 0x00090100	// No ghost spawning in SOZ 2

// Purely visual settings (only those with no effect on simulation at all)
constant u32 SETTING_HIDDEN_MONITOR_HINT		= 0x80000500	// Show a hint where the hidden monitors for signposts are
constant u32 SETTING_SUPERFAST_RUNANIM			= 0x80000600	// Super fast running animation
constant u32 SETTING_LIVES_DISPLAY				= 0x80002300	// Lives display location: 0 for auto, 1 for lower left, 2 for upper right
constant u32 SETTING_BS_COUNTDOWN_RINGS			= 0x80009000	// Count remaining rings down in Blue Spheres instead of counting collected rings up
constant u32 SETTING_CONTINUE_MUSIC				= 0x8000a000	// Continue music when restarting a level
constant u32 SETTING_UNDERWATER_AUDIO			= 0x8000a100	// Low-pass audio effect when underwater
constant u32 SETTING_ICZ_NIGHTTIME				= 0x80050200	// Use night time palette for ICZ 1 start
constant u32 SETTING_CNZ_PROTOTYPE_MUSIC		= 0x80041100	// Use Sonic 3 prototype music for CNZ Act 1 (Flag 0x01) and Act 2 (Flag 0x02)
constant u32 SETTING_ICZ_PROTOTYPE_MUSIC		= 0x80051100	// Use Sonic 3 prototype music for ICZ Act 1 (Flag 0x01) and Act 2 (Flag 0x02)
constant u32 SETTING_LBZ_PROTOTYPE_MUSIC		= 0x80061100	// Use Sonic 3 prototype music for LBZ Act 1 (Flag 0x01) and Act 2 (Flag 0x02)
constant u32 SETTING_FBZ2_MIDBOSS_TRACK			= 0x80080300	// Use main boss (0) or mini-boss (1) music in FBZ 2 mid-boss
constant u32 SETTING_SSZ_BOSS_TRACKS			= 0x800c0100	// Use Sonic 1 & 2 boss music in SSZ



//-------------------------------------------------------//
// Non-boolean configuration options                     //
//-------------------------------------------------------//

// Code to copy:
//  if (Game.getSetting(SETTING_XYZ))

constant u32 SETTING_GFX_ANTIFLICKER			= 0x00001a01
constant u32 SETTING_LEVELLAYOUTS				= 0x00002002	// Select level layouts (incl. object and ring placements): 0 = Sonic 3 alone, 1 = Sonic 3 & Knuckles, 2 = Sonic 3 A.I.R.
constant u32 SETTING_REGION_CODE				= 0x00003080	// Region code: Flag 0x80 is set outside of Japan, 0x40 for PAL regions
constant u32 SETTING_TIME_ATTACK_GHOSTS			= 0x00003103

// Config options with no effect on simulation
constant u32 SETTING_AUDIO_TITLE_THEME			= 0x80400100
constant u32 SETTING_AUDIO_EXTRALIFE_JINGLE		= 0x80400201
constant u32 SETTING_AUDIO_INVINCIBILITY_THEME	= 0x80400301
constant u32 SETTING_AUDIO_SUPER_THEME			= 0x80400404
constant u32 SETTING_AUDIO_MINIBOSS_THEME		= 0x80400501
constant u32 SETTING_AUDIO_KNUCKLES_THEME		= 0x80400601
constant u32 SETTING_AUDIO_HPZ_MUSIC			= 0x80400701
constant u32 SETTING_AUDIO_OUTRO				= 0x80400801
constant u32 SETTING_AUDIO_COMPETITION_MENU		= 0x80400900
constant u32 SETTING_AUDIO_CONTINUE_SCREEN		= 0x80400a01

