Skip to content

Commit

Permalink
Added support for v2.0 patches of Enhanced Edition games
Browse files Browse the repository at this point in the history
  • Loading branch information
Argent77 committed Apr 1, 2016
1 parent 1fcafbe commit acb5091
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 30 deletions.
2 changes: 1 addition & 1 deletion LightingPack/languages/english/setup.tra
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@1 = ~Shader script files for lighting control~
@2 = ~This mod requires BG:EE or BG2:EE to be installed.~
@2 = ~This mod requires an Enhanced Edition game to be installed.~
@3 = ~You need BG:EE v1.2 or higher for this mod to work.~

@100 = ~Neutral settings for contrast, brightness and gamma~
Expand Down
2 changes: 1 addition & 1 deletion LightingPack/languages/polish/setup.tra
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@1 = ~Pliki skryptowe shaderow dla kontroli oswietlenia~
@2 = ~Mod ten wymaga zainstalowania BG:EE lub BG2:EE.~
@2 = ~Modyfikacja ta wymaga zainstalowania wersji Enhanced Edition.~
@3 = ~Do dzialania tego moda niezbedne jest zainstalowanie BG:EE w wersji 1.2 lub wyzszej.~

@100 = ~Neutralne ustawienia poziomu kontrastu, jasnosci i korekcji gamma~
Expand Down
14 changes: 11 additions & 3 deletions LightingPack/lib/functions.tph
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,24 @@ vec4 a7ApplyFilters( vec4 color )

>>>>>>>>

// EE engine 2.x contains additional shader files
ACTION_IF (FILE_EXISTS_IN_GAME ~fpsprite.glsl~) BEGIN
ACTION_DEFINE_ARRAY a7_shader_files BEGIN ~fpdraw.glsl~ ~fpfont.glsl~ ~fpselect.glsl~ ~fpsprite.glsl~ ~fptone.glsl~ ~fpyuv.glsl~ ~fpyuvgry.glsl~ END
END ELSE BEGIN
ACTION_DEFINE_ARRAY a7_shader_files BEGIN ~fpdraw.glsl~ ~fptone.glsl~ ~fpyuv.glsl~ ~fpyuvgry.glsl~ END
END

// Adjusting shader return values only, for max. mod compatibility
ACTION_FOR_EACH file IN ~fpDraw.GLSL~ ~fpTone.GLSL~ ~fpYUV.GLSL~ ~fpYUVGRY.GLSL~ BEGIN
ACTION_PHP_EACH a7_shader_files AS index => file BEGIN
ACTION_IF (FILE_EXISTS_IN_GAME ~%file%~) BEGIN
ACTION_IF ((FILE_CONTAINS_EVALUATED(~%file%~ ~a7FragColor~)) == 0) BEGIN
COPY_EXISTING ~%file%~ ~override~
INSERT_FILE 0 ~LightingPack/inlined/functions.glsl~
REPLACE_TEXTUALLY EVALUATE_REGEXP
~gl_FragColor\(.+\)~
~vec4 a7FragColor\1%LNL% gl_FragColor = a7ApplyFilters( a7FragColor );~
~^\([ %TAB%]*\)gl_FragColor\(.+\)~
~\1vec4 a7FragColor\2%LNL%\1gl_FragColor = a7ApplyFilters( a7FragColor );~
EVALUATE_BUFFER
BUT_ONLY
END ELSE BEGIN
WARN ~File has already been extended: %file%. Skipping...~
END
Expand Down
9 changes: 8 additions & 1 deletion LightingPack/readme/readme.polish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Możesz wybrać opcję z zestawu predefiniowanych konfiguracji oświetlenia lub

Jeśli chcesz mieć ogólny pogląd jak dane ustawienia mają się do tych oryginalnych, wejdź w folder preview tego moda i otwórz przy pomocy dowolnej przeglądarki graficznej lub internetowej plik o nazwie "lighting_preview.jpg".

Uwaga: Zmiany dokonane przez tą modyfikację nie będą widoczne, jeśli w opcjach graficznych gry wybierzesz opcję "Alternatywny renderer".


2. Instalacja
~~~~~~~~~~~~~
Expand Down Expand Up @@ -54,7 +56,12 @@ Zastosowanie plików shaderów w grze:
fpDraw.GLSL Wykorzystywany we wszystkich kolorowych obszarach ekranu, z wyjątkiem filmów.
fpTone.GLSL Wykorzystywany we wszystkich obszarach ekranu o różnym stopniu szarości (np. przy nieaktywnych przyciskach czy efekcie zatrzymania czasu).
fpYUV.GLSL Wykorzystywany podczas odtwarzaniu filmów.
fpYUVGRY.GLSL Wykorzystywane dla wyjścia wideo w trybie odcieni szarości (obecnie używane jedynie w BG2:EE).
fpYUVGRY.GLSL Wykorzystywane dla wyjścia wideo w trybie odcieni szarości.

Dodatkowe pliki shaderów dla wersji silnika v2.0:
fpFont.GLSL Używane do tekstów w grze.
fpSelect.GLSL Używane do podświetlania sprite'ów.
fpSprite.GLSL Używane do obramowania sprite'ów.


6. Version History
Expand Down
11 changes: 10 additions & 1 deletion LightingPack/readme/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ If you want to get a general idea on how each setting looks compared to the orig
preview folder of this mod and open the file "lighting_preview.jpg" with your graphics viewer
or browser.

Note: Changes made by this mod will not be visible if you select "Alternative renderer" in the
graphics options of the games.


2. Installation
~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -71,7 +74,13 @@ Usage of shader files in the game:
fpDraw.GLSL Used for every colored areas of the screen, except for videos.
fpTone.GLSL Used for grayscaled areas of the screen (e.g. disabled buttons or time stop effect).
fpYUV.GLSL Used for video output.
fpYUVGRY.GLSL Used for grayscaled video output (currently only used in BG2:EE).
fpYUVGRY.GLSL Used for grayscaled video output.

Additional shader files since game engine v2.0:
fpFont.GLSL Used for game text.
fpSelect.GLSL Used for sprite highlighting.
fpSprite.GLSL Used for the sprite outlines.



6. Version History
Expand Down
46 changes: 23 additions & 23 deletions LightingPack/setup-LightingPack.tp2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LANGUAGE ~Polski (tlumaczenie: Cahir)~ ~polish~ ~LightingPack/languages/english

// Neutral settings
BEGIN @100 // Neutral settings for contrast, brightness and gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -18,7 +18,7 @@ BEGIN @100 // Neutral settings for contrast, brightness and gamma

// slight overall increase
BEGIN @101 // Slightly increased contrast, brightness and gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -27,7 +27,7 @@ BEGIN @101 // Slightly increased contrast, brightness and gamma

// moderate overall increase
BEGIN @102 // Moderately increased contrast, brightness and gamma (recommended)
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -36,7 +36,7 @@ BEGIN @102 // Moderately increased contrast, brightness and gamma (recommende

// great overall increase
BEGIN @103 // Greatly increased contrast, brightness and gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -45,7 +45,7 @@ BEGIN @103 // Greatly increased contrast, brightness and gamma

// slight overall decrease
BEGIN @104 // Slightly reduced contrast, brightness and gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -54,7 +54,7 @@ BEGIN @104 // Slightly reduced contrast, brightness and gamma

// moderate overall decrease
BEGIN @105 // Moderately reduced contrast, brightness and gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -63,7 +63,7 @@ BEGIN @105 // Moderately reduced contrast, brightness and gamma

// slight contrast increase
BEGIN @106 // Slightly increased contrast
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -72,7 +72,7 @@ BEGIN @106 // Slightly increased contrast

// moderate contrast increase
BEGIN @107 // Moderately increased contrast
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -81,7 +81,7 @@ BEGIN @107 // Moderately increased contrast

// great contrast increase
BEGIN @108 // Greatly increased contrast
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -90,7 +90,7 @@ BEGIN @108 // Greatly increased contrast

// slight contrast decrease
BEGIN @109 // Slightly reduced contrast
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -99,7 +99,7 @@ BEGIN @109 // Slightly reduced contrast

// moderate contrast decrease
BEGIN @110 // Moderately reduced contrast
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -108,7 +108,7 @@ BEGIN @110 // Moderately reduced contrast

// slight brightness increase
BEGIN @111 // Slightly increased brightness
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -117,7 +117,7 @@ BEGIN @111 // Slightly increased brightness

// moderate brightness increase
BEGIN @112 // Moderately increased brightness
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -126,7 +126,7 @@ BEGIN @112 // Moderately increased brightness

// great brightness increase
BEGIN @113 // Greatly increased brightness
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -135,7 +135,7 @@ BEGIN @113 // Greatly increased brightness

// slight brightness decrease
BEGIN @114 // Slightly reduced brightness
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -144,7 +144,7 @@ BEGIN @114 // Slightly reduced brightness

// moderate brightness decrease
BEGIN @115 // Moderately reduced brightness
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -153,7 +153,7 @@ BEGIN @115 // Moderately reduced brightness

// slight gamma increase
BEGIN @116 // Slightly increased gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -162,7 +162,7 @@ BEGIN @116 // Slightly increased gamma

// moderate gamma increase
BEGIN @117 // Moderately increased gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -171,7 +171,7 @@ BEGIN @117 // Moderately increased gamma

// great gamma increase
BEGIN @118 // Greatly increased gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -180,7 +180,7 @@ BEGIN @118 // Greatly increased gamma

// slight gamma decrease
BEGIN @119 // Slightly reduced gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -189,7 +189,7 @@ BEGIN @119 // Slightly reduced gamma

// moderate gamma decrease
BEGIN @120 // Moderately reduced gamma
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand All @@ -198,7 +198,7 @@ BEGIN @120 // Moderately reduced gamma

// manual input
BEGIN @121 // Enter values for contrast, brightness and gamma manually
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires BG:EE or BG2:EE to be installed.
REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @2 // This mod requires an Enhanced Edition game to be installed.
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~fpDraw.GLSL~ @3 // You need BG:EE v1.2 or higher for this mod to work.
SUBCOMPONENT @1 // Install shader files for lighting control (BG:EE or BG2:EE)

Expand Down Expand Up @@ -248,5 +248,5 @@ BEGIN @121 // Enter values for contrast, brightness and gamma manually
END

INCLUDE ~LightingPack/lib/functions.tph~
LAF InstallLighting STR_VAR contrast = EVALUATE_BUFFER ~%contrast%~ brightness = EVALUATE_BUFFER ~%brightness%~ gamma = EVALUATE_BUFFER ~%gamma%~ END
LAF InstallLighting STR_VAR contrast = EVAL ~%contrast%~ brightness = EVAL ~%brightness%~ gamma = EVAL ~%gamma%~ END

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ If you want to get a general idea on how each setting looks compared to the orig
preview folder of this mod and open the file "lighting_preview.jpg" with your graphics viewer
or browser.

**Note:** Changes made by this mod will not be visible if you select "Alternative renderer" in the
graphics options of the games.


##Installation

Expand Down Expand Up @@ -66,3 +69,10 @@ fpTone.GLSL Used for grayscaled areas of the screen (e.g. disabled buttons or
fpYUV.GLSL Used for video output.
fpYUVGRY.GLSL Used for grayscaled video output (currently only used in BG2:EE).
```

Additional shader files since game engine v2.0:
```
fpFont.GLSL Used for game text.
fpSelect.GLSL Used for sprite highlighting.
fpSprite.GLSL Used for the sprite outlines.
```

0 comments on commit acb5091

Please sign in to comment.