Skip to content

Commit

Permalink
Merge pull request #105 from Root-Core/gothic_classic
Browse files Browse the repository at this point in the history
Improved and combined fixes for Gothic 1 / 2
  • Loading branch information
R1kaB3rN authored Aug 26, 2024
2 parents 80327b8 + 61114dd commit ad6a519
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 47 deletions.
37 changes: 0 additions & 37 deletions gamefixes-steam/39510.py

This file was deleted.

1 change: 1 addition & 0 deletions gamefixes-steam/39510.py
40 changes: 30 additions & 10 deletions gamefixes-steam/65540.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
""" Game fix for Gothic 1
""" Game fix for Gothic 1 Classic
Game fix for Gothic II: Gold Classic
"""
#pylint: disable=C0103

from protonfixes import util


def main():
# Fix resolution, not necessary with 'GD3D11' - but doesn't hurt
set_resolution()

screen_width,screen_height = util.get_resolution()
# Fix background music / Gothic 2 startup
util.protontricks('directmusic')
util.winedll_override('*dsound', 'b') # Override registry entry

zVidResFullscreenX=str(screen_width)
zVidResFullscreenY=str(screen_height)
# Fix crackling audio
util.set_environment('PULSE_LATENCY_MSEC', '90')

# Allow use of the popular workshop item 'GD3D11', which implements the DirectDraw API with Gothic-specific fixes
# Gothic 1: https://steamcommunity.com/sharedfiles/filedetails/?id=2791606767
# Gothic 2: https://steamcommunity.com/sharedfiles/filedetails/?id=2787015529
#
# This might also be necessary for the GOG release
util.winedll_override('ddraw', 'n,b')

# Fix extreme mouse stutter and allow additional use of 'GRawInput (mouse fix)' from workshop
# Gothic 1: https://steamcommunity.com/sharedfiles/filedetails/?id=3054112346
# Gothic 2: https://steamcommunity.com/sharedfiles/filedetails/?id=3054078559
util.winedll_override('dinput', 'n,b')
util.winedll_override('dinput8', 'n,b')

""" Modify Gothic.ini
"""

def set_resolution() -> None:
# Patch the config to match the system resolution
screen_width,screen_height = util.get_resolution()

zVidResFullscreenX = str(screen_width)
zVidResFullscreenY = str(screen_height)

game_opts = """
[GAME]
Expand All @@ -24,7 +47,4 @@ def main():
zVidResFullscreenBPP=32
"""

util.set_ini_options(game_opts,'system/Gothic.ini','cp1251','game')

# Fix the game getting locked on exit
util.disable_fsync()
util.set_ini_options(game_opts, 'system/Gothic.ini', 'cp1251', 'game')

0 comments on commit ad6a519

Please sign in to comment.