#!/usr/bin/env bash
# 
# SCRIPT NAME:
# gw2
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Starts Guild Wars 2 inside Wine.
#
# USAGE:
# ./gw2
# Set custom wineprefix
export WINEPREFIX="${HOME}/Games/Guild_Wars_2/"

# Set wine to 64-bit
export WINEARCH=win64

# Optimize performance
export __GL_THREADED_OPTIMIZATIONS=0
export __GL_SYNC_TO_VBLANK=0
export __GL_YIELD="NOTHING"

# Disable debug messages
export WINEDEBUG=-all
export LOGFILE=/dev/null

# Enable esync
export WINEESYNC=1

# Run GW2 using some settings
wine64 "${WINEPREFIX}/drive_c/Program Files/Guild Wars 2/Gw2-64.exe" -dx9single -mapLoadInfo
