#!/bin/bash

version=2.6.1-1

install_packages https://github.com/Pi-Apps-Coders/files/releases/download/large-files/stuntrally_${version}_arm64.deb || exit 1

mkdir -p ~/.config/stuntrally
echo '
[ car1 ]
abs = off
absA = off
autorear = on
autorear_inv = on
autotrans = on
camera = 9
car = SZ
clr_gloss = 1.000000
clr_hue = 0.440000
clr_refl = 1.100000
clr_sat = 0.900000
clr_val = 0.710000
sss_effect = 0.574000
sss_effectA = 0.650000
sss_velfactor = 0.626000
sss_velfactorA = 0.734000
steer_range = 1.000000
steer_rangeA = 0.760000
steer_sim_easy = 0.650000
steer_sim_normal = 0.900000
tcs = off
tcsA = off
[ car2 ]
camera = 9
car = ES
clr_gloss = 0.500000
clr_hue = 0.910000
clr_refl = 1.000000
clr_sat = 1.000000
clr_val = 1.000000
[ car3 ]
camera = 9
car = ES
clr_gloss = 1.000000
clr_hue = 0.750000
clr_refl = 0.400000
clr_sat = 0.950000
clr_val = 0.900000
[ car4 ]
camera = 9
car = ES
clr_gloss = 0.500000
clr_hue = 0.000000
clr_refl = 1.000000
clr_sat = 1.000000
clr_val = 0.900000
[ car5 ]
clr_gloss = 0.500000
clr_hue = 0.910000
clr_refl = 1.000000
clr_sat = 1.000000
clr_val = 1.000000
[ car6 ]
clr_gloss = 0.030000
clr_hue = 0.700000
clr_refl = 1.300000
clr_sat = 1.000000
clr_val = 0.700000
[ game ]
boost_add_sec = 0.100000
boost_max = 11.000000
boost_min = 2.000000
boost_per_km = 1.000000
boost_power = 0.800000
boost_type = 2
chall_num = -1
champ_num = -1
champ_rev = off
collis_cars = on
collis_roadw = off
collis_veget = on
damage_dec = 40.000000
damage_type = 1
dyn_objects = on
flip_type = 1
in_main = off
in_menu = 0
local_players = 1
num_laps = 2
pre_time = 2.000000
rewind_type = 1
sim_mode = easy
split_vertically = on
start_in_main = on
start_order = 0
track = Jng7-Hilly
track_user = off
trk_reverse = off
[ graph_detail ]
anisotropy = 0
preset = 0
road_dist = 1.000000
ter_detail = 1.704071
ter_dist = 0.000000
ter_mtr = 0
ter_tripl = 0
tex_filter = 2
tex_size = 0
view_dist = 1000.000000
[ graph_par ]
particles = off
particles_len = 1.000000
trail_len = 1.000000
trails = off
[ graph_reflect ]
dist = 20.000000
faces_once = 1
map_size = 0
mode = 0
skip_frames = 150
water_reflect = off
water_refract = off
water_rttsize = 0
[ graph_shadow ]
count = 1
dist = 100.000000
lightmap_size = 0
shader_mode = 
size = 0
type = 0
[ graph_veget ]
grass = 0.000000
grass_dist = 0.640571
imposters_only = on
trees = 0.000000
trees_dist = 0.601562
use_imposters = off
[ graphs ]
tc_r = 1.026358
tc_xr = 1.017167
te_common = on
te_reference = off
te_xf_pow = 1.000000
te_xfx = 4.000000
te_xfy = 160.000000
te_yf = 9013.303711
[ gui ]
car_ed_tab = 0
cars_sort = 1
cars_view = 0
chall_tab = 0
champ_info = on
champ_tab = 0
tut_tab = 0
tweak_tab = 0
[ gui_tracks ]
columns0 = 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1
columns1 = 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
filter = off
filters0 = 1 0 0 0 0 0 0 0 0 0 0 0 0
filters1 = 26 6 5 4 3 5 5 4 5 4 5 5 9
sort = 2
sortup = on
view = 0
[ hud_show ]
cam_tilt = on
caminfo = on
car_dbgsurf = off
car_dbgtxt = off
car_dbgtxtclr = 0
car_dbgtxtcnt = 5
car_tirevis = off
check_arrow = on
check_beam = off
fps = off
gauges = on
graphs = off
graphs_type = 1
mph = off
opplist_sort = on
opponents = off
show_cardbg = off
show_digits = on
times = on
trackmap = on
[ hud_size ]
arrow = 0.260000
cam_bnc_mul = 1.000000
cam_bounce = on
cam_in_loop = 1
cam_loop_chng = on
fov = 90.000000
fov_max = 120.000000
fov_smooth = 5.000000
gauges = 0.190000
gauges_type = 3
mini_border = on
mini_rotated = on
mini_terrain = on
mini_zoom = 2.400000
mini_zoomed = on
minimap = 0.165000
minipos = 0.100000
[ misc ]
autostart = off
boostFromExhaust = off
bulletDebug = off
bulletLines = off
bulletProfilerTxt = off
dev_keys = off
dev_no_prvs = off
escquit = off
language = en
loadingback = on
mouse_capture = on
ogredialog = off
profilerTxt = off
screenshot_png = off
show_welcome = on
version = 2600
[ network ]
game_name = Default Game
local_port = 4243
master_server_address = stuntrally.dy.fi
master_server_port = 4243
nickname = Player
[ pacenotes ]
alpha = 0.900000
dist = 300.000000
near = 0.570000
next = 4
show = on
size = 0.930000
[ replay ]
bestonly = on
ghoHideDist = 5.000000
ghoHideDistTrk = 5.000000
ghost = off
ghostother = on
ghostpar = off
ghostrewind = on
listghosts = off
listview = 0
num_views = 1
rec = off
trackghost = on
[ sim ]
bullet_freq = 160.000000
bullet_iter = 24
dynamics_iter = 60
game_freq = 82.000000
gui_sleep = 1
multi_thr = 1
perf_speed = 100000.000000
thread_sleep = 5
[ sound ]
device = 
hud_chk = off
hud_chk_wrong = on
hud_vol = 0.750000
reverb = on
vol_car_crash = 0.608426
vol_car_scrap = 0.915743
vol_engine = 0.580488
vol_env = 0.748115
vol_fl_cont = 0.878492
vol_fl_splash = 0.636364
vol_susp = 0.474945
vol_tires = 0.856763
volume = 1.550000
[ video ]
buffer = FBO
fsaa = 0
fullscreen = off
limit_fps = off
limit_fps_val = 60.000000
limit_sleep = -1
rendersystem = OpenGL Rendering Subsystem
vsync = on
windowx = 800
windowy = 600
[ video_eff ]
all_effects = off
bloom = off
bloomintensity = 0.130000
bloomorig = 0.910000
boost_fov = off
dof = off
dof_far = 1000.000000
dof_focus = 100.000000
godrays = off
hdr = off
hdr_adaptationScale = 0.510000
hdr_bloomint = 0.810000
hdr_bloomorig = 0.340000
hdr_p1 = 0.620000
hdr_p2 = 0.100000
hdr_p3 = 0.790000
hdr_vignettingDarkness = 0.340000
hdr_vignettingRadius = 2.850000
motionblur = off
motionblurintensity = 0.400000
softparticles = off
ssao = off
' > ~/.config/stuntrally/game.cfg
