//-------Aliases-------//
private alias object.value0 : menu.highlight
private alias object.value1 : menu.vanishTimer
private alias object.value2 : object.drawState
private alias object.value3 : object.prevState
private alias object.value4 : text.drawline
private alias object.value5 : text.drawalign
private alias object.value6 : text.xpos
private alias object.value7 : text.ypos
private alias object.value8 : scroll.min
private alias object.value9 : scroll.max
private alias object.value10 : scroll.current
private alias object[30].value11 : arrow.move
private alias object.value12 : text.headercolor
private alias object.value13 : menu.line
private alias object.value14 : delete.check
private alias object.value15 : delete.ticker
private alias object.value16 : object.curMenu
private alias object.value18 : menu.smallerpagesel
private alias object.value19 : menu.smallerpagehigh
private alias object.value20 : smallarrow.move

private alias 0 : TEXT_LEFT_ALIGN
private alias 1 : TEXT_RIGHT_ALIGN
private alias 2 : TEXT_CENTER_ALIGN
private alias 0 : HEADER_TEXT_GREY
private alias 1 : HEADER_TEXT_BLUE
private alias 2 : HEADER_TEXT_GOLD
private alias 55 : text.margin.right
private alias 2 : TEXT_FILE_NUM

public alias saveRAM[8000] : saved.Rayshoo
public alias saveRAM[8001] : saved.knuxpal
public alias saveRAM[8002] : saved.mightymoves
public alias saveRAM[8003] : saved.actTheme
public alias saveRAM[8004] : saved.tailsclear
public alias saveRAM[8005] : saved.mightymaxdash
public alias saveRAM[8006] : saved.raymaxdash
public alias saveRAM[8007] : saved.superHover
public alias saveRAM[8008] : saved.raytailattack
public alias saveRAM[8009] : saved.sonicLookback
public alias saveRAM[8010] : saved.sonicHanging
public alias saveRAM[8011] : saved.sonicFlailing
public alias saveRAM[8012] : saved.sonicWaiting
public alias saveRAM[8013] : saved.sonicendpose
public alias saveRAM[8014] : saved.knuxclear
public alias saveRAM[8015] : saved.amyclear
public alias saveRAM[8016] : saved.rayclear
public alias saveRAM[8017] : saved.mightyclear
public alias saveRAM[8018] : saved.sonicburningfnf
public alias saveRAM[8019] : saved.sonicshocker
public alias saveRAM[8020] : saved.tailspal
public alias saveRAM[8021] : saved.mightypal
public alias saveRAM[8022] : saved.sonicpal
public alias saveRAM[8023] : saved.bossMusic
public alias saveRAM[8024] : saved.fallingAni
public alias saveRAM[8025] : saved.amyPal
public alias saveRAM[8026] : saved.hedgePost
public alias saveRAM[8027] : saved.SHCscreen

// Function declarations

//main stuff
//first function is main code
//second function is drawing

	reserve function modoption.abilities
	reserve function draw.abilities

	reserve function modoption.visuals
	reserve function draw.visuals

	reserve function modoption.sound
	reserve function modoption.soundSHC
	reserve function draw.sound

//other stuff
	reserve function options.exit
	reserve function optionMCP.text
	reserve function headerMCP.back
	reserve function headerMCP.text
	reserve function headerMCP.length
	reserve function delete.expand

//back to main 
	reserve function left.backtonorm
	reserve function right.backtonorm

//values
private value text.margin = 0;

//tables
private table StarList
	2, 101, 272
	158, 28, 272
	174, 141, 272
	234, 55, 272
	160, 177, 273
	244, 149, 273
	81, 129, 273
	184, 57, 273
	324, 80, 273
	33, 151, 274
	34, 54, 274
	92, 96, 274
	144, 35, 274
	207, 155, 274
	301, 50, 274
end table

private table charspace
	3, 6, 10, 9, 9, 9, 3, 4, 4, 7, 9, 3, 7
	3, 11, 7, 5, 7, 7, 7, 7, 7, 7, 7, 7, 3
	3, 6, 6, 6, 6, 10, 9, 8, 9, 9, 7, 7, 9
	11, 5, 8, 9, 6, 11, 9, 10, 7, 10, 7, 7
	9, 10, 9, 15, 9, 11, 9, 4, 11, 4, 5, 7
	4, 9, 8, 9, 9, 7, 7, 9, 11, 5, 8, 9, 6
	11, 9, 10, 7, 10, 7, 7, 9, 10, 9, 15, 9
	11, 9, 5, 3, 5, 9
end table


function modoption.abilities
	object.curMenu = 21
	CallFunction(main.sound)
	if inputPress.up == 1
		menu.highlight--
		if menu.highlight < 0
			menu.highlight = 3
		end if
	else	
		if inputPress.down == 1
			menu.highlight++
			if menu.highlight > 3
				menu.highlight = 0
			end if
		end if
	end if
	switch menu.highlight
		case 0 //Mod Options Highlighted
			if inputPress.left == 1
				object.state = left.backtonorm
			end if
			if inputPress.right == 1
				object.state = right.backtonorm
			end if
			break
		case 1 //Change Menu
			if inputPress.left == 1
				object.state = modoption.sound
			end if
			if inputPress.right == 1
				object.state = modoption.visuals
			end if
			break
		case 2 //Mighty Moveset
			if inputPress.left == 1	
				saved.mightymoves--
				if saved.mightymoves < 0
					saved.mightymoves = 2
				end if
			end if
			if inputPress.right == 1
				saved.mightymoves++
				if saved.mightymoves > 2
					saved.mightymoves = 0
				end if
			end if
			break
		case 3 //Mighty Moveset
			if inputPress.left == 1	
				saved.raytailattack--
				if saved.raytailattack < 0
					saved.raytailattack = 1
				end if
			end if
			if inputPress.right == 1
				saved.raytailattack++
				if saved.raytailattack > 1
					saved.raytailattack = 0
				end if
			end if
			break
	end switch
end function

function modoption.visuals
	object.curMenu = 22
	CallFunction(main.sound)
	if inputPress.up == 1
		menu.highlight--
		if menu.highlight < 0
			menu.highlight = 20
		end if
	else	
		if inputPress.down == 1
			menu.highlight++
			if menu.highlight > 20
				menu.highlight = 0
			end if
		end if
	end if
	switch menu.highlight
		case 0 //Mod Options Highlighted
			if inputPress.left == 1
				object.state = left.backtonorm
			end if
			if inputPress.right == 1
				object.state = right.backtonorm
			end if
			break
		case 1 //Change Menu
			if inputPress.left == 1
				object.state = modoption.abilities
			end if
			if inputPress.right == 1
				object.state = modoption.sound
			end if
			break
		case 2 //ray shoe
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.Rayshoo ^= 1
			end if
			break
		case 3 //knux palette
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.knuxpal ^= 1
			end if
			break
		case 4 //mighty max dash
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.mightymaxdash ^= 1
			end if
			break
		case 5 //ray max dash
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.raymaxdash ^= 1
			end if
			break
		case 6 //Super Sonic Hover
			if inputPress.left == 1	
				saved.superHover--
				if saved.superHover < 0
					saved.superHover = 2
				end if
			end if
			if inputPress.right == 1
				saved.superHover++
				if saved.superHover > 2
					saved.superHover = 0
				end if
			end if
			break
		case 7 //sonic look back
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.sonicLookback ^= 1
			end if
			break
		case 8 //sonic hanging
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.sonicHanging ^= 1
			end if
			break
		case 9 //Sonic FLAILING
			if inputPress.left == 1	
				saved.sonicFlailing--
				if saved.sonicFlailing < 0
					saved.sonicFlailing = 3
				end if
			end if
			if inputPress.right == 1
				saved.sonicFlailing++
				if saved.sonicFlailing > 3
					saved.sonicFlailing = 0
				end if
			end if
			break
		case 10 //Sonic wait
			if inputPress.left == 1	
				saved.sonicWaiting--
				if saved.sonicWaiting < 0
					saved.sonicWaiting = 4
				end if
			end if
			if inputPress.right == 1
				saved.sonicWaiting++
				if saved.sonicWaiting > 4
					saved.sonicWaiting = 0
				end if
			end if
			break
		case 11 //Sonic ending
			if inputPress.left == 1	
				saved.sonicendpose--
				if saved.sonicendpose < 0
					saved.sonicendpose = 5
				end if
			end if
			if inputPress.right == 1
				saved.sonicendpose++
				if saved.sonicendpose > 5
					saved.sonicendpose = 0
				end if
			end if
			break
		case 12 //sonic burned animations
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.sonicburningfnf ^= 1
			end if
			break
		case 13 //sonic shocker animations
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.sonicshocker ^= 1
			end if
			break
		case 14 //tails pal
			if inputPress.left == 1	
				saved.tailspal--
				if saved.tailspal < 0
					saved.tailspal = 3
				end if
			end if
			if inputPress.right == 1
				saved.tailspal++
				if saved.tailspal > 3
					saved.tailspal = 0
				end if
			end if
			break
		case 15 //mighty pal
			if inputPress.left == 1	
				saved.mightypal--
				if saved.mightypal < 0
					saved.mightypal = 1
				end if
			end if
			if inputPress.right == 1
				saved.mightypal++
				if saved.mightypal > 1
					saved.mightypal = 0
				end if
			end if
			break
		case 16 //sonic pal
			if inputPress.left == 1	
				saved.sonicpal--
				if saved.sonicpal < 0
					saved.sonicpal = 1
				end if
			end if
			if inputPress.right == 1
				saved.sonicpal++
				if saved.sonicpal > 1
					saved.sonicpal = 0
				end if
			end if
			break	
		case 17 //falling animations
			if inputPress.left == 1	
				saved.fallingAni--
				if saved.fallingAni < 0
					saved.fallingAni = 1
				end if
			end if
			if inputPress.right == 1
				saved.fallingAni++
				if saved.fallingAni > 1
					saved.fallingAni = 0
				end if
			end if
			break	
		case 18 //amy pal
			if inputPress.left == 1	
				saved.amyPal--
				if saved.amyPal < 0
					saved.amyPal = 2
				end if
			end if
			if inputPress.right == 1
				saved.amyPal++
				if saved.amyPal > 2
					saved.amyPal = 0
				end if
			end if
			break
		case 19 //sonic post
			if inputPress.left == 1	
				saved.hedgePost--
				if saved.hedgePost < 0
					saved.hedgePost = 2
				end if
			end if
			if inputPress.right == 1
				saved.hedgePost++
				if saved.hedgePost > 2
					saved.hedgePost = 0
				end if
			end if
			break	
		case 20 //shc
			if inputPress.left == 1	
				saved.SHCscreen--
				if saved.SHCscreen < 0
					saved.SHCscreen = 1
				end if
			end if
			if inputPress.right == 1
				saved.SHCscreen++
				if saved.SHCscreen > 1
					saved.SHCscreen = 0
				end if
			end if
			break				
	end switch
end function

function modoption.soundSHC
	object.curMenu = 23
	CallFunction(main.sound)
	if inputPress.up == 1
		menu.highlight--
		if menu.highlight < 0
			menu.highlight = 7
		end if
	else	
		if inputPress.down == 1
			menu.highlight++
			if menu.highlight > 7
				menu.highlight = 0
			end if
		end if
	end if
	saved.actTheme = 0
	switch menu.highlight
		case 0 //Mod Options Highlighted
			if inputPress.left == 1
				object.state = left.backtonorm
			end if
			if inputPress.right == 1
				object.state = right.backtonorm
			end if
			break
		case 1 //Change Menu
			if inputPress.left == 1
				object.state = modoption.visuals
			end if
			if inputPress.right == 1
				object.state = modoption.abilities
			end if
			break
		case 2 //tails clear
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.Tailsclear ^= 1
			end if
			break
		case 3 //knux clear
			if inputPress.left == 1	
				saved.Knuxclear--
				if saved.Knuxclear < 0
					saved.Knuxclear = 2
				end if
			end if
			if inputPress.right == 1
				saved.Knuxclear++
				if saved.Knuxclear > 2
					saved.Knuxclear = 0
				end if
			end if				
			break
		case 4 //amy clear
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.amyclear ^= 1
			end if
			break
		case 5 //mighty clear
			if inputPress.left == 1	
				saved.mightyclear--
				if saved.mightyclear < 0
					saved.mightyclear = 2
				end if
			end if
			if inputPress.right == 1
				saved.mightyclear++
				if saved.mightyclear > 2
					saved.mightyclear = 0
				end if
			end if			
			break
		case 6 //ray clear
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.rayclear ^= 1
			end if
			break
		case 7 //boss music
			if inputPress.left == 1	
				saved.bossMusic--
				if saved.bossMusic < 0
					saved.bossMusic = 1
				end if
			end if
			if inputPress.right == 1
				saved.bossMusic++
				if saved.bossMusic > 1
					saved.bossMusic = 0
				end if
			end if
			break						
	end switch
end function

function modoption.sound
	//KARL HEY
	//KARL HEY
	//KARL HEY
	//KARL CHANGE THIS AFTER SHC OK
	object.state = modoption.soundSHC

	object.curMenu = 23
	CallFunction(main.sound)
	if inputPress.up == 1
		menu.highlight--
		if menu.highlight < 0
			menu.highlight = 8
		end if
	else	
		if inputPress.down == 1
			menu.highlight++
			if menu.highlight > 8
				menu.highlight = 0
			end if
		end if
	end if
	switch menu.highlight
		case 0 //Mod Options Highlighted
			if inputPress.left == 1
				object.state = left.backtonorm
			end if
			if inputPress.right == 1
				object.state = right.backtonorm
			end if
			break
		case 1 //Change Menu
			if inputPress.left == 1
				object.state = modoption.visuals
			end if
			if inputPress.right == 1
				object.state = modoption.abilities
			end if
			break
		case 2 //Separate Act Themes
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.actTheme ^= 1
			end if
			break
		case 3 //tails clear
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.Tailsclear ^= 1
			end if
			break
		case 4 //knux clear
			if inputPress.left == 1	
				saved.Knuxclear--
				if saved.Knuxclear < 0
					saved.Knuxclear = 2
				end if
			end if
			if inputPress.right == 1
				saved.Knuxclear++
				if saved.Knuxclear > 2
					saved.Knuxclear = 0
				end if
			end if				
			break
		case 5 //amy clear
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.amyclear ^= 1
			end if
			break
		case 6 //mighty clear
			if inputPress.left == 1	
				saved.mightyclear--
				if saved.mightyclear < 0
					saved.mightyclear = 2
				end if
			end if
			if inputPress.right == 1
				saved.mightyclear++
				if saved.mightyclear > 2
					saved.mightyclear = 0
				end if
			end if			
			break
		case 7 //ray clear
			temp0 = inputPress.left
			temp0 |= inputPress.right
			if temp0 == 1
				saved.rayclear ^= 1
			end if
			break
		case 8 //boss music
			if inputPress.left == 1	
				saved.bossMusic--
				if saved.bossMusic < 0
					saved.bossMusic = 1
				end if
			end if
			if inputPress.right == 1
				saved.bossMusic++
				if saved.bossMusic > 1
					saved.bossMusic = 0
				end if
			end if
			break						
	end switch
end function

function draw.abilities
	//Gameplay header
	text.xpos = sidebar.w
	text.xpos >>= 1
	text.xpos += screen.xcenter
	text.drawalign = TEXT_CENTER_ALIGN
	text.drawline = 1
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//mighty moveset
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 13
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.mightymoves
	case 0
		text.drawline = 16
		break
	case 1
		text.drawline = 15
		break
	case 2
		text.drawline = 14
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//ray moveset
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 25
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.raytailattack
	case 1
		text.drawline = 3
		break
	case 0
		text.drawline = 4
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	CallFunction(headerMCP.back)
	text.drawline = 0
	text.headercolor = HEADER_TEXT_GREY
	text.drawalign = TEXT_CENTER_ALIGN
	text.ypos = 50
	text.xpos = sidebar.w
	text.xpos >>= 1
	text.xpos += screen.xcenter
	CallFunction(headerMCP.text)
end function

function draw.visuals
	//Visuals header
	text.xpos = sidebar.w
	text.xpos >>= 1
	text.xpos += screen.xcenter
	text.drawalign = TEXT_CENTER_ALIGN
	text.drawline = 2
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//ray shoe color
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 7
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.rayshoo
	case 0
		text.drawline = 8
		break
	case 1
		text.drawline = 9
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//knux pal
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 10
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.knuxpal
	case 0
		text.drawline = 11
		break
	case 1
		text.drawline = 12
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//mighty max dash
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 20
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.mightymaxdash
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 4
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//ray max dash
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 21
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.raymaxdash
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 4
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//super sonic hover
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 22
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.superHover
	case 0
		text.drawline = 11
		break
	case 1
		text.drawline = 23
		break
	case 2
		text.drawline = 24
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//sonicLookback
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 26
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.sonicLookback
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 4
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//sonicHanging
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 27
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.sonicHanging
	case 0
		text.drawline = 23
		break
	case 1
		text.drawline = 30
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//sonicflain
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 28
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.sonicFlailing
	case 0
		text.drawline = 31
		break
	case 1
		text.drawline = 23
		break
	case 2
		text.drawline = 32
		break
	case 3
		text.drawline = 33
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//sonicwait
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 29
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.sonicWaiting
	case 0
		text.drawline = 31
		break
	case 1
		text.drawline = 23
		break
	case 2
		text.drawline = 34
		break
	case 3
		text.drawline = 30
		break
	case 4
		text.drawline = 15
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//sonic end
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 35
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.sonicendpose
	case 0
		text.drawline = 31
		break
	case 1
		text.drawline = 32
		break
	case 2
		text.drawline = 23
		break
	case 3
		text.drawline = 34
		break		
	case 4
		text.drawline = 37
		break
	case 5
		text.drawline = 36
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//sonic burning fnf
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 43
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.sonicburningfnf
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 4
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//sonic shcoekr
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 44
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.sonicshocker
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 4
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//tails palette
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 45
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.tailspal
	case 0
		text.drawline = 11
		break
	case 1
		text.drawline = 23
		break
	case 2
		text.drawline = 46
		break
	case 3
		text.drawline = 47
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//mighty palette
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 48
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.mightypal
	case 0
		text.drawline = 11
		break
	case 1
		text.drawline = 49
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//sonic palette
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 50
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.sonicpal
	case 0
		text.drawline = 31
		break
	case 1
		text.drawline = 33
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//falling animations
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 53
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.fallingAni
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 4
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//amy palette
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 54
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.amyPal
	case 0
		text.drawline = 11
		break
	case 1
		text.drawline = 55
		break
	case 2
		text.drawline = 32
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++


	//hedeg post
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 56
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.hedgePost
	case 0
		text.drawline = 31
		break
	case 1
		text.drawline = 32
		break
	case 2
		text.drawline = 23
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//shc
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 57
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.SHCscreen
	case 0
		text.drawline = 4
		break
	case 1
		text.drawline = 3
		break			
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	CallFunction(headerMCP.back)
	text.drawline = 0
	text.headercolor = HEADER_TEXT_GREY
	text.drawalign = TEXT_CENTER_ALIGN
	text.ypos = 50
	text.xpos = sidebar.w
	text.xpos >>= 1
	text.xpos += screen.xcenter
	CallFunction(headerMCP.text)	
end function

function draw.sound
	//Sound header
	text.xpos = sidebar.w
	text.xpos >>= 1
	text.xpos += screen.xcenter
	text.drawalign = TEXT_CENTER_ALIGN
	text.drawline = 6
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//KARL HYE
	//KARL HYE
	//KARL HYE
	//KARL GET RID OF THE SLASHES AFTER SHC PLEASE

	//separate act themes
	//text.xpos = text.margin
	//text.drawalign = TEXT_LEFT_ALIGN
	//text.drawline = 17
	//CallFunction(optionMCP.text)
	
	//text.xpos = screen.xsize
	//text.xpos -= text.margin.right
	//text.drawalign = TEXT_CENTER_ALIGN
	//switch saved.actTheme
	//case 0
	//	text.drawline = 3
	//	break
	//case 1
	//	text.drawline = 4
	//	break
	//end switch
	//CallFunction(optionMCP.text)
	//text.ypos += 21
	//menu.line++

	//tails clear
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 18
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.tailsclear
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 19
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//knux clear
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 38
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.knuxclear
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 34
		break
	case 2
		text.drawline = 14
		break				
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//amy clear
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 39
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.amyclear
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 32
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//mighty clear
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 40
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.mightyclear
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 14
		break
	case 2
		text.drawline = 42
		break		
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//ray clear
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 41
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.rayclear
	case 0
		text.drawline = 3
		break
	case 1
		text.drawline = 42
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	//boss music
	text.xpos = text.margin
	text.drawalign = TEXT_LEFT_ALIGN
	text.drawline = 51
	CallFunction(optionMCP.text)
	
	text.xpos = screen.xsize
	text.xpos -= text.margin.right
	text.drawalign = TEXT_CENTER_ALIGN
	switch saved.bossMusic
	case 0
		text.drawline = 31
		break
	case 1
		text.drawline = 52
		break
	end switch
	CallFunction(optionMCP.text)
	text.ypos += 21
	menu.line++

	CallFunction(headerMCP.back)
	text.drawline = 0
	text.headercolor = HEADER_TEXT_GREY
	text.drawalign = TEXT_CENTER_ALIGN
	text.ypos = 50
	text.xpos = sidebar.w
	text.xpos >>= 1
	text.xpos += screen.xcenter
	CallFunction(headerMCP.text)
end function


function left.backtonorm
	object[29].priority = PRIORITY_INACTIVE
	object[30].priority = PRIORITY_ACTIVE
	object[30].state = 50
end function

function right.backtonorm
	object[29].priority = PRIORITY_INACTIVE
	object[30].priority = PRIORITY_ACTIVE
	object[30].state = 0
end function

function options.exit
	menu.vanishTimer++
	if menu.vanishTimer >= 30
		ResetObjectEntity(30, TypeName[Blank Object], 0, 0, 0)
		ResetObjectEntity(object.entityPos, TypeName[Blank Object], 0, 0, 0)
	end if
end function

event ObjectMain
	text.margin = sidebar.w
	text.margin += 10
	
	if object.state == 0
		object.state = modoption.abilities
	end if
	
	if inputPress.buttonB == 1
		delete.check = 0
		object.state = options.exit
		menu.state = 2
		WriteSaveRAM()
		CallFunction(options.exit)
	else
		CallFunction(object.state)
	end if	
	
	if object.state != object.prevState	
		object.prevState = object.state

		if object.state == modoption.abilities
			object.drawState = draw.abilities
		end if
		if object.state == modoption.visuals
			object.drawState = draw.visuals
		end if
		//if object.state == modoption.sound
		if object.state == modoption.soundSHC
			object.drawState = draw.sound
		end if
	end if
end event

function headerMCP.back
	if screen.xsize == 320
		DrawRect(6, 0, screen.xsize, 71, color7, color7, color7, 255)
	else
		DrawRect(51, 0, screen.xsize, 71, color7, color7, color7, 255)	
	end if
	if menu.highlight == 0
		temp0 = text.margin
		temp0 -= 4
		DrawRect(temp0, 46, screen.xsize, 26, color5, color5, color7, 255)
		DrawRect(temp0, 46, screen.xsize, 24, color1, color1, color1, 255)
		temp0--
		DrawRect(temp0, 47, 1, 24, color5, color5, color7, 255)
		DrawRect(temp0, 47, 1, 22, color1, color1, color1, 255)
	end if
		
		
end function

function headerMCP.length
	GetTextInfo(temp0, TEXT_FILE_NUM, TEXTINFO_TEXTSIZE, text.drawline, 0)
	temp1 = 0
	temp3 = 0
	while temp1 < temp0
		GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp1)
		if temp2 > 64
			temp2 -= 65
			GetTableValue(temp6, temp2, headerspace)
			if temp5 == 0 //Y following an A
				if temp2 == 24
					temp3 -= 4
				end if
			end if
			temp5 = temp2
			temp3 += temp6
		else
			temp3 += 4
		end if
		temp1++
	loop
end function

function headerMCP.text
	switch text.headercolor
		case 0 //GREY
			CopyPalette(0, 218, 0, 240, 5)
			break
		case 1 //BLUE
			CopyPalette(0, 213, 0, 240, 5)
			break
		case 2 //GOLD
			CopyPalette(0, 208, 0, 240, 5)
			break
	end switch
	temp5 = 1
	if text.drawalign == TEXT_LEFT_ALIGN
		GetTextInfo(temp0, TEXT_FILE_NUM, TEXTINFO_TEXTSIZE, text.drawline, 0)
		temp1 = 0
		temp3 = text.xpos
		while temp1 < temp0
			GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp1)
			if temp2 > 64
				temp2 -= 65
				GetTableValue(temp6, temp2, headerspace)
				if temp5 == 0 //Y following an A
					if temp2 == 24
						temp3 -= 4
					end if
				end if
				temp5 = temp2
				temp2 += 277
				DrawSpriteScreenXY(temp2, temp3, text.ypos)
				temp3 += temp6
			else
				temp3 += 4
			end if
			temp1++
		loop
	else	
		if text.drawalign == TEXT_RIGHT_ALIGN
			GetTextInfo(temp0, TEXT_FILE_NUM, TEXTINFO_TEXTSIZE, text.drawline, 0)
			temp1 = 0
			temp3 = text.xpos
			while temp0 > temp1
				temp0--
				GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp0)
				if temp2 > 64
					temp2 -= 65
					GetTableValue(temp6, temp2, headerspace)
					if temp5 == 24//Y following an A
						if temp2 == 0
							temp3 += 4
						end if
					end if
					temp5 = temp2
					temp3 -= temp6
					temp2 += 277
					DrawSpriteScreenXY(temp2, temp3, text.ypos)
				else
					temp3 -= 4
				end if
			loop
		else
			if text.drawalign == TEXT_CENTER_ALIGN
				GetTextInfo(temp0, TEXT_FILE_NUM, TEXTINFO_TEXTSIZE, text.drawline, 0)
				temp1 = 0
				temp3 = 0
				while temp1 < temp0
					GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp1)
					if temp2 > 64
						temp2 -= 65
						GetTableValue(temp6, temp2, headerspace)
						if temp5 == 0 //Y following an A
							if temp2 == 24
								temp3 += 4
							end if
						end if
						temp5 = temp2
						temp3 -= temp6
					else
						temp3 -= 4
					end if
					temp1++
				loop
				temp1 = 0
				temp3 >>= 1
				temp3 += text.xpos
				while temp1 < temp0
					GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp1)
					if temp2 > 64
						temp2 -= 65
						GetTableValue(temp6, temp2, headerspace)
						if temp5 == 0 //Y following an A
							if temp2 == 24
								temp3 -= 4
							end if
						end if
						temp5 = temp2
						temp2 += 277
						DrawSpriteScreenXY(temp2, temp3, text.ypos)
						temp3 += temp6
					else
						temp3 += 4
					end if
					temp1++
				loop
			end if
		end if
	end if
	CopyPalette(0, 218, 0, 240, 5)
end function

function optionMCP.text
	if menu.line == 1
		object.inkEffect = INK_NONE
	else
		if menu.line == menu.highlight
			object.inkEffect = INK_NONE
		else
			object.inkEffect = INK_BLEND
		end if
	end if
	switch text.drawline
		case 3 //Red
		case 146 //Red
			CopyPalette(0, 230, 0, 224, 3)
			break
		case 4 //Blue
		case 147 //Blue
			CopyPalette(0, 227, 0, 224, 3)
			break
		default //Grey
			CopyPalette(0, 233, 0, 224, 3)
			break
	end switch
	if text.drawalign == TEXT_LEFT_ALIGN
		GetTextInfo(temp0, TEXT_FILE_NUM, TEXTINFO_TEXTSIZE, text.drawline, 0)
		temp1 = 0
		temp3 = text.xpos
		while temp1 < temp0
			GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp1)
			if temp2 > 32
				temp2 -= 33
				GetTableValue(temp6, temp2, charspace)
				temp2 += 176
				DrawSpriteScreenFX(temp2, FX_INK, temp3, text.ypos)
				temp3 += temp6
			else
				temp3 += 6
			end if
			temp1++
		loop
	else	
		if text.drawalign == TEXT_RIGHT_ALIGN
			GetTextInfo(temp0, TEXT_FILE_NUM, TEXTINFO_TEXTSIZE, text.drawline, 0)
			temp1 = 0
			temp3 = text.xpos
			while temp0 > temp1
				temp0--
				GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp0)
				if temp2 > 32
					temp2 -= 33
					GetTableValue(temp6, temp2, charspace)
					temp3 -= temp6
					temp2 += 176
					DrawSpriteScreenFX(temp2, FX_INK, temp3, text.ypos)
				else
					temp3 -= 6
				end if
			loop
		else
			if text.drawalign == TEXT_CENTER_ALIGN
				GetTextInfo(temp0, TEXT_FILE_NUM, TEXTINFO_TEXTSIZE, text.drawline, 0)
				temp1 = 0
				temp3 = 0
				while temp1 < temp0
					GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp1)
					if temp2 > 32
						temp2 -= 33
						GetTableValue(temp6, temp2, charspace)
						temp3 -= temp6
					else
						temp3 -= 6
					end if
					temp1++
				loop
				temp1 = 0
				temp3 >>= 1
				temp3 += text.xpos
				while temp1 < temp0
					GetTextInfo(temp2, TEXT_FILE_NUM, TEXTINFO_TEXTDATA, text.drawline, temp1)
					if temp2 > 32
						temp2 -= 33
						GetTableValue(temp6, temp2, charspace)
						temp2 += 176
						DrawSpriteScreenFX(temp2, FX_INK, temp3, text.ypos)
						temp3 += temp6
					else
						temp3 += 6
					end if
					temp1++
				loop
			end if
		end if
	end if
	CopyPalette(0, 233, 0, 224, 3)
end function

event ObjectDraw
	//Background Elements
	//White Background
	DrawRect(0, 0, screen.xsize, screen.ysize, color7, color7, color7, 255)
	
	//Blue Tiles
	temp0 = sidebar.w
	DrawRect(0, 0, temp0, screen.ysize, color5, color5, color7, 255)	
	temp0 -= 3
	DrawRect(temp0, 0, 1, screen.ysize, color7, color7, color7, 255)
	temp0++
	DrawRect(temp0, 0, 2, screen.ysize, 0, 0, 0, 255)
	temp0 += 2
	DrawRect(temp0, 0, 1, screen.ysize, color5, color5, color7, 255)
	
	//Stars
	temp7 = 0
	while temp7 < 45			
		GetTableValue(temp2, temp7, StarList)
		temp7++
		temp2 += 64
		GetTableValue(temp3, temp7, StarList)
		temp7++
		temp3 += 45
		GetTableValue(temp4, temp7, StarList)
		temp7++
		DrawSpriteScreenXY(temp4, temp2, temp3)		
	loop

	//Blue Circle
	DrawRect(sidebar.w, 235, screen.xsize, 5, color5, color5, color7, 255)
	DrawSpriteScreenXY(270, screen.xsize, screen.ysize)
	
	//Scroller
	if menu.highlight == 0
		scroll.max = 0
		scroll.min = 0
	else
		temp0 = menu.highlight
		temp0--
		temp0 *= 21
		scroll.max = temp0
		scroll.min = temp0
		scroll.min -= 147
	end if
	
	if scroll.current < scroll.min
		scroll.current += 3
	else
		if scroll.current > scroll.max
			scroll.current -= 3
		end if
	end if	
	
	//Highlighter
	if menu.highlight > 1		
		temp0 = text.margin
		temp0 -=  3
		temp2 = menu.highlight
		temp2 *= 21
		temp2 += 53
		temp2 -= scroll.current
		temp1 = screen.xsize
		temp1 -= 110
		DrawRect(temp0, temp2, screen.xsize, 19, color5, color5, color7, 255)
		DrawRect(temp1, temp2, 110, 17, color6, color6, color6, 255) // light grey part

	//Delete Highlight
	if delete.check == 1
		if inputDown.buttonA == 1
			temp3 = 0
				if delete.ticker != 110
					if delete.ticker <= 110
							delete.ticker++
					end if
				end if	
			temp3 += delete.ticker
			DrawRect(temp1, temp2, temp3, 17, 255,0,0, 255) // RED
			if temp3 == 110
				StopSfx(SfxName[Warn], 0)
				delete.check = 2
				PlaySfx(SfxName[Cleared], 0)

				temp3 = 0
				delete.ticker = 0
			end if
		else
			StopSfx(SfxName[Warn], 0)
			temp3 = 0
			delete.ticker = 0
			delete.check = 0
		end if
	end if
	temp4 = inputPress.up
	temp4 |= inputPress.down
	if temp4 == 1
		StopSfx(SfxName[Warn], 0)
		temp3 = 0
		delete.ticker = 0
		delete.check = 0
	end if
	//Delete Highlight Ended

		temp1 -= text.margin
		temp1 ++
		DrawRect(temp0, temp2, temp1, 17, color1, color1, color1, 255)
		temp2++
		temp0--
		DrawRect(temp0, temp2, 1, 17, color5, color5, color7, 255)
		DrawRect(temp0, temp2, 1, 15, color1, color1, color1, 255)
	else
		//option menu Highlighter
		if menu.highlight == 1		
			temp0 = text.margin
			temp0 -=  3
			temp2 = menu.highlight
			temp2 *= 21
			temp2 += 53
			temp2 -= scroll.current
			temp1 = screen.xsize
			temp1 -= 110
			DrawRect(temp0, temp2, screen.xsize, 19, color5, color5, color7, 255)
			temp1 -= text.margin
			temp1 ++
			DrawRect(temp0, temp2, screen.xsize, 17, color1, color1, color1, 255)
			temp2++
			temp0--
			DrawRect(temp0, temp2, 1, 17, color5, color5, color7, 255)
			DrawRect(temp0, temp2, 1, 15, color1, color1, color1, 255)

		end if
	end if	
	
	//Subheader smaller arrows
	if menu.highlight == 1
		smallarrow.move++
		smallarrow.move &= 63
	else
		smallarrow.move = 0
	end if
	
	temp1 = smallarrow.move
	temp1 >>= 4
	temp1 *= 5
	temp0 = sidebar.w
	temp3 = 140 // idk what to name this lol
	temp0 += temp3
	temp0 -= temp1
	if screen.xsize == 320
		temp0 -= 25
	end if
	temp2 = 76 // y
	temp2 -= scroll.current
	DrawSpriteScreenXY(275, temp0, temp2)
	temp0 = screen.xsize
	temp0 -= temp3
	temp0 += temp1
	if screen.xsize == 320
		temp0 += 24
	end if
	temp0 -= 3
	DrawSpriteScreenXY(276, temp0, temp2)
		
	//Menu text
	menu.line = 1
	text.ypos = 78
	text.ypos -= scroll.current
	CallFunction(object.drawState)
	
	//Subheader arrows
	if menu.highlight == 0
		arrow.move++
		arrow.move &= 63
	else
		arrow.move = 0
	end if
	
	temp1 = arrow.move
	temp1 >>= 4
	temp1 *= 5
	temp0 = sidebar.w
	temp0 += 60
	if screen.xsize == 320
		temp0 -= 15
	end if
	temp0 -= temp1
	DrawSpriteScreenXY(275, temp0, 52)
	temp0 = screen.xsize
	temp0 -= 60
	if screen.xsize == 320
		temp0 += 13
	end if	
	temp0 += temp1
	DrawSpriteScreenXY(276, temp0, 52)

	//Black Tiles	
	DrawRect(0, 0, screen.xsize, 28, 0, 0, 0, 255)
	DrawRect(0, 25, screen.xsize, 1, color7, 0, 0, 255)
	temp0 = sidebar.w
	temp0 -= 3
	DrawRect(0, 28, temp0, 1, color7, color7, color7, 255)
	temp0 += 4
	DrawRect(temp0, 28, screen.xsize, 1, color5, color5, color7, 255)
	
	text.drawline = 10
	DrawSpriteScreenXY(303, 50, 25)
	CallFunction(header.length)
	temp0 = 50
	temp1 = temp0
	temp0 += temp3
	while temp1 < temp0
		DrawSpriteScreenXY(305, temp1, 25)
		temp1++
	loop
	DrawSpriteScreenXY(304, temp0, 25)
	
	text.headercolor = HEADER_TEXT_BLUE
	text.drawalign = TEXT_LEFT_ALIGN
	text.ypos = 20
	text.xpos = 50
	CallFunction(header.text)
	
	temp3 = 32
	if saved.mobile == 1
		temp3 += 48
		DrawSpriteScreenXY(306, temp3, 50)
		DrawSpriteScreenXY(307, temp3, 190)
	end if
end event


event ObjectStartup
	LoadSpriteSheet("Menus/Options.gif")

	//Load font sprites
	temp0 = 0
	temp1 = 0
	while temp0 < 88
		while temp1 < 128
			SpriteFrame(0, 0, 8, 8, temp1, temp0)
			temp1 += 8
		loop
		temp1 = 0
		temp0 += 8
	loop
	
	//Start second font at 176
	SpriteFrame(0, 0, 3, 12, 129, 1)
	SpriteFrame(0, 0, 6, 12, 133, 1)
	SpriteFrame(0, 0, 10, 12, 140, 1)
	SpriteFrame(0, 0, 9, 12, 151, 1)	
	SpriteFrame(0, 0, 9, 12, 161, 1)
	SpriteFrame(0, 0, 9, 12, 171, 1)
	SpriteFrame(0, 0, 3, 12, 181, 1)
	SpriteFrame(0, 0, 4, 12, 185, 1)
	SpriteFrame(0, 0, 4, 12, 190, 1)
	SpriteFrame(0, 0, 7, 12, 195, 1)
	SpriteFrame(0, 0, 9, 12, 203, 1)
	SpriteFrame(0, 0, 3, 12, 213, 1)
	SpriteFrame(0, 0, 7, 12, 217, 1)
	SpriteFrame(0, 0, 3, 12, 225, 1)
	SpriteFrame(0, 0, 11, 12, 229, 1)
	SpriteFrame(0, 0, 7, 12, 241, 1) //191
	SpriteFrame(0, 0, 5, 12, 249, 1)
	SpriteFrame(0, 0, 7, 12, 129, 14)	
	SpriteFrame(0, 0, 7, 12, 137, 14)
	SpriteFrame(0, 0, 7, 12, 145, 14)
	SpriteFrame(0, 0, 7, 12, 153, 14)
	SpriteFrame(0, 0, 7, 12, 161, 14)
	SpriteFrame(0, 0, 7, 12, 169, 14)
	SpriteFrame(0, 0, 7, 12, 177, 14)
	SpriteFrame(0, 0, 7, 12, 185, 14) //200
	SpriteFrame(0, 0, 3, 12, 193, 14)
	SpriteFrame(0, 0, 3, 12, 197, 14)
	SpriteFrame(0, 0, 6, 12, 201, 14)
	SpriteFrame(0, 0, 6, 12, 208, 14)
	SpriteFrame(0, 0, 6, 12, 215, 14)
	SpriteFrame(0, 0, 6, 12, 222, 14)
	SpriteFrame(0, 0, 10, 12, 229, 14)	
	SpriteFrame(0, 0, 9, 12, 240, 14)
	SpriteFrame(0, 0, 8, 12, 129, 27)
	SpriteFrame(0, 0, 9, 12, 138, 27)
	SpriteFrame(0, 0, 9, 12, 148, 27)
	SpriteFrame(0, 0, 7, 12, 158, 27)
	SpriteFrame(0, 0, 7, 12, 166, 27)
	SpriteFrame(0, 0, 9, 12, 174, 27)
	SpriteFrame(0, 0, 11, 12, 184, 27)
	SpriteFrame(0, 0, 5, 12, 196, 27)
	SpriteFrame(0, 0, 8, 12, 202, 27)
	SpriteFrame(0, 0, 9, 12, 211, 27)
	SpriteFrame(0, 0, 6, 12, 221, 27)
	SpriteFrame(0, 0, 11, 12, 228, 27) //220
	SpriteFrame(0, 0, 9, 12, 240, 27)
	SpriteFrame(0, 0, 10, 12, 129, 40)
	SpriteFrame(0, 0, 7, 12, 140, 40)
	SpriteFrame(0, 0, 10, 12, 148, 40)
	SpriteFrame(0, 0, 7, 12, 159, 40)
	SpriteFrame(0, 0, 7, 12, 167, 40)
	SpriteFrame(0, 0, 9, 12, 175, 40)
	SpriteFrame(0, 0, 10, 12, 185, 40)
	SpriteFrame(0, 0, 9, 12, 196, 40)
	SpriteFrame(0, 0, 15, 12, 206, 40)
	SpriteFrame(0, 0, 9, 12, 222, 40)
	SpriteFrame(0, 0, 11, 12, 232, 40)
	SpriteFrame(0, 0, 9, 12, 244, 40)	
	SpriteFrame(0, 0, 4, 12, 129, 53)
	SpriteFrame(0, 0, 11, 12, 134, 53)
	SpriteFrame(0, 0, 4, 12, 146, 53)
	SpriteFrame(0, 0, 5, 12, 151, 53)
	SpriteFrame(0, 0, 7, 12, 157, 53)
	SpriteFrame(0, 0, 4, 12, 165, 53)	
	SpriteFrame(0, 0, 9, 12, 240, 14) //240
	SpriteFrame(0, 0, 8, 12, 129, 27)
	SpriteFrame(0, 0, 9, 12, 138, 27)
	SpriteFrame(0, 0, 9, 12, 148, 27)
	SpriteFrame(0, 0, 7, 12, 158, 27)
	SpriteFrame(0, 0, 7, 12, 166, 27)
	SpriteFrame(0, 0, 9, 12, 174, 27)
	SpriteFrame(0, 0, 11, 12, 184, 27)
	SpriteFrame(0, 0, 5, 12, 196, 27)
	SpriteFrame(0, 0, 8, 12, 202, 27)
	SpriteFrame(0, 0, 9, 12, 211, 27)
	SpriteFrame(0, 0, 6, 12, 221, 27)
	SpriteFrame(0, 0, 11, 12, 228, 27)
	SpriteFrame(0, 0, 9, 12, 240, 27)
	SpriteFrame(0, 0, 10, 12, 129, 40)
	SpriteFrame(0, 0, 7, 12, 140, 40)
	SpriteFrame(0, 0, 10, 12, 148, 40)
	SpriteFrame(0, 0, 7, 12, 159, 40)
	SpriteFrame(0, 0, 7, 12, 167, 40)
	SpriteFrame(0, 0, 9, 12, 175, 40)
	SpriteFrame(0, 0, 10, 12, 185, 40) //260
	SpriteFrame(0, 0, 9, 12, 196, 40)
	SpriteFrame(0, 0, 15, 12, 206, 40)
	SpriteFrame(0, 0, 9, 12, 222, 40)
	SpriteFrame(0, 0, 11, 12, 232, 40)
	SpriteFrame(0, 0, 9, 12, 244, 40)	
	SpriteFrame(0, 0, 5, 12, 170, 53)
	SpriteFrame(0, 0, 3, 12, 176, 53)
	SpriteFrame(0, 0, 5, 12, 180, 53)
	SpriteFrame(0, 0, 9, 12, 186, 53) //269
	
	
	SpriteFrame(-307, -100, 307, 100, 1, 157) //270 Big Circle
	SpriteFrame(0, 0, 1, 1, 59, 142) //271 Star 1
	SpriteFrame(-1, -1, 3, 3, 55, 142) //272 Star 2
	SpriteFrame(-2, -3, 5, 7, 63, 132) //273 Star 3
	SpriteFrame(-3, -4, 7, 9, 55, 132) //274 Star 4
	SpriteFrame(-11, -1, 14, 14, 69, 132) //275 Submenu Arrow Left
	SpriteFrame(-1, -1, 14, 14, 84, 132) //276 Submenu Arrow Left
	
	
	SpriteFrame(0, 0, 17, 18, 138, 110) //277 A Header Alphabet
	SpriteFrame(0, 0, 17, 18, 156, 110)
	SpriteFrame(0, 0, 17, 18, 174, 110)
	SpriteFrame(0, 0, 17, 18, 192, 110)
	SpriteFrame(0, 0, 16, 18, 210, 110) //281 E
	SpriteFrame(0, 0, 16, 18, 227, 110)	
	SpriteFrame(0, 0, 18, 18, 244, 110)
	SpriteFrame(0, 0, 17, 18, 263, 110)
	SpriteFrame(0, 0, 8, 18, 281, 110) // I
	SpriteFrame(0, 0, 16, 18, 290, 110)
	SpriteFrame(0, 0, 18, 18, 307, 110)
	SpriteFrame(0, 0, 17, 18, 326, 110)
	SpriteFrame(0, 0, 18, 18, 344, 110) //289 M
	SpriteFrame(0, 0, 17, 18, 363, 110)
	SpriteFrame(0, 0, 18, 18, 138, 129)
	SpriteFrame(0, 0, 17, 18, 157, 129)
	SpriteFrame(0, 0, 18, 18, 175, 129)
	SpriteFrame(0, 0, 18, 18, 194, 129) // R
	SpriteFrame(0, 0, 16, 18, 213, 129)
	SpriteFrame(0, 0, 16, 18, 230, 129)
	SpriteFrame(0, 0, 17, 18, 247, 129)
	SpriteFrame(0, 0, 17, 18, 265, 129)
	SpriteFrame(0, 0, 24, 18, 283, 129)
	SpriteFrame(0, 0, 17, 18, 308, 129)
	SpriteFrame(0, 0, 17, 18, 326, 129)
	SpriteFrame(0, 0, 17, 18, 344, 129) //302 Z
	
	SpriteFrame(-17, 0, 17, 19, 129, 66) //303
	SpriteFrame(0, 0, 17, 19, 147, 66) //304
	SpriteFrame(0, 0, 1, 19, 147, 66) //305

	SpriteFrame(-48, 0, 14, 14, 113, 125) //306 Up Arrow
	SpriteFrame(-48, 0, 14, 14, 113, 140) //307 Down Arrow
	
end event
