From 793fe4e6032c5bce93b005a62a2c20e8d2075d8c Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Tue, 15 Jan 2019 18:03:15 -0400 Subject: [PATCH 01/24] Fixed another minor typo or two --- code/botlib/be_aas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/botlib/be_aas.h b/code/botlib/be_aas.h index dbf24bc128..cb7d73c981 100644 --- a/code/botlib/be_aas.h +++ b/code/botlib/be_aas.h @@ -217,5 +217,5 @@ typedef struct aas_predictroute_s int endcontents; //contents at the end of movement prediction int endtravelflags; //end travel flags int numareas; //number of areas predicted ahead - int time; //time predicted ahead (in hundreth of a sec) + int time; //time predicted ahead (in hundredths of a sec) } aas_predictroute_t; From 9500f06b8f9a1c42f166880161117f689aea19fd Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Tue, 15 Jan 2019 18:18:40 -0400 Subject: [PATCH 02/24] Minor typo correction to be_aas_file.c --- code/botlib/be_aas_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/botlib/be_aas_file.c b/code/botlib/be_aas_file.c index f4d91720b5..3de8f78030 100644 --- a/code/botlib/be_aas_file.c +++ b/code/botlib/be_aas_file.c @@ -277,7 +277,7 @@ void AAS_FileInfo(void) aasworld.reachabilitysize * sizeof(aas_reachability_t) + aasworld.numportals * sizeof(aas_portal_t) + aasworld.numclusters * sizeof(aas_cluster_t); - botimport.Print(PRT_MESSAGE, "optimzed size %d KB\n", optimized >> 10); + botimport.Print(PRT_MESSAGE, "optimized size %d KB\n", optimized >> 10); } //end of the function AAS_FileInfo #endif //AASFILEDEBUG //=========================================================================== From afb102a8b6ddc2d1b69724157186d9a6f77d4852 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Thu, 17 Jan 2019 09:05:50 -0400 Subject: [PATCH 03/24] Updated .gitgnore to latest GitHub template --- misc/msvc12/.gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/msvc12/.gitignore b/misc/msvc12/.gitignore index 4ba92b04af..3e8a1553fc 100644 --- a/misc/msvc12/.gitignore +++ b/misc/msvc12/.gitignore @@ -211,7 +211,7 @@ _pkginfo.txt # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache -!*.[Cc]ache/ +!?*.[Cc]ache/ # Others ClientBin/ @@ -336,3 +336,6 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb From 22722f2108633f9002bc45730373ce7219b18d87 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Thu, 17 Jan 2019 09:34:15 -0400 Subject: [PATCH 04/24] Add .gitignore to msvc10 folder --- misc/msvc10/.gitignore | 341 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 341 insertions(+) create mode 100644 misc/msvc10/.gitignore diff --git a/misc/msvc10/.gitignore b/misc/msvc10/.gitignore new file mode 100644 index 0000000000..3e8a1553fc --- /dev/null +++ b/misc/msvc10/.gitignore @@ -0,0 +1,341 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ +# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true +**/wwwroot/lib/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb From 2d3b8b5c2727cdc98373324a77801faf45da92dc Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Thu, 17 Jan 2019 09:35:18 -0400 Subject: [PATCH 05/24] Added .gitignore to msvc11 folder --- misc/msvc11/.gitignore | 341 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 341 insertions(+) create mode 100644 misc/msvc11/.gitignore diff --git a/misc/msvc11/.gitignore b/misc/msvc11/.gitignore new file mode 100644 index 0000000000..3e8a1553fc --- /dev/null +++ b/misc/msvc11/.gitignore @@ -0,0 +1,341 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ +# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true +**/wwwroot/lib/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb From 0549613351935e9a638ed79b9dad8b4ae1cdd150 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Thu, 17 Jan 2019 09:36:10 -0400 Subject: [PATCH 06/24] Added .gitignore to msvc folder --- misc/msvc/.gitignore | 341 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 341 insertions(+) create mode 100644 misc/msvc/.gitignore diff --git a/misc/msvc/.gitignore b/misc/msvc/.gitignore new file mode 100644 index 0000000000..3e8a1553fc --- /dev/null +++ b/misc/msvc/.gitignore @@ -0,0 +1,341 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ +# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true +**/wwwroot/lib/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb From efd55cab9de35d33050ef246c7ac0d3cc47739f6 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 11 Jun 2023 11:41:59 -0500 Subject: [PATCH 07/24] nsis: Remove Speex library The game doesn't support it anymore. --- misc/nsis/Makefile | 6 ------ misc/nsis/ioquake3.nsi.in | 6 ------ 2 files changed, 12 deletions(-) diff --git a/misc/nsis/Makefile b/misc/nsis/Makefile index 3875e4e502..a17d2a458d 100644 --- a/misc/nsis/Makefile +++ b/misc/nsis/Makefile @@ -22,9 +22,6 @@ endif ifndef USE_CURL_DLOPEN USE_CURL_DLOPEN=0 endif -ifndef USE_INTERNAL_SPEEX -USE_INTERNAL_SPEEX=1 -endif ifndef USE_INTERNAL_ZLIB USE_INTERNAL_ZLIB=1 endif @@ -56,9 +53,6 @@ endif ifeq ($(USE_CURL_DLOPEN),1) DEFINES+= -DUSE_CURL_DLOPEN endif -ifeq ($(USE_INTERNAL_SPEEX),1) - DEFINES+= -DUSE_INTERNAL_SPEEX -endif ifeq ($(USE_INTERNAL_ZLIB),1) DEFINES+= -DUSE_INTERNAL_ZLIB endif diff --git a/misc/nsis/ioquake3.nsi.in b/misc/nsis/ioquake3.nsi.in index 7e2b07dfd6..0da3a7b680 100644 --- a/misc/nsis/ioquake3.nsi.in +++ b/misc/nsis/ioquake3.nsi.in @@ -78,9 +78,6 @@ Section "ioquake3 (required)" ioquake3 ; Set output path to the installation directory. SetOutPath $INSTDIR -!ifndef USE_INTERNAL_SPEEX - File "libspeex.dll" -!endif !ifndef USE_INTERNAL_ZLIB File "zlib1.dll" !endif @@ -200,9 +197,6 @@ Section "Uninstall" Delete $INSTDIR\id-readme.txt Delete $INSTDIR\voip-readme.txt -!ifndef USE_INTERNAL_SPEEX - Delete $INSTDIR\libspeex.dll -!endif !ifndef USE_INTERNAL_ZLIB Delete $INSTDIR\zlib1.dll !endif From 9738176849bcf09566e2ad602d07e40a9a8d18ef Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 11 Jun 2023 11:48:42 -0500 Subject: [PATCH 08/24] nsis: Require installing SDL It's required to run and unlikely to be installed system wide. --- misc/nsis/ioquake3.nsi.in | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/misc/nsis/ioquake3.nsi.in b/misc/nsis/ioquake3.nsi.in index 0da3a7b680..082a716317 100644 --- a/misc/nsis/ioquake3.nsi.in +++ b/misc/nsis/ioquake3.nsi.in @@ -78,6 +78,7 @@ Section "ioquake3 (required)" ioquake3 ; Set output path to the installation directory. SetOutPath $INSTDIR + File "../../build/release-mingw32-x86/SDL2.dll" !ifndef USE_INTERNAL_ZLIB File "zlib1.dll" !endif @@ -139,14 +140,6 @@ Section "Protocol Handler" ProtocolHandler SectionEnd -Section "SDL2.dll" SDL - - SetOutPath $INSTDIR - - File "../../build/release-mingw32-x86/SDL2.dll" - -SectionEnd - !ifdef USE_OPENAL_DLOPEN Section "OpenAL-Soft library" OpenAL @@ -197,6 +190,7 @@ Section "Uninstall" Delete $INSTDIR\id-readme.txt Delete $INSTDIR\voip-readme.txt + Delete $INSTDIR\SDL2.dll !ifndef USE_INTERNAL_ZLIB Delete $INSTDIR\zlib1.dll !endif @@ -204,7 +198,6 @@ Section "Uninstall" Delete $INSTDIR\jpeg8c.dll !endif - Delete $INSTDIR\SDL2.dll !ifdef USE_OPENAL_DLOPEN Delete $INSTDIR\OpenAL32.dll !endif @@ -230,7 +223,6 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${ioquake3} "The game executables." !insertmacro MUI_DESCRIPTION_TEXT ${StartMenuShortcuts} "Create shortcuts in the start menu." !insertmacro MUI_DESCRIPTION_TEXT ${ProtocolHandler} "The protocol handler lets you connect to a game by clicking a link in a web browser." - !insertmacro MUI_DESCRIPTION_TEXT ${SDL} "SDL files." !ifdef USE_OPENAL_DLOPEN !insertmacro MUI_DESCRIPTION_TEXT ${OpenAL} "OpenAL files." !endif From 5362af3858d83fb1c6ec03ad731be3fe28bbfb21 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 11 Jun 2023 13:26:00 -0500 Subject: [PATCH 09/24] nsis: Display ioquake3 version Display version in the installer and add/remove software. --- misc/nsis/ioquake3.nsi.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/nsis/ioquake3.nsi.in b/misc/nsis/ioquake3.nsi.in index 082a716317..f78c14373c 100644 --- a/misc/nsis/ioquake3.nsi.in +++ b/misc/nsis/ioquake3.nsi.in @@ -7,6 +7,8 @@ ; ; you have to copy OpenAL32.dll here manually +!define VERSION "XXXVERSIONXXX" + !define MULTIUSER_MUI !define MULTIUSER_EXECUTIONLEVEL Highest !define MULTIUSER_INSTALLMODE_COMMANDLINE @@ -24,7 +26,7 @@ Name "ioquake3" ; The file to write -OutFile "ioquake3-XXXVERSIONXXX-XXXRELEASEXXX.x86.exe" +OutFile "ioquake3-${VERSION}-XXXRELEASEXXX.x86.exe" ; The default installation directory ; set by Multiuser.nsh @@ -71,7 +73,7 @@ Function un.onInit FunctionEnd ; The stuff to install -Section "ioquake3 (required)" ioquake3 +Section "ioquake3 ${VERSION} (required)" ioquake3 SectionIn RO @@ -114,6 +116,7 @@ Section "ioquake3 (required)" ioquake3 ; Write the uninstall keys for Windows WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "DisplayName" "ioquake3" + WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "DisplayVersion" "${VERSION}" WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoModify" 1 WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoRepair" 1 From 221465f3b44639536631cbb7ba20e12fa5e7e179 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 11 Jun 2023 17:05:12 -0500 Subject: [PATCH 10/24] nsis: Add better descriptions for OpenAL and libcurl --- misc/nsis/ioquake3.nsi.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/nsis/ioquake3.nsi.in b/misc/nsis/ioquake3.nsi.in index f78c14373c..d0333f46a4 100644 --- a/misc/nsis/ioquake3.nsi.in +++ b/misc/nsis/ioquake3.nsi.in @@ -227,9 +227,9 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${StartMenuShortcuts} "Create shortcuts in the start menu." !insertmacro MUI_DESCRIPTION_TEXT ${ProtocolHandler} "The protocol handler lets you connect to a game by clicking a link in a web browser." !ifdef USE_OPENAL_DLOPEN - !insertmacro MUI_DESCRIPTION_TEXT ${OpenAL} "OpenAL files." + !insertmacro MUI_DESCRIPTION_TEXT ${OpenAL} "Advanced audio mixer that supports surround sound." !endif !ifdef USE_CURL_DLOPEN - !insertmacro MUI_DESCRIPTION_TEXT ${libcurl} "libcurl files." + !insertmacro MUI_DESCRIPTION_TEXT ${libcurl} "Used for HTTP file downloads." !endif !insertmacro MUI_FUNCTION_DESCRIPTION_END From a119e67fb8c20d1eacebdaa54744660478898a03 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 11 Jun 2023 16:41:15 -0500 Subject: [PATCH 11/24] nsis: Fix CustomUrlArguments for protocol handler --- misc/nsis/ioquake3.nsi.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/nsis/ioquake3.nsi.in b/misc/nsis/ioquake3.nsi.in index d0333f46a4..fe765f0378 100644 --- a/misc/nsis/ioquake3.nsi.in +++ b/misc/nsis/ioquake3.nsi.in @@ -136,7 +136,7 @@ SectionEnd Section "Protocol Handler" ProtocolHandler WriteRegStr SHCTX "Software\Classes\quake3" "CustomUrlApplication" "$INSTDIR\ioquake3.x86.exe" - WriteRegStr SHCTX "Software\Classes\quake3" "CustomUrlArguments" '"%1"' + WriteRegStr SHCTX "Software\Classes\quake3" "CustomUrlArguments" '--uri "%1"' WriteRegStr SHCTX "Software\Classes\quake3" "URL Protocol" "" WriteRegStr SHCTX "Software\Classes\quake3\DefaultIcon" "" "$INSTDIR\ioquake3.x86.exe,0" WriteRegStr SHCTX "Software\Classes\quake3\shell\open\command" "" '"$INSTDIR\ioquake3.x86.exe" --uri "%1"' From 2bca424fcea98b30f0a6575327ee645d010f38b2 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 11 Jun 2023 12:32:13 -0500 Subject: [PATCH 12/24] nsis: Only uninstall protocol handler for this installation --- misc/nsis/ioquake3.nsi.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/nsis/ioquake3.nsi.in b/misc/nsis/ioquake3.nsi.in index fe765f0378..a4bf5cb5de 100644 --- a/misc/nsis/ioquake3.nsi.in +++ b/misc/nsis/ioquake3.nsi.in @@ -22,6 +22,8 @@ !include "MUI2.nsh" !define MUI_ICON "../quake3.ico" +!include LogicLib.nsh + ; The name of the installer Name "ioquake3" @@ -172,7 +174,11 @@ Section "Uninstall" ; Remove registry keys DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" DeleteRegKey SHCTX "Software\ioquake3" - DeleteRegKey SHCTX "Software\Classes\quake3" + + ReadRegStr $0 SHCTX "Software\Classes\quake3\shell\open\command" "" + ${If} $0 == '"$INSTDIR\ioquake3.x86.exe" --uri "%1"' + DeleteRegKey SHCTX "Software\Classes\quake3" + ${EndIf} ; Remove files and uninstaller Delete $INSTDIR\baseq3\cgamex86.dll From 10a45cbdc131a35530d89bd3cfc2a7eed74b54cc Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 6 Jul 2023 02:42:09 -0500 Subject: [PATCH 13/24] Don't list mod directories at Windows drive root The mod list on Windows would search the root of the drive if fs_basepath, fs_homepath, fs_steampath, or fs_gogpath are blank ("") (which is usually the case). The issue is in the low-level Sys_ListFiles() but it only affects the mod menu, on Windows. It cannot be abused by console commands to list system files outside of the virtual filesystem. --- If a directory at the root of the drive of the working directory contained a pk3 file, the directory was listed in the mods menu. The virtual filesystem doesn't add blank directory names to the search path so it cannot load mods from the drive root. (Unless of course you set a fs_*path cvar to "C:\".) Sys_ListFiles() with blank directory caused Windows to use "\*" for the search path and "\" prefix means root of drive. Unix opendir("") failed so nothing was listed for blank directory. Sys_ListFilteredFiles() with blank directory _and_ specifying subdirs could access any directory (on Windows and Unix-like) but no code uses this or makes it accessible. These functions are only used for initializing the virtual filesystem and listing mods. They are not accessible by anything else such as a console command. Only the mods menu, on Windows, is affected. --- code/sys/sys_unix.c | 9 +++++++++ code/sys/sys_win32.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index e0c63238d1..66b6fa17fa 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -346,6 +346,10 @@ void Sys_ListFilteredFiles( const char *basedir, char *subdirs, char *filter, ch return; } + if ( basedir[0] == '\0' ) { + return; + } + if (strlen(subdirs)) { Com_sprintf( search, sizeof(search), "%s/%s", basedir, subdirs ); } @@ -425,6 +429,11 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter return listCopy; } + if ( directory[0] == '\0' ) { + *numfiles = 0; + return NULL; + } + if ( !extension) extension = ""; diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c index e40caaa06b..d5e1c637b5 100644 --- a/code/sys/sys_win32.c +++ b/code/sys/sys_win32.c @@ -483,6 +483,10 @@ void Sys_ListFilteredFiles( const char *basedir, char *subdirs, char *filter, ch return; } + if ( basedir[0] == '\0' ) { + return; + } + if (strlen(subdirs)) { Com_sprintf( search, sizeof(search), "%s\\%s\\*", basedir, subdirs ); } @@ -584,6 +588,11 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter return listCopy; } + if ( directory[0] == '\0' ) { + *numfiles = 0; + return NULL; + } + if ( !extension) { extension = ""; } From 5327a21d5f2b120258dde8ce813abd02d273b82a Mon Sep 17 00:00:00 2001 From: AsciiWolf Date: Tue, 25 Jul 2023 14:22:06 +0200 Subject: [PATCH 14/24] Add AppStream metadata --- misc/setup/org.ioquake3.IOQuake3.metainfo.xml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 misc/setup/org.ioquake3.IOQuake3.metainfo.xml diff --git a/misc/setup/org.ioquake3.IOQuake3.metainfo.xml b/misc/setup/org.ioquake3.IOQuake3.metainfo.xml new file mode 100644 index 0000000000..8af20788fe --- /dev/null +++ b/misc/setup/org.ioquake3.IOQuake3.metainfo.xml @@ -0,0 +1,34 @@ + + + org.ioquake3.IOQuake3 + ioquake3.desktop + CC0-1.0 + GPL-2.0 + ioquake3 + Free and open-source Quake 3 based engine + +

+ ioquake3 is a free and open-source software first person shooter engine based on the Quake 3: Arena and Quake 3: Team Arena source code. +

+

+ The source code is licensed under the GPL version 2, and was first released under that license by id software on August 20th, 2005. Since then, + our dedicated team has been working hard to improve it, fixing bugs, and adding just the right new features to make the engine even better than before. +

+
+ https://ioquake3.org + https://github.com/ioquake/ioq3/issues + + + https://media.indiedb.com/images/engines/1/1/91/6l2hb3o.jpg + + + https://media.indiedb.com/images/engines/1/1/91/ioquake3.jpg + + + The ioquake Group + + intense + intense + intense + +
From e5c688b342b8e7edd88bc670c02c9050e007fcab Mon Sep 17 00:00:00 2001 From: Jack Slater Date: Mon, 7 Aug 2023 08:02:39 -0700 Subject: [PATCH 15/24] Update org.ioquake3.ioquake3.metainfo.xml fixed the case of the filename and removed the hotlinked screenshots of original quake 3. --- ...ake3.metainfo.xml => org.ioquake3.ioquake3.metainfo.xml} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename misc/setup/{org.ioquake3.IOQuake3.metainfo.xml => org.ioquake3.ioquake3.metainfo.xml} (86%) diff --git a/misc/setup/org.ioquake3.IOQuake3.metainfo.xml b/misc/setup/org.ioquake3.ioquake3.metainfo.xml similarity index 86% rename from misc/setup/org.ioquake3.IOQuake3.metainfo.xml rename to misc/setup/org.ioquake3.ioquake3.metainfo.xml index 8af20788fe..23d5756d44 100644 --- a/misc/setup/org.ioquake3.IOQuake3.metainfo.xml +++ b/misc/setup/org.ioquake3.ioquake3.metainfo.xml @@ -1,6 +1,6 @@ - org.ioquake3.IOQuake3 + org.ioquake3.ioquake3 ioquake3.desktop CC0-1.0 GPL-2.0 @@ -19,10 +19,10 @@ https://github.com/ioquake/ioq3/issues - https://media.indiedb.com/images/engines/1/1/91/6l2hb3o.jpg + TK - https://media.indiedb.com/images/engines/1/1/91/ioquake3.jpg + TK The ioquake Group From b1e6ef14254fdcb77cbe2f602c22549d3fb0eb78 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 15 Aug 2023 05:33:02 -0500 Subject: [PATCH 16/24] Improve AppStream metainfo --- misc/setup/org.ioquake3.ioquake3.metainfo.xml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/misc/setup/org.ioquake3.ioquake3.metainfo.xml b/misc/setup/org.ioquake3.ioquake3.metainfo.xml index 23d5756d44..a416464cf4 100644 --- a/misc/setup/org.ioquake3.ioquake3.metainfo.xml +++ b/misc/setup/org.ioquake3.ioquake3.metainfo.xml @@ -1,9 +1,9 @@ - + org.ioquake3.ioquake3 ioquake3.desktop CC0-1.0 - GPL-2.0 + GPL-2.0-or-later ioquake3 Free and open-source Quake 3 based engine @@ -17,18 +17,12 @@ https://ioquake3.org https://github.com/ioquake/ioq3/issues - - - TK - - - TK - - + https://github.com/ioquake/ioq3 The ioquake Group - intense + intense intense intense + intense From 78359180a447f1292787b8a8ebaa6405c6f87eed Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 17 Aug 2023 08:01:31 -0500 Subject: [PATCH 17/24] Build QVMs even if there is no QVM JIT The QVM interpreter works on all platforms. If building QVMs is an issue, that should probably be handled separate from whether there is a QVM JIT compiler. This enables building QVMs by default on Linux arm64. --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index e658f2c44c..25ba0a9fb4 100644 --- a/Makefile +++ b/Makefile @@ -1069,7 +1069,6 @@ endif ifneq ($(HAVE_VM_COMPILED),true) BASE_CFLAGS += -DNO_VM_COMPILED - BUILD_GAME_QVM=0 endif TARGETS = From a81df34905fab89ad478237c269fc26bb1262489 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 18 Nov 2023 19:10:53 -0600 Subject: [PATCH 18/24] OpenGL2: Fix border for cg_viewsize using HDR/FB-MSAA w/postProcess If using renderFBO (r_hdr 1 or r_ext_framebuffer_multisample > 0) and r_postProcess 1, the viewport border (cg_viewsize < 100) which is drawn before the world scene was drawn to the renderFBO but not copied to the default framebuffer. Now 2D before the world scene is drawn to the default framebuffer directly for r_postProcess 1 like 2D drawn after the world scene. --- code/renderergl2/tr_backend.c | 24 +++++------------------- code/renderergl2/tr_local.h | 1 - 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/code/renderergl2/tr_backend.c b/code/renderergl2/tr_backend.c index ba3e2abb9b..12783b4459 100644 --- a/code/renderergl2/tr_backend.c +++ b/code/renderergl2/tr_backend.c @@ -342,9 +342,7 @@ void RB_BeginDrawingView (void) { { FBO_t *fbo = backEnd.viewParms.targetFbo; - // FIXME: HUGE HACK: render to the screen fbo if we've already postprocessed the frame and aren't drawing more world - // drawing more world check is in case of double renders, such as skyportals - if (fbo == NULL && !(backEnd.framePostProcessed && (backEnd.refdef.rdflags & RDF_NOWORLDMODEL))) + if (fbo == NULL && (!r_postProcess->integer || !(backEnd.refdef.rdflags & RDF_NOWORLDMODEL))) fbo = tr.renderFbo; if (tr.renderCubeFbo && fbo == tr.renderCubeFbo) @@ -708,10 +706,9 @@ void RE_StretchRaw (int x, int y, int w, int h, int cols, int rows, const byte * ri.Printf( PRINT_ALL, "qglTexSubImage2D %i, %i: %i msec\n", cols, rows, end - start ); } - // FIXME: HUGE hack if (glRefConfig.framebufferObject) { - FBO_Bind(backEnd.framePostProcessed ? NULL : tr.renderFbo); + FBO_Bind(r_postProcess->integer ? NULL : tr.renderFbo); } RB_SetGL2D(); @@ -795,9 +792,8 @@ const void *RB_StretchPic ( const void *data ) { cmd = (const stretchPicCommand_t *)data; - // FIXME: HUGE hack if (glRefConfig.framebufferObject) - FBO_Bind(backEnd.framePostProcessed ? NULL : tr.renderFbo); + FBO_Bind(r_postProcess->integer ? NULL : tr.renderFbo); RB_SetGL2D(); @@ -1313,14 +1309,7 @@ const void *RB_ClearDepth(const void *data) if (glRefConfig.framebufferObject) { - if (!tr.renderFbo || backEnd.framePostProcessed) - { - FBO_Bind(NULL); - } - else - { - FBO_Bind(tr.renderFbo); - } + FBO_Bind(tr.renderFbo); } qglClear(GL_DEPTH_BUFFER_BIT); @@ -1378,7 +1367,7 @@ const void *RB_SwapBuffers( const void *data ) { if (glRefConfig.framebufferObject) { - if (!backEnd.framePostProcessed) + if (!r_postProcess->integer) { if (tr.msaaResolveFbo && r_hdr->integer) { @@ -1401,7 +1390,6 @@ const void *RB_SwapBuffers( const void *data ) { GLimp_EndFrame(); - backEnd.framePostProcessed = qfalse; backEnd.projection2D = qfalse; return (const void *)(cmd + 1); @@ -1655,8 +1643,6 @@ const void *RB_PostProcess(const void *data) } #endif - backEnd.framePostProcessed = qtrue; - return (const void *)(cmd + 1); } diff --git a/code/renderergl2/tr_local.h b/code/renderergl2/tr_local.h index 668dbbdd34..adbb3d597f 100644 --- a/code/renderergl2/tr_local.h +++ b/code/renderergl2/tr_local.h @@ -1472,7 +1472,6 @@ typedef struct { FBO_t *last2DFBO; qboolean colorMask[4]; - qboolean framePostProcessed; qboolean depthFill; } backEndState_t; From f7c12a1cf77335145800507b1cc50b0957e9e381 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 18 Nov 2023 19:31:09 -0600 Subject: [PATCH 19/24] OpenGL2: Fix r_clear when using HDR/FB-MSAA --- code/renderergl2/tr_backend.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/renderergl2/tr_backend.c b/code/renderergl2/tr_backend.c index 12783b4459..6b61217b51 100644 --- a/code/renderergl2/tr_backend.c +++ b/code/renderergl2/tr_backend.c @@ -1197,6 +1197,13 @@ const void *RB_DrawBuffer( const void *data ) { if ( r_clear->integer ) { qglClearColor( 1, 0, 0.5, 1 ); qglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + + if (glRefConfig.framebufferObject && tr.renderFbo) { + FBO_Bind(tr.renderFbo); + + qglClearColor( 1, 0, 0.5, 1 ); + qglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + } } return (const void *)(cmd + 1); From 03bc4eb810f1531704d44c2d918a6031b1d73ba2 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 20 Nov 2023 17:16:32 -0600 Subject: [PATCH 20/24] OpenGL2: Fix FB-MSAA on AMD Windows driver Fix r_ext_framebuffer_multisample > 0 causing the screen to always be solid black when using AMD Windows driver. The AMD Windows driver requires binding renderbuffer for it to be valid. The OpenGL2 renderer uses GL_EXT_direct_state_access that shouldn't require this. It would be required for Core/GL_ARB_direct_state_access. It seems like a driver bug. --- code/renderergl2/tr_fbo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/renderergl2/tr_fbo.c b/code/renderergl2/tr_fbo.c index 26f50c3f98..b0a9478f9c 100644 --- a/code/renderergl2/tr_fbo.c +++ b/code/renderergl2/tr_fbo.c @@ -170,9 +170,13 @@ void FBO_CreateBuffer(FBO_t *fbo, int format, int index, int multisample) } absent = *pRenderBuffer == 0; - if (absent) + if (absent) { qglGenRenderbuffers(1, pRenderBuffer); + // workaround AMD Windows driver requiring bind to create renderbuffer + GL_BindRenderbuffer(*pRenderBuffer); + } + if (multisample && glRefConfig.framebufferMultisample) qglNamedRenderbufferStorageMultisampleEXT(*pRenderBuffer, multisample, format, fbo->width, fbo->height); else From 972635ea5a3d1057d9a958c2cb1815dff05ab33b Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 22 Nov 2023 19:38:50 -0600 Subject: [PATCH 21/24] OpenGL2: Fix updating the loading screen with r_cubeMapping 1 Generating cubemaps set backEnd.viewParms.isMirror = qtrue while the loading screen said 'loading... maps/q3dm1.bsp' and it just stayed like that until done loading (no additional messages or item icons) because all 2D drawing was culled due to flipped culling for isMirror. This was noticed because a recent commit fixed RB_ShowImages() to be drawn to the screen instead of draw into renderFbo and never blit to the screen. Now the loading screen draws over it as expected. Mentioned commit: a81df34905fab89ad478237c269fc26bb1262489 "OpenGL2: Fix border for cg_viewsize using HDR/FB-MSAA w/postProcess" --- code/renderergl2/tr_backend.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/renderergl2/tr_backend.c b/code/renderergl2/tr_backend.c index 6b61217b51..7387101bdf 100644 --- a/code/renderergl2/tr_backend.c +++ b/code/renderergl2/tr_backend.c @@ -1169,6 +1169,13 @@ const void *RB_DrawSurfs( const void *data ) { qglGenerateTextureMipmapEXT(cubemap->image->texnum, GL_TEXTURE_CUBE_MAP); } + // FIXME? backEnd.viewParms doesn't get properly initialized for 2D drawing. + // r_cubeMapping 1 generates cubemaps with R_RenderCubemapSide() + // and sets isMirror = qtrue. Clear it here to prevent it from leaking + // to 2D drawing and causing the loading screen to be culled. + backEnd.viewParms.isMirror = qfalse; + backEnd.viewParms.flags = 0; + return (const void *)(cmd + 1); } From ae0878ca618a737d7f8e843e8f4867bd34712cbe Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 20 Dec 2023 23:12:56 -0600 Subject: [PATCH 22/24] OpenGL2: Fix q3map2 lightstyles effects Fixes World of Padman wop_trashmap. For r_mergeLightmaps 1 - Fix tcMod transform on "map $lightmap" stages - Fix external lightmap image texcoords if shader also has an internal lightmap For r_sunlightMode 1 - Fix "tcGen lightmap" stages with blendFunc GL_SRC_ALPHA GL_ONE being converted to white image + modulate lightmap and drawing incorrectly --- code/renderergl2/tr_bsp.c | 1 + code/renderergl2/tr_shader.c | 107 ++++++++++++++++++++++++++++++++--- 2 files changed, 99 insertions(+), 9 deletions(-) diff --git a/code/renderergl2/tr_bsp.c b/code/renderergl2/tr_bsp.c index ad5fe3a30d..b316351e09 100644 --- a/code/renderergl2/tr_bsp.c +++ b/code/renderergl2/tr_bsp.c @@ -497,6 +497,7 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) { } +// If FatPackU() or FatPackV() changes, update FixFatLightmapTexCoords() static float FatPackU(float input, int lightmapnum) { if (lightmapnum < 0) diff --git a/code/renderergl2/tr_shader.c b/code/renderergl2/tr_shader.c index 0cd78a78e3..c899363e61 100644 --- a/code/renderergl2/tr_shader.c +++ b/code/renderergl2/tr_shader.c @@ -2580,13 +2580,15 @@ static int CollapseStagesToGLSL(void) numStages++; } - // convert any remaining lightmap stages to a lighting pass with a white texture + // convert any remaining lightmap stages with no blending or blendfunc filter + // to a lighting pass with a white texture // only do this with r_sunlightMode non-zero, as it's only for correct shadows. if (r_sunlightMode->integer && shader.numDeforms == 0) { for (i = 0; i < MAX_SHADER_STAGES; i++) { shaderStage_t *pStage = &stages[i]; + int blendBits; if (!pStage->active) continue; @@ -2594,15 +2596,23 @@ static int CollapseStagesToGLSL(void) if (pStage->adjustColorsForFog) continue; - if (pStage->bundle[TB_DIFFUSEMAP].tcGen == TCGEN_LIGHTMAP) - { - pStage->glslShaderGroup = tr.lightallShader; - pStage->glslShaderIndex = LIGHTDEF_USE_LIGHTMAP; - pStage->bundle[TB_LIGHTMAP] = pStage->bundle[TB_DIFFUSEMAP]; - pStage->bundle[TB_DIFFUSEMAP].image[0] = tr.whiteImage; - pStage->bundle[TB_DIFFUSEMAP].isLightmap = qfalse; - pStage->bundle[TB_DIFFUSEMAP].tcGen = TCGEN_TEXTURE; + if (pStage->bundle[TB_DIFFUSEMAP].tcGen != TCGEN_LIGHTMAP) + continue; + + blendBits = pStage->stateBits & (GLS_DSTBLEND_BITS | GLS_SRCBLEND_BITS); + + if (blendBits != 0 && + blendBits != (GLS_DSTBLEND_SRC_COLOR | GLS_SRCBLEND_ZERO) && + blendBits != (GLS_DSTBLEND_ZERO | GLS_SRCBLEND_DST_COLOR)) { + continue; } + + pStage->glslShaderGroup = tr.lightallShader; + pStage->glslShaderIndex = LIGHTDEF_USE_LIGHTMAP; + pStage->bundle[TB_LIGHTMAP] = pStage->bundle[TB_DIFFUSEMAP]; + pStage->bundle[TB_DIFFUSEMAP].image[0] = tr.whiteImage; + pStage->bundle[TB_DIFFUSEMAP].isLightmap = qfalse; + pStage->bundle[TB_DIFFUSEMAP].tcGen = TCGEN_TEXTURE; } } @@ -2890,6 +2900,83 @@ static void VertexLightingCollapse( void ) { } } +/* +================= +FixFatLightmapTexCoords + +Handle edge cases of altering lightmap texcoords for fat lightmap atlas +================= +*/ +static void FixFatLightmapTexCoords(void) +{ + texModInfo_t *tmi; + int lightmapnum; + int stage; + int size; + int i; + + if ( !r_mergeLightmaps->integer || tr.fatLightmapCols <= 0) { + return; + } + + if ( shader.lightmapIndex < 0 ) { + // no internal lightmap, texcoords were not modified + return; + } + + lightmapnum = shader.lightmapIndex; + + if (tr.worldDeluxeMapping) + lightmapnum >>= 1; + + lightmapnum %= (tr.fatLightmapCols * tr.fatLightmapRows); + + for ( stage = 0; stage < MAX_SHADER_STAGES; stage++ ) { + shaderStage_t *pStage = &stages[stage]; + + if ( !pStage->active ) { + break; + } + + // fix tcMod transform for internal lightmaps, it may be used by q3map2 lightstyles + if ( pStage->bundle[0].isLightmap ) { + for ( i = 0; i < pStage->bundle[0].numTexMods; i++ ) { + tmi = &pStage->bundle[0].texMods[i]; + + if ( tmi->type == TMOD_TRANSFORM ) { + tmi->translate[0] /= (float)tr.fatLightmapCols; + tmi->translate[1] /= (float)tr.fatLightmapRows; + } + } + } + // add a tcMod transform for external lightmaps to convert back to the original texcoords + else if ( pStage->bundle[0].tcGen == TCGEN_LIGHTMAP ) { + if ( pStage->bundle[0].numTexMods == TR_MAX_TEXMODS ) { + ri.Printf( PRINT_DEVELOPER, "WARNING: too many tcmods to fix external lightmap texcoords for r_mergeLightmaps in shader '%s'", shader.name ); + } else { + size = pStage->bundle[0].numTexMods * sizeof( texModInfo_t ); + + if ( size ) { + memmove( &pStage->bundle[0].texMods[1], &pStage->bundle[0].texMods[0], size ); + } + + tmi = &pStage->bundle[0].texMods[0]; + pStage->bundle[0].numTexMods++; + + tmi->matrix[0][0] = tr.fatLightmapCols; + tmi->matrix[0][1] = 0; + tmi->matrix[1][0] = 0; + tmi->matrix[1][1] = tr.fatLightmapRows; + + tmi->translate[0] = -(lightmapnum % tr.fatLightmapCols); + tmi->translate[1] = -(lightmapnum / tr.fatLightmapCols); + + tmi->type = TMOD_TRANSFORM; + } + } + } +} + /* =============== InitShader @@ -3081,6 +3168,8 @@ static shader_t *FinishShader( void ) { hasLightmapStage = qfalse; } + FixFatLightmapTexCoords(); + // // look for multitexture potential // From b07ff2a3cacf64dcd774499ec63e4b59c6bd849e Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 22 Dec 2023 22:00:57 -0600 Subject: [PATCH 23/24] OpenGL2: Fix parsing q3gl2_sun without two additional tokens If mapLightScale and shadowScale weren't included at the end of q3gl2_sun, the next shader line was skipped by SkipRestOfLine(). COM_ParseExt() with allowLineBreaks=qfalse, returns "" once and then goes to the next line anyway. (Doesn't work well multiple "optional" tokens. It looks like a vanilla bug.) --- code/renderergl2/tr_shader.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/code/renderergl2/tr_shader.c b/code/renderergl2/tr_shader.c index c899363e61..4b9fa991b8 100644 --- a/code/renderergl2/tr_shader.c +++ b/code/renderergl2/tr_shader.c @@ -1841,12 +1841,17 @@ static qboolean ParseShader( char **text ) tr.sunShadowScale = atof(token); // parse twice, since older shaders may include mapLightScale before sunShadowScale - token = COM_ParseExt( text, qfalse ); - if (token[0]) - tr.sunShadowScale = atof(token); + if (token[0]) { + token = COM_ParseExt( text, qfalse ); + if (token[0]) { + tr.sunShadowScale = atof(token); + } + } } - SkipRestOfLine( text ); + if (token[0]) { + SkipRestOfLine( text ); + } continue; } // tonemap parms From 5ede35d8ddf22a99afa7f487deebf52d4f986cde Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 26 Dec 2023 07:24:06 -0600 Subject: [PATCH 24/24] Fix building QVMs on Linux with Windows line endings On non-Windows, compiling QVM tools failed if dagcheck.md had CRLF line endings and compiling QVMs failed if game source had CRLF line endings. Also made Windows open the files as binary (no automatic CRLF to LF) so it behaves the same as on non-Windows. --- code/tools/lcc/cpp/lex.c | 20 ++++++++++++++++++++ code/tools/lcc/cpp/unix.c | 6 ++++++ code/tools/lcc/lburg/gram.c | 22 ++++++++++++++++++++++ code/tools/lcc/lburg/gram.y | 22 ++++++++++++++++++++++ code/tools/lcc/lburg/lburg.c | 4 ++-- 5 files changed, 72 insertions(+), 2 deletions(-) diff --git a/code/tools/lcc/cpp/lex.c b/code/tools/lcc/cpp/lex.c index 8030354efc..66092e1b9d 100644 --- a/code/tools/lcc/cpp/lex.c +++ b/code/tools/lcc/cpp/lex.c @@ -511,6 +511,25 @@ foldline(Source *s) return 0; } +// This doesn't have proper tracking across read() to only remove \r from \r\n sequence. +// The lexer doesn't correctly handle standalone \r anyway though. +int +crlf_to_lf(unsigned char *buf, int n) { + int i, count; + + count = 0; + + for (i = 0; i < n; i++) { + if (buf[i] == '\r') { + continue; + } + + buf[count++] = buf[i]; + } + + return count; +} + int fillbuf(Source *s) { @@ -521,6 +540,7 @@ fillbuf(Source *s) error(FATAL, "Input buffer overflow"); if (s->fd<0 || (n=read(s->fd, (char *)s->inl, INS/8)) <= 0) n = 0; + n = crlf_to_lf(s->inl, n); if ((*s->inp&0xff) == EOB) /* sentinel character appears in input */ *s->inp = EOFC; s->inl += n; diff --git a/code/tools/lcc/cpp/unix.c b/code/tools/lcc/cpp/unix.c index bac841d8bd..56f1fff5c1 100644 --- a/code/tools/lcc/cpp/unix.c +++ b/code/tools/lcc/cpp/unix.c @@ -65,6 +65,9 @@ setup(int argc, char **argv) fp = (char*)newstring((uchar*)argv[optind], strlen(argv[optind]), 0); if ((fd = open(fp, 0)) <= 0) error(FATAL, "Can't open input file %s", fp); +#ifdef WIN32 + _setmode(fd, _O_BINARY); +#endif } if (optind+1