From 893b14b8b49ebab05c6dfbbdd50a693752692158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Tue, 16 Jul 2024 10:42:53 +0200 Subject: [PATCH 01/23] Update SourceDEFUN.sln --- SourceDEFUN.sln | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceDEFUN.sln b/SourceDEFUN.sln index fbd4dcc..bc6be6a 100644 --- a/SourceDEFUN.sln +++ b/SourceDEFUN.sln @@ -1,5 +1,5 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 +Microsoft Visual Studio Solution File, Format Version 17.00 # Visual Studio 2022 # WARNING TO WINDOWS USERS: This file might not be up to date since my [Sectonidse] primary OS is Linux. Just in case you know. Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "game\client\swarm_skeleton_client.vcxproj", "{A26C0361-6B09-9E3D-5194-C9CB89243710}" From 79e07d760692f33e1ec6f15f0c6b05283c28d49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Tue, 16 Jul 2024 10:44:52 +0200 Subject: [PATCH 02/23] Update SourceDEFUN.sln --- SourceDEFUN.sln | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceDEFUN.sln b/SourceDEFUN.sln index bc6be6a..6f19e24 100644 --- a/SourceDEFUN.sln +++ b/SourceDEFUN.sln @@ -1,5 +1,5 @@  -Microsoft Visual Studio Solution File, Format Version 17.00 +Microsoft Visual Studio Solution File, Format Version 14.00 # Visual Studio 2022 # WARNING TO WINDOWS USERS: This file might not be up to date since my [Sectonidse] primary OS is Linux. Just in case you know. Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "game\client\swarm_skeleton_client.vcxproj", "{A26C0361-6B09-9E3D-5194-C9CB89243710}" From a350b1a3e2b52b994748446c86d252cde13daf65 Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:07:24 +0300 Subject: [PATCH 03/23] Create activities.json Don't forget to make the system for it and finish the activities dictionary --- configs/activities.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 configs/activities.json diff --git a/configs/activities.json b/configs/activities.json new file mode 100644 index 0000000..ecf5bba --- /dev/null +++ b/configs/activities.json @@ -0,0 +1,34 @@ +1: [ + "This is Activities file! It has all the activities for NPC/Playermodels! ", + "But how to work with it you say? Here's how: ", + " 1. Every named key dictionary is a prefix for some activity. ", + " 1.1. Do you see dictionary ACT with array RUN and value AIM? ", + " 1.2. Well if we combine the path, we get: 'ACT_RUN_AIM!' ", + " 1.3. Then this 'ACT_RUN_AIM' gets registered by ai_activity.cpp [we'll call it reader] ", + " 2. Why is there a 0 in keys? ", + " 2.1. It's there for a reason. It tells the reader to not expect any more dictionaties. ", + " 2.2. So if i pick FLY from ACT, it'll be ACT_FLY! ", + " 3. Why is there a space sometimes in keys? ", + " 3.1. It tells the compiler to not add underscore (_) to activity name. ", + " 3.2. Example: ACT > DIE > BACKWARD = ACT_DIEBACKWARD ", + " 4. Why is there a 0 in first value of array? ", + " 4.1. It tells the reader to use the current path as an activity. ", + " 4.2. Example: ACT > WALK > 0 = ACT_WALK ", + " 5. What does number 1 mean? ", + " 5.1. It means 'stop reading. altogether'. ", + " 5.2. So if there array with key '1', then the reader will just ignore it. ", + " 5.3. That means you can make pseudo-comments here, like the one you're reading right now! ", + " 5.4. Example: ACT > 1 = [skip to next key/parent dictionary] ", + "-----------------------------------------------------------------------------------------------", + "Okay smart guy, well why won't you design a simpler system? ", + " A: I mean don't you like it? Would you like typing a lot of ACT_WEAPON_*_*? I would not. " +], +"ACT": { + 0: ["INVALID", "RESET", "IDLE", "TRANSITION", "SCRIPT_CUSTOM_MOVE", "FLY", "HOVER", "GLIDE", "SWIM", "JUMP", "HOP", "LEAP", "LAND", "SHIPLADDER_UP", "SHIPLADDER_DOWN", "STRAFE_LEFT", "STRAFE_RIGHT", "ROLL_LEFT", "ROLL_RIGHT", "TURN_LEFT", "TURN_RIGHT", "CROUCH", "CROUCHIDLE", "STAND", "USE", "ALIEN_BURROW_IDLE", "ALIEN_BURROW_OUT"], + "RUN": [0, "AIM", "CROUCH", "CROUCH_AIM", "PROTECTED"], + "WALK": [0, "AIM", "CROUCH", "CROUCH_AIM"], + "COVER": [0, "MED", "LOW"], + "RANGE": ["ATTCK1", "ATTACK2", "ATTCK1_LOW", "ATTACK2_LOW"], + "DIE ": ["SIMPLE", "BACKWARD", "FORWARD", "VIOLENT", "RAGDOLL"], + "CLIMB": ["UP", "DOWN", "DISMOUNT"] +} From 5040e08e7c1ca663822c50b4a505407649aae81c Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:09:00 +0300 Subject: [PATCH 04/23] fix --- configs/activities.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/activities.json b/configs/activities.json index ecf5bba..ec01c4d 100644 --- a/configs/activities.json +++ b/configs/activities.json @@ -1,4 +1,4 @@ -1: [ +"1": [ "This is Activities file! It has all the activities for NPC/Playermodels! ", "But how to work with it you say? Here's how: ", " 1. Every named key dictionary is a prefix for some activity. ", @@ -24,7 +24,7 @@ " A: I mean don't you like it? Would you like typing a lot of ACT_WEAPON_*_*? I would not. " ], "ACT": { - 0: ["INVALID", "RESET", "IDLE", "TRANSITION", "SCRIPT_CUSTOM_MOVE", "FLY", "HOVER", "GLIDE", "SWIM", "JUMP", "HOP", "LEAP", "LAND", "SHIPLADDER_UP", "SHIPLADDER_DOWN", "STRAFE_LEFT", "STRAFE_RIGHT", "ROLL_LEFT", "ROLL_RIGHT", "TURN_LEFT", "TURN_RIGHT", "CROUCH", "CROUCHIDLE", "STAND", "USE", "ALIEN_BURROW_IDLE", "ALIEN_BURROW_OUT"], + "0": ["INVALID", "RESET", "IDLE", "TRANSITION", "SCRIPT_CUSTOM_MOVE", "FLY", "HOVER", "GLIDE", "SWIM", "JUMP", "HOP", "LEAP", "LAND", "SHIPLADDER_UP", "SHIPLADDER_DOWN", "STRAFE_LEFT", "STRAFE_RIGHT", "ROLL_LEFT", "ROLL_RIGHT", "TURN_LEFT", "TURN_RIGHT", "CROUCH", "CROUCHIDLE", "STAND", "USE", "ALIEN_BURROW_IDLE", "ALIEN_BURROW_OUT"], "RUN": [0, "AIM", "CROUCH", "CROUCH_AIM", "PROTECTED"], "WALK": [0, "AIM", "CROUCH", "CROUCH_AIM"], "COVER": [0, "MED", "LOW"], From f6c0ad298ffac6b4f654dfc7387e64722bc7d4a8 Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:26:14 +0300 Subject: [PATCH 05/23] Update and fix activities.json --- configs/activities.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/activities.json b/configs/activities.json index ec01c4d..b653f57 100644 --- a/configs/activities.json +++ b/configs/activities.json @@ -1,3 +1,4 @@ +{ "1": [ "This is Activities file! It has all the activities for NPC/Playermodels! ", "But how to work with it you say? Here's how: ", @@ -28,7 +29,9 @@ "RUN": [0, "AIM", "CROUCH", "CROUCH_AIM", "PROTECTED"], "WALK": [0, "AIM", "CROUCH", "CROUCH_AIM"], "COVER": [0, "MED", "LOW"], - "RANGE": ["ATTCK1", "ATTACK2", "ATTCK1_LOW", "ATTACK2_LOW"], + "RANGE": ["ATTACK1", "ATTACK2", "ATTACK1_LOW", "ATTACK2_LOW"], "DIE ": ["SIMPLE", "BACKWARD", "FORWARD", "VIOLENT", "RAGDOLL"], "CLIMB": ["UP", "DOWN", "DISMOUNT"] +}, +"1": "Needs finishing!" } From 93d253592c0c2eb6f14b759f9051339bfb83395c Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:31:09 +0300 Subject: [PATCH 06/23] New License! No more code comments about modifications! --- LICENSE | 222 ++++++-------------------------------------------------- 1 file changed, 21 insertions(+), 201 deletions(-) diff --git a/LICENSE b/LICENSE index 5c304d1..f50e2c4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,21 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +MIT License + +Copyright (c) 2024 Secton + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 49ba4c7441ed57f1dbe9a562f59f7731d82210ee Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:49:33 +0300 Subject: [PATCH 07/23] i swear if that will fix the shader compilation --- materialsystem/swarmshaders/buildshaders.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/materialsystem/swarmshaders/buildshaders.bat b/materialsystem/swarmshaders/buildshaders.bat index f50fae1..be6680b 100644 --- a/materialsystem/swarmshaders/buildshaders.bat +++ b/materialsystem/swarmshaders/buildshaders.bat @@ -125,7 +125,7 @@ if exist vcslist.txt del /f /q vcslist.txt REM **************** REM Generate a makefile for the shader project REM **************** -perl %SrcDirBase%/devtools/bin/updateshaders.pl" -source . +perl %SrcDirBase%/devtools/bin/updateshaders.pl -source . REM **************** From c1df6df7cf9c8da2fb6d9410f96a2d71f8f38d7e Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:56:56 +0300 Subject: [PATCH 08/23] Update compile.yml --- .github/workflows/compile.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index fdb4e37..cf696e5 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -37,8 +37,11 @@ jobs: # working-directory: ${{env.GITHUB_WORKSPACE}} # run: nuget restore ${{env.SOLUTION_FILE_PATH}} - - name: Install Strawberry Perl for Shaders compilation - run: choco install strawberryperl + #- name: Install Strawberry Perl for Shaders compilation + # run: choco install strawberryperl + + - name: Install Perl Dependencies + run: cpan String::CRC32 #- name: Build (Legacy VS2010 Version) # working-directory: ${{env.GITHUB_WORKSPACE}} @@ -51,7 +54,6 @@ jobs: working-directory: ${{env.GITHUB_WORKSPACE}} run: | cd ./materialsystem/swarmshaders/ - dir ../../devtools/bin/ ./buildshaders.bat deferred_shaders - name: Build (VS2022 Version) From 7945b3880883f7cd5fcb0aebace87e8486fd778d Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:04:59 +0300 Subject: [PATCH 09/23] Alright, let's try this --- .github/workflows/compile.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index cf696e5..be170db 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -37,11 +37,13 @@ jobs: # working-directory: ${{env.GITHUB_WORKSPACE}} # run: nuget restore ${{env.SOLUTION_FILE_PATH}} + # ENABLE THIS ON FIRST TIME SETUP #- name: Install Strawberry Perl for Shaders compilation # run: choco install strawberryperl - - name: Install Perl Dependencies - run: cpan String::CRC32 + # ENABLE THIS ON FIRST TIME SETUP + #- name: Install Perl Dependencies + # run: cpan String::CRC32 #- name: Build (Legacy VS2010 Version) # working-directory: ${{env.GITHUB_WORKSPACE}} @@ -54,7 +56,7 @@ jobs: working-directory: ${{env.GITHUB_WORKSPACE}} run: | cd ./materialsystem/swarmshaders/ - ./buildshaders.bat deferred_shaders + ./buildshaders.bat game_shader_generic_swarm - name: Build (VS2022 Version) working-directory: ${{env.GITHUB_WORKSPACE}} From 4e2b24b03d7d02c0478062dbd2950209c5018880 Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:06:50 +0300 Subject: [PATCH 10/23] Update compile.yml --- .github/workflows/compile.yml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index be170db..17bac03 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -33,24 +33,13 @@ jobs: - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1.0.2 - #- name: Restore NuGet packages - # working-directory: ${{env.GITHUB_WORKSPACE}} - # run: nuget restore ${{env.SOLUTION_FILE_PATH}} - # ENABLE THIS ON FIRST TIME SETUP #- name: Install Strawberry Perl for Shaders compilation # run: choco install strawberryperl - # ENABLE THIS ON FIRST TIME SETUP - #- name: Install Perl Dependencies - # run: cpan String::CRC32 + - name: Install Shader Dependencies + run: cpan String::CRC32 - #- name: Build (Legacy VS2010 Version) - # working-directory: ${{env.GITHUB_WORKSPACE}} - # # Add additional options to the MSBuild command line here (like platform or verbosity level). - # # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - # run: | - # & "C:/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe" /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} - name: Compile Shaders working-directory: ${{env.GITHUB_WORKSPACE}} @@ -58,7 +47,7 @@ jobs: cd ./materialsystem/swarmshaders/ ./buildshaders.bat game_shader_generic_swarm - - name: Build (VS2022 Version) + - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference From c2289369c2cdbf41511b78eadcdbbd796c6d3da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Tue, 16 Jul 2024 16:18:35 +0200 Subject: [PATCH 11/23] revert all changes --- .github/workflows/compile.yml | 21 +- .gitignore | 4 - CMakeLists.txt | 259 ------------------- LICENSE | 222 ++-------------- SourceDEFUN.sln | 2 +- configs/activities.json | 37 +++ materialsystem/swarmshaders/buildshaders.bat | 2 +- 7 files changed, 67 insertions(+), 480 deletions(-) delete mode 100644 CMakeLists.txt create mode 100644 configs/activities.json diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index fdb4e37..17bac03 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -33,28 +33,21 @@ jobs: - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1.0.2 - #- name: Restore NuGet packages - # working-directory: ${{env.GITHUB_WORKSPACE}} - # run: nuget restore ${{env.SOLUTION_FILE_PATH}} + # ENABLE THIS ON FIRST TIME SETUP + #- name: Install Strawberry Perl for Shaders compilation + # run: choco install strawberryperl - - name: Install Strawberry Perl for Shaders compilation - run: choco install strawberryperl + - name: Install Shader Dependencies + run: cpan String::CRC32 - #- name: Build (Legacy VS2010 Version) - # working-directory: ${{env.GITHUB_WORKSPACE}} - # # Add additional options to the MSBuild command line here (like platform or verbosity level). - # # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - # run: | - # & "C:/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe" /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} - name: Compile Shaders working-directory: ${{env.GITHUB_WORKSPACE}} run: | cd ./materialsystem/swarmshaders/ - dir ../../devtools/bin/ - ./buildshaders.bat deferred_shaders + ./buildshaders.bat game_shader_generic_swarm - - name: Build (VS2022 Version) + - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference diff --git a/.gitignore b/.gitignore index 5fefd59..23c8d77 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,3 @@ materialsystem/swarmshaders/Release_dx9/ ipch/ materialsystem/shaderlib/Debug/ materialsystem/shaderlib/Release/ -*.vsidx -/.vs -/.vs/SourceDEFUN/v17/Solution.VC.db-shm -/.vs/SourceDEFUN/v17/Browse.VC.db diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index b752d9f..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,259 +0,0 @@ -# oh yes sir, the Linux support is gonna be here soon - -# TODO: -# WASNT TESTED YET -# MORE CMAKE THINGIES (line 81-85) -# CHECK IF IT WILL EVEN COMPILE - -cmake_minimum_required(VERSION 3.18 FATAL_ERROR) - -set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE) - -if (APPLE) - # Secton: UNTESTED - # NOTE: You will need to pass this as a command line parameter for the Xcode generator -DCMAKE_OSX_ARCHITECTURES=i386 - # Also note only Xcode 9.4.1 and earlier support i386 - set(CMAKE_OSX_ARCHITECTURES i386) - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9) - set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym") -endif() - -project(SourceDEFUN) - -# For some reason, checking if CMAKE_BUILD_TYPE is defined is unreliable -# So simply check if it's empty instead -if ("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE) -endif() - -# Modern VS versions default to C++14 anyway, so make it consistent -# But in the future we may want so support C++20 -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_VISIBILITY_PRESET hidden) -set_property(GLOBAL PROPERTY USE_FOLDERS ON) - -# This is a way to emulate groups.vgc -set(BUILD_GROUP "game" CACHE STRING "Build Group") - -# For the CMake GUIs that support a combobox list -set_property(CACHE BUILD_GROUP PROPERTY STRINGS - "everything" - "game" - "shaders" -) - -# Which game are we building? -set(BUILD_GAME "hl2" CACHE STRING "Build Game") - -set_property( - CACHE BUILD_GAME PROPERTY STRINGS - "defunmod" -) - -set(SRCDIR "${CMAKE_CURRENT_LIST_DIR}") -set(GAMEDIR "${CMAKE_CURRENT_LIST_DIR}/game") -# It's a commented code don't highlight ok? | set(THIRDPARTYDIR "${SRCDIR}/thirdparty") - -# Compile options that are populated and set for each target depending on their type -set(ADDITIONAL_COMPILE_OPTIONS_EXE) -set(ADDITIONAL_COMPILE_OPTIONS_DLL) -set(ADDITIONAL_COMPILE_OPTIONS_LIB) - -# Libraries that are linked to for each target depending on their type -set(ADDITIONAL_LINK_LIBRARIES_EXE) -set(ADDITIONAL_LINK_LIBRARIES_DLL) - -# Linker options that are populated and set for each target depending on their type -set(ADDITIONAL_LINK_OPTIONS_EXE) -set(ADDITIONAL_LINK_OPTIONS_DLL) -set(ADDITIONAL_LINK_OPTIONS_LIB) - -# Sources that are added to each target depending on their type -set(ADDITIONAL_SOURCES_EXE) -set(ADDITIONAL_SOURCES_DLL) -set(ADDITIONAL_SOURCES_LIB) - -# Compile definitions that are added to each target depending on their type -set(ADDITIONAL_COMPILE_DEFINITIONS_EXE) -set(ADDITIONAL_COMPILE_DEFINITIONS_DLL) -set(ADDITIONAL_COMPILE_DEFINITIONS_LIB) - -include("_cmake_scripts/pch_skip.cmake") -include("_cmake_scripts/platform_dirs.cmake") -include("_cmake_scripts/base.cmake") -include("_cmake_scripts/video_base.cmake") -include("_cmake_scripts/postbuild.cmake") - -set(LIBPUBLIC "${SRCDIR}/lib/public${PLATSUBDIR}") -set(LIBCOMMON "${SRCDIR}/lib/common${PLATSUBDIR}") - -link_directories( - ${LIBPUBLIC} - ${LIBCOMMON} -) - -include_directories( - "${SRCDIR}/common" - "${SRCDIR}/public" - "${SRCDIR}/public/tier0" - "${SRCDIR}/public/tier1" - "${SRCDIR}/public/tier2" # Not sure if necessary - "${SRCDIR}/public/tier3" # Ditto -) - -add_compile_definitions($<$:DEBUG> $<$:_DEBUG>) -add_compile_definitions($<$:NDEBUG>) - -if (${IS_WINDOWS}) - include("_cmake_scripts/windows_base.cmake") -elseif (${IS_LINUX} OR ${IS_OSX}) - include("_cmake_scripts/posix_base.cmake") -endif() - -include("_cmake_scripts/groups.cmake") - -# Store all targets in a variable name ( See: https://stackoverflow.com/questions/37434946/how-do-i-iterate-over-all-cmake-targets-programmatically/62311397#62311397 ) -function(get_all_targets var) - set(targets) - get_all_targets_recursive(targets ${CMAKE_CURRENT_SOURCE_DIR}) - set(${var} ${targets} PARENT_SCOPE) -endfunction() - -macro(get_all_targets_recursive targets dir) - get_property(subdirectories DIRECTORY ${dir} PROPERTY SUBDIRECTORIES) - foreach(subdir ${subdirectories}) - get_all_targets_recursive(${targets} ${subdir}) - endforeach() - - get_property(current_targets DIRECTORY ${dir} PROPERTY BUILDSYSTEM_TARGETS) - list(APPEND ${targets} ${current_targets}) -endmacro() - -get_all_targets(ALL_TARGETS) - -# Set of helper functions to add defintions/options/libs for each target in a filtered way -function(add_compile_definitions_filtered target definitions) - foreach(additional_definition IN LISTS ${definitions}) - set(SHOULD_EXCLUDE 0) - # Exclude the compile definition if target defines an exclude list - foreach(exclude IN LISTS "${target}_exclude_compile_definitions") - if (${additional_definition} STREQUAL ${exclude}) - set(SHOULD_EXCLUDE 1) - break() - endif() - endforeach() - if (NOT ${SHOULD_EXCLUDE}) - target_compile_definitions(${target} PRIVATE ${additional_definition}) - endif() - endforeach() -endfunction() - - -function(add_compile_options_filtered target options) - foreach(additional_option IN LISTS ${options}) - set(SHOULD_EXCLUDE 0) - # Exclude the compile options if target defines an exclude list - foreach(exclude IN LISTS "${target}_exclude_compile_options") - if (${additional_option} STREQUAL ${exclude}) - set(SHOULD_EXCLUDE 1) - break() - endif() - endforeach() - if (NOT ${SHOULD_EXCLUDE}) - target_compile_options(${target} PRIVATE "$<$:${additional_option}>") - endif() - endforeach() -endfunction() - -function(add_sources_filtered target sources) - foreach(additional_source IN LISTS ${sources}) - set(SHOULD_EXCLUDE 0) - # Exclude the source if target defines an exclude list - foreach(exclude IN LISTS "${target}_exclude_source") - if (${additional_source} STREQUAL ${exclude}) - set(SHOULD_EXCLUDE 1) - break() - endif() - endforeach() - if (NOT ${SHOULD_EXCLUDE}) - target_sources(${target} PRIVATE ${additional_source}) - endif() - endforeach() -endfunction() - -function(add_libraries_filtered target libraries) - foreach(additional_lib IN LISTS ${libraries}) - set(SHOULD_EXCLUDE 0) - # Exclude the lib if target defines an exclude list - foreach(exclude IN LISTS "${target}_exclude_lib") - if (${additional_lib} STREQUAL ${exclude}) - set(SHOULD_EXCLUDE 1) - break() - endif() - endforeach() - if (NOT ${SHOULD_EXCLUDE}) - get_target_property(libraries ${target} LINK_LIBRARIES) - # Don't bother adding it if the target already links it manually - foreach(lib IN LISTS libraries) - if (${additional_lib} STREQUAL ${lib}) - set(SHOULD_EXCLUDE 1) - break() - endif() - endforeach() - endif() - if (NOT ${SHOULD_EXCLUDE}) - target_link_libraries(${target} PRIVATE ${additional_lib}) - endif() - endforeach() -endfunction() - -# Iterates over all the targets and add necessary definitions/options/libs -# This is an incredible hack, but it allows for targets to specify exclude lists -# This allows us to emulate -$File and such from VPC -foreach(target ${ALL_TARGETS}) - # Define an empty exclude list if one isn't defined - if (NOT DEFINED "${target}_exclude_compile_options") - set("${target}_exclude_compile_options") - endif() - - # Define an empty exclude list if one isn't defined - if (NOT DEFINED "${target}_exclude_lib") - set("${target}_exclude_lib") - endif() - - # Define an empty exclude list if one isn't defined - if (NOT DEFINED "${target}_exclude_source") - set("${target}_exclude_source") - endif() - - get_target_property(target_type ${target} TYPE) - if (${target_type} STREQUAL "EXECUTABLE") - add_compile_options_filtered(${target} ADDITIONAL_COMPILE_OPTIONS_EXE) - add_libraries_filtered(${target} ADDITIONAL_LINK_LIBRARIES_EXE) - add_sources_filtered(${target} ADDITIONAL_SOURCES_EXE) - target_link_options(${target} PRIVATE ${ADDITIONAL_LINK_OPTIONS_EXE}) - target_compile_definitions(${target} PRIVATE MEMOVERRIDE_MODULE=$) - add_compile_definitions_filtered(${target} ADDITIONAL_COMPILE_DEFINITIONS_EXE) - - # Only applies to Linux and OSX - target_strip_symbols(${target}) - elseif((${target_type} STREQUAL "SHARED_LIBRARY") OR (${target_type} STREQUAL "MODULE_LIBRARY")) - add_compile_options_filtered(${target} ADDITIONAL_COMPILE_OPTIONS_DLL) - add_libraries_filtered(${target} ADDITIONAL_LINK_LIBRARIES_DLL) - add_sources_filtered(${target} ADDITIONAL_SOURCES_DLL) - target_link_options(${target} PRIVATE ${ADDITIONAL_LINK_OPTIONS_DLL}) - target_compile_definitions(${target} PRIVATE MEMOVERRIDE_MODULE=$ DLLNAME=$) - add_compile_definitions_filtered(${target} ADDITIONAL_COMPILE_DEFINITIONS_DLL) - - # Only applies to Linux and OSX - target_strip_symbols(${target}) - elseif(${target_type} STREQUAL "STATIC_LIBRARY") - add_compile_options_filtered(${target} ADDITIONAL_COMPILE_OPTIONS_LIB) - add_sources_filtered(${target} ADDITIONAL_SOURCES_LIB) - target_link_options(${target} PRIVATE ${ADDITIONAL_LINK_OPTIONS_LIB}) - target_compile_definitions(${target} PRIVATE LIBNAME=$) - add_compile_definitions_filtered(${target} ADDITIONAL_COMPILE_DEFINITIONS_LIB) - endif() - -endforeach() diff --git a/LICENSE b/LICENSE index 5c304d1..f50e2c4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,21 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +MIT License + +Copyright (c) 2024 Secton + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/SourceDEFUN.sln b/SourceDEFUN.sln index fbd4dcc..6f19e24 100644 --- a/SourceDEFUN.sln +++ b/SourceDEFUN.sln @@ -1,5 +1,5 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 +Microsoft Visual Studio Solution File, Format Version 14.00 # Visual Studio 2022 # WARNING TO WINDOWS USERS: This file might not be up to date since my [Sectonidse] primary OS is Linux. Just in case you know. Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "game\client\swarm_skeleton_client.vcxproj", "{A26C0361-6B09-9E3D-5194-C9CB89243710}" diff --git a/configs/activities.json b/configs/activities.json new file mode 100644 index 0000000..b653f57 --- /dev/null +++ b/configs/activities.json @@ -0,0 +1,37 @@ +{ +"1": [ + "This is Activities file! It has all the activities for NPC/Playermodels! ", + "But how to work with it you say? Here's how: ", + " 1. Every named key dictionary is a prefix for some activity. ", + " 1.1. Do you see dictionary ACT with array RUN and value AIM? ", + " 1.2. Well if we combine the path, we get: 'ACT_RUN_AIM!' ", + " 1.3. Then this 'ACT_RUN_AIM' gets registered by ai_activity.cpp [we'll call it reader] ", + " 2. Why is there a 0 in keys? ", + " 2.1. It's there for a reason. It tells the reader to not expect any more dictionaties. ", + " 2.2. So if i pick FLY from ACT, it'll be ACT_FLY! ", + " 3. Why is there a space sometimes in keys? ", + " 3.1. It tells the compiler to not add underscore (_) to activity name. ", + " 3.2. Example: ACT > DIE > BACKWARD = ACT_DIEBACKWARD ", + " 4. Why is there a 0 in first value of array? ", + " 4.1. It tells the reader to use the current path as an activity. ", + " 4.2. Example: ACT > WALK > 0 = ACT_WALK ", + " 5. What does number 1 mean? ", + " 5.1. It means 'stop reading. altogether'. ", + " 5.2. So if there array with key '1', then the reader will just ignore it. ", + " 5.3. That means you can make pseudo-comments here, like the one you're reading right now! ", + " 5.4. Example: ACT > 1 = [skip to next key/parent dictionary] ", + "-----------------------------------------------------------------------------------------------", + "Okay smart guy, well why won't you design a simpler system? ", + " A: I mean don't you like it? Would you like typing a lot of ACT_WEAPON_*_*? I would not. " +], +"ACT": { + "0": ["INVALID", "RESET", "IDLE", "TRANSITION", "SCRIPT_CUSTOM_MOVE", "FLY", "HOVER", "GLIDE", "SWIM", "JUMP", "HOP", "LEAP", "LAND", "SHIPLADDER_UP", "SHIPLADDER_DOWN", "STRAFE_LEFT", "STRAFE_RIGHT", "ROLL_LEFT", "ROLL_RIGHT", "TURN_LEFT", "TURN_RIGHT", "CROUCH", "CROUCHIDLE", "STAND", "USE", "ALIEN_BURROW_IDLE", "ALIEN_BURROW_OUT"], + "RUN": [0, "AIM", "CROUCH", "CROUCH_AIM", "PROTECTED"], + "WALK": [0, "AIM", "CROUCH", "CROUCH_AIM"], + "COVER": [0, "MED", "LOW"], + "RANGE": ["ATTACK1", "ATTACK2", "ATTACK1_LOW", "ATTACK2_LOW"], + "DIE ": ["SIMPLE", "BACKWARD", "FORWARD", "VIOLENT", "RAGDOLL"], + "CLIMB": ["UP", "DOWN", "DISMOUNT"] +}, +"1": "Needs finishing!" +} diff --git a/materialsystem/swarmshaders/buildshaders.bat b/materialsystem/swarmshaders/buildshaders.bat index f50fae1..be6680b 100644 --- a/materialsystem/swarmshaders/buildshaders.bat +++ b/materialsystem/swarmshaders/buildshaders.bat @@ -125,7 +125,7 @@ if exist vcslist.txt del /f /q vcslist.txt REM **************** REM Generate a makefile for the shader project REM **************** -perl %SrcDirBase%/devtools/bin/updateshaders.pl" -source . +perl %SrcDirBase%/devtools/bin/updateshaders.pl -source . REM **************** From cd5eb848a7e9ddd0741e74b3c6490b9f1e50da60 Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:07:45 +0300 Subject: [PATCH 12/23] DX10 support- i mean DX9Ex --- dx10sdk/utilities/dx9_30/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 dx10sdk/utilities/dx9_30/readme.md diff --git a/dx10sdk/utilities/dx9_30/readme.md b/dx10sdk/utilities/dx9_30/readme.md new file mode 100644 index 0000000..b13ec21 --- /dev/null +++ b/dx10sdk/utilities/dx9_30/readme.md @@ -0,0 +1,8 @@ +# DX10SDK for SourceDEFUN +Probably useless, but it's still better to have at least some kind of upgrade. + +I'm not sure if that'll work but it's worth trying. + +This file exists because you can't just create folders in GitHub: you must create a new file to do that. It works by writing the folder name and typing "/" before the file name. + +It was taken from Alien Swarm: Reactive Drop, but it wasn't changed because it's literally a dll From 52f48f9a6b9eafbe292b6debf929cd64c13d27fe Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:10:24 +0300 Subject: [PATCH 13/23] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 465691b..0be48fc 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Quake >>> GoldSRC >>> Source >> Alien Swarm > Deferred > SourceDEFUN - [x] Deferred lighting (from Alien Swarm Deferred) - [x] PBR (Physically based Rendering) - [ ] Linux Support + - [ ] DXVK Support (man i wish it was possible to support Vulkan instead of DXVK) - [ ] First Person Camera, ported to Alien Swarm branch - [ ] Ambient Occlusion - [ ] SourceDEFUN Mod Installer (does moving mod to sourcemods for you and more stuff) From f984a5f62a6fa8a60f31be8207221398ab278003 Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:15:50 +0300 Subject: [PATCH 14/23] Temp solution --- materialsystem/swarmshaders/buildshaders.bat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/materialsystem/swarmshaders/buildshaders.bat b/materialsystem/swarmshaders/buildshaders.bat index be6680b..10a09c0 100644 --- a/materialsystem/swarmshaders/buildshaders.bat +++ b/materialsystem/swarmshaders/buildshaders.bat @@ -3,7 +3,7 @@ set TTEXE=time /t echo. -rem echo ==================== buildshaders %* ================== +echo -----<| buildshaders |>----- %TTEXE% -cur-Q set tt_start=%ERRORLEVEL% set tt_chkpt=%tt_start% @@ -24,7 +24,9 @@ set SHADERINCPATH=vshtmp9/... fxctmp9/... include/... if "%1" == "" goto usage +if "%2" == "" goto usage set inputbase=%1 +set makefilebase=%2 set DIRECTX_SDK_VER=pc09.00 set DIRECTX_SDK_BIN_DIR=dx9sdk\utilities @@ -69,9 +71,7 @@ set ChangeToDir=%SDKBINDIR% if /i "%4" NEQ "-source" goto NoSourceDirSpecified -goto SKIPBULLSHITCHANGE set SrcDirBase=%~5 -:SKIPBULLSHITCHANGE REM ** use the -game parameter to tell us where to put the files set targetdir=%~3\shaders @@ -131,10 +131,10 @@ perl %SrcDirBase%/devtools/bin/updateshaders.pl -source . REM **************** REM Run the makefile, generating minimal work/build list for fxc files, go ahead and compile vsh and psh files. REM **************** -rem cmake -G "NMake Makefiles" /S /C /F makefile.%inputbase% clean > clean.txt 2>&1 +rem cmake -G "NMake Makefiles" /S /C /F ./makefile.%makefilebase% echo Building inc files, asm vcs files, and VMPI worklist for %inputbase%... REM https://cmake.org/cmake/help/v3.30/generator/NMake%20Makefiles.html very helpful of you cmake -cmake -G "NMake Makefiles" /S makefile.%inputbase% +cmake -G "NMake Makefiles" /S makefile.%makefilebase% REM **************** REM Copy the inc files to their target From d8cde96aa1e2aebb34764f6046bbb8ce5a9fb6c7 Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:16:25 +0300 Subject: [PATCH 15/23] Update compile.yml --- .github/workflows/compile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 17bac03..cd65067 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -45,7 +45,7 @@ jobs: working-directory: ${{env.GITHUB_WORKSPACE}} run: | cd ./materialsystem/swarmshaders/ - ./buildshaders.bat game_shader_generic_swarm + ./buildshaders.bat game_shader_generic_swarm deferred_shaders - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} From b5e1302d929c720135ae283ed85d23fc316da2e0 Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:19:00 +0300 Subject: [PATCH 16/23] what literally what --- .github/workflows/compile.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index cd65067..dc09f9c 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -43,9 +43,7 @@ jobs: - name: Compile Shaders working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - cd ./materialsystem/swarmshaders/ - ./buildshaders.bat game_shader_generic_swarm deferred_shaders + run: ./materialsystem/swarmshaders/buildshaders.bat game_shader_generic_swarm deferred_shaders - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} From 5e84192259bcb33a0e508ee72914538b5ebf56c0 Mon Sep 17 00:00:00 2001 From: Sectonidse <94748461+Sectonidse@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:22:53 +0300 Subject: [PATCH 17/23] wdym |????? --- materialsystem/swarmshaders/buildshaders.bat | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/materialsystem/swarmshaders/buildshaders.bat b/materialsystem/swarmshaders/buildshaders.bat index 10a09c0..92f15cc 100644 --- a/materialsystem/swarmshaders/buildshaders.bat +++ b/materialsystem/swarmshaders/buildshaders.bat @@ -24,9 +24,7 @@ set SHADERINCPATH=vshtmp9/... fxctmp9/... include/... if "%1" == "" goto usage -if "%2" == "" goto usage set inputbase=%1 -set makefilebase=%2 set DIRECTX_SDK_VER=pc09.00 set DIRECTX_SDK_BIN_DIR=dx9sdk\utilities @@ -131,10 +129,10 @@ perl %SrcDirBase%/devtools/bin/updateshaders.pl -source . REM **************** REM Run the makefile, generating minimal work/build list for fxc files, go ahead and compile vsh and psh files. REM **************** -rem cmake -G "NMake Makefiles" /S /C /F ./makefile.%makefilebase% +rem cmake -G "NMake Makefiles" /S /C /F ./makefile.%inputbase% echo Building inc files, asm vcs files, and VMPI worklist for %inputbase%... REM https://cmake.org/cmake/help/v3.30/generator/NMake%20Makefiles.html very helpful of you cmake -cmake -G "NMake Makefiles" /S makefile.%makefilebase% +cmake -G "NMake Makefiles" /S ./makefile.%inputbase% REM **************** REM Copy the inc files to their target From 91a0a6e409b5f4ccddf13b4f96b743b41bd08d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Tue, 16 Jul 2024 18:26:53 +0200 Subject: [PATCH 18/23] add a prototype --- .gitignore | 3 + CMakeLists.txt | 17 +++++ materialsystem/shaderlib/CMakeLists.txt | 84 +++++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 materialsystem/shaderlib/CMakeLists.txt diff --git a/.gitignore b/.gitignore index 23c8d77..0c5ffbe 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ materialsystem/swarmshaders/Release_dx9/ ipch/ materialsystem/shaderlib/Debug/ materialsystem/shaderlib/Release/ +/build +/materialsystem/shaderlib/.vs +*.user diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2324718 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.10) + +# Project Name and Version (Optional) +project(MyGameProject VERSION 1.0.0) + +# Find dependencies (if any) +# For example: find_package(OpenGL REQUIRED) + +# Add subdirectories as projects +#add_subdirectory(client) +#add_subdirectory(server) +#add_subdirectory(game_shader_generic_deferred) +add_subdirectory(materialsystem/shaderlib) # Assuming shaderlib is located here + +# Optional: Add targets to build all subdirectories at once +# This is just an example, you might need to adjust it based on your project structure +add_custom_target(build_all ALL COMMAND make VERBOSE_MAKEFILE=1) diff --git a/materialsystem/shaderlib/CMakeLists.txt b/materialsystem/shaderlib/CMakeLists.txt new file mode 100644 index 0000000..015a57b --- /dev/null +++ b/materialsystem/shaderlib/CMakeLists.txt @@ -0,0 +1,84 @@ +# Set the project name +project(shaderlib) + +# Location of source files relative to this CMakeLists.txt +set(SOURCE_FILES + BaseShader.cpp + ShaderDLL.cpp + shaderlib_cvar.cpp +) + +# Location of header files relative to this CMakeLists.txt +set(HEADER_FILES + ../../public/shaderlib/BaseShader.h + ../../public/tier0/basetypes.h + ../../public/tier0/commonmacros.h + ../../public/shaderlib/cshader.h + ../../public/tier0/dbg.h + ../../public/tier0/fasttimer.h + ../../public/appframework/IAppSystem.h + ../../public/tier0/icommandline.h + ../../public/icvar.h + ../../public/materialsystem/imaterial.h + ../../public/materialsystem/imaterialsystem.h + ../../public/materialsystem/imaterialsystemhardwareconfig.h + ../../public/materialsystem/imaterialvar.h + ../../public/materialsystem/imesh.h + ../../public/materialsystem/IShader.h + ../../public/materialsystem/ishaderapi.h + ../IShaderSystem.h + ../../public/materialsystem/itexture.h + ../../public/materialsystem/materialsystem_config.h + ../../public/mathlib/mathlib.h + ../../public/tier0/memdbgoff.h + ../../public/tier0/memdbgon.h + ../../public/tier0/platform.h + ../../public/tier0/protected_things.h + ../../public/shaderlib/ShaderDLL.h + shaderDLL_Global.h + shaderlib_cvar.h + ../../public/string_t.h + ../../public/tier1/strtools.h + ../../public/tier1/utlmemory.h + ../../public/tier1/utlvector.h + ../../public/mathlib/vector.h + ../../public/mathlib/vector2d.h + ../../public/mathlib/vector4d.h + ../../public/mathlib/vmatrix.h + ../../public/mathlib/vplane.h + ../../public/vstdlib/vstdlib.h +) + +include_directories( + ../../common + ../../public + ../../public/tier0 + ../../public/tier1 + ../../public/mathlib + ../../public/shaderlib + ../../public/materialsystem + ../../public/appframework + ../../materialsystem +) + +# Add compiler flags based on configuration (Debug/Release) +if(CMAKE_BUILD_TYPE MATCHES "Debug") + # Debug flags (e.g. disable optimizations) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Od") +else() + # Release flags (e.g. enable optimizations) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2") +endif() + +# Add source and header files +add_library(shaderlib STATIC ${SOURCE_FILES} ${HEADER_FILES}) + +# Target compiler and platform (assuming Visual Studio) +target_compile_features(shaderlib PRIVATE) + +# Add preprocessor definitions +set(PREPROCESSOR_DEFINITIONS WIN32;_WIN32;_DEBUG;DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;VPCGAME=swarm;VPCGAMECAPS=SWARM;_DLL_EXT=.dll;COMPILER_MSVC32;COMPILER_MSVC;LIBNAME=shaderlib;FAST_MATERIALVAR_ACCESS) +add_compile_definitions(${PREPROCESSOR_DEFINITIONS}) + +# Optional: Set output directory for the library +set_target_properties(shaderlib PROPERTIES OUTPUT_DIRECTORY ../../lib/public) From 8a366e7f4a8ecc60be5ea8c7da19fa2a48265d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Tue, 16 Jul 2024 20:51:05 +0200 Subject: [PATCH 19/23] it works? --- CMakeLists.txt | 2 +- create_solution.cmd | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 create_solution.cmd diff --git a/CMakeLists.txt b/CMakeLists.txt index 2324718..c288797 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,4 +14,4 @@ add_subdirectory(materialsystem/shaderlib) # Assuming shaderlib is located here # Optional: Add targets to build all subdirectories at once # This is just an example, you might need to adjust it based on your project structure -add_custom_target(build_all ALL COMMAND make VERBOSE_MAKEFILE=1) +#add_custom_target(build_all ALL COMMAND make VERBOSE_MAKEFILE=1) diff --git a/create_solution.cmd b/create_solution.cmd new file mode 100644 index 0000000..4a0f73f --- /dev/null +++ b/create_solution.cmd @@ -0,0 +1 @@ +cmake -B build -A Win32 From 165db2b32a6fa8044f7c40ac01fd9eb7b77a7dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Tue, 16 Jul 2024 21:43:50 +0200 Subject: [PATCH 20/23] basicly add game_shader_generic_deferred --- .gitignore | 2 + CMakeLists.txt | 15 +-- create_solution.cmd | 1 + materialsystem/swarmshaders/CMakeLists.txt | 105 ++++++++++++++++++ materialsystem/swarmshaders/commandbuilder.h | 2 +- .../game_shader_generic_swarm.sln | 4 +- 6 files changed, 115 insertions(+), 14 deletions(-) create mode 100644 materialsystem/swarmshaders/CMakeLists.txt diff --git a/.gitignore b/.gitignore index 0c5ffbe..0214c75 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ materialsystem/shaderlib/Release/ /build /materialsystem/shaderlib/.vs *.user +/materialsystem/swarmshaders/.vs +*.filters diff --git a/CMakeLists.txt b/CMakeLists.txt index c288797..300e018 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,10 @@ cmake_minimum_required(VERSION 3.10) -# Project Name and Version (Optional) -project(MyGameProject VERSION 1.0.0) - -# Find dependencies (if any) -# For example: find_package(OpenGL REQUIRED) +# Project Name and Version +project(SourceDEFUN VERSION 1.0.0) # Add subdirectories as projects #add_subdirectory(client) #add_subdirectory(server) -#add_subdirectory(game_shader_generic_deferred) -add_subdirectory(materialsystem/shaderlib) # Assuming shaderlib is located here - -# Optional: Add targets to build all subdirectories at once -# This is just an example, you might need to adjust it based on your project structure -#add_custom_target(build_all ALL COMMAND make VERBOSE_MAKEFILE=1) +add_subdirectory(materialsystem/swarmshaders) +add_subdirectory(materialsystem/shaderlib) diff --git a/create_solution.cmd b/create_solution.cmd index 4a0f73f..405ba7b 100644 --- a/create_solution.cmd +++ b/create_solution.cmd @@ -1 +1,2 @@ cmake -B build -A Win32 +pause \ No newline at end of file diff --git a/materialsystem/swarmshaders/CMakeLists.txt b/materialsystem/swarmshaders/CMakeLists.txt new file mode 100644 index 0000000..b88ac98 --- /dev/null +++ b/materialsystem/swarmshaders/CMakeLists.txt @@ -0,0 +1,105 @@ +project(game_shader_generic_deferred) + +# source files +set(SOURCE_FILES + BaseVSShader.cpp + blur.cpp + debug_lightingctrl.cpp + debug_radiosity_grid.cpp + debug_shadow.cpp + deferred_brush.cpp + deferred_decalModulate.cpp + deferred_model.cpp + deferred_utility.cpp + defpass_composite.cpp + defpass_gbuffer.cpp + defpass_shadow.cpp + IDeferredExt.cpp + lighting_global.cpp + lighting_pass_basic.cpp + lighting_pass_volum.cpp + lighting_world.cpp + lighting_volume.cpp + pbr_dx9.cpp + radiosity_blend.cpp + radiosity_global.cpp + radiosity_propagate.cpp + screenspace_combine.cpp + screenspace_shading.cpp + volume_blend.cpp + volume_prepass.cpp +) + +# header files +set(HEADER_FILES + BaseVSShader.h + commandbuilder.h + common_deferred_fxc.h + common_fxc.h + common_hlsl_cpp_consts.h + common_lighting_fxc.h + common_pragmas.h + common_ps_fxc.h + common_shadowmapping_fxc.h + common_vertexlitgeneric_dx9.h + common_vs_fxc.h + cpp_shader_constant_register_map.h + deferred_context.h + deferred_global_common.h + deferred_includes.h + deferred_utility.h + defpass_composite.h + defpass_gbuffer.h + defpass_shadow.h + IDeferredExt.h + lighting_helper.h + lighting_pass_basic.h + lighting_pass_volum.h + pbr_common_ps2_3_x.h +) + +# header directories +include_directories( + ../../common + ../../public + ../../public/tier0 + ../../public/tier1 + ../../dx9sdk/include + fxctmp9 + include + vshtmp9 +) + +# link directories +link_directories( + ../../lib/common + ../../lib/public +) + +# link libraries +link_libraries( + version.lib + winmm.lib + ../../dx9sdk/lib/d3dx9 + ../../public/interfaces + ../../public/mathlib + ../../public/matsys_controls + ../../public/shaderlib + ../../public/tier0 + ../../public/tier1 + ../../public/tier2 + ../../public/tier3 + ../../public/vstdlib +) + +add_library(game_shader_generic_deferred SHARED ${SOURCE_FILES} ${HEADER_FILES}) + +# Target compiler and platform (assuming Visual Studio) +target_compile_features(game_shader_generic_deferred PRIVATE) + +# Add preprocessor definitions +set(PREPROCESSOR_DEFINITIONS WIN32;_WIN32;_DEBUG;DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;STDSHADER_DX9_DLL_EXPORT;FAST_MATERIALVAR_ACCESS;COMPILER_MSVC;COMPILER_MSVC32) +add_compile_definitions(${PREPROCESSOR_DEFINITIONS}) + +# Optional: Set output directory for the library +set_target_properties(game_shader_generic_deferred PROPERTIES OUTPUT_DIRECTORY Release_dx9/game_shader_generic_deferred.dll) diff --git a/materialsystem/swarmshaders/commandbuilder.h b/materialsystem/swarmshaders/commandbuilder.h index a9cf7ca..f8a491d 100644 --- a/materialsystem/swarmshaders/commandbuilder.h +++ b/materialsystem/swarmshaders/commandbuilder.h @@ -42,7 +42,7 @@ template class CFixedCommandStorageBuffer FORCEINLINE void EnsureCapacity( size_t sz ) { - Assert( m_nNumBytesRemaining >= sz ); + //Assert( m_nNumBytesRemaining >= sz ); } template FORCEINLINE void Put( T const &nValue ) diff --git a/materialsystem/swarmshaders/game_shader_generic_swarm.sln b/materialsystem/swarmshaders/game_shader_generic_swarm.sln index c25e258..08727e9 100644 --- a/materialsystem/swarmshaders/game_shader_generic_swarm.sln +++ b/materialsystem/swarmshaders/game_shader_generic_swarm.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 14.00 +# Visual Studio 2022 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game_shader_generic_swarm", "game_shader_generic_swarm.vcxproj", "{C8D2DC83-E117-7576-7B43-10C844264C51}" EndProject Global From 43b5bad9972bb09847a6b0eb3eba1b0819bdbc7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Thu, 18 Jul 2024 12:08:48 +0200 Subject: [PATCH 21/23] heck yea --- CMakeLists.txt | 4 +- create_solution.cmd | 4 +- game/client/CMakeLists.txt | 1434 ++++++++++++++++++++ game/server/CMakeLists.txt | 1120 +++++++++++++++ materialsystem/swarmshaders/CMakeLists.txt | 60 +- 5 files changed, 2589 insertions(+), 33 deletions(-) create mode 100644 game/client/CMakeLists.txt create mode 100644 game/server/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 300e018..aedea5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.10) project(SourceDEFUN VERSION 1.0.0) # Add subdirectories as projects -#add_subdirectory(client) -#add_subdirectory(server) +add_subdirectory(game/client) +add_subdirectory(game/server) add_subdirectory(materialsystem/swarmshaders) add_subdirectory(materialsystem/shaderlib) diff --git a/create_solution.cmd b/create_solution.cmd index 405ba7b..4448864 100644 --- a/create_solution.cmd +++ b/create_solution.cmd @@ -1,2 +1,4 @@ +:hello cmake -B build -A Win32 -pause \ No newline at end of file +pause +goto hello \ No newline at end of file diff --git a/game/client/CMakeLists.txt b/game/client/CMakeLists.txt new file mode 100644 index 0000000..ae1f648 --- /dev/null +++ b/game/client/CMakeLists.txt @@ -0,0 +1,1434 @@ +project(swarm_skeleton_client) + +# source files +set(SOURCE_FILES + ../../common/language.cpp + ../shared/deferred/CDefLight.cpp + ../shared/deferred/CDefLightContainer.cpp + ../shared/deferred/CDefLightGlobal.cpp + ../shared/deferred/deferred_shared_common.cpp + ../shared/predicted_viewmodel.cpp + ../shared/sdk/sdk_fx_shared.cpp + ../shared/sdk/sdk_gamemovement.cpp + ../shared/sdk/sdk_gamerules.cpp + ../shared/sdk/sdk_playeranimstate.cpp + ../shared/sdk/sdk_player_shared.cpp + ../shared/sdk/sdk_usermessages.cpp + ../shared/sdk/sdk_weapon_parse.cpp + ../shared/sdk/weapon_mp5.cpp + ../shared/sdk/weapon_pistol.cpp + ../shared/sdk/weapon_sdkbase.cpp + achievement_notification_panel.cpp + ../shared/achievement_saverestore.cpp + ../shared/achievementmgr.cpp + ../shared/activitylist.cpp + ../shared/ai_criteria.cpp + ../shared/ai_responsesystem.cpp + ../shared/ai_speechconcept.cpp + ../shared/ammodef.cpp + animatedentitytextureproxy.cpp + animatedoffsettextureproxy.cpp + animatedtextureproxy.cpp + AnimateSpecificTextureProxy.cpp + ../shared/animation.cpp + ../shared/base_playeranimstate.cpp + ../shared/baseachievement.cpp + baseanimatedtextureproxy.cpp + baseclientrendertargets.cpp + ../shared/basecombatcharacter_shared.cpp + ../shared/basecombatweapon_shared.cpp + ../shared/baseentity_shared.cpp + ../shared/basegrenade_shared.cpp + ../shared/baseparticleentity.cpp + ../shared/baseplayer_shared.cpp + ../shared/baseviewmodel_shared.cpp + ../shared/beam_shared.cpp + beamdraw.cpp + ../../common/blackbox_helper.cpp + ../../public/bone_accessor.cpp + bone_merge_cache.cpp + c_ai_basehumanoid.cpp + c_ai_basenpc.cpp + c_baseanimating.cpp + c_baseanimatingoverlay.cpp + c_basecombatcharacter.cpp + c_basecombatweapon.cpp + c_basedoor.cpp + c_baseentity.cpp + c_baseflex.cpp + c_baselesson.cpp + c_baseplayer.cpp + c_basetoggle.cpp + c_baseviewmodel.cpp + c_beamspotlight.cpp + c_breakableprop.cpp + c_colorcorrection.cpp + c_colorcorrectionvolume.cpp + c_dynamiclight.cpp + c_entitydissolve.cpp + c_entityflame.cpp + c_entityfreezing.cpp + c_entityparticletrail.cpp + c_env_ambient_light.cpp + c_env_dof_controller.cpp + c_env_fog_controller.cpp + c_env_global_light.cpp + c_env_particlescript.cpp + c_env_projectedtexture.cpp + c_env_screenoverlay.cpp + c_env_tonemap_controller.cpp + c_fire_smoke.cpp + c_fish.cpp + c_func_areaportalwindow.cpp + c_func_breakablesurf.cpp + c_func_brush.cpp + c_func_conveyor.cpp + c_func_dust.cpp + c_func_lod.cpp + deferred/cascade_t.cpp + deferred/cdeferred_manager_client.cpp + deferred/clight_editor.cpp + deferred/clight_manager.cpp + deferred/DefCookieProjectable.cpp + deferred/DefCookieTexture.cpp + deferred/deferred_client_common.cpp + deferred/deferred_rt.cpp + deferred/def_light_t.cpp + deferred/flashlighteffect_deferred.cpp + deferred/IDeferredExtClient.cpp + deferred/materialsystem_passthru.cpp + deferred/vgui/projectable_factory.cpp + deferred/vgui/vgui_editor_controls.cpp + deferred/vgui/vgui_editor_props.cpp + deferred/vgui/vgui_editor_root.cpp + deferred/vgui/vgui_marquee.cpp + deferred/vgui/vgui_particles.cpp + deferred/vgui/vgui_projectable.cpp + deferred/viewrender_deferred.cpp + hl2/C_Func_Monitor.cpp + c_func_movelinear.cpp + c_func_occluder.cpp + c_func_reflective_glass.cpp + c_func_rotating.cpp + c_func_smokevolume.cpp + c_func_tracktrain.cpp + c_gameinstructor.cpp + c_gib.cpp + c_hairball.cpp + c_info_overlay_accessor.cpp + c_lightglow.cpp + C_MaterialModifyControl.cpp + c_movie_display.cpp + c_particle_system.cpp + c_physbox.cpp + c_physics_prop_statue.cpp + c_physicsprop.cpp + c_physmagnet.cpp + c_pixel_visibility.cpp + c_plasma.cpp + c_playerresource.cpp + c_point_camera.cpp + c_point_commentary_node.cpp + c_postprocesscontroller.cpp + c_prop_hallucination.cpp + c_props.cpp + c_ragdoll_manager.cpp + c_rope.cpp + c_rumble.cpp + c_sceneentity.cpp + c_shadowcontrol.cpp + c_slideshow_display.cpp + c_soundscape.cpp + c_spatialentity.cpp + c_spotlight_end.cpp + c_sprite.cpp + c_sprite_perfmonitor.cpp + c_sun.cpp + c_sunlightshadowcontrol.cpp + c_surfacerender.cpp + c_team.cpp + c_tesla.cpp + c_test_proxytoggle.cpp + c_triggers.cpp + c_user_message_register.cpp + c_vehicle_choreo_generic.cpp + c_vehicle_jeep.cpp + c_vguiscreen.cpp + hl2/c_waterbullet.cpp + C_WaterLODControl.cpp + c_world.cpp + camomaterialproxy.cpp + cdll_bounded_cvars.cpp + cdll_client_int.cpp + cdll_util.cpp + cl_mat_stub.cpp + classmap.cpp + ../../public/client_class.cpp + + + - client_factorylist.cpp client_thinklist.cpp clientalphaproperty.cpp @@ -890,7 +885,7 @@ set(HEADER_FILES functionproxy.h fx.h fx_blood.h - cstrike/fx_cs_blood.h + #cstrike/fx_cs_blood.h fx_discreetline.h fx_envelope.h fx_explosion.h @@ -922,7 +917,7 @@ set(HEADER_FILES hud_macros.h hud_numericdisplay.h hud_pdump.h - cstrike/hud_radar.h + #cstrike/hud_radar.h hud_vehicle.h hudelement.h hudtexturehandle.h @@ -1244,7 +1239,7 @@ set(HEADER_FILES ../shared/animation.h ../shared/apparent_velocity_helper.h ../shared/base_playeranimstate.h - ../shared/cstrike/basecsgrenade_projectile.h + #../shared/cstrike/basecsgrenade_projectile.h ../shared/baseentity_shared.h ../shared/basegrenade_shared.h ../shared/hl2/basehlcombatweapon_shared.h @@ -1272,7 +1267,7 @@ set(HEADER_FILES ../shared/eventlist.h ../shared/func_dust_shared.h ../shared/func_ladder.h - ../shared/cstrike/fx_cs_shared.h + #../shared/cstrike/fx_cs_shared.h ../shared/gameeventdefs.h ../shared/gamemovement.h ../shared/gamerules.h @@ -1351,9 +1346,9 @@ set(HEADER_FILES ../shared/voice_gamemgr.h ../shared/voice_status.h ../shared/vphysics_sound.h - ../shared/cstrike/weapon_flashbang.h - ../shared/cstrike/weapon_hegrenade.h - ../shared/weapon_ifmsteadycam.h + #../shared/cstrike/weapon_flashbang.h + #../shared/cstrike/weapon_hegrenade.h + #../shared/weapon_ifmsteadycam.h ../shared/weapon_parse.h ../shared/weapon_proficiency.h game_controls/baseviewport.h @@ -1397,38 +1392,38 @@ link_directories( # link libraries link_libraries( winmm.lib - ..\..\lib\public\bitmap.lib - ..\..\lib\public\bonesetup.lib - ..\..\lib\public\choreoobjects.lib - ..\..\lib\public\dmxloader.lib - ..\..\lib\public\interfaces.lib - ..\..\lib\common\jpeglib.lib - ..\..\lib\public\mathlib.lib - ..\..\lib\public\matsys_controls.lib - ..\..\lib\public\npsclient.lib - ..\..\lib\public\particles.lib - ..\..\lib\public\raytrace.lib - ..\..\lib\public\responserules_runtime.lib - ..\..\lib\public\steam_api.lib - ..\..\lib\public\tier0.lib - ..\..\lib\public\tier1.lib - ..\..\lib\public\tier2.lib - ..\..\lib\public\tier3.lib - ..\..\lib\public\vgui_controls.lib - ..\..\lib\public\videocfg.lib - ..\..\lib\public\vpklib.lib - ..\..\lib\public\vstdlib.lib - ..\..\lib\public\vtf.lib + ../../lib/public/bitmap.lib + ../../lib/public/bonesetup.lib + ../../lib/public/choreoobjects.lib + ../../lib/public/dmxloader.lib + ../../lib/public/interfaces.lib + ../../lib/common/jpeglib.lib + ../../lib/public/mathlib.lib + ../../lib/public/matsys_controls.lib + ../../lib/public/npsclient.lib + ../../lib/public/particles.lib + ../../lib/public/raytrace.lib + ../../lib/public/responserules_runtime.lib + ../../lib/public/steam_api.lib + ../../lib/public/tier0.lib + ../../lib/public/tier1.lib + ../../lib/public/tier2.lib + ../../lib/public/tier3.lib + ../../lib/public/vgui_controls.lib + ../../lib/public/videocfg.lib + ../../lib/public/vpklib.lib + ../../lib/public/vstdlib.lib + ../../lib/public/vtf.lib ) add_library(swarm_skeleton_client SHARED ${SOURCE_FILES} ${HEADER_FILES}) # Target compiler and platform (assuming Visual Studio) -target_compile_features(swarm_skeleton_server PRIVATE) +target_compile_features(swarm_skeleton_client PRIVATE) # Add preprocessor definitions set(PREPROCESSOR_DEFINITIONS WIN32;_WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;DLLNAME=client;VPCGAME=swarm;VPCGAMECAPS=SWARM;_DLL_EXT=.dll;COMPILER_MSVC32;COMPILER_MSVC;MEMOVERRIDE_MODULE=client;NO_STRING_T;CLIENT_DLL;VECTOR;VERSION_SAFE_STEAM_API_INTERFACES;PROTECTED_THINGS_ENABLE;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead;ENABLE_HTMLWINDOW;fopen=dont_use_fopen;SDK_CLIENT_DLL;SDK_DLL;SPLIT_SCREEN_STUBS;GAMEUI_EMBEDDED;GAMEUI_EXPORTS;DEFERRED_DEV) add_compile_definitions(${PREPROCESSOR_DEFINITIONS}) # Optional: Set output directory for the library -set_target_properties(swarm_skeleton_server PROPERTIES OUTPUT_DIRECTORY client.dll) +set_target_properties(swarm_skeleton_client PROPERTIES OUTPUT_DIRECTORY client.dll) diff --git a/game/server/CMakeLists.txt b/game/server/CMakeLists.txt index ec28d2a..da428ef 100644 --- a/game/server/CMakeLists.txt +++ b/game/server/CMakeLists.txt @@ -692,7 +692,7 @@ set(HEADER_FILES hierarchy.h ../shared/hintmessage.h ../shared/hintsystem.h - ../../common/hl2orange.spa.h + #../../common/hl2orange.spa.h hltvdirector.h ../shared/ichoreoeventcallback.h ../shared/igamesystem.h @@ -841,7 +841,7 @@ set(HEADER_FILES hl2/npc_attackchopper.h hl2/npc_bullseye.h hl2/rotorwash.h - ../../public/mathlib/amd3dx.h + #../../public/mathlib/amd3dx.h ../shared/ammodef.h ../shared/base_playeranimstate.h base_transmit_proxy.h @@ -929,7 +929,7 @@ set(HEADER_FILES ../../public/vstdlib/IKeyValuesSystem.h ilagcompensationmanager.h ../../public/vgui/ILocalize.h - ../../public/ImageLoader.h + #../../public/ImageLoader.h ../../public/materialsystem/imaterial.h ../../public/materialsystem/imaterialsystem.h ../../public/materialsystem/imaterialvar.h @@ -1045,8 +1045,8 @@ set(HEADER_FILES variant_t.h ../../public/vcollide.h ../../public/vcollide_parse.h - ../../public/tier0/vcr_shared.h - ../../public/tier0/vcrmode.h + #../../public/tier0/vcr_shared.h + #../../public/tier0/vcrmode.h ../../public/mathlib/vector.h ../../public/mathlib/vector2d.h ../../public/mathlib/vector4d.h From 69e8a9ab013a3b10219798cc3475433637a54ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Wilczy=C5=84ski?= Date: Thu, 18 Jul 2024 12:25:49 +0200 Subject: [PATCH 23/23] Update create_solution.cmd --- create_solution.cmd | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/create_solution.cmd b/create_solution.cmd index 4448864..6db4791 100644 --- a/create_solution.cmd +++ b/create_solution.cmd @@ -1,4 +1 @@ -:hello -cmake -B build -A Win32 -pause -goto hello \ No newline at end of file +cmake -B build -A Win32 \ No newline at end of file